Some of the reference designs from Trenz Electronics include a preconfigured yocto bsp layer that can be used to generate a Linux image and a prebuilt yocto linux image, that can be copied directly to sd card.
Scroll Ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
The yocto bsp layer will be generated with the quartus project in the <project name>/os/yocto/meta-<module> folder. The generated layers depends on the meta-altera layer (for more information see: Yocto KICKstart#Used source files).
Add the generated bsp layer meta-<machine> to /yocto/poky/build/conf/bblayers.conf with:
Code Block | ||||
---|---|---|---|---|
| ||||
bitbake-layers add-layer ../meta-<module> |
e.g. for the board TEI0022-03 see TEI0022 Test Board#Hardware → the MACHINE name is tei0022-a5-c8-2gb.
run following commands to redefine 'MACHINE':
Code Block | ||||
---|---|---|---|---|
| ||||
sed -i '/^MACHINE/s/MACHINE/#MACHINE/g' conf/local.conf echo -e '\nMACHINE = "<module>-<Board-Part-Short-Name>"' >> conf/local.conf |
Build the image with following command (the image recipes are located in meta-<module>/recipes-images/yocto/):
Code Block | ||||
---|---|---|---|---|
| ||||
bitbake <module>-image-minimal |
Scroll Ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Yocto generates a full sd card image with u-boot, zImage, rootfs etc. included.
The generated image is stored in path/to/yocto/poky/build/tmp/deploy/images/<machine>/<image_name>.wic.
If you downloaded a reference design with prebuilt files, you can find a generated yocto linux image in <project name>/prebuilt/Board_Part_Short_Name/os/yocto/images/.
Do following steps to copy the image to the SD card:
Run following command to get the device name of the SD card (e.g. /dev/sdx):
Code Block | ||||
---|---|---|---|---|
| ||||
lsblk |
Copy the generated *.wic image to the sd card (replace 'sdx' in 'of=/dev/sdx' with the correct sd card device name:
Code Block | ||||
---|---|---|---|---|
| ||||
sudo dd if=path/to/yocto_image/<image_name>.wic of=/dev/sdx bs=1M seek=0 |
Insert the SD card into your board, set boot mode to sd card (if the setting is available) and boot it.
Scroll Ignore | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
select COM Port
Info |
---|
Win OS: see device manager Linux OS: see dmesg | grep tty (UART is *USB1) |
Login data:
Code Block | ||||
---|---|---|---|---|
| ||||
yocto login: root Password: root |
Info |
---|
Note: Wait until Linux boot finished |
You can use Linux shell now.
Code Block | ||||
---|---|---|---|---|
| ||||
i2cdetect -y -r 1 (check I2C 1 Bus, if available) dmesg | grep rtc (RTC check, if available) udhcpc (ETH0 check, if available) lsusb (USB check, if available) |
Scroll Only | ||
---|---|---|
|
Scroll pdf ignore | ||||||
---|---|---|---|---|---|---|
|