Yocto tests
← Older revision
Revision as of 22:47, 28 January 2016
Line 1:
Line 1:
==<font color="blue">About</font>== ==<font color="blue">About</font>==
-<font size='4'><b>NOTE: a newer version of the article is available [[Poky_2.0_manual|here]]</b></font>+<font size='4'><b>NOTE: a newer version of the article is available [[Poky_2.0_manual|here (poky 2.0)]]</b></font>
* Poky revision - DORA (1.5) * Poky revision - DORA (1.5)
Oleg
Poky 2.0 manual
Setup:
← Older revision Revision as of 22:33, 28 January 2016 (8 intermediate revisions not shown)Line 16: Line 16: These names are listed as they appear in the u-boot configuration header file - actual output files have different names: These names are listed as they appear in the u-boot configuration header file - actual output files have different names: * '''boot.bin'''+('''u-boot-dtb.img''') - u-boot as the first stage bootloader = Secondary Program Loader that boots '''u-boot-dtb.img''' * '''boot.bin'''+('''u-boot-dtb.img''') - u-boot as the first stage bootloader = Secondary Program Loader that boots '''u-boot-dtb.img''' -<font style='color:rgba(200,200,200,1)'> * '''devicetree.dtb''' - device tree with described interfaces, zynq registers, interrupts and drivers * '''devicetree.dtb''' - device tree with described interfaces, zynq registers, interrupts and drivers * '''uImage''' - kernel, drivers * '''uImage''' - kernel, drivers * '''uramdisk.image.gz''' - applications * '''uramdisk.image.gz''' - applications -</font>+ Copy them on the micro SD card (FAT partition) > run '''boot''' once in the u-boot command line. Copy them on the micro SD card (FAT partition) > run '''boot''' once in the u-boot command line. Line 26: Line 25: * Auto unpacking the root file system image to RAM when booting: * Auto unpacking the root file system image to RAM when booting: ** Check u-boot default environment variables when building the bootloader. ** Check u-boot default environment variables when building the bootloader. -** <font style='color:rgba(200,200,200,1)'> Keep '''uramdisk.image.gz''' along with all the other files on the FAT partition of (micro)SD card.</font>+** Keep '''uramdisk.image.gz''' along with all the other files on the FAT partition of (micro)SD card. -* <font style='color:rgba(200,200,200,1)'>Root file system on EXT2(EXT3,etc.) partition of (micro)SD card.</font>+* <font style='color:rgba(100,100,100,1)'>Root file system on EXT2(EXT3,etc.) partition of (micro)SD card.</font> - + ==<font color="blue">Setup</font>== ==<font color="blue">Setup</font>== Line 39: Line 37: git clone -b master https://github.com/Elphel/meta-ezynq.git meta-ezynq git clone -b master https://github.com/Elphel/meta-ezynq.git meta-ezynq - cd meta-ezynq; git checkout 8818b2b560245777a730d6715e2be34c9c6545bc; cd ..+ cd meta-ezynq; git checkout b8b1cd8e6dae7cadb51e987f966a4ffbcd6c6543; cd .. git clone -b master https://github.com/Elphel/meta-elphel393.git meta-elphel393 git clone -b master https://github.com/Elphel/meta-elphel393.git meta-elphel393 - cd meta-elphel393; git checkout fceb0b9649186eced2e4f2a1cab7d3457de3e526; cd ..+ cd meta-elphel393; git checkout 15ef78b0f8c836a0aa74e93f245eeeb7094af263; cd .. git clone -b master https://github.com/Xilinx/meta-xilinx.git meta-xilinx git clone -b master https://github.com/Xilinx/meta-xilinx.git meta-xilinx Line 49: Line 47: git clone -b master git://git.openembedded.org/meta-openembedded meta-openembedded git clone -b master git://git.openembedded.org/meta-openembedded meta-openembedded cd meta-openembedded; git checkout 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c; cd .. cd meta-openembedded; git checkout 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c; cd .. - + '''#Part 2 : init environment and auto-fill Yocto's conf-files''' '''#Part 2 : init environment and auto-fill Yocto's conf-files''' Line 82: Line 80: * Step 3: build bootable image (3 targets) * Step 3: build bootable image (3 targets) - bitbake u-boot-ezynq <font style='color:rgba(200,200,200,1)'>linux-xlnx core-image-elphel393</font>+ bitbake u-boot-ezynq device-tree linux-xlnx core-image-elphel393 </font> </font> Line 94: Line 92: </font> </font> ====Output==== ====Output==== -* poky/build/tmp/deploy/images/'''boot.bin'''+* poky/build/tmp/deploy/images/<machine>/'''boot.bin''' -* poky/build/tmp/deploy/images/'''u-boot-dtb.img'''+* poky/build/tmp/deploy/images/<machine>/'''u-boot-dtb.img''' ====Notes==== ====Notes==== Line 107: Line 105: </font> </font> ====Output==== ====Output==== -* poky/build/tmp/deploy/images/'''devicetree.dtb'''+* poky/build/tmp/deploy/images/<machine>/'''devicetree.dtb''' ==<font color="blue">Build kernel</font>== ==<font color="blue">Build kernel</font>== Line 116: Line 114: </font> </font> ====Output==== ====Output==== -* poky/build/tmp/deploy/images/.../'''uImage''' (kernel)+* poky/build/tmp/deploy/images/<machine>/'''uImage''' (kernel) ====Notes==== ====Notes==== Line 128: Line 126: </font> </font> ====Output==== ====Output==== -* poky/build/tmp/deploy/images/'''uramdisk.image.gz''' (the file has *.u-boot extension after it's built)+* poky/build/tmp/deploy/images/<machine>/'''uramdisk.image.gz''' (the file has *.u-boot extension after it's built) OlegEzynq
Develop (add support for new boards):
← Older revision Revision as of 22:23, 28 January 2016 (6 intermediate revisions not shown)Line 10: Line 10: <b>as of 2016/01/13...</b> <b>as of 2016/01/13...</b> -* For a new board you still have to run an extra Xilinx program to generate ps7_init.c/h+* For a new board you still have to run an extra Xilinx program to generate ps7_init.c/h. ==Supported boards== ==Supported boards== Line 25: Line 25: | style="padding:0px 15px 0px 15px;" | Zynq 7Z045 | style="padding:0px 15px 0px 15px;" | Zynq 7Z045 | style="padding:0px 15px 0px 15px;" | Xilinx | style="padding:0px 15px 0px 15px;" | Xilinx -| style="padding:0px 15px 0px 15px;" | <font color='green'>Y</font>+| style="padding:0px 15px 0px 15px;" | <font color='red'>N</font> |- |- | style="padding:0px 15px 0px 15px;" | [http://www.zedboard.org/ ZedBoard] | style="padding:0px 15px 0px 15px;" | [http://www.zedboard.org/ ZedBoard] | style="padding:0px 15px 0px 15px;" | Zynq 7Z020 | style="padding:0px 15px 0px 15px;" | Zynq 7Z020 | style="padding:0px 15px 0px 15px;" | Digilent/Avnet | style="padding:0px 15px 0px 15px;" | Digilent/Avnet -| style="padding:0px 15px 0px 15px;" | <font color='green'>Y</font>+| style="padding:0px 15px 0px 15px;" | <font color='red'>N</font> |- |- | style="padding:0px 15px 0px 15px;" | [http://blog.elphel.com/2013/11/nc393-development-progress-testing-the-hardware/ 10393] | style="padding:0px 15px 0px 15px;" | [http://blog.elphel.com/2013/11/nc393-development-progress-testing-the-hardware/ 10393] Line 37: Line 37: | style="padding:0px 15px 0px 15px;" | <font color='green'>Y</font> | style="padding:0px 15px 0px 15px;" | <font color='green'>Y</font> |} |} - ==Output== ==Output== * '''boot.bin''' (SPL) - loads u-boot.img, no FSBL needed. * '''boot.bin''' (SPL) - loads u-boot.img, no FSBL needed. -* '''u-boot.img''' (u-boot image)+* '''u-boot-dtb.img''' (u-boot image) Boot: Copy them to SD card in order to boot from it. Boot: Copy them to SD card in order to boot from it. - ==Install meta-toolchain (Kubuntu 13.04)== ==Install meta-toolchain (Kubuntu 13.04)== Line 62: Line 60: git clone https://github.com/Elphel/ezynq.git git clone https://github.com/Elphel/ezynq.git cd ezynq cd ezynq - ./install_uboot.sh+ ./install_uboot.sh (edit the toolchain path) </font> </font> Line 81: Line 79: ** '''boot_head.bin''' - contains values for RBL register initialization ** '''boot_head.bin''' - contains values for RBL register initialization ** '''boot.bin''' - the SPL image ** '''boot.bin''' - the SPL image -** '''u-boot.img''' - the u-boot image+** '''u-boot-dtb.img''' - the u-boot image ** '''u-boot.html''' - configuration settings overview ** '''u-boot.html''' - configuration settings overview ** '''u-boot.map''' - the bootloader's memory map ** '''u-boot.map''' - the bootloader's memory map ** '''u-boot''' - ELF file ** '''u-boot''' - ELF file - ==Develop (add support for new boards)== ==Develop (add support for new boards)== -* Add a new board record to the list in the ''boards.cfg'' (or leave as is if the item already exists).+* (not needed anymore?) Add a new board record to the list in the ''boards.cfg'' (or leave as is if the item already exists). +* Create '''configs/zynq_microzed_defconfig''' file * Create a configuration file for the new board - use ''include/configs/zynq_microzed.h'' as a reference * Create a configuration file for the new board - use ''include/configs/zynq_microzed.h'' as a reference * Edit (or create new for specific memory and chip) according to the board configuration the following files: * Edit (or create new for specific memory and chip) according to the board configuration the following files: Line 96: Line 94: * Build: * Build: <font size='2'>./makeuboot <new_board>_config</font> <font size='2'>./makeuboot <new_board>_config</font> - ==Known issues== ==Known issues== OlegPoky 2.0 manual
Output:
← Older revision Revision as of 22:11, 28 January 2016 (5 intermediate revisions not shown)Line 35: Line 35: '''#Part 1''' '''#Part 1''' - git clone -b jethro git://git.yoctoproject.org/poky.git poky+ git clone -b master git://git.yoctoproject.org/poky.git poky - cd poky; git checkout 83b72d8d1fdab2f7727083df59c00d9fa2324169+ cd poky; git checkout 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c - git clone -b jethro https://github.com/Elphel/meta-ezynq.git meta-ezynq+ git clone -b master https://github.com/Elphel/meta-ezynq.git meta-ezynq - cd meta-ezynq; git checkout dd185f86155c3f9623e058d84f2fb3ddfae0b22c; cd ..+ cd meta-ezynq; git checkout 8818b2b560245777a730d6715e2be34c9c6545bc; cd .. - git clone -b jethro https://github.com/Elphel/meta-elphel393.git meta-elphel393+ git clone -b master https://github.com/Elphel/meta-elphel393.git meta-elphel393 - cd meta-elphel393; git checkout f6c78d1d837b83b3d51e1ac962dff435c38f8f0c; cd ..+ cd meta-elphel393; git checkout fceb0b9649186eced2e4f2a1cab7d3457de3e526; cd .. git clone -b master https://github.com/Xilinx/meta-xilinx.git meta-xilinx git clone -b master https://github.com/Xilinx/meta-xilinx.git meta-xilinx - cd meta-xilinx; git checkout 989a6a12010247aebf137d8ad3f6a042da42640a; cd ..+ cd meta-xilinx; git checkout cc146d6c170f100eb2f445047969893faa7a6a55; cd .. + git clone -b master git://git.openembedded.org/meta-openembedded meta-openembedded + cd meta-openembedded; git checkout 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c; cd .. + '''#Part 2 : init environment and auto-fill Yocto's conf-files''' '''#Part 2 : init environment and auto-fill Yocto's conf-files''' Line 61: Line 64: echo " $CURRENT_PATH/meta-elphel393 \\" >> $BBLAYERS_CONF echo " $CURRENT_PATH/meta-elphel393 \\" >> $BBLAYERS_CONF echo " $CURRENT_PATH/meta-xilinx \\" >> $BBLAYERS_CONF echo " $CURRENT_PATH/meta-xilinx \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-openembedded/meta-oe \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-openembedded/meta-python \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-openembedded/meta-networking \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-openembedded/meta-webserver \\" >> $BBLAYERS_CONF echo " \"" >> $BBLAYERS_CONF echo " \"" >> $BBLAYERS_CONF Line 94: Line 101: * Since Poky 1.5.1 u-boot introduced Kconfig and currently (as of 2016/01/22) is still migrating from autoconf - keeping both build methods working together. * Since Poky 1.5.1 u-boot introduced Kconfig and currently (as of 2016/01/22) is still migrating from autoconf - keeping both build methods working together. * Current u-boot uses the board's device tree blob to make a stripped version for itself - uncompiled device tree files are present in the u-boot sources * Current u-boot uses the board's device tree blob to make a stripped version for itself - uncompiled device tree files are present in the u-boot sources + +==<font color="blue">Compile devicetree</font>== +<font size='2'> + bitbake device-tree +</font> +====Output==== +* poky/build/tmp/deploy/images/'''devicetree.dtb''' ==<font color="blue">Build kernel</font>== ==<font color="blue">Build kernel</font>== Line 103: Line 117: ====Output==== ====Output==== * poky/build/tmp/deploy/images/.../'''uImage''' (kernel) * poky/build/tmp/deploy/images/.../'''uImage''' (kernel) -* poky/build/tmp/deploy/images/.../'''devicetree.dtb''' (or some *.dtb) - currently and temporarily is built with <b>bitbake device-tree</b> ====Notes==== ====Notes==== OlegPoky 2.0 manual
← Older revision
Revision as of 03:18, 28 January 2016
(2 intermediate revisions not shown)Line 35:
Line 35:
'''#Part 1''' '''#Part 1'''
- git clone -b jethro git://git.yoctoproject.org/poky.git poky+ git clone -b master git://git.yoctoproject.org/poky.git poky
- cd poky; git checkout 83b72d8d1fdab2f7727083df59c00d9fa2324169+ cd poky; git checkout 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c
- git clone -b jethro https://github.com/Elphel/meta-ezynq.git meta-ezynq+ git clone -b master https://github.com/Elphel/meta-ezynq.git meta-ezynq
- cd meta-ezynq; git checkout dd185f86155c3f9623e058d84f2fb3ddfae0b22c; cd ..+ cd meta-ezynq; git checkout 8818b2b560245777a730d6715e2be34c9c6545bc; cd ..
- git clone -b jethro https://github.com/Elphel/meta-elphel393.git meta-elphel393+ git clone -b master https://github.com/Elphel/meta-elphel393.git meta-elphel393
- cd meta-elphel393; git checkout f6c78d1d837b83b3d51e1ac962dff435c38f8f0c; cd ..+ cd meta-elphel393; git checkout 6b80bea222fb4882cf7c2ce7efc435596c25e367; cd ..
git clone -b master https://github.com/Xilinx/meta-xilinx.git meta-xilinx git clone -b master https://github.com/Xilinx/meta-xilinx.git meta-xilinx
- cd meta-xilinx; git checkout 989a6a12010247aebf137d8ad3f6a042da42640a; cd ..+ cd meta-xilinx; git checkout cc146d6c170f100eb2f445047969893faa7a6a55; cd ..
+ git clone -b master git://git.openembedded.org/meta-openembedded meta-openembedded
+ cd meta-openembedded; git checkout 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c; cd ..
+
'''#Part 2 : init environment and auto-fill Yocto's conf-files''' '''#Part 2 : init environment and auto-fill Yocto's conf-files'''
Line 61:
Line 64:
echo " $CURRENT_PATH/meta-elphel393 \\" >> $BBLAYERS_CONF echo " $CURRENT_PATH/meta-elphel393 \\" >> $BBLAYERS_CONF
echo " $CURRENT_PATH/meta-xilinx \\" >> $BBLAYERS_CONF echo " $CURRENT_PATH/meta-xilinx \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta-openembedded/meta-oe \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta-openembedded/meta-python \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta-openembedded/meta-networking \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta-openembedded/meta-webserver \\" >> $BBLAYERS_CONF
echo " \"" >> $BBLAYERS_CONF echo " \"" >> $BBLAYERS_CONF
Oleg
Trigger
External (J15):
← Older revision Revision as of 18:38, 25 January 2016 (2 intermediate revisions not shown)Line 80: Line 80: ====External (J15)==== ====External (J15)==== -Receive: GPIO[10] needs to be configured to receive the trigger signal -+Receive: GPIO[10] needs to be configured to receive the trigger signal: +<font size='2'> +* Step 0: Link to parameters that will be changed: + http://192.168.0.9/parsedit.php?TRIG&TRIG_CONDITION&TRIG_OUT&TRIG_PERIOD&COMPRESSOR_RUN +* Step 1: stop the compressor + COMPRESSOR_RUN=0x0 -(Same parameters for master and slave)+* Step 2: (Same parameters for master and slave) -* TRIG_OUT=0x800000+ TRIG_OUT=0x800000 -* set the TRIG_PERIOD=0x5B8D800 (=96000000 dec, =1sec =1fps)+ set the TRIG_PERIOD=0x5B8D800 (=96000000 dec, =1sec =1fps) -* TRIG_CONDITION=0x200000+ TRIG_CONDITION=0x200000 -* TRIG=0x4+ TRIG=0x4 + +* Step 3: restart the compressor + COMPRESSOR_RUN=0x2 Generate: GPIO[11] needs to be programmed - set TRIG_OUT=0x800000 Generate: GPIO[11] needs to be programmed - set TRIG_OUT=0x800000 -<font size='2'>+ Notes: Notes: OlegPoky 2.0 manual
← Older revision
Revision as of 23:43, 22 January 2016
(13 intermediate revisions not shown)Line 1:
Line 1:
-==About==+==<font color="blue">Description</font>==
+
+* Building embedded Linux image for Zynq ARMv7 platform - Elphel 10393 board
+
+==<font color="blue">About</font>==
+
+* Yocto Poky revision = 2.0
+* Host OS = Kubuntu 14.04.3 LTS x64
+
+==<font color="blue">Required packages</font>==
+* Found in [http://www.yoctoproject.org/docs/2.0/mega-manual/mega-manual.html Yocto Project mega-manual]
+
+==<font color="blue">Output files</font>==
+Found in the poky's deploy directory: '''poky/build/tmp/deploy/images/'''
+
+These names are listed as they appear in the u-boot configuration header file - actual output files have different names:
+* '''boot.bin'''+('''u-boot-dtb.img''') - u-boot as the first stage bootloader = Secondary Program Loader that boots '''u-boot-dtb.img'''
+<font style='color:rgba(200,200,200,1)'>
+* '''devicetree.dtb''' - device tree with described interfaces, zynq registers, interrupts and drivers
+* '''uImage''' - kernel, drivers
+* '''uramdisk.image.gz''' - applications
+</font>
+Copy them on the micro SD card (FAT partition) > run '''boot''' once in the u-boot command line.
+
+==<font color="blue">Boot options</font>==
+* Auto unpacking the root file system image to RAM when booting:
+** Check u-boot default environment variables when building the bootloader.
+** <font style='color:rgba(200,200,200,1)'> Keep '''uramdisk.image.gz''' along with all the other files on the FAT partition of (micro)SD card.</font>
+* <font style='color:rgba(200,200,200,1)'>Root file system on EXT2(EXT3,etc.) partition of (micro)SD card.</font>
+
+
+==<font color="blue">Setup</font>==
+* Step 1: Copy the following lines to <b>some_script.sh</b>, modify and run:
+<font size='2'>
+ '''#Part 1'''
+
+ git clone -b jethro git://git.yoctoproject.org/poky.git poky
+ cd poky; git checkout 83b72d8d1fdab2f7727083df59c00d9fa2324169
+
+ git clone -b jethro https://github.com/Elphel/meta-ezynq.git meta-ezynq
+ cd meta-ezynq; git checkout dd185f86155c3f9623e058d84f2fb3ddfae0b22c; cd ..
+
+ git clone -b jethro https://github.com/Elphel/meta-elphel393.git meta-elphel393
+ cd meta-elphel393; git checkout f6c78d1d837b83b3d51e1ac962dff435c38f8f0c; cd ..
+
+ git clone -b master https://github.com/Xilinx/meta-xilinx.git meta-xilinx
+ cd meta-xilinx; git checkout 989a6a12010247aebf137d8ad3f6a042da42640a; cd ..
+
+ '''#Part 2 : init environment and auto-fill Yocto's conf-files'''
+
+ CURRENT_PATH=$(dirname $(readlink -f "$0"))
+ . ./oe-init-build-env
+
+ BBLAYERS_CONF="conf/bblayers.conf"
+
+ echo "BBLAYERS = \" \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta-yocto \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta-yocto-bsp \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta-ezynq \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta-elphel393 \\" >> $BBLAYERS_CONF
+ echo " $CURRENT_PATH/meta-xilinx \\" >> $BBLAYERS_CONF
+ echo " \"" >> $BBLAYERS_CONF
+
+ LOCAL_CONF="conf/local.conf"
+
+ # <font color='red'>change the MACHINE</font>
+ echo "MACHINE ?= \"'''elphel393'''\"" >> $LOCAL_CONF
+ # <font color='red'>Elphel's MIRROR website, '''\n''' is important</font>
+ echo "MIRRORS =+ \"http://.*/.* http://mirror.elphel.com/elphel393_mirror/ \n \"" >> $LOCAL_CONF
+
+* Step 2: re-init environment
+ cd poky
+ . ./oe-init-build-env
+
+* Step 3: build bootable image (3 targets)
+ bitbake u-boot-ezynq <font style='color:rgba(200,200,200,1)'>linux-xlnx core-image-elphel393</font>
+</font>
+
+==<font color="blue">Build bootloader</font>==
+<font size='2'>
+ bitbake u-boot-ezynq
+ or
+ bitbake u-boot
+ or
+ bitbake virtual/bootloader
+</font>
+====Output====
+* poky/build/tmp/deploy/images/'''boot.bin'''
+* poky/build/tmp/deploy/images/'''u-boot-dtb.img'''
+
+====Notes====
+* Since Poky 1.5.1 switched from u-boot-xlnx to u-boot - some of the u-boot-xlnx reached the upstream
+* Since Poky 1.5.1 u-boot introduced Kconfig and currently (as of 2016/01/22) is still migrating from autoconf - keeping both build methods working together.
+* Current u-boot uses the board's device tree blob to make a stripped version for itself - uncompiled device tree files are present in the u-boot sources
+
+==<font color="blue">Build kernel</font>==
+<font size='2'>
+ bitbake linux-xlnx
+ or
+ bitbake virtual/kernel
+</font>
+====Output====
+* poky/build/tmp/deploy/images/.../'''uImage''' (kernel)
+* poky/build/tmp/deploy/images/.../'''devicetree.dtb''' (or some *.dtb) - currently and temporarily is built with <b>bitbake device-tree</b>
+
+====Notes====
+* Kernel version is 4.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
+
+==<font color="blue">Build ramdisk.image.gz</font>==
+<font size='2'>
+ bitbake core-image-elphel393
+</font>
+====Output====
+* poky/build/tmp/deploy/images/'''uramdisk.image.gz''' (the file has *.u-boot extension after it's built)
Oleg
Poky 2.0 manual
Notes:
← Older revision Revision as of 22:46, 22 January 2016 (8 intermediate revisions not shown)Line 1: Line 1: -==About==+==<font color="blue">Description</font>== + +* Building embedded Linux image for Zynq ARMv7 platform - Elphel 10393 board + +==<font color="blue">About</font>== + +* Yocto Poky revision = 2.0 +* Host OS = Kubuntu 14.04.3 LTS x64 + +==<font color="blue">Required packages</font>== +* Found in [http://www.yoctoproject.org/docs/2.0/mega-manual/mega-manual.html Yocto Project mega-manual] + +==<font color="blue">Output files</font>== +Found in the poky's deploy directory: '''poky/build/tmp/deploy/images/''' + +These names are listed as they appear in the u-boot configuration header file - actual output files have different names: +* '''boot.bin'''+('''u-boot-dtb.img''') - u-boot as the first stage bootloader = Secondary Program Loader that boots '''u-boot-dtb.img''' +<font style='color:rgba(200,200,200,1)'> +* '''devicetree.dtb''' - device tree with described interfaces, zynq registers, interrupts and drivers +* '''uImage''' - kernel, drivers +* '''uramdisk.image.gz''' - applications +</font> +Copy them on the micro SD card (FAT partition) > run '''boot''' once in the u-boot command line. + +==<font color="blue">Boot options</font>== +* Auto unpacking the root file system image to RAM when booting: +** Check u-boot default environment variables when building the bootloader. +** <font style='color:rgba(200,200,200,1)'> Keep '''uramdisk.image.gz''' along with all the other files on the FAT partition of (micro)SD card.</font> +* <font style='color:rgba(200,200,200,1)'>Root file system on EXT2(EXT3,etc.) partition of (micro)SD card.</font> + + +==<font color="blue">Setup</font>== +* Step 1: Copy the following lines to <b>some_script.sh</b>, modify and run: +<font size='2'> + '''#Part 1''' + + git clone -b jethro git://git.yoctoproject.org/poky.git poky + cd poky; git checkout 83b72d8d1fdab2f7727083df59c00d9fa2324169 + + git clone -b jethro https://github.com/Elphel/meta-ezynq.git meta-ezynq + cd meta-ezynq; git checkout dd185f86155c3f9623e058d84f2fb3ddfae0b22c; cd .. + + git clone -b jethro https://github.com/Elphel/meta-elphel393.git meta-elphel393 + cd meta-elphel393; git checkout f6c78d1d837b83b3d51e1ac962dff435c38f8f0c; cd .. + + git clone -b master https://github.com/Xilinx/meta-xilinx.git meta-xilinx + cd meta-xilinx; git checkout 989a6a12010247aebf137d8ad3f6a042da42640a; cd .. + + '''#Part 2 : init environment and auto-fill Yocto's conf-files''' + + CURRENT_PATH=$(dirname $(readlink -f "$0")) + . ./oe-init-build-env + + BBLAYERS_CONF="conf/bblayers.conf" + + echo "BBLAYERS = \" \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-yocto \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-yocto-bsp \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-ezynq \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-elphel393 \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-xilinx \\" >> $BBLAYERS_CONF + echo " \"" >> $BBLAYERS_CONF + + LOCAL_CONF="conf/local.conf" + + # <font color='red'>change the MACHINE</font> + echo "MACHINE ?= \"'''elphel393'''\"" >> $LOCAL_CONF + # <font color='red'>Elphel's MIRROR website, '''\n''' is important</font> + echo "MIRRORS =+ \"http://.*/.* http://mirror.elphel.com/elphel393_mirror/ \n \"" >> $LOCAL_CONF + +* Step 2: re-init environment + cd poky + . ./oe-init-build-env + +* Step 3: build bootable image (3 targets) + bitbake u-boot-ezynq <font style='color:rgba(200,200,200,1)'>linux-xlnx core-image-elphel393</font> +</font> + +==<font color="blue">Build bootloader</font>== +<font size='2'> + bitbake u-boot-ezynq + or + bitbake u-boot + or + bitbake virtual/bootloader +</font> +====Output==== +* poky/build/tmp/deploy/images/'''boot.bin''' +* poky/build/tmp/deploy/images/'''u-boot-dtb.img''' + +====Notes==== +* Since Poky 1.5.1 switched from u-boot-xlnx to u-boot - some of the u-boot-xlnx reached the upstream +* Since Poky 1.5.1 u-boot introduced Kconfig and currently (as of 2016/01/22) is still migrating from autoconf - keeping both build methods working together. + +==<font color="blue">Build kernel</font>== +<font size='2'> + bitbake linux-xlnx + or + bitbake virtual/kernel +</font> +====Output==== +* poky/build/tmp/deploy/images/.../'''uImage''' (kernel) +* poky/build/tmp/deploy/images/.../'''devicetree.dtb''' (or some *.dtb) + +====Notes==== +* Kernel version is 4.0, linux-xlnx +* Device Tree Blob is compiled separately in linux-xlnx OlegPoky 2.0 manual
Setup:
← Older revision Revision as of 22:08, 22 January 2016 (3 intermediate revisions not shown)Line 1: Line 1: -==About==+==<font color="blue">Description</font>== + +* Building embedded Linux image for Zynq ARMv7 platform - Elphel 10393 board + +==<font color="blue">About</font>== + +* Yocto Poky revision = 2.0 +* Host OS = Kubuntu 14.04.3 LTS x64 + +==<font color="blue">Required packages</font>== +* Found in [http://www.yoctoproject.org/docs/2.0/mega-manual/mega-manual.html Yocto Project mega-manual] + +==<font color="blue">Output files</font>== +Found in the poky's deploy directory: '''poky/build/tmp/deploy/images/''' + +These names are listed as they appear in the u-boot configuration header file - actual output files have different names: +* '''boot.bin'''+('''u-boot-dtb.img''') - u-boot as the first stage bootloader = Secondary Program Loader that boots '''u-boot-dtb.img''' +<font style='color:rgba(200,200,200,1)'> +* '''devicetree.dtb''' - device tree with described interfaces, zynq registers, interrupts and drivers +* '''uImage''' - kernel, drivers +* '''uramdisk.image.gz''' - applications +</font> +Copy them on the micro SD card (FAT partition) > run '''boot''' once in the u-boot command line. + +==<font color="blue">Boot options</font>== +* Auto unpacking the root file system image to RAM when booting: +** Check u-boot default environment variables when building the bootloader. +** <font style='color:rgba(200,200,200,1)'> Keep '''uramdisk.image.gz''' along with all the other files on the FAT partition of (micro)SD card.</font> +* <font style='color:rgba(200,200,200,1)'>Root file system on EXT2(EXT3,etc.) partition of (micro)SD card.</font> + + +==<font color="blue">Setup</font>== +Copy the following lines to <b>some_script.sh</b>, modify and run: +<font size='2'> + '''#Part 1''' + + git clone -b jethro git://git.yoctoproject.org/poky.git poky + cd poky; git checkout 83b72d8d1fdab2f7727083df59c00d9fa2324169 + + git clone -b jethro https://github.com/Elphel/meta-ezynq.git meta-ezynq + cd meta-ezynq; git checkout dd185f86155c3f9623e058d84f2fb3ddfae0b22c; cd .. + + git clone -b jethro https://github.com/Elphel/meta-elphel393.git meta-elphel393 + cd meta-elphel393; git checkout f6c78d1d837b83b3d51e1ac962dff435c38f8f0c; cd .. + + git clone -b master https://github.com/Xilinx/meta-xilinx.git meta-xilinx + cd meta-xilinx; git checkout 989a6a12010247aebf137d8ad3f6a042da42640a; cd .. + + '''#Part 2 : init environment and auto-fill Yocto's conf-files''' + + CURRENT_PATH=$(dirname $(readlink -f "$0")) + . ./oe-init-build-env + + BBLAYERS_CONF="conf/bblayers.conf" + + echo "BBLAYERS = \" \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-yocto \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-yocto-bsp \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-ezynq \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-elphel393 \\" >> $BBLAYERS_CONF + echo " $CURRENT_PATH/meta-xilinx \\" >> $BBLAYERS_CONF + echo " \"" >> $BBLAYERS_CONF + + LOCAL_CONF="conf/local.conf" + + # <font color='red'>change the MACHINE</font> + echo "MACHINE ?= \"'''elphel393'''\"" >> $LOCAL_CONF + # <font color='red'>Elphel's MIRROR website, '''\n''' is important</font> + echo "MIRRORS =+ \"http://.*/.* http://mirror.elphel.com/elphel393_mirror/ \n \"" >> $LOCAL_CONF OlegYocto tests
About:
← Older revision Revision as of 21:19, 22 January 2016 (2 intermediate revisions not shown)Line 1: Line 1: ==<font color="blue">About</font>== ==<font color="blue">About</font>== -<font size='3'><b>NOTE: a newer version of the article is available</b></font>+<font size='4'><b>NOTE: a newer version of the article is available [[Poky_2.0_manual|here]]</b></font> * Poky revision - DORA (1.5) * Poky revision - DORA (1.5) OlegPoky 2.0 manual
Created page with "==About=="
New page
==About== OlegYocto tests
About:
← Older revision Revision as of 21:16, 22 January 2016 (2 intermediate revisions not shown)Line 1: Line 1: ==<font color="blue">About</font>== ==<font color="blue">About</font>== + +<font size='3'><b>NOTE: a newer version of the article is available</b></font> + +* Poky revision - DORA (1.5) * All of the described things happen in Kubuntu 13.04 * All of the described things happen in Kubuntu 13.04 * Building Linux images for Zynq platform - ARMv7 * Building Linux images for Zynq platform - ARMv7 OlegTrigger
External (J15):
← Older revision Revision as of 19:11, 18 January 2016 (7 intermediate revisions not shown)Line 79: Line 79: * TRIG_OUT=0x800000 * TRIG_OUT=0x800000 -====External====+====External (J15)==== Receive: GPIO[10] needs to be configured to receive the trigger signal - Receive: GPIO[10] needs to be configured to receive the trigger signal - +(Same parameters for master and slave) +* TRIG_OUT=0x800000 +* set the TRIG_PERIOD=0x5B8D800 (=96000000 dec, =1sec =1fps) * TRIG_CONDITION=0x200000 * TRIG_CONDITION=0x200000 * TRIG=0x4 * TRIG=0x4 - Generate: GPIO[11] needs to be programmed - set TRIG_OUT=0x800000 Generate: GPIO[11] needs to be programmed - set TRIG_OUT=0x800000 Line 98: Line 100: GPIO[11] & GPIO[10] can be set by following http://192.168.0.9/sync.php?role=detect&channel=external GPIO[11] & GPIO[10] can be set by following http://192.168.0.9/sync.php?role=detect&channel=external + +====External (J12-J14)==== +Master +* TRIG_OUT=0x80000 (J12) +* set the TRIG_PERIOD=0x5B8D800 (=96000000 dec, =1sec =1fps) +* TRIG_CONDITION=0x20000 +* TRIG=0x4 + +Slave + +* TRIG_OUT=0x80000 +* set the TRIG_PERIOD=0x5B8D800 (=96000000 dec, =1sec =1fps) +* TRIG_CONDITION=0x20000 (J14) +* TRIG=0x4 ==Links== ==Links== [[Media:10369a.pdf|10369 Circuit Diagram, Parts List, PCB layout]] [[Media:10369a.pdf|10369 Circuit Diagram, Parts List, PCB layout]] OlegU-boot-xlnx
Step 2: initenv:
New page
=Desctiption=A walkthrough for microzed, OS = Kubuntu 14.04, gcc 4.8.4
=Steps=
==Step 0: toolchain==
1. Build and install toolchain with poky, instructions [[Yocto_tests#Build_toolchain_.28not_necessary_-_needed_only_for_building_ezynq_targets_outside_poky.29|here]].
==Step 1: get source==
git clone https://github.com/Xilinx/u-boot-xlnx.git
latest commit:
commit 40e8c28b90725f1e23e22c3b3514cf0b531f1bee
Author: Michal Simek <michal.simek@xilinx.com>
Date: Mon Jan 11 11:50:53 2016 +0100
==Step 2: initenv==
1. Create <b>initenv</b> in u-boot-xlnx:
initenv:
#!/bin/sh
export CROSS_COMPILE=arm-poky-linux-gnueabi-
export PATH=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/:$PATH
2. run:
. ./initenv
Note: if forgotten the error would be something like this:
lib/asm-offsets.c:1:0: error: bad value (armv5) for -march= switch
/*
^
make[1]: *** [lib/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
==Step 3: config==
make zynq_microzed_defconfig
output:
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
==Step 4: make==
make
output:
arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc
make[2]: *** [examples/standalone/hello_world] Error 1
make[1]: *** [examples/standalone] Error 2
make: *** [examples] Error 2
...
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=678e8798ebe0f4fd1bd347db136f1499b8fe00c9 Oleg
U-boot-xlnx
New page
=Desctiption=A walkthrough for microzed, OS = Kubuntu 14.04, gcc 4.8.4
=Steps=
==Step 0: toolchain==
1. Build and install toolchain with poky, instructions [[Yocto_tests#Build_toolchain_.28not_necessary_-_needed_only_for_building_ezynq_targets_outside_poky.29|here]].
==Step 1: get source==
git clone https://github.com/Xilinx/u-boot-xlnx.git
latest commit:
commit 40e8c28b90725f1e23e22c3b3514cf0b531f1bee
Author: Michal Simek <michal.simek@xilinx.com>
Date: Mon Jan 11 11:50:53 2016 +0100
==Step 2: initenv==
1. Create <b>initenv</b> in u-boot-xlnx:
initenv:
#!/bin/sh
export CROSS_COMPILE=arm-poky-linux-gnueabi-
export PATH=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/:$PATH
2. run:
. ./initenv
==Step 3: config==
make zynq_microzed_defconfig
output:
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
==Step 4: make==
make
output:
arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc
make[2]: *** [examples/standalone/hello_world] Error 1
make[1]: *** [examples/standalone] Error 2
make: *** [examples] Error 2
...
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=678e8798ebe0f4fd1bd347db136f1499b8fe00c9 Oleg
U-boot-xlnx
Desctiption:
New page
=Desctiption=A walkthrough for microzed, OS = Kubuntu 14.04
=Steps=
==Step 0: toolchain==
1. Build and install toolchain with poky, instructions [[Yocto_tests#Build_toolchain_.28not_necessary_-_needed_only_for_building_ezynq_targets_outside_poky.29|here]].
==Step 1: get source==
git clone https://github.com/Xilinx/u-boot-xlnx.git
latest commit:
commit 40e8c28b90725f1e23e22c3b3514cf0b531f1bee
Author: Michal Simek <michal.simek@xilinx.com>
Date: Mon Jan 11 11:50:53 2016 +0100
==Step 2: initenv==
1. Create <b>initenv</b> in u-boot-xlnx:
initenv:
#!/bin/sh
export CROSS_COMPILE=arm-poky-linux-gnueabi-
export PATH=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/:$PATH
2. run:
. ./initenv
==Step 3: config==
make zynq_microzed_defconfig
output:
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
==Step 4: make==
make
output:
arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc
make[2]: *** [examples/standalone/hello_world] Error 1
make[1]: *** [examples/standalone] Error 2
make: *** [examples] Error 2
... Oleg
Ezynq
← Older revision
Revision as of 18:51, 14 January 2016
(7 intermediate revisions not shown)Line 3:
Line 3:
====="Free" the code part===== ====="Free" the code part=====
+<b>as of 2014/02/23...</b>
+
Ezynq addresses the potential legal problems with distribution of a product/software based on Zynq platform: Ezynq addresses the potential legal problems with distribution of a product/software based on Zynq platform:
* FSBL is under Xilinx's copyright * FSBL is under Xilinx's copyright
* The current (2014/02/23) official SPL implementation in the [https://github.com/Xilinx/u-boot-xlnx/tree/master-next u-boot-xlnx master-next 54fee227ef141214141a226efd17ae0516deaf32] branch is FSBL-less but it requires to use the files (<b>ps7_init.c/h</b>) that come under Xilinx's copyright which makes u-boot noncompliant with its GPL license. * The current (2014/02/23) official SPL implementation in the [https://github.com/Xilinx/u-boot-xlnx/tree/master-next u-boot-xlnx master-next 54fee227ef141214141a226efd17ae0516deaf32] branch is FSBL-less but it requires to use the files (<b>ps7_init.c/h</b>) that come under Xilinx's copyright which makes u-boot noncompliant with its GPL license.
+
+<b>as of 2016/01/13...</b>
+* For a new board you still have to run an extra Xilinx program to generate ps7_init.c/h
==Supported boards== ==Supported boards==
Line 45:
Line 50:
<font size='2'> <font size='2'>
sudo apt-get install texinfo chrpath sudo apt-get install texinfo chrpath
- git clone -b dora git://git.yoctoproject.org/poky+ git clone -b jethro git://git.yoctoproject.org/poky
cd poky cd poky
. ./oe-init-build-env . ./oe-init-build-env
Line 51:
Line 56:
</font> </font>
-* Run installation script in ''build/tmp/deploy/''+* Run installation script in ''build/tmp/deploy/sdk''
-==Install Ezynq (Kubuntu 13.04)==+==Install Ezynq (Kubuntu 14.04)==
<font size='2'> <font size='2'>
- git clone git://git.code.sf.net/p/elphel/ezynq ezynq+ git clone https://github.com/Elphel/ezynq.git
cd ezynq cd ezynq
./install_uboot.sh ./install_uboot.sh
</font> </font>
-
==Build== ==Build==
Oleg
Ezynq
Install Ezynq (Kubuntu 13.04):
← Older revision Revision as of 02:54, 14 January 2016 (6 intermediate revisions not shown)Line 3: Line 3: ====="Free" the code part===== ====="Free" the code part===== +<b>as of 2014/02/23...</b> + Ezynq addresses the potential legal problems with distribution of a product/software based on Zynq platform: Ezynq addresses the potential legal problems with distribution of a product/software based on Zynq platform: * FSBL is under Xilinx's copyright * FSBL is under Xilinx's copyright * The current (2014/02/23) official SPL implementation in the [https://github.com/Xilinx/u-boot-xlnx/tree/master-next u-boot-xlnx master-next 54fee227ef141214141a226efd17ae0516deaf32] branch is FSBL-less but it requires to use the files (<b>ps7_init.c/h</b>) that come under Xilinx's copyright which makes u-boot noncompliant with its GPL license. * The current (2014/02/23) official SPL implementation in the [https://github.com/Xilinx/u-boot-xlnx/tree/master-next u-boot-xlnx master-next 54fee227ef141214141a226efd17ae0516deaf32] branch is FSBL-less but it requires to use the files (<b>ps7_init.c/h</b>) that come under Xilinx's copyright which makes u-boot noncompliant with its GPL license. + +<b>as of 2016/01/13...</b> + +under investigation ==Supported boards== ==Supported boards== Line 45: Line 51: <font size='2'> <font size='2'> sudo apt-get install texinfo chrpath sudo apt-get install texinfo chrpath - git clone -b dora git://git.yoctoproject.org/poky+ git clone -b jethro git://git.yoctoproject.org/poky cd poky cd poky . ./oe-init-build-env . ./oe-init-build-env Line 51: Line 57: </font> </font> -* Run installation script in ''build/tmp/deploy/''+* Run installation script in ''build/tmp/deploy/sdk'' -==Install Ezynq (Kubuntu 13.04)==+==Install Ezynq (Kubuntu 14.04)== <font size='2'> <font size='2'> - git clone git://git.code.sf.net/p/elphel/ezynq ezynq+ git clone https://github.com/Elphel/ezynq.git cd ezynq cd ezynq ./install_uboot.sh ./install_uboot.sh </font> </font> - ==Build== ==Build== OlegEzynq
← Older revision
Revision as of 02:20, 14 January 2016
(2 intermediate revisions not shown)Line 3:
Line 3:
====="Free" the code part===== ====="Free" the code part=====
+<b>as of 2014/02/23...</b>
+
Ezynq addresses the potential legal problems with distribution of a product/software based on Zynq platform: Ezynq addresses the potential legal problems with distribution of a product/software based on Zynq platform:
* FSBL is under Xilinx's copyright * FSBL is under Xilinx's copyright
* The current (2014/02/23) official SPL implementation in the [https://github.com/Xilinx/u-boot-xlnx/tree/master-next u-boot-xlnx master-next 54fee227ef141214141a226efd17ae0516deaf32] branch is FSBL-less but it requires to use the files (<b>ps7_init.c/h</b>) that come under Xilinx's copyright which makes u-boot noncompliant with its GPL license. * The current (2014/02/23) official SPL implementation in the [https://github.com/Xilinx/u-boot-xlnx/tree/master-next u-boot-xlnx master-next 54fee227ef141214141a226efd17ae0516deaf32] branch is FSBL-less but it requires to use the files (<b>ps7_init.c/h</b>) that come under Xilinx's copyright which makes u-boot noncompliant with its GPL license.
+
+<b>as of 2015/01/13...</b>
+
+under investigation
==Supported boards== ==Supported boards==
Oleg
Elphel camera parts 0393-12
← Older revision
Revision as of 02:47, 8 January 2016
Line 1:
Line 1:
-[[Elphel_camera_parts]]+[[Elphel_camera_parts_0393|Elphel NC393 series camera parts]]
== 0393-12 - front ends == == 0393-12 - front ends ==
=== 0393-12-29 - Sensor front end, CS-mount === === 0393-12-29 - Sensor front end, CS-mount ===
Mikhail
Pages
