From owner-freebsd-current Sun Jun 16 11:29:45 2002 Delivered-To: freebsd-current@freebsd.org Received: from van-laarhoven.org (ap-z-5ab8.adsl.wanadoo.nl [212.129.218.184]) by hub.freebsd.org (Postfix) with SMTP id 3FF5D37B40E for ; Sun, 16 Jun 2002 11:29:38 -0700 (PDT) Received: (qmail 73805 invoked from network); 16 Jun 2002 18:29:36 -0000 Received: from heather.van-laarhoven.org (10.66.0.2) by uitsmijter.van-laarhoven.org with SMTP; 16 Jun 2002 18:29:36 -0000 Date: Sun, 16 Jun 2002 20:29:36 +0200 (CEST) From: Nick Hibma To: FreeBSD CURRENT Mailing List Cc: Nick Hibma Subject: making make load work for /sys/modules/* Message-ID: <20020616201846.G1928-200000@heather.van-laarhoven.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1570425195-1024252176=:1928" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-1570425195-1024252176=:1928 Content-Type: TEXT/PLAIN; charset=US-ASCII At the moment 'make load' does not work in /sys/modules. The attached patch fixes that by using .OBJDIR instead of .CURDIR as the absolute path to find the module at: heidi:toor# make Warning: Object directory not changed from original /usr/src-current/sys/modules/umass ... heidi:toor# make load /sbin/kldload -v /usr/src-current/sys/modules/umass/umass.ko Loaded /usr/src-current/sys/modules/umass/umass.ko, id=5 ... heidi:toor# make obj /usr/obj/usr/src-current/sys/modules/umass created for /usr/src-current/sys/modules/umass heidi:toor# make ... heidi:toor# make load /sbin/kldload -v /usr/src-current/sys/modules/umass/umass.ko kldload: can't load /usr/src-current/sys/modules/umass/umass.ko: No such file or directory *** Error code 1 Stop in /usr/src-current/sys/modules/umass. After changing .CURDIR to .OBJDIR it selects the correct module depending on whether it was created in the MAKEOBJDIR directory or not: heidi:toor# make Warning: Object directory not changed from original /usr/src-current/sys/modules/umass ... heidi:toor# make load /sbin/kldload -v /usr/src-current/sys/modules/umass/umass.ko Loaded /usr/src-current/sys/modules/umass/umass.ko, id=5 ... heidi:toor# make obj /usr/obj/usr/src-current/sys/modules/umass created for /usr/src-current/sys/modules/umass heidi:toor# make ... heidi:toor# make load /sbin/kldload -v /usr/obj/usr/src-current/sys/modules/umass/umass.ko Loaded /usr/obj/usr/src-current/sys/modules/umass/umass.ko, id=5 Any objections to the attached patch? Any reason to wait for a system makefiles guru? Nick -- n_hibma@van-laarhoven.org http://www.van-laarhoven.org/ n_hibma@FreeBSD.org http://www.etla.net/~n_hibma/ --0-1570425195-1024252176=:1928 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="make-load.diff" Content-Transfer-Encoding: BASE64 Content-ID: <20020616202936.L1928@heather.van-laarhoven.org> Content-Description: Content-Disposition: attachment; filename="make-load.diff" SW5kZXg6IGttb2QubWsNCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBm aWxlOiAvaG9tZS9uY3ZzL3NyYy9zeXMvY29uZi9rbW9kLm1rLHYNCnJldHJp ZXZpbmcgcmV2aXNpb24gMS4xMjQNCmRpZmYgLXUgLXIxLjEyNCBrbW9kLm1r DQotLS0ga21vZC5tawkxNCBNYXkgMjAwMiAwNzo0OToxMiAtMDAwMAkxLjEy NA0KKysrIGttb2QubWsJMTYgSnVuIDIwMDIgMTg6MTg6MTcgLTAwMDANCkBA IC0yNzgsNyArMjc4LDcgQEANCiANCiAuaWYgIXRhcmdldChsb2FkKQ0KIGxv YWQ6CSR7UFJPR30NCi0JJHtLTU9ETE9BRH0gLXYgJHsuQ1VSRElSfS8ke0tN T0R9LmtvDQorCSR7S01PRExPQUR9IC12ICR7Lk9CSkRJUn0vJHtLTU9EfS5r bw0KIC5lbmRpZg0KIA0KIC5pZiAhdGFyZ2V0KHVubG9hZCkNCg== --0-1570425195-1024252176=:1928-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message