Poky manual

From ElphelWiki
Revision as of 14:59, 28 March 2019 by Oleg (talk | contribs) (Description)
Jump to: navigation, search

Use cases

  • Linux kernel update when adding/developing a driver
  • When an application needs to be included into the firmware image archive
  • Update Elphel's PHP extension
  • C/C++ applications if developed on PC require a cross-compiler and require Yocto installation or some other alternative.

Other projects that use Python, PHP, Javascript, HTML, C/C++ on hardware (compiler is included in the firmware image) do not require this SDK use but it makes the process more convenient, e.g. by copying the built packages straight to the target hardware.


  • Building embedded Linux image for Zynq ARMv7 platform - Elphel 10393 board
  • Yocto Poky revision = 2.6 (Thud)
  • Yocto Poky revision = 2.4 (Rocko)
  • Yocto Poky revision = 2.0 (Jethro)


  • Once everything is built it supports updating software projects (files and binaries) on the target system
    • access is set up in yocto's local.conf (see setup.py output) + ssh-copy-id
    • bitbake some-app -c target_scp from the command line or Eclipse IDE - see examples in elphel-apps-... at Git


Output files

The names are listed as they appear in the u-boot configuration header file - actual output files have different names:

File(s) Description
boot.bin u-boot as the first stage bootloader = Secondary Program Loader (SPL) that boots u-boot-dtb.img
u-boot-dtb.img full size u-boot with a stripped device tree (cat u-boot.img some_stripped_devicetree.dtb > u-boot-dtb.img)
devicetree.dtb device tree with listed interfaces, zynq registers, interrupts and drivers
  • elphel393/bootable-images/mmc/devicetree.dtb - mount rootfs from mmc partition
  • elphel393/bootable-images/nand/devicetree.dtb - mount rootfs from NAND flash
uImage kernel, drivers
rootfs.ubifs, rootfs.ubi, rootfs.tar.gz rootfs in different formats - *.ubi* for NAND, *.tar.gz for mmc

The file are located at elphel393/bootable-images/, which is a link to poky's deploy directory elphel393/poky/build/tmp/deploy/images/elphel393/

  • complete set of files for rootfs in NAND Flash: elphel393/bootable-images/nand/
  • complete set of files for rootfs on MMC (micro SD card): elphel393/bootable-images/mmc/

Write files to media and boot

Boot from micro SD card

  • Use recovery or regular μSD card
  • EXT4 partition mounted as /

Detailed instructions

Boot from NAND flash

  • The default boot option - power on.
  • A UBIFS image is written to /dev/mtd4 - is mounted as /

Detailed instructions



  • Poky 2.4 Rocko (Kubuntu 16.04)

git clone -b rocko https://git.elphel.com/Elphel/elphel393.git
cd elphel393
cd poky
. ./oe-init-build-env
bitbake u-boot device-tree linux-xlnx core-image-elphel393

Temporary: linux-xlnx in Rocko depends on branch 'lwir' for x393. Change in projects.json line 42 from 'master' to 'lwir'.

  • Poky 2.6 Thud (Kubuntu 18.04)

git clone -b thud https://git.elphel.com/Elphel/elphel393.git
cd elphel393
cd poky
. ./oe-init-build-env
bitbake u-boot device-tree linux-xlnx core-image-elphel393

Compare built vs deployed software versions

cd elphel393
./check_versions.py root@


  • deployed = running on the target system
check_versions.py output in terminal


All targets

bitbake u-boot device-tree linux-xlnx core-image-elphel393


bitbake u-boot


  • boot.bin
  • u-boot-dtb.img


  • Current the recipe installs only binaries. We will upgrade u-boot from 2016.05 to the current release later.

2016.05 will not compile in Kubuntu 18.04

Device tree

bitbake device-tree


  • devicetree.dtb


bitbake linux-xlnx


  • uImage


  • linux-xlnx rocko branch was simply moved to thud branch
  • yocto thud: Kernel version is 4.9.0, linux-xlnx
  • Device Tree Blob is compiled separately in linux-xlnx
  • Uncompiled device tree files are present in the linux sources provided by linux-xlnx


bitbake core-image-elphel393


  • rootfs.tar.gz
  • rootfs.ubi, rootfs.ubifs

Details for development

Development for 10393