TS-4900 - Build Yocto Distribution: Difference between revisions

From embeddedTS Manuals
(Created page with "To get started, install repo. This is a tool for downloading and updating a set of git repositories. <source lang=bash> mkdir ~/bin curl http://commondatastorage.googleapis....")
 
No edit summary
Line 1: Line 1:
= Recommended reading =
* [https://www.yoctoproject.org/documentation/current Yocto Documentation]
* [http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html Yocto quick start guide]
* [https://community.freescale.com/docs/DOC-1616 Freescale Yocto instructions]
= Build Yocto =
To get started, install repo.  This is a tool for downloading and updating a set of git repositories.
To get started, install repo.  This is a tool for downloading and updating a set of git repositories.


Line 17: Line 23:


Once it is downloaded the environment needs to bet set up:
Once it is downloaded the environment needs to bet set up:
<source  
<source lang=bash>
export SDKMACHINE="x86_64"
export SDKMACHINE="x86_64"
export SDKMACHINE="i686"
export SDKMACHINE="i686"
Line 62: Line 68:
sudo umount /mnt/sd
sudo umount /mnt/sd
</source>
</source>
= Updating the distribution =
Occasionally we will make updates to Yocto.  To pull these down:
<source lang=bash>
export PATH=${PATH}:~/bin
cd ts-bsp
repo sync
source ./setup-environment build
</source>
From here, you can bitbake your desired image which will include any updates.

Revision as of 11:26, 23 June 2014

Recommended reading

Build Yocto

To get started, install repo. This is a tool for downloading and updating a set of git repositories.

mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=${PATH}:~/bin

Check out our BSP:

mkdir ts-bsp
cd ts-bsp
repo init -u https://github.com/embeddedarm/ts-oe-bsp.git -b daisy
repo sync # This will take a while while it downloads several git repositories

Once it is downloaded the environment needs to bet set up:

export SDKMACHINE="x86_64"
export SDKMACHINE="i686"
export MACHINE='ts4900-quad'
source ./setup-environment build

#Install our BB layers file.  This includes a set of common layers used
#in our images.
cp ../.repo/manifests/bblayers.conf conf/bblayers.conf

You will need to select which image to build. You can view the images we provide with:

ls -l sources/meta-ts/recipes-*/images/*

These images may change in the future, or more may be added. There are descriptions in the top comments of each file.

  1. Build our common image with X11/QT support

bitbake ts-x11-image

  1. Alternatively, this is a smaller image with X11/QT omitted
  2. bitbake ts-headless-image


After the build has finished, it will be available in:

cd tmp/deploy/images/ts4900-quad

Use gparted or fdisk+mkfs to format an SD card with a single ext4 partition.

From your pc, mount the SD card. Assuming /dev/sdc

mkdir /mnt/sd
mount /dev/sdc1 /mnt/sd
sudo tar ts-x11-image-ts4900-quad.tar.bz2 -C /mnt/sd

This will install the rootfs, but the kernel, device tree (dtb), and FPGA bitstream must be manually installed.

sudo cp uImage /mnt/sd/boot/
sudo cp uImage-imx6q-ts4900*.dtb /mnt/sd/boot/
sudo rename 's/uImage-imx6q/imx6q/' /mnt/sd/boot/*.dtb
sudo umount /mnt/sd

Updating the distribution

Occasionally we will make updates to Yocto. To pull these down:

export PATH=${PATH}:~/bin
cd ts-bsp
repo sync

source ./setup-environment build

From here, you can bitbake your desired image which will include any updates.