PKG_SOURCE_DIR is no longer required since commit
1c5d050bc0
Add PKG_SOURCE_NAME so that the kernel source files stored
in sources/linux include the kernel variant in their
file name (amlogic-3.10, raspberrypi, ...).
Currently a lot of files are named linux-GITHASH.tar.gz.
When PKG_SOURCE_NAME is set this will change to eg
linux-raspberrypi-GITHASH.tar.gz, linux-amlogic-3.10-GITHASH.tar.gz
etc and it's easer for humans to detect older versions and clean
up the sources dir.
Signed-off-by: Matthias Reichl <hias@horus.com>
Building the kernel separately, after the modules have been built, has
the side-effect that modpost (called from scripts/link-vmlinux.sh in
the kernel tree) generates a Module.symvers files containing only the
in-kernel symbols:
# modpost vmlinux.o to check for section mismatches
${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o
This causes undefined symbol warnings when building external
modules/drivers and these drivers reference symbols from modules.
eg when building RTL8812AU for RPi2:
WARNING: "cfg80211_put_bss" [.../RTL8812AU-ff2f1dd/8812au.ko] undefined!
...
When building the kernel in the usual way (by just running "make")
this problem does not occur because the default kernel build target
includes "modules", which is built after the kernel. So Modules.symvers
generated from link-kernel.sh will later be replaced by the symvers
from modpost.
The easiest way to fix this is to add "modules" to the kernel image
build target. The actual modules build is a no-op (as they've been built
just before), but modpost will be triggered after the kernel build
and we get a correct Module.symvers file - and external modules/drivers
build without warnings.
Signed-off-by: Matthias Reichl <hias@horus.com>
Since 4.17, make headers_check requires a working compiler to detect
goto-asm support.
Configuring CROSS_COMPILE= with a non-existant gcc compiler (as is the
case when building linux:host in a clean build) will now always fail.
Avoid setting CROSS_COMPILE in Makefile and instead pass on the
command line when required.
Signed-off-by: Matthias Reichl <hias@horus.com>