Thursday 24 October 2013

kernel compiling

So by now there are real limitations to the demo kernel's available and I have been really wanting to enable some of the missing features as well as disable things I don't need.



EDIT:  The below links are broken. go here instead:

http://eewiki.net/display/linuxonarm/BeagleBone+Black

The best and most recent tutorial I've found on compiling the kernel is http://wiki.replicape.com/index.php?title=Compile_kernel_3.12 see also http://wiki.replicape.com/index.php?title=Compiling_the_kernel I'll copy his stuff to here just in case it gets deleted.


 Get and patch the kernel:
 git clone https://github.com/beagleboard/kernel.git 3.12
 cd 3.12
 git checkout origin/3.12 -b 3.12
 ./patch.sh
Compile the kernel:
 cd kernel
 cp ../configs/beaglebone .config
 make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- LOADADDR=0x80008000 uImage dtbs
 make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- modules
 mkdir rootfs
 make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- INSTALL_MOD_PATH=./rootfs modules_install
Install the kernel on your BeagleBone:
 scp arch/arm/boot/uImage root@192.168.7.2:/boot/uImage-3.12.0
 scp arch/arm/boot/dts/am335x-bone*.dtb root@192.168.7.2:/boot/
 rm rootfs/lib/modules/3.12*/build
 rm rootfs/lib/modules/3.12*/source
 scp -r rootfs/lib/modules/3.12* root@192.168.7.2:/lib/modules/
Log in, move link, sync and reboot:
 ssh root@192.168.7.2
 cd /boot/
 rm uImage
 ln -s uImage-3.12.0 uImage
 sync
 reboot

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Fantastic - for the 3.12 tips.
    I've got a BBB to investigating the powerManagement. To do above had to get the compiler and angstrom-distribution.org/toolchains/ is down.
    So used
    sudo apt-get install gcc-arm-linux-gnueabi
    which pulled in gcc-4.6
    then on building had to modify
    CROSS_COMPILE=arm-linux-gnueabi-
    It compiled OK. So dumb question (I guess I should try it ..) but do you think its going to be OK to use or likely to brick the BBB?

    ReplyDelete