Zynq development issues
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
Presentations
10359
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=== Oleg10338
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 {| {| Oleg10359
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=== OlegPrice list
Eyesis4Pi
Ezynq
Poky 2.0 manual
Poky 2.0 manual
NAND flash boot rootfs
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== OlegUser:Sayme
New user account
SaymePoky 2.0 manual
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>== OlegNAND flash boot rootfs
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/ OlegPoky 2.0 manual
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>== OlegNAND flash boot rootfs
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
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=== OlegSd boot rootfs
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
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