-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile kernel on 64/32 split archs without redefining TARGET_PREFIX #2506
Conversation
Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
for MOD in `find $INSTALL/usr/lib/kernel-overlays/ -type f -name *.ko`; do | ||
$STRIP --strip-debug $MOD | ||
${TARGET_KERNEL_PREFIX}strip --strip-debug $MOD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be using $TARGET_PREFIX
or $TARGET_KERNEL_PREFIX
? If the latter, then $STRIP
would be correct here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TARGET_PREFIX is unchanged and always points to the (userspace) target toolchain - as do CC, STRIP etc. so setup_toolchain is fine as it is
kernel compile doesn't need all this, everything's handled inside the kernel build via ARCH and CROSS_COMPILE
@HiassofT Looks good. Could you also fix project/device specific u-boot packages? |
@Raybuntu Odroid C2 and LePotato seem to use a different toolchain for u-boot than kernel (aarch64-elf instead of aarch64-linux-gnu). So I'd rather keep these as they are as they don't use $TARGET_PREFIX We could think about introducing TARGET_UBOOT_PREFIX for such cases, but that'd be a separate refactoring step and as only 2 devices seem to need 3 different toolchains I'm not sure if it's worth the hassle - handling it manually in the device specific package.mk is fine IMO |
Build+runtime test with Rock64/arm and build test with Wetek Hub (which includes dvb drivers) was fine. Together with #2505 and a perf kernel backport patch perf built and worked on Rock64/arm - full tree used for the test is here: https://github.com/HiassofT/LibreELEC.tv/tree/rockchip-kernel-perf-build |
You are correct @HiassofT. Sorry for the noise. |
Cross compiling the linux kernel and u-boot is normally done via setting appropriate ARCH and CROSS_COMPILE options (which the LE buildsystem already does).
It's therefore not necessary to redefine TARGET_PREFIX in scripts/build
Just add TARGET_KERNEL_PREFIX (defaulting to TARGET_PREFIX on non-split arch builds) in addition to the already existing TARGET_KERNEL_ARCH and use that for compiling kernel, kernel-modules and u-boot
Note: with these changes PKG_IS_KERNEL_PKG becomes an unused marker and can probably be dropped, but I left it intact for now