Imaging solutions with Free Software & Open Hardware

Who's online

There are currently 0 users online.

Subscribe to Wiki Recent Changes feed
Track the most recent changes to the wiki in this feed. MediaWiki 1.28.0
Updated: 17 min 44 sec ago

Zynq development issues

Tue, 04/12/2016 - 12:36

New page

==Log==
<font size='2'>
[ 1.035759] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.042319] usbcore: registered new interface driver usb-storage
[ 1.073619] e0002000.ps7-usb supply vbus not found, using dummy regulator
[ 1.103560] Registering platform device 'ci_hdrc.0'. Parent at e0002000.ps7-usb
[ 1.114806] ci_hdrc ci_hdrc.0: ChipIdea HDRC found, revision: 22, lpm: 0; cap: f00d4100 op: f00d4140
[ 1.136023] ci_hdrc ci_hdrc.0: unable to init phy: -110
[ 1.141232] ci_hdrc: probe of ci_hdrc.0 failed with error -110
</font> Oleg

Presentations

Thu, 03/31/2016 - 14:24

← Older revision Revision as of 20:24, 31 March 2016 (2 intermediate revisions not shown)Line 1: Line 1: ==Presentations== ==Presentations==  +  +===2014/04/14  UNIGE University of Geneva ===  +* Presentation:  +**[http://community.elphel.com/files/presentations/UNIGE_Univ_of_Geneva/OpenHardware-ScientificApplications_U-Geneve04-2014.odp High Performance Open Hardware for Scientific Applications] (45 MB)  +* Video :  +**[https://mediaserver.unige.ch/play/84201 12 years of designing and manufacturing Open Hardware cameras]   + ===2013/10/08 UofU Computer Engineering Jr Seminar=== ===2013/10/08 UofU Computer Engineering Jr Seminar=== Line 10: Line 17: ===2012/10/22 UofU SCI ImageLunch=== ===2012/10/22 UofU SCI ImageLunch=== * Presentation: * Presentation:  +**[http://community.elphel.com/files/presentations/20111107_UU_SCI_ImageLunch/Spherical_View_Multi-Camera_System_Calibration_00.odp Spherical View Multi-Camera System Calibration] (8.2 MB) * Sound: * Sound: ** [http://community.elphel.com/files/presentations/20121022_UU_SCI_ImageLunch/Voice0004.amr amr] (5MB) ** [http://community.elphel.com/files/presentations/20121022_UU_SCI_ImageLunch/Voice0004.amr amr] (5MB) Olga

Presentations

Thu, 03/31/2016 - 13:17

← Older revision Revision as of 19:17, 31 March 2016 (One intermediate revision not shown)Line 1: Line 1: ==Presentations== ==Presentations==  +  +===2014/04/14  UNIGE University of Geneva ===  +* Presentation:  +**[http://community.elphel.com/files/presentations/UNIGE_Univ_of_Geneva/OpenHardware-ScientificApplications_U-Geneve04-2014.odp High Performance Open Hardware for Scientific Applications] (45 MB)  +* Video :  +**[https://mediaserver.unige.ch/play/84201 12 years of designing and manufacturing Open Hardware cameras]   + ===2013/10/08 UofU Computer Engineering Jr Seminar=== ===2013/10/08 UofU Computer Engineering Jr Seminar=== Olga

10359

Thu, 03/31/2016 - 12:04

10359:

← Older revision Revision as of 18:04, 31 March 2016 Line 30: Line 30: ===Power consumption=== ===Power consumption=== -Idle: 3.3V 0.19A  +Idle (programmed): 3.3V 0.19A   ===Connect 10353, 10359 and sensors=== ===Connect 10353, 10359 and sensors=== Oleg

10338

Thu, 03/31/2016 - 12:03

10338:

← Older revision Revision as of 18:03, 31 March 2016 Line 8: Line 8: * 27mm x 15mm * 27mm x 15mm  +Power consumption:  +* idle: 3.3V 0.07A {| {| Oleg

10359

Thu, 03/31/2016 - 12:02

10359:

← Older revision Revision as of 18:02, 31 March 2016 Line 29: Line 29: *[[10359_in_dual_sensor_setup|Dual sensor setup]] *[[10359_in_dual_sensor_setup|Dual sensor setup]]  +===Power consumption===  +Idle: 3.3V 0.19A ===Connect 10353, 10359 and sensors=== ===Connect 10353, 10359 and sensors=== Oleg

Price list

Thu, 03/24/2016 - 18:33

← Older revision Revision as of 00:33, 25 March 2016 Line 1: Line 1: -<span style='color:red;font-size:25px;font-weight:bold'>50% off on the current Eyesis4Pi camera model!</span>  -* <span style='font-size:20px'>Due to development of the new 10393 camera series all current models including Eyesis4Pi are offered at 50% discount while supply lasts</span>  -* <span style='font-size:20px'>Upgrade to 10393 will be available for the current Eyesis4Pi cameras</span>  -  = Ordering  = = Ordering  = Oleg

Eyesis4Pi

Thu, 03/24/2016 - 18:31

← Older revision Revision as of 00:31, 25 March 2016 Line 1: Line 1: -<span style='color:red;font-size:25px;font-weight:bold'>50% off on the current Eyesis4Pi camera model!</span>  -* <span style='font-size:20px'>Due to development of the new 10393 camera series all current models including Eyesis4Pi are offered at 50% discount while supply lasts</span>  -* <span style='font-size:20px'>Upgrade to 10393 will be available for the current Eyesis4Pi cameras</span>  == [[Image:hp_banner_eyesis.png]]<br> == == [[Image:hp_banner_eyesis.png]]<br> == Oleg

Ezynq

Fri, 03/18/2016 - 14:40

← Older revision Revision as of 20:40, 18 March 2016 (2 intermediate revisions not shown)Line 11: Line 11: <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.  +  +<b>as of 2016/03/18...</b>  +* u-boot-xlnx master-next branch is removed long ago - so the link above is broken ==Supported boards== ==Supported boards== Line 44: Line 47: Boot: Copy them to SD card in order to boot from it. Boot: Copy them to SD card in order to boot from it.  +==Build==  +For instructions please follow [[Poky_2.0_manual|this guide]].  +  +<!-- ==Install meta-toolchain (Kubuntu 13.04)== ==Install meta-toolchain (Kubuntu 13.04)== * Build: * Build: Line 104: Line 111: * Bitstream loading is not tested, current code does not enable level shifters - it may be more appropriate to do just before loading of the bitstream. * Bitstream loading is not tested, current code does not enable level shifters - it may be more appropriate to do just before loading of the bitstream. * Write level training for DDR memory doesn't work in MicroZed and ZC706 * Write level training for DDR memory doesn't work in MicroZed and ZC706  +--> Oleg

Poky 2.0 manual

Fri, 03/18/2016 - 12:29

← Older revision Revision as of 18:29, 18 March 2016 (One intermediate revision not shown)Line 51: Line 51:             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 b8b1cd8e6dae7cadb51e987f966a4ffbcd6c6543; cd ..+  cd meta-ezynq; git checkout d3a055fc82fff990f9f2cdb8c09eb948133cf6f4; 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 c5237f99d94217bff8c9180bed93ee673c9590a1; cd ..+  cd meta-elphel393; git checkout 56e3c1b7007faab1ccd4d983348b249d610165d6; 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 Oleg

Poky 2.0 manual

Thu, 03/17/2016 - 20:36

← Older revision Revision as of 02:36, 18 March 2016 Line 51: Line 51:             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 b8b1cd8e6dae7cadb51e987f966a4ffbcd6c6543; cd ..+  cd meta-ezynq; git checkout d7d92c00101a3bfbaf563f4a17ad6f5ba1d3bcda; 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 c5237f99d94217bff8c9180bed93ee673c9590a1; cd ..+  cd meta-elphel393; git checkout 56e3c1b7007faab1ccd4d983348b249d610165d6; 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 Oleg

NAND flash boot rootfs

Thu, 03/10/2016 - 13:56

Boot from NAND flash (rootfs):

← Older revision Revision as of 20:56, 10 March 2016 Line 1: Line 1: ==Boot from NAND flash (rootfs)== ==Boot from NAND flash (rootfs)== * The default boot option - power on. * The default boot option - power on. -* A UBIFS image of rootfs is written to /dev/mtd4 ('''ubi0:elphel393''' in bootargs in the device tree) - mounted as '''/'''+* A UBIFS image of rootfs is written to /dev/mtd4 ('''ubi0:elphel393-rootfs''' in bootargs in the device tree) - mounted as '''/''' ==Reflash factory image== ==Reflash factory image== Oleg

User:Sayme

Wed, 03/09/2016 - 20:48

New user account

Sayme

Poky 2.0 manual

Wed, 03/09/2016 - 13:03

Notes:

← Older revision Revision as of 20:03, 9 March 2016 (One intermediate revision not shown)Line 33: Line 33: * A UBIFS image is written to /dev/mtd4 - is mounted as '''/''' * A UBIFS image is written to /dev/mtd4 - is mounted as '''/''' * [[NAND_flash_boot_rootfs|Detailed instructions]] * [[NAND_flash_boot_rootfs|Detailed instructions]]  +  +===Notes===  +* It is possible to unpack rootfs to RAM not mounting any partitions ('''/''' in RAM, ramdisk):  +** Changes are not stored  +** Boot faster?  +** Work faster?  +** Modify env commands in the u-boot (in elphel393.h or when in the u-boot command line)  +** Carefully check the actual and hardcoded images' sizes in the u-boot (elphel393.h) and the device tree (elphel393_xxx.dts) with the actual sizes. ==<font color="blue">Setup</font>== ==<font color="blue">Setup</font>== Oleg

NAND flash boot rootfs

Wed, 03/09/2016 - 12:38

Instructions:

← Older revision Revision as of 19:38, 9 March 2016 (2 intermediate revisions not shown)Line 1: Line 1: -===Boot from NAND flash===+==Boot from NAND flash (rootfs)== * The default boot option - power on. * The default boot option - power on. -* A UBIFS image of rootfs is written to /dev/mtd4 ('''ubi0:elphel393''' in bootargs in the device tree)+* A UBIFS image of rootfs is written to /dev/mtd4 ('''ubi0:elphel393''' in bootargs in the device tree) - mounted as '''/''' -====Reflash factory image (update software/firmware or corrupt flash partition) ====+   +==Reflash factory image==  +===Notes===  +* Update software/firmware or corrupt flash partition  +* To update u-boot images, device tree and kernel - booting from micro SD card is not required.  +* To update rootfs - boot from micro SD card otherwise a mounted flash partition will be rewritten, get corrupt and the camera won't boot - boot from micro SD card and reflash rootfs partition to recover.  +* '''boot.bin''', '''u-boot-dtb.img''' - most likely won't need updating at all. Only if their partitions get corrupt  +** As Zynq's BootROM performs 32KB jumps within the first 128MiB of flash in the search of a boot.bin header with a correct checksum it is possible to flash a few backup images to the 1st flash partition (mtd0) in the device tree. The partition size is 1MB, boot.bin size is normally around 100KB (<192KB - Zynq OCM requirement)  +   +===Instructions=== * Use files from '''.../poky/build/tmp/deploy/images/elphel393/nand/''' * Use files from '''.../poky/build/tmp/deploy/images/elphel393/nand/'''  +** '''boot.bin'''  +** '''u-boot-dtb.img'''  +** '''devicetree.dtb'''  +** '''uImage'''  +** '''rootfs.ubifs''' (<font color='green'>recommended</font>), '''rootfs.ubi''' (<font color='red'>radical</font>) * Copy all of the image files to a micro SD card (or boot first from the card then copy over network) * Copy all of the image files to a micro SD card (or boot first from the card then copy over network) -* Boot from micro SD card.+* Boot from micro SD card (<font color='red'>important for rootfs updates</font>) * Reflash what is needed: * Reflash what is needed: ** Reflash SPL ('''boot.bin''', /dev/mtd0) ** Reflash SPL ('''boot.bin''', /dev/mtd0) Line 50: Line 64: Update: Update: <font size='2'> <font size='2'> -  # '''NOT TESTED'''+  flash_unlock /dev/mtd4   ubiattach /dev/ubi_ctrl -m 4   ubiattach /dev/ubi_ctrl -m 4 -  #ubimkvol /dev/ubi0 -N elphel393-rootfs -s 256MiB+  # NOT NEEDED: ubimkvol /dev/ubi0 -N elphel393-rootfs -s 256MiB   ubiupdatevol /dev/ubi0_0 rootfs.ubifs   ubiupdatevol /dev/ubi0_0 rootfs.ubifs  + #   # read: http://www.linux-mtd.infradead.org/faq/ubifs.html   # read: http://www.linux-mtd.infradead.org/faq/ubifs.html   # read: http://free-electrons.com/blog/creating-flashing-ubi-ubifs-images/   # read: http://free-electrons.com/blog/creating-flashing-ubi-ubifs-images/ Oleg

Poky 2.0 manual

Wed, 03/09/2016 - 11:47

Boot options:

← Older revision Revision as of 18:47, 9 March 2016 Line 29: Line 29: * [[Sd_boot_rootfs|Detailed instructions]] * [[Sd_boot_rootfs|Detailed instructions]] -===Boot from NAND flash===+===Boot from NAND flash (rootfs)=== * The default boot option - power on. * The default boot option - power on. -* A UBIFS image of rootfs is written to /dev/mtd4 ('''ubi0:elphel393''' in bootargs in the device tree)+* A UBIFS image is written to /dev/mtd4 - is mounted as '''/''' -====Reflash factory image (update software/firmware or corrupt flash partition) ====+* [[NAND_flash_boot_rootfs|Detailed instructions]] -* Use files from '''.../poky/build/tmp/deploy/images/elphel393/nand/'''+ -* Copy all of the image files to a micro SD card (or boot first from the card then copy over network)+ -* Boot from micro SD card.+ -* Reflash what is needed:+ -** Reflash SPL ('''boot.bin''', /dev/mtd0)+ -<font size='2'>+ - cd <path-to-image-files>+ - # boot.bin+ - # mtd0 is 1MB (8 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)+ - # erase only first 2 blocks, other block are reserved for copies+ - flash_unlock /dev/mtd0+ - flash_erase /dev/mtd0 0 2+ - nandwrite -n /dev/mtd0 -p boot.bin+ -</font>+ -** Reflash u-boot ('''u-boot-dtb.img''', /dev/mtd1)+ -<font size='2'>+ - cd <path-to-image-files>+ - # u-boot-dtb.img+ - # mtd1 is 4M (32 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)+ - # erase only the 1st 8 blocks as image is <1M, leave unused area for backup copies+ - flash_unlock /dev/mtd1+ - flash_erase /dev/mtd1 0 8+ - nandwrite -n /dev/mtd1 -p u-boot-dtb.img+ -</font>+ -** Reflash devicetree ('''devicetree.dtb''', /dev/mtd2)+ -<font size='2'>+ - cd <path-to-image-files>+ - # u-boot-dtb.img+ - # mtd2 is 1M (8 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)+ - flash_unlock /dev/mtd2+ - flash_erase /dev/mtd2 0 8+ - nandwrite -n /dev/mtd2 -p devicetree.dtb+ -</font>+ -** Reflash kernel ('''uImage''', /dev/mtd3)+ -<font size='2'>+ - cd <path-to-image-files>+ - # uImage+ - # mtd3 is 16M (128 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)+ - flash_unlock /dev/mtd3+ - flash_erase /dev/mtd3 0 128+ - nandwrite -n /dev/mtd3 -p uImage+ -</font>+ -** For rootfs there are 2 options: + -*** update - <font color='green'>recommended</font>, '''rootfs.ubifs'''+ -*** reflash - <font color='red'>radical</font>, '''rootfs.ubi'''+ -Update:+ -<font size='2'>+ - # '''NOT TESTED'''+ - ubiattach /dev/ubi_ctrl -m 4+ - #ubimkvol /dev/ubi0 -N elphel393-rootfs -s 256MiB+ - ubiupdatevol /dev/ubi0_0 rootfs.ubifs+ - # read: http://www.linux-mtd.infradead.org/faq/ubifs.html+ - # read: http://free-electrons.com/blog/creating-flashing-ubi-ubifs-images/+ - # read: http://www.linux-mtd.infradead.org/doc/ubi.html#L_volupdate+ - # read: http://comments.gmane.org/gmane.linux.drivers.mtd/39415+ -</font>+ -Reflash:+ -<font size='2'>+ - cd <path-to-image-files>+ - flash_unlock /dev/mtd4+ - flash_erase /dev/mtd4 0 2048+ - ubiformat /dev/mtd4 -f rootfs.ubi -s 2048 -O 2048+ -</font>+ -'''Note:''' Considering to store the u-boot, device tree and kernel on UBUFS partitions in future.+ ==<font color="blue">Setup</font>== ==<font color="blue">Setup</font>== Oleg

NAND flash boot rootfs

Wed, 03/09/2016 - 11:46

Created page with "===Boot from NAND flash=== * The default boot option - power on. * A UBIFS image of rootfs is written to /dev/mtd4 ('''ubi0:elphel393''' in bootargs in the device tree) ====Refla..."

New page

===Boot from NAND flash===
* The default boot option - power on.
* A UBIFS image of rootfs is written to /dev/mtd4 ('''ubi0:elphel393''' in bootargs in the device tree)
====Reflash factory image (update software/firmware or corrupt flash partition) ====
* Use files from '''.../poky/build/tmp/deploy/images/elphel393/nand/'''
* Copy all of the image files to a micro SD card (or boot first from the card then copy over network)
* Boot from micro SD card.
* Reflash what is needed:
** Reflash SPL ('''boot.bin''', /dev/mtd0)
<font size='2'>
cd <path-to-image-files>
# boot.bin
# mtd0 is 1MB (8 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)
# erase only first 2 blocks, other block are reserved for copies
flash_unlock /dev/mtd0
flash_erase /dev/mtd0 0 2
nandwrite -n /dev/mtd0 -p boot.bin
</font>
** Reflash u-boot ('''u-boot-dtb.img''', /dev/mtd1)
<font size='2'>
cd <path-to-image-files>
# u-boot-dtb.img
# mtd1 is 4M (32 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)
# erase only the 1st 8 blocks as image is <1M, leave unused area for backup copies
flash_unlock /dev/mtd1
flash_erase /dev/mtd1 0 8
nandwrite -n /dev/mtd1 -p u-boot-dtb.img
</font>
** Reflash devicetree ('''devicetree.dtb''', /dev/mtd2)
<font size='2'>
cd <path-to-image-files>
# u-boot-dtb.img
# mtd2 is 1M (8 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)
flash_unlock /dev/mtd2
flash_erase /dev/mtd2 0 8
nandwrite -n /dev/mtd2 -p devicetree.dtb
</font>
** Reflash kernel ('''uImage''', /dev/mtd3)
<font size='2'>
cd <path-to-image-files>
# uImage
# mtd3 is 16M (128 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)
flash_unlock /dev/mtd3
flash_erase /dev/mtd3 0 128
nandwrite -n /dev/mtd3 -p uImage
</font>
** For rootfs there are 2 options:
*** update - <font color='green'>recommended</font>, '''rootfs.ubifs'''
*** reflash - <font color='red'>radical</font>, '''rootfs.ubi'''
Update:
<font size='2'>
# '''NOT TESTED'''
ubiattach /dev/ubi_ctrl -m 4
#ubimkvol /dev/ubi0 -N elphel393-rootfs -s 256MiB
ubiupdatevol /dev/ubi0_0 rootfs.ubifs
# read: http://www.linux-mtd.infradead.org/faq/ubifs.html
# read: http://free-electrons.com/blog/creating-flashing-ubi-ubifs-images/
# read: http://www.linux-mtd.infradead.org/doc/ubi.html#L_volupdate
# read: http://comments.gmane.org/gmane.linux.drivers.mtd/39415
</font>
Reflash:
<font size='2'>
cd <path-to-image-files>
flash_unlock /dev/mtd4
flash_erase /dev/mtd4 0 2048
ubiformat /dev/mtd4 -f rootfs.ubi -s 2048 -O 2048
</font>
'''Note:''' Considering to store the u-boot, device tree and kernel on UBUFS partitions in future.

[[Category:Elphel393]] Oleg

Poky 2.0 manual

Wed, 03/09/2016 - 11:42

Boot options:

← Older revision Revision as of 18:42, 9 March 2016 Line 24: Line 24: ==<font color="blue">Boot options</font>== ==<font color="blue">Boot options</font>== -===Boot from micro SD card===+===Boot from micro SD card (rootfs)=== -* The micro SD card/adapter must be modified for this boot mode (to keep CD pin high) - only then the camera will boot.+* The micro SD card/adapter must be modified for this boot mode (to keep CD pin high) - only then the camera will boot -* EXT4 partition mounted as '''/'''.+* EXT4 partition mounted as '''/''' -====Instructions====+* [[Sd_boot_rootfs|Detailed instructions]] -PC:+ -* After all of the targets are built use files from '''.../poky/build/tmp/deploy/images/elphel393/mmc/'''+ -* Format to have 2 partitions: FAT32 and EXT4 (use gparted), the order of partitions is important or change bootargs in the device tree.+ -* FAT32: copy the following files:+ -*** '''boot.bin'''+ -*** '''u-boot-dtb.img'''+ -*** '''devicetree.dtb'''+ -*** '''uImage'''+ -* EXT4: mounted to some <mountpoint>+ -** unpack the '''rootfs.tar.gz''', console:+ - <font size='2'>tar -C <mountpoint> -xzpf rootfs.tar.gz</font>+ - + -Camera:+ -* Insert, power on+ ===Boot from NAND flash=== ===Boot from NAND flash=== Oleg

Sd boot rootfs

Wed, 03/09/2016 - 11:38

Created page with "==Notes== * The micro SD card/adapter must be modified for this boot mode (to keep CD pin high with the card inserted) - only then the camera will boot. * EXT4 partition mounted ..."

New page

==Notes==
* The micro SD card/adapter must be modified for this boot mode (to keep CD pin high with the card inserted) - only then the camera will boot.
* EXT4 partition mounted as /.

==Prepare the card==
PC:
* After all of the targets are built in poky use files from '''.../poky/build/tmp/deploy/images/elphel393/mmc/''':
** '''boot.bin'''
** '''u-boot-dtb.img'''
** '''devicetree.dtb'''
** '''uImage'''
** '''rootfs.tar.gz'''
* Format into 2 partitions: FAT32 and EXT4 (use gparted or command line instructions below), the order of partitions is important or change bootargs in the device tree accordingly.
* FAT32: copy the following files:
*** '''boot.bin'''
*** '''u-boot-dtb.img'''
*** '''devicetree.dtb'''
*** '''uImage'''
* If EXT4 is not empty - format it or delete old contents
* Mount EXT4 to some <mountpoint>
** unpack the '''rootfs.tar.gz''', console:
<font size='2'>tar -C <mountpoint> -xzpf rootfs.tar.gz</font>

==Boot==
* Insert, power on

==Format micro SD card (command line)==
Example for '''/dev/sda''':
* create partitions with fdisk
* mkfs.vfat -F 32 /dev/sda1
* mkfs.ext4 /dev/sda2

[[Category:Elphel393]] Oleg

Poky 2.0 manual

Wed, 03/09/2016 - 01:31

Reflash factory image (update software/firmware or corrupt flash partition):

← Older revision Revision as of 08:31, 9 March 2016 (16 intermediate revisions not shown)Line 12: Line 12: ==<font color="blue">Output files</font>== ==<font color="blue">Output files</font>== -Found in the poky's deploy directory: '''poky/build/tmp/deploy/images/'''+Found in the poky's deploy directory:  +* files for rootfs in NAND Flash: '''poky/build/tmp/deploy/images/elphel393/nand/'''  +* files for rootfs on MMC (micro SD card): '''poky/build/tmp/deploy/images/elphel393/mmc/''' 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 as the first stage bootloader = Secondary Program Loader that boots '''u-boot-dtb.img''' * '''boot.bin''' - u-boot as the first stage bootloader = Secondary Program Loader 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'') * '''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 described interfaces, zynq registers, interrupts and drivers+* '''devicetree.dtb''' - device tree with listed interfaces, zynq registers, interrupts and drivers * '''uImage''' - kernel, drivers * '''uImage''' - kernel, drivers -* '''uramdisk.image.gz''' - applications+* '''rootfs.ubifs''' or '''rootfs.tar.gz''' - rootfs - + -Copy them on the micro SD card (FAT partition) > run '''boot''' once in the u-boot command line.+ ==<font color="blue">Boot options</font>== ==<font color="blue">Boot options</font>== -* Auto unpacking the root file system image to RAM when booting:+===Boot from micro SD card=== -** Check u-boot default environment variables when building the bootloader.+* The micro SD card/adapter must be modified for this boot mode (to keep CD pin high) - only then the camera will boot. -** Keep '''uramdisk.image.gz''' along with all the other files on the FAT partition of (micro)SD card.+* EXT4 partition mounted as '''/'''. -* <font style='color:rgba(100,100,100,1)'>Root file system on EXT2(EXT3,etc.) partition of (micro)SD card.</font>+====Instructions====  +PC:  +* After all of the targets are built use files from '''.../poky/build/tmp/deploy/images/elphel393/mmc/'''  +* Format to have 2 partitions: FAT32 and EXT4 (use gparted), the order of partitions is important or change bootargs in the device tree.  +* FAT32: copy the following files:  +*** '''boot.bin'''  +*** '''u-boot-dtb.img'''  +*** '''devicetree.dtb'''  +*** '''uImage'''  +* EXT4: mounted to some <mountpoint>  +** unpack the '''rootfs.tar.gz''', console:  + <font size='2'>tar -C <mountpoint> -xzpf rootfs.tar.gz</font>  +   +Camera:  +* Insert, power on  +   +===Boot from NAND flash===  +* The default boot option - power on.  +* A UBIFS image of rootfs is written to /dev/mtd4 ('''ubi0:elphel393''' in bootargs in the device tree)  +====Reflash factory image (update software/firmware or corrupt flash partition) ====  +* Use files from '''.../poky/build/tmp/deploy/images/elphel393/nand/'''  +* Copy all of the image files to a micro SD card (or boot first from the card then copy over network)  +* Boot from micro SD card.  +* Reflash what is needed:  +** Reflash SPL ('''boot.bin''', /dev/mtd0)  +<font size='2'>  + cd <path-to-image-files>  + # boot.bin  + # mtd0 is 1MB (8 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)  + # erase only first 2 blocks, other block are reserved for copies  + flash_unlock /dev/mtd0  + flash_erase /dev/mtd0 0 2  + nandwrite -n /dev/mtd0 -p boot.bin  +</font>  +** Reflash u-boot ('''u-boot-dtb.img''', /dev/mtd1)  +<font size='2'>  + cd <path-to-image-files>  + # u-boot-dtb.img  + # mtd1 is 4M (32 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)  + # erase only the 1st 8 blocks as image is <1M, leave unused area for backup copies  + flash_unlock /dev/mtd1  + flash_erase /dev/mtd1 0 8  + nandwrite -n /dev/mtd1 -p u-boot-dtb.img  +</font>  +** Reflash devicetree ('''devicetree.dtb''', /dev/mtd2)  +<font size='2'>  + cd <path-to-image-files>  + # u-boot-dtb.img  + # mtd2 is 1M (8 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)  + flash_unlock /dev/mtd2  + flash_erase /dev/mtd2 0 8  + nandwrite -n /dev/mtd2 -p devicetree.dtb  +</font>  +** Reflash kernel ('''uImage''', /dev/mtd3)  +<font size='2'>  + cd <path-to-image-files>  + # uImage  + # mtd3 is 16M (128 eraseblocks,128K = 1 block, there are 64 pages of 2048 per block)  + flash_unlock /dev/mtd3  + flash_erase /dev/mtd3 0 128  + nandwrite -n /dev/mtd3 -p uImage  +</font>  +** For rootfs there are 2 options:  +*** update - <font color='green'>recommended</font>, '''rootfs.ubifs'''  +*** reflash - <font color='red'>radical</font>, '''rootfs.ubi'''  +Update:  +<font size='2'>  + # '''NOT TESTED'''  + ubiattach /dev/ubi_ctrl -m 4  + #ubimkvol /dev/ubi0 -N elphel393-rootfs -s 256MiB  + ubiupdatevol /dev/ubi0_0 rootfs.ubifs  + # read: http://www.linux-mtd.infradead.org/faq/ubifs.html  + # read: http://free-electrons.com/blog/creating-flashing-ubi-ubifs-images/  + # read: http://www.linux-mtd.infradead.org/doc/ubi.html#L_volupdate  + # read: http://comments.gmane.org/gmane.linux.drivers.mtd/39415  +</font>  +Reflash:  +<font size='2'>  + cd <path-to-image-files>  + flash_unlock /dev/mtd4  + flash_erase /dev/mtd4 0 2048  + ubiformat /dev/mtd4 -f rootfs.ubi -s 2048 -O 2048  +</font>  +'''Note:''' Considering to store the u-boot, device tree and kernel on UBUFS partitions in future. ==<font color="blue">Setup</font>== ==<font color="blue">Setup</font>== Line 50: Line 133:           '''#Part 2 : init environment and auto-fill Yocto's conf-files'''   '''#Part 2 : init environment and auto-fill Yocto's conf-files'''  + CONF_NOTES="meta/conf/conf-notes.txt"  +  + if [ -f $CONF_NOTES ]; then  +    rm $CONF_NOTES  + fi  +  + echo "Common \"elphel393\" targets are:" >> $CONF_NOTES  + echo "    u-boot" >> $CONF_NOTES  + echo "    device-tree" >> $CONF_NOTES  + echo "    linux-xlnx" >> $CONF_NOTES  + echo "    core-image-elphel393" >> $CONF_NOTES           CURRENT_PATH=$(dirname $(readlink -f "$0"))   CURRENT_PATH=$(dirname $(readlink -f "$0")) Oleg

Pages