Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jun 2002 20:29:36 +0200 (CEST)
From:      Nick Hibma <n_hibma@van-laarhoven.org>
To:        FreeBSD CURRENT Mailing List <current@FreeBSD.ORG>
Cc:        Nick Hibma <n_hibma@van-laarhoven.org>
Subject:   making make load work for /sys/modules/*
Message-ID:  <20020616201846.G1928-200000@heather.van-laarhoven.org>

next in thread | raw e-mail | index | archive | help
  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020616201846.G1928-200000>