[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.
Welcome to the Slackware Documentation Project
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
howtos:slackware_admin:cross_compiling_the_linux_kernel [2018/06/01 22:00 (UTC)] – [Cross-compiler] bifferos | howtos:slackware_admin:cross_compiling_the_linux_kernel [2018/06/01 22:36 (UTC)] – [Kernel compilation] bifferos |
---|
<code>$ make</code> | <code>$ make</code> |
| |
| While that's running we'll configure the kernel so it's ready to compile. |
==== Kernel preparation ==== | ==== Kernel preparation ==== |
| |
$ wget https://mirrors.slackware.com/slackware/slackware-14.2/kernels/hugesmp.s/config -O .config</code> | $ wget https://mirrors.slackware.com/slackware/slackware-14.2/kernels/hugesmp.s/config -O .config</code> |
| |
You should now have a .config in /usr/src/linux which says 'CONFIG_64BIT is not set' at the top. | You should now have a .config in /usr/src/linux which says 'CONFIG_64BIT is not set' at the top. That will replace your old 64-bit kernel .config that you had before (included from the 'K' disk set). Obviously copy the kernel someplace else if you wanted to keep that! |
| |
==== Kernel compilation ==== | ==== Kernel compilation ==== |
<code>$ make bzImage CROSS_COMPILE=i486-linux- ARCH=i386</code> | <code>$ make bzImage CROSS_COMPILE=i486-linux- ARCH=i386</code> |
| |
Copy the built kernel to a 32-bit machine and it should boot. If you want to compile/install the modules as well, just make sure you don't forget to use the same CROSS_COMPILE and ARCH variables every time you specify the make commands, everything should use the cross-compiler: 'make modules', 'make modules_install' and so on. You will probably get away without these appended for some commands like 'make clean', but it's safest to just include them whenever you do anything on that kernel, they certainly won't hurt. | Copy the built kernel to a 32-bit machine and it should boot. If you want to compile/install the modules as well, just make sure you don't forget to use the same CROSS_COMPILE and ARCH variables every time you specify the make commands, everything should use the cross-compiler: |
| |
| <code>$ make modules CROSS_COMPILE=i486-linux- ARCH=i386 |
| $ make modules_install CROSS_COMPILE=i486-linux- ARCH=i386</code> |
| |
| and so on. You will probably get away without these appended for some commands like 'make clean', but it's safest to just include them whenever you do any work on that kernel, they certainly won't hurt. |
| |
| |