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)
Sun, Dec 8, 9:45 AM
Unknown Object (File)
Oct 29 2024, 6:21 PM
Unknown Object (File)
Oct 21 2024, 1:04 PM
Unknown Object (File)
Oct 2 2024, 6:28 PM
Unknown Object (File)
Sep 27 2024, 8:46 AM
Unknown Object (File)
Sep 19 2024, 3:43 AM
Unknown Object (File)
Sep 7 2024, 5:06 AM
Unknown Object (File)
Sep 5 2024, 12:52 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.