5. BSP

The Board Support Package is composed by a set files, patches, recipes, configuration files, etc. This chapter gives you the information you need when you want to customize something, fix a bug, or simply learn how the all thing has been assembled.

5.1. U-boot

5.1.1. Get sources

The bootloader used by i.MX6 SoloX SabreSD is u-boot. If you want to browse/modify the sources first you have to get them. There are two viable ways to do that:

  • if you already built i.MX6 SoloX SabreSD’s bootloader with Bitbake, then you already have them on your (virtual) disk, otherwise
  • you can download them.

Bitbake will place u-boot sources under:

  Host    select
/path/to/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git

this means that within the virtual machine you will find them under:

  Host    select
/home/architech/architech_sdk/architech/imx6sxsabresd/yocto/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git

We suggest you to don’t work under Bitbake build directory, you will pay a speed penalty and you can have troubles syncronizing the all thing. Just copy the sources some place else and do what you have to do.

If you didn’t build them already with Bitbake or you just want to do make every step by hand, you can always get them from the Internet by cloning the proper repository and checking out the proper commit. Check IMXLINUX: Embedded Linux for i.MX Applications Processors

5.2. Linux Kernel

Like we saw for the bootloader, the first thing you need is: sources. Get them from Bitbake build directory (if you built the kernel with it) or get them from the Internet.

Bitbake will place the sources under directory:

  Host    select
/path/to/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/linux-imx/3.14.28-r0/git

If you are working with the virtual machine, you will find them under directory:

  Host    select
/home/architech/architech_sdk/architech/imx6sxsabresd/yocto/build/tmp/work/imx6sxsabresd-poky-linux-gnueabi/linux-xlnx/3.14.28-r0/git

We suggest you to don’t work under Bitbake build directory, you will pay a speed penalty and you could have troubles syncronizing the all thing. Just copy them some place else and do what you have to do.

If you didn’t build them already with Bitbake or you just want to do make every step by hand, you can always get them from the Internet by cloning the proper repository and checking out the proper commit. Check IMXLINUX: Embedded Linux for i.MX Applications Processors

5.2.1. Build from bitbake

The most frequent way of customization of the Linux Kernel is to change the .config file that contains the Kernel options. Setup the environment and run:

  Host    select
bitbake virtual/kernel -c cleanall
bitbake virtual/kernel -c menuconfig

a new window, like the following one, will pop-up:

_images/menuconfig.png

follow the instructions, save and exit, than you ready to generate your preferred image based on your customized kernel. If you prefer, you can build just the kernel running:

  Host    select
bitbake virtual/kernel

At the end of the build process, the output file (uImage.bin), along with the built kernel modules, will be placed under tmp/deploy/images/imx6sxsabresd/ inside your build directory, so, if you are building your system from the default directory, the destination directory will be /home/architech/architech_sdk/architech/imx6sxsabresd/yocto/build/tmp/deploy/images/imx6sxsabresd/.

5.3. Meta Layer

A Yocto/OpenEmbedded meta-layer is a directory that contains recipes, configuration files, patches, etc., all needed by Bitbake to properly “see” and build a BSP, a distribution, a (set of) package(s), whatever. Several meta-layers are provided by Freescale for the SABRE Board.

Please, refer to the software documentation on the IMXLINUX: Embedded Linux for i.MX Applications Processors

5.4. Root FS

An SD card image provides the full system to boot with U-Boot and kernel. To flash an SD card image, run the following command:

  Host    select
sudo dd if=core-image-minimal-imx6sxsabresd.sdcard of=/dev/sd<partition> bs=1M

Important

sudo password is architech

Make sure everything has been written on the SD card:

  Host    select
sync

and unmount the SD card from your system.

Extra information on how to customize the file system and the different packages available from Freescale, can be found on the IMXLINUX: Embedded Linux for i.MX Applications Processors