TS-4900 - Build Yocto Distribution: Difference between revisions
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
mkdir ts-bsp | mkdir ts-bsp | ||
cd ts-bsp | cd ts-bsp | ||
repo init -u https://github.com/embeddedarm/ts-oe-bsp.git -b | repo init -u https://github.com/embeddedarm/ts-oe-bsp.git -b dizzy | ||
repo sync # This will take a while while it downloads | repo sync # This will take a while while it downloads around 10 git repos | ||
</source> | </source> | ||
Line 28: | Line 28: | ||
#export SDKMACHINE="x86_64" | #export SDKMACHINE="x86_64" | ||
#export SDKMACHINE="i686" | #export SDKMACHINE="i686" | ||
## | # Generate the image based on quad or solo | ||
#export MACHINE="ts4900-quad" | |||
#export MACHINE="ts4900-solo" | |||
## The SDK and MACHINE can be changed later by modifying build/conf/local.conf | |||
source ./setup-environment build | source ./setup-environment build | ||
Line 38: | Line 40: | ||
</source> | </source> | ||
You will need to select which image to build. You can view the images we provide with: | You will need to select which image to build. Our default image is ts-x11-image. You can view the images we provide with: | ||
<source lang=bash> | <source lang=bash> | ||
ls -l sources/meta-ts/recipes-*/images/* | ls -l sources/meta-ts/recipes-*/images/* | ||
Line 50: | Line 52: | ||
#bitbake ts-headless-image | #bitbake ts-headless-image | ||
After the build has finished, it will be available in | |||
After the build has finished, it will be available in | |||
<source lang=bash> | <source lang=bash> | ||
# for the quad build | |||
cd tmp/deploy/images/ts4900-quad | cd tmp/deploy/images/ts4900-quad | ||
# for the solo build | |||
cd tmp/deploy/images/ts4900-solo | |||
</source> | </source> | ||
Use gparted or fdisk+mkfs to format an SD card with a single | Use gparted or fdisk+mkfs to format an SD card with a single partition. | ||
From your pc, mount the SD card. Assuming /dev/sdc | From your pc, mount the SD card. Assuming /dev/sdc is the SD card | ||
<source lang=bash> | <source lang=bash> | ||
mkdir /mnt/sd | mkdir /mnt/sd | ||
mount /dev/sdc1 /mnt/sd | sudo mount /dev/sdc1 /mnt/sd | ||
sudo mkfs.ext4 /dev/sdc1 | |||
sudo tar -xf ts-x11-image-ts4900-quad.tar.bz2 -C /mnt/sd | sudo tar -xf ts-x11-image-ts4900-quad.tar.bz2 -C /mnt/sd | ||
sudo umount /mnt/sd/ | |||
sync | |||
sudo | |||
</source> | </source> | ||
Revision as of 10:46, 31 March 2015
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 dizzy
repo sync # This will take a while while it downloads around 10 git repos
Once it is downloaded the environment needs to bet set up:
## The SDK will default to the architecture of the build system
## or you can override it with one of the following:
#export SDKMACHINE="x86_64"
#export SDKMACHINE="i686"
# Generate the image based on quad or solo
#export MACHINE="ts4900-quad"
#export MACHINE="ts4900-solo"
## The SDK and MACHINE can be changed later by modifying build/conf/local.conf
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. Our default image is ts-x11-image. 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.
- Build our common image with X11/QT support
bitbake ts-x11-image
- Alternatively, this is a smaller image with X11/QT omitted
- bitbake ts-headless-image
After the build has finished, it will be available in
# for the quad build
cd tmp/deploy/images/ts4900-quad
# for the solo build
cd tmp/deploy/images/ts4900-solo
Use gparted or fdisk+mkfs to format an SD card with a single partition.
From your pc, mount the SD card. Assuming /dev/sdc is the SD card
mkdir /mnt/sd
sudo mount /dev/sdc1 /mnt/sd
sudo mkfs.ext4 /dev/sdc1
sudo tar -xf ts-x11-image-ts4900-quad.tar.bz2 -C /mnt/sd
sudo umount /mnt/sd/
sync
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.