Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:slackware_admin:cross_compiling_the_linux_kernel [2018/06/01 22:44 (UTC)]
bifferos [Cross-compiler]
howtos:slackware_admin:cross_compiling_the_linux_kernel [2018/06/01 22:51 (UTC)] (current)
bifferos [Cross-compiler]
Line 33: Line 33:
 <​code>​Toolchain -> C library (glibc)</​code>​ <​code>​Toolchain -> C library (glibc)</​code>​
  
-If you don't do this you will need to disable stack protection in your kernel compile and we want to keep a standard Slackware config, because we're true Slackers heart-and-soul right? :).+If you don't do this you will need to disable stack protection in your kernel ​config when we come to compile ​that and we want to keep a standard Slackware config, because we're true Slackers heart-and-soul right? :).
  
 You can play around with many other options like kernel header versions however for building the kernel itself none of these matter. ​ The only option that may conceivably make a difference is the GCC version, particularly if you are building an old kernel version which doesn'​t support later versions of GCC.  For this demonstration we can leave the defaults though. ​ Save the config and then: You can play around with many other options like kernel header versions however for building the kernel itself none of these matter. ​ The only option that may conceivably make a difference is the GCC version, particularly if you are building an old kernel version which doesn'​t support later versions of GCC.  For this demonstration we can leave the defaults though. ​ Save the config and then:
Line 51: Line 51:
 ==== 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 ​cross-compiler in your path.
  
 <​code>​export PATH=/​usr/​src/​buildroot-2018.02.2/​output/​host/​bin:​$PATH</​code>​ <​code>​export PATH=/​usr/​src/​buildroot-2018.02.2/​output/​host/​bin:​$PATH</​code>​
  
-The compiler executable has the architecture prefix in it's name to avoid collision with the system ​gcc, you can now run it and test it works:+The compiler executable has the architecture prefix in it's name to avoid collision with the system ​GCC, you can now run it and test if it works:
  
 <​code>​$ i486-linux-gcc --version</​code>​ <​code>​$ i486-linux-gcc --version</​code>​
  
-If you are interested, you can find all the other toolchain tools like ld, ar and so on with similar prefixes. ​ Now configure your kernel if you want to.  I'm leaving the default options here:+If you are interested, you can find all the other toolchain tools like ld, ar and so on with similar prefixes. ​ Now configure your kernel if you want to:
  
 <​code>​$ cd /​usr/​src/​linux <​code>​$ cd /​usr/​src/​linux
 $ make menuconfig CROSS_COMPILE=i486-linux- ARCH=i386</​code>​ $ make menuconfig CROSS_COMPILE=i486-linux- ARCH=i386</​code>​
  
-Finally make the kernel:+I'm leaving the default options here, just appending a '​-buildroot'​ to the kernel name. Finally make the kernel:
  
 <​code>​$ make bzImage CROSS_COMPILE=i486-linux- ARCH=i386</​code>​ <​code>​$ make bzImage CROSS_COMPILE=i486-linux- ARCH=i386</​code>​

In Other Languages
QR Code
QR Code howtos:slackware_admin:cross_compiling_the_linux_kernel (generated for current page)