Bug 124389

Summary: [build] make installkernel fails with KMODDIR iff $(KMODDIR) does not exist
Product: Base System Reporter: ota
Component: kernAssignee: freebsd-bugs mailing list <bugs>
Status: Closed Overcome By Events    
Severity: Affects Only Me    
Priority: Normal    
Version: 7.0-STABLE   
Hardware: Any   
OS: Any   

Description ota 2008-06-08 08:40:04 UTC
"make installkernel" does not create $(KMODDIR).  As a result, all files are installed as $(KMODDIR) but not under $(KMODDIR).  Quick-workaround is "mkdir $(KMODDIR)" before installkernel; but installkernel process is broken.

How-To-Repeat: # ls /boot/dir
ls: /boot/dir: No such file or directory
# make installkernel KMODDIR=/boot/dir


===> zyd (install)
install -o root -g wheel -m 555   if_zyd.ko /boot/dir
install -o root -g wheel -m 555   if_zyd.ko.symbols /boot/dir
kldxref /boot/dir
kldxref: /boot/dir: Not a directory
*** Error code 1

Stop in /usr/src/sys/modules.
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
# ls -l /boot/dir
-r-xr-xr-x  1 root  wheel  89690 Jun  8 03:35 /boot/dir
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:36 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 ota 2019-08-12 09:32:12 UTC
"make installkernel KMODDIR=/boot/dir" still fails in 13-CURRENT but I haven't needed to specify KMODDIR long enough years.

Also, some changes have been done to kernel modules since this PR was submitted like below in /usr/src/UPDATING.

        Kernel modules compiled outside of a kernel build now default to
        installing to /boot/modules instead of /boot/kernel.  Many kernel
        modules built this way (such as those in ports) already overrode
        KMODDIR explicitly to install into /boot/modules.  However,
        manually building and installing a module from /sys/modules will
        now install to /boot/modules instead of /boot/kernel.