Cross-compile a kernel for Slackware from Slackware64 multilib
I have a low power netbook running Slackware 13.37 and a much faster desktop running Slackware64 13.37.
The netbook takes about 30 minutes to build a minimal Linux kernel, while the desktop can build the same kernel in only a few minutes.
So I'd like to do my kernel builds on the faster desktop.
If I went multilib on the Slackware64 desktop, would I be able to build a kernel for Slackware32?
Or is a slack32 chroot/VM my only option?
This is amazing, but I was looking precisely for the same answer! I've got a 901 EEE-PC (ATOM 32bit) and slack 13.37 64bit in all my computers but this one (which, of course, is now running slack 13.37 32bit). So, seeing this post I decided to go ahead and try cross-compilation. After a few tries, this is how I got my 901 running a trimmed and 'tailor-made' 220.127.116.11 kernel.
IMPORTANT NOTE: this worked in a multilib Slackware 64bit system. It may or may not work on pure Slackware 64 bit systems.
As root (obviously) do
#make menuconfig ARCH=i386
The ARCH=1386 is important . Make sure that in the kernel's configuration menu "Executable file formats / Emulations --->" there is no option "IA32 Emulation (NEW)". This means that everything is OK. You probably know this already, but just go to "General setup --->" and fill something like "eee-pc" in "Local version - append to kernel release". This way the modules tree will not be overwritten in the host machine.
Now do (the -j 8 is optional, just to take advantage of a 4 core CPU)
#make all ARCH=i386 -j 8
#make modules_install ARCH=i386
Then just copy the image (called bzImage) in /usr/src/linux-18.104.22.168/arch/x86/boot/ to somewhere safe (mine goes to the USB Pen directly).
cp /usr/src/linux-22.214.171.124/arch/x86/boot/bzImage /media/USB-DISK
To be sure that the image is a 32bit executable go to /usr/src/linux-126.96.36.199/arch/x86/boot/ and do
The result should look like this (note the 'x86 boot executable')
bzImage: Linux kernel x86 boot executable bzImage, version 188.8.131.52-eeepc (root@calypso) #8 SMP PREEMPT Sun Jul 3 10:33:16, RO-rootFS, root_dev 0x801, swap_dev 0x1, Normal VGA
#tar zcf eee-pc.tgz /lib/modules/184.108.40.206-eeepc/
Copy that to the USB and proceed with the install. I suppose you know what to do on the Notebook!
Mine is now working flawlessly with a costumed 220.127.116.11 kernel cross-compiled ina 64bit machine
I'll install the multilib packages and give it a try now.
It works :)
I just did:
|All times are GMT -5. The time now is 04:48 PM.|