-
Notifications
You must be signed in to change notification settings - Fork 1
01 Adding Anboard platform to kernel
sudo apt-get install quilt # needed to work with patches in Yocto sudo apt-get install lzop # file compressor to generate zImage sudo apt-get install gcc-arm-linux-gnueabihf # hard float toolchain sudo apt-get install libncurses5-dev # needed to work with kernel sudo apt-get install libssl-dev # install openssl library if kernel fail
git clone https://github.com/torvalds/linux.git cd linux/ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx_v6_v7_defconfig # all i.MX armv6 and armv7 boards make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig (select menu option: Boot options -> Use appended device tree blob to zImage (EXPERIMENTAL)) make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx35-pdk.dtb # device tree blob for the specific board make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules # kernel modules outside of the kernel image make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=../modules cat arch/arm/boot/zImage arch/arm/boot/dts/imx35-pdk.dtb > linuximage # append device tree blob(dtb) to kernel image
Creating the device tree for a new platform is an essential task to get the kernel running. In the former seteps we build an universal image for various i.MX platforms. However the device tree blob tells the kernel on runtime the CPU to use, how the hardware is connected and configured ... .
DTS configuration is out of the scope of this capacitaion. One should rather start with this very good tutorial:
use this Link : http://free-electrons.com/pub/conferences/2013/elce/petazzoni-device-tree-dummies/petazzoni-device-tree-dummies.pdf
Device tree documentation for the various hardware components can be found inside the kernel directory:
Documentation/devicetree/bindings
It is also a good idea to grep inside the kernels dts dirs e.g.:
grep -R "smsc95" arch/arm | grep *dts*
cd ~/yocto-schulung/linux quilt new add-anboard-support.patch # create a new empty patch nano patches/series # check if the patch is on the stack touch arch/arm/boot/dts/imx35-anboard.dts # add a new empty dts file quilt add arch/arm/boot/dts/imx35-anboard.dts # add the dts file to the patch on top cd arch/arm/boot/dts cp imx35-pdk.dts imx35-anboard.dts # copy a well known similar platform cd - quilt refresh # refresh the patch nano patches/add-anboard-support.patch # check if the new dts file for Anboard is added to the patch
We will need this patch later in our Yocto bsp to continue adding the CUPID BSP support.
We can check Garz & Fricker PTXDist BSP with kernel 2.6.33. This is a mainline kernel with serveral patches added by GuF.
wget http://support.garz-fricke.com/products/Cupid/Linux/Releases/linux-1.47.0-0/OSELAS.BSP-GUF-Linux-1.47.0-0.tar.bz2 tar -xf OSELAS.BSP-GUF-Linux-1.47.0-0.tar.bz2
gedit OSELAS.BSP-GUF-Linux-1.47.0-0/patches/linux-2.6.33/1102-mx3-add-support-for-Garz-Fricke-CUPID.patch
GuF platforms expect the ATAG list on a different location than standard kernels:
gedit OSELAS.BSP-GUF-Linux-1.47.0-0/patches/linux-2.6.33/0905-guf-move-atag-list-for-redboot-configuration.patch
gedit OSELAS.BSP-GUF-Linux-1.47.0-0/configs/cupid/kernelconfig
- What is ATAG?: http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html
- ATAG vs. device tree: http://free-electrons.com/pub/conferences/2013/elce/petazzoni-device-tree-dummies/petazzoni-device-tree-dummies.pdf
- Quilt documentation: http://users.suse.com/~agruen/quilt.pdf