Page MenuHomeFreeBSD

Fix LOCAL_MODULES and improve the make output.
ClosedPublic

Authored by jhb on Jul 18 2019, 9:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 19 2024, 1:19 PM
Unknown Object (File)
Mar 19 2024, 1:19 PM
Unknown Object (File)
Mar 17 2024, 10:36 PM
Unknown Object (File)
Mar 17 2024, 10:24 PM
Unknown Object (File)
Feb 3 2024, 10:09 AM
Unknown Object (File)
Jan 15 2024, 3:10 AM
Unknown Object (File)
Dec 20 2023, 1:16 AM
Unknown Object (File)
Sep 30 2023, 7:15 PM
Subscribers
None

Details

Summary

The exists() check guarding the invocation of ls was not working
correctly as it was expanding '$L' to determine the path of the
local modules directory. Fix by using {} around the variable
name.

Inline some of the logic from bsd.subdir.mk when invoking local
module builds. This gives output in 'make buildkernel' the same
as if there was a Makefile in /usr/local/sys/modules with
SUBDIR = ${LOCAL_MODULES}.

Test Plan
  • tested with drm-current-kmod patched to install sources

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Sample output from the tail of a NO_KERNELCLEAN=yes build with nothing to do:

===> x86bios (all)
===> xl (all)
===> xz (all)
===> zfs (all)
===> zlib (all)
===> drm-current-kmod (all)
===> drm-current-kmod/linuxkpi (all)
===> drm-current-kmod/ttm (all)
===> drm-current-kmod/drm (all)
===> drm-current-kmod/vmwgfx (all)
===> drm-current-kmod/i915 (all)
===> drm-current-kmod/amd (all)
===> drm-current-kmod/amd/amdgpu (all)
===> drm-current-kmod/amd/amdkfd (all)
===> drm-current-kmod/radeon (all)
--------------------------------------------------------------
>>> Kernel build for GENERIC completed on Thu Jul 18 15:06:31 PDT 2019
--------------------------------------------------------------
imp added inline comments.
sys/conf/kern.post.mk
80 ↗(On Diff #59902)

Just a question: do you know why we do this substitution? I see you followed the same convention as other places, so it's not wrong wrt this commit, but was wondering if you knew the history.

This revision is now accepted and ready to land.Aug 6 2019, 9:12 PM
sys/conf/kern.post.mk
80 ↗(On Diff #59902)

Hmm, clobber => cleandir is from https://svnweb.freebsd.org/base?view=revision&revision=111802. I suspect we can just kill clobber entirely. It has no replacement in the buildkernel/installkernel wrappers. Peter added it way back in r73133. The reinstall => install thing dates back to when modules were added to kernel builds and exists because reinstall isn't a valid target for bsd.kmod.mk. Only kernels need reinstall to avoid renaming the kernel to kernel.old, etc.

This revision was automatically updated to reflect the committed changes.