Parent Page


Efika Mx Hacking Notes

Web References

Kernel Hacking

Setting Up a Kernel Tree

git clone git://gitorious.org/efikamx/linux-kernel.git 
cd linux-kernel/ 
git checkout origin/efikasb-10.08.00 
cp arch/arm/configs/mx51_efikasb_devtmpfs_defconfig .config 

efikasb is the SmartBook (aka the netbook), efikamx is the SmartTop, (aka headless).

Updating a Kernel Tree

$ git pull

General Git Commands

$ git config --global core.editor "gedit"

Building a Kernel and Modules

cd linux-kernel
make uImage modules -j8 
fakeroot make deb-pkg 

Trying Out a New Kernel and Modules

The easiest way to do this is to take a standard installer image and overwrite the script file (boot.scr) with this one:

uboot script that boots the kernel on the SD card, with root as /dev/sda2:

setenv ramdisk uInitrd; 
setenv kernel uImage; 
setenv bootargs console=tty1 root=/dev/sda2 rootwait rw quiet splash; 
${loadcmd} ${ramdiskaddr} ${ramdisk}; 
if imi ${ramdiskaddr}; then; else 
  setenv bootargs ${bootargs} noinitrd; 
  setenv ramdiskaddr ""; 
fi; 
${loadcmd} ${kerneladdr} ${kernel} 
if imi ${kerneladdr}; then 
  bootm ${kerneladdr} ${ramdiskaddr} 
fi; 

Creating the script:

mkimage -A arm -O linux -a 0 -e 0 -T script -C none -n "EfikaMX Boot Script" -d myboot.script boot.scr

Overwrite the script file in the boot partition of the SSD (it's the smaller of the two, about 127MB. You might want to test that this works before trying one of your kernels. To test this, just copy the relevant uImage and uInitrd images to the right place:

cd /media/whatever
sudo cp uInitrd-blah-efikasb uInitrd
sudo cp uImage-blah-efikasb uImage

That should just reboot. OK, to try out your kernel, copy in the kernel that you've created: Install the modules

cd linux-kernel
sudo make modules_install

Linaro PPAs

To add a PPA to an ARM Linux platform's repository:

$ sudo add-apt-repository ppa:linaro-maintainers/tools

Boards/Efika (last modified 2011-01-24 13:15:05)