Difference between revisions of "Poky manual"

From ElphelWiki
Jump to: navigation, search
(Description)
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==<font color="blue">Description</font>==
 
==<font color="blue">Description</font>==
How to build the firmware for Elphel 10393 series camera systems from scratch.
+
Build the firmware for Elphel 10393 series camera systems from scratch.
  
 
Prebuilt releases can be found [https://community.elphel.com/files/393/ here].
 
Prebuilt releases can be found [https://community.elphel.com/files/393/ here].
Line 15: Line 15:
  
 
* Building embedded Linux image for Zynq ARMv7 platform - Elphel 10393 board
 
* Building embedded Linux image for Zynq ARMv7 platform - Elphel 10393 board
* Yocto Poky revision = 2.7.1 (Warrior)
+
* Yocto Poky revision = 2.7.1 (Warrior) - <font color="green">builds in Kubuntu 20.04.</font> <font color="red">Older OSes are not supported. Can roll back to get built in 16.04.</font>
* Yocto Poky revision = 2.4 (Rocko)
+
* <s>Yocto Poky revision = 2.4 (Rocko) - <font color="green">builds in Kubuntu 16.04.</font> <font color="red">Won't build in 18.04 or 20.04.</font></s>
 
* <s>Yocto Poky revision = 2.0 (Jethro)</s>
 
* <s>Yocto Poky revision = 2.0 (Jethro)</s>
  
Line 34: Line 34:
  
 
==<font color="blue">Requirements</font>==
 
==<font color="blue">Requirements</font>==
* Kubuntu 16.04 x64 (as of Dec 2018) - Poky: 2.4 Rocko, 2.7.1 Warrior
+
* Kubuntu 20.04 x64
* Kubuntu 18.04 x64 (as of Dec 2018) - Poky: 2.7.1 Warrior (not tested but might build w/o problems)
+
* <s>Kubuntu 18.04 x64 (as of Dec 2018) - Poky: 2.7.1 Warrior (not tested but might build w/o problems)</s>
 +
* <s>Kubuntu 16.04 x64 (as of Dec 2018) - Poky: 2.4 Rocko, 2.7.1 Warrior</s>
  
 
==<font color="blue">Output files</font>==
 
==<font color="blue">Output files</font>==
Line 89: Line 90:
 
==<font color="blue">Setup</font>==
 
==<font color="blue">Setup</font>==
  
* Poky 2.4 Rocko (Kubuntu 16.04)
+
* Poky 2.7.1 Warrior (Kubuntu 20.04)
 
<font size='2'>
 
<font size='2'>
  git clone -b '''rocko''' https://git.elphel.com/Elphel/elphel393.git
+
  git clone -b '''warrior''' https://git.elphel.com/Elphel/elphel393.git
 
  cd elphel393
 
  cd elphel393
 
  ./setup.py
 
  ./setup.py
Line 97: Line 98:
 
  . ./oe-init-build-env
 
  . ./oe-init-build-env
 
  bitbake u-boot device-tree linux-xlnx core-image-elphel393
 
  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'.''-->
 
 
</font>
 
</font>
  
* Poky 2.7.1 Warrior (Kubuntu 16.04 or 18.04)
+
* <s>Poky 2.4 Rocko (Kubuntu 16.04)
 
<font size='2'>
 
<font size='2'>
  git clone -b '''warrior''' https://git.elphel.com/Elphel/elphel393.git
+
  git clone -b '''rocko''' https://git.elphel.com/Elphel/elphel393.git
 
  cd elphel393
 
  cd elphel393
 
  ./setup.py
 
  ./setup.py
Line 108: Line 108:
 
  . ./oe-init-build-env
 
  . ./oe-init-build-env
 
  bitbake u-boot device-tree linux-xlnx core-image-elphel393
 
  bitbake u-boot device-tree linux-xlnx core-image-elphel393
</font>
+
<!--''Temporary: linux-xlnx in Rocko depends on branch 'lwir' for x393. Change in projects.json line 42 from 'master' to 'lwir'.''-->
 +
</font></s>
  
 
==<font color="blue">Compare '''built''' vs '''deployed''' software versions</font>==
 
==<font color="blue">Compare '''built''' vs '''deployed''' software versions</font>==

Revision as of 13:35, 15 September 2020

Description

Build the firmware for Elphel 10393 series camera systems from scratch.

Prebuilt releases can be found here.

Use cases

  • Update Linux Kernel when developing a driver
  • Include application to the default firmware package
  • 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 written in Python, PHP, Javascript, HTML, C/C++ (gcc is installed on the system board) can be developed on the camera. Installing the framework is not required but it can simplify the development process.

Description

  • Building embedded Linux image for Zynq ARMv7 platform - Elphel 10393 board
  • Yocto Poky revision = 2.7.1 (Warrior) - builds in Kubuntu 20.04. Older OSes are not supported. Can roll back to get built in 16.04.
  • Yocto Poky revision = 2.4 (Rocko) - builds in Kubuntu 16.04. Won't build in 18.04 or 20.04.
  • Yocto Poky revision = 2.0 (Jethro)

Features

  • 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

Requirements

  • Kubuntu 20.04 x64
  • Kubuntu 18.04 x64 (as of Dec 2018) - Poky: 2.7.1 Warrior (not tested but might build w/o problems)
  • Kubuntu 16.04 x64 (as of Dec 2018) - Poky: 2.4 Rocko, 2.7.1 Warrior

Output files

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

File(s) Build Command Description
boot.bin bitbake u-boot u-boot as the first stage bootloader = Secondary Program Loader (SPL) that boots u-boot-dtb.img
u-boot-dtb.img bitbake u-boot full size u-boot with a stripped device tree (cat u-boot.img some_stripped_devicetree.dtb > u-boot-dtb.img)
devicetree.dtb bitbake device-tree 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 bitbake linux-xlnx kernel, drivers
rootfs.ubifs, rootfs.ubi, rootfs.tar.gz bitbake core-image-elphel393 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

Notes

Setup

  • Poky 2.7.1 Warrior (Kubuntu 20.04)

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

  • Poky 2.4 Rocko (Kubuntu 16.04)

git clone -b rocko https://git.elphel.com/Elphel/elphel393.git
cd elphel393
./setup.py
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@192.168.0.9

check_versions.py output in terminal (web-393 revision on PC is ahead of the one installed on the camera)

Details for development

Development for 10393