Sometime we might want to change something in kernel itself in order to get some hardware to work or just small patch to tune it better.
Whatever the cause.. this is how we can compile our own version of kernel and boot it into Vortex86 SX machine.
I recommend before starting anything at all, kindly consult Vortex86SX_Linux_HowTo here [pdf] ..
First ,we download the closest version that you might want to compile with ..
this one is where we obtain the current working .config setting before we tweak it later.
well.. i took it from this page..
Downloaded both file –
1. root filesystem: xlr561-sx-rootfs.tar.gz (5.43 MB)
2. kernel files: xlr561-sx-kernel-2.6.24.tar.gz (1.94 MB)
and also Network adapter file.. if don’t have yet..
3. Ethernet driver: r6040.tar.gz (9 KB)
Store it somewhere that you can found later.. extract it and look around also can..
Get that kernel source from kernel.org mirror. . in this case (2.6.24)
from this directory
or direct link at http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2
then.. we start with extracting the file.. (this one i compile on CentOS .. so your directory might differ)
tar xjfc /tmp/linux-2.6.24.tar.bz2
get the source / default / currently working config from original filesystem that we downloaded earlier..
mkdir -p /tmp/xlr
tar zxfv /tmp/xlr561-sx-rootfs.tar.gz .
this will extract all root filesystem from the archive file..
verify that the exist the file ./etc/kernel-config/kernel-2.6.24-vortex86sx.config
for the kernel-file ..
tar zxfv /tmp/xlr561-sx-kernel-2.6.24.tar.gz .
it will consist just two file
the content of sysconfig.cfg is something like this
we are going to copy the original kernel config into /usr/src/kernel/linux-2.6.24/
cp /tmp/xlr/etc/kernel-config/kernel-2.6.24-vortex86sx.config .config
time to try start compile..
this will bring its setting to the closest set to original compiled kernel.
then from here we tweak it .. with
For “MOXA” card..
need to select some from this hierarchy .
need to double spacebar .. to change it to * .. instead of
(however your need might be vary..)
if you want to tweak any other setting also can be done from here..
when done.. it will spit something like this..
Root device is (8, 5)
Setup is 11192 bytes (padded to 11264 bytes).
System is 1820 kB
Kernel: arch/x86/boot/bzImage is ready (#2)
Building modules, stage 2.
MODPOST 2 modules
you can later find the new kernel created as /usr/src/kernel/linux-2.6.24/arch/x86/boot/bzImage
[[email protected] linux-220.127.116.11]# file arch/x86/boot/bzImage
arch/x86/boot/bzImage: Linux kernel x86 boot executable RO-rootFS, root_dev 0x805, swap_dev 0x1, Normal VGA
.. now we copy this together with original file from original kernel
mv linux linux-orig
this will replace the original kernel (linux) with our recently build kernel...
then next process would be ..
transferring this file into VortexSX86 and boot it from there..
use scp or whatever mean.. to get it into that machine folder..
.. this is where and when the network driver come handy..
after copied the file .. reboot the machine to have new kernel in effect..
to verify ..
or can also test the moxa driver after that as well..
p/s : the screenshot is based on 18.104.22.168 kernel.. as can't get screenshot during the on-site activity .. on ubuntu host ..though..
would not matter anyway .. just for my future reference and help whoever need them later .. 😎