[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:slackware_admin:cross_compiling_the_linux_kernel [2018/06/01 21:54 (UTC)] – [Slackware Install] bifferos | howtos:slackware_admin:cross_compiling_the_linux_kernel [2018/06/01 22:51 (UTC)] (current) – [Cross-compiler] bifferos | ||
---|---|---|---|
Line 25: | Line 25: | ||
$ make menuconfig</ | $ make menuconfig</ | ||
- | For building 32-bit kernels with maximum compatibility I generally select the 486 output option, (586 is the default): | + | You will see a configuration system much like the kernel config. |
< | < | ||
- | [OPTIONAL] If you want, you may get better compatibility with your chosen kernel by choosing a non-default | + | To make the compiler we are about to build behave more like the Slackware one we want to use glibc instead of the default |
- | < | + | < |
- | Now save that configuration | + | If you don't do this you will need to disable stack protection in your kernel config when we come to compile |
+ | |||
+ | You can play around with many other options like kernel header versions however for building the kernel itself none of these matter. | ||
< | < | ||
+ | While that's running we'll configure the kernel so it's ready to compile. | ||
==== Kernel preparation ==== | ==== Kernel preparation ==== | ||
Line 44: | Line 47: | ||
$ wget https:// | $ wget https:// | ||
- | You should now have a .config in / | + | You should now have a .config in / |
==== Kernel compilation ==== | ==== Kernel compilation ==== | ||
- | When the Buildroot build is done, you need to include the cross-compiler in your path. | + | When the Buildroot build is done, you need to include the generated |
< | < | ||
- | The compiler executable has the architecture prefix in it's name to avoid collision with the system | + | The compiler executable has the architecture prefix in it's name to avoid collision with the system |
< | < | ||
- | If you are interested, you can find all the other toolchain tools like ld, ar and so on with similar prefixes. | + | If you are interested, you can find all the other toolchain tools like ld, ar and so on with similar prefixes. |
< | < | ||
$ make menuconfig CROSS_COMPILE=i486-linux- ARCH=i386</ | $ make menuconfig CROSS_COMPILE=i486-linux- ARCH=i386</ | ||
- | Finally make the kernel: | + | I'm leaving the default options here, just appending a ' |
< | < | ||
- | Copy the built kernel to a 32-bit machine and it should boot. If you want to compile/ | + | Copy the built kernel to a 32-bit machine and it should boot. If you want to compile/ |
+ | |||
+ | < | ||
+ | $ make modules_install | ||
+ | |||
+ | and so on. You will probably get away without these appended for some commands like 'make clean', | ||