Skip to content
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

Build scripts do not use cross compiler for linux! #27

Open
lpsantil opened this issue Aug 2, 2023 · 1 comment
Open

Build scripts do not use cross compiler for linux! #27

lpsantil opened this issue Aug 2, 2023 · 1 comment

Comments

@lpsantil
Copy link

lpsantil commented Aug 2, 2023

A major oversight (even on my part!), the linux build script (https://github.com/haileys/doslinux/blob/master/script/build-linux) doesn't actually use the arguments to call the cross-compiler! I discovered this when porting doslinux to Fedora 38.

Currently, it seems like F38's gcc 13 is too new to build Linux kernel 5.8.9. Ubuntu 22.04's gcc 11 is fine. I think F36 might work OOTB but I'd have to build a VM to verify that. May do that even though it's gone EOL in May 2023.

One way to cross-compile the Linux 5.8.9 kernel (based on https://gts3.org/2017/cross-kernel.html) is to do the following

## DL Linux
# https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.9.tar.gz
## Extract Linux Kernel source
# tar zxvf linux-5.8.9.tar.gz
## Copy in the config
# cp -v linux-config-doslinux linux-5.8.9/
## Build
# cd linux-5.8.9 && make -j4 ARCH=x86 CROSS_COMPILE=i386-linux-musl

This is building for me w/F38, a gcc 9.4.0 cross-compiler in /usr/local/. I'm off to verify this in Ubuntu 22.04 now.

@lpsantil
Copy link
Author

lpsantil commented Aug 4, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant