Friday, October 10, 2014

Mainline Linux for RIoTBoard

Yep, these days you can enjoy a good Linux mainline support for RIoTBoard, thanks to the hard work of lots of people. Here are my notes how to build latest Linux kernel for this cool board.

mkdir ~/riotboard
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.17.tar.xz
tar xf linux-3.17.tar.xz && cd linux-3.17
make distclean && make imx_v6_v7_defconfig && make LOADADDR=0x10008000 uImage -j4
cp arch/arm/boot/uImage ~/riotboard/
cp arch/arm/boot/dts/imx6dl-riotboard.dtb ~/riotboard/
make modules_install INSTALL_MOD_PATH=~/riotboard

Well, now ~/riotboard contains the fresh kernel, device tree and drivers, so you can copy them to your embedded target.

4 comments:

  1. what is the LOADADDR argument for in the make command?

    ReplyDelete
  2. Hi MCO. LOADADDR is 0x10008000.

    ReplyDelete
  3. What is the effect of this argument? is the loadaddr where the bootloader shall expect the kernel? Sorry for the question I am new to building kernels...

    ReplyDelete
  4. Well, there are several effects when you pass the LOADADDR argument:
    1. The kernel build doesn't fail.
    2. The kernel bootstraping and relocation code are linked to run on this physical address.
    3. The uImage is generated with this option, this informing the bootloader where to load and execute the kernel during boot.

    ReplyDelete