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.
The bootloader used by TWR-LS1021A is u-boot. If you want to browse/modify the sources first you have to get them, if you already built TWR-LS1021A’s bootloader with Bitbake, then you already have them on your (virtual) disk:
Bitbake will place u-boot sources under:
/path/to/yocto/build_ls1021atwr_release/tmp/work/ls1021atwr-fsl-linux-gnueabi/u-boot-ls1/2014.07-r0/git
this means that within the virtual machine you will find them under:
/home/architech/architech_sdk/architech/ls1021atwr/yocto/build_ls1021atwr_release/tmp/work/ls1021atwr-fsl-linux-gnueabi/u-boot-ls1/2014.07-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.
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:
/path/to/yocto/build_ls1021atwr_release/tmp/work/ls1021atwr-fsl-linux-gnueabi/linux-ls1/3.12-r0/git
If you are working with the virtual machine, you will find them under directory:
/home/architech/architech_sdk/architech/ls1021atwr/yocto/build_ls1021atwr_release/tmp/work/ls1021atwr-fsl-linux-gnueabi/linux-ls1/3.12-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.
Please, refer to the software documentation on the Freescale SDK website
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:
bitbake virtual/kernel -c cleanall
bitbake virtual/kernel -c menuconfig
a new window, like the following one, will pop-up:
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:
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/ls1021atwr/ 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/ls1021atwr/yocto/build/tmp/deploy/images/ls1021atwr/.
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 Freescale SDK website
An SD card image provides the full system to boot with U-Boot and kernel. To flash an SD card image, run the following commands (after have formatted it in FAT32):
cp tmp/deploy/images/ls1021atwr/fsl-image-core-ls1021atwr.ext2.gz.u-boot /path/your/sd
cp tmp/deploy/images/ls1021atwr/uImage /path/your/sd
cp tmp/deploy/images/ls1021atwr/uImage-ls1021a-twr.dtb /path/your/sd
Important
sudo password is architech
Make sure everything has been written on the SD card:
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