mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

This makes the external module compilation a bit more robust for cases where external module recipes may be passing extra params to make via EXTRA_OEMAKE, and more than often one needs to pass M=$(PWD) when building external modules and if we use EXTRA_OEMAKE that would mean that it would appear in do_make_scripts as well and since we are only changing the reference kernel src tree here it will not run the make scripts in desired directory. It is also well explained in top makefile in kernel tree around line# 1335 in 3.4 |else # KBUILD_EXTMOD | |### |# External module support. |# When building external modules the kernel used as basis is considered |# read-only, and no consistency checks are made and the make |# system is not used on the basis kernel. If updates are required |# in the basis kernel ordinary make commands (without M=...) must |# be used. Therefore passing M=... will not do the updates in the basis kernel as expected with 'make scripts' so we have to bypass EXTRA_OEMAKE [Yocto #3787] (From OE-Core rev: 0e0a5ee405bab478f35690e95219a1e5f2ac7aa6) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
24 lines
699 B
Plaintext
24 lines
699 B
Plaintext
inherit module_strip
|
|
|
|
inherit kernel-arch
|
|
|
|
export OS = "${TARGET_OS}"
|
|
export CROSS_COMPILE = "${TARGET_PREFIX}"
|
|
|
|
export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
|
|
KERNEL_OBJECT_SUFFIX = ".ko"
|
|
|
|
# kernel modules are generally machine specific
|
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
|
|
#
|
|
# Ensure the hostprogs are available for module compilation. Modules that
|
|
# inherit this recipe and override do_compile() should be sure to call
|
|
# do_make_scripts() or ensure the scripts are built independently.
|
|
#
|
|
do_make_scripts() {
|
|
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
|
make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
|
|
-C ${STAGING_KERNEL_DIR} scripts
|
|
}
|