Imaging solutions with Free Software & Open Hardware

Who's online

There are currently 0 users online.

Poky manual

Wiki Recent Changes - Fri, 01/19/2018 - 18:17

‎Errors

← Older revision Revision as of 01:17, 20 January 2018 (11 intermediate revisions by the same user not shown)Line 24: Line 24:     ==<font color="blue">Required packages</font>== ==<font color="blue">Required packages</font>== −* Found in [http://www.yoctoproject.org/docs/2.0/mega-manual/mega-manual.html Yocto Project mega-manual] :+* For Poky 2.0 Jethro see [http://www.yoctoproject.org/docs/2.0/mega-manual/mega-manual.html Yocto Project Poky 2.0 mega-manual] −<font size='2'>+* For Poky 2.4 Rocko see [http://www.yoctoproject.org/docs/2.4/mega-manual/mega-manual.html Yocto Project Poky 2.4 mega-manual] −Ubuntu and Debian  −  sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \  − build-essential chrpath socat libsdl1.2-dev xterm device-tree-compiler  −   −Fedora  − sudo dnf install gawk make wget tar bzip2 gzip python unzip perl patch \  − diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \  − ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat \  − findutils which SDL-devel xterm device-tree-compiler   −   −OpenSUSE  − sudo zypper install python gcc gcc-c++ git chrpath make wget python-xml \  − diffstat makeinfo python-curses patch socat libSDL-devel xterm device-tree-compiler                        −   −CentOS  − sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \  − diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat \  − perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue SDL-devel xterm device-tree-compiler  −</font>      ==<font color="blue">Other dependencies</font>== ==<font color="blue">Other dependencies</font>== Line 52: Line 33:  ==<font color="blue">Output files</font>== ==<font color="blue">Output files</font>==  The names are listed as they appear in the u-boot configuration header file - actual output files have different names: The 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'''+{| class="wikitable" −* '''u-boot-dtb.img''' - full size u-boot with a stripped device tree (''cat u-boot.img some_stripped_devicetree.dtb > u-boot-dtb.img'')+|- −* '''devicetree.dtb''' - device tree with listed interfaces, zynq registers, interrupts and drivers.+! File(s) −** ''elphel393/bootable-images/mmc/devicetree.dtb'' - mount rootfs from mmc partition+! Description −** ''elphel393/bootable-images/nand/devicetree.dtb'' - mount rootfs from NAND flash+|- −* '''uImage''' - kernel, drivers+| <font color='darkblue'>'''boot.bin'''</font> −* '''rootfs.ubifs''', '''rootfs.ubi''', '''rootfs.tar.gz''' - rootfs in different formats+| u-boot as the first stage bootloader = Secondary Program Loader (SPL) that boots '''u-boot-dtb.img'''  +|-  +| <font color='darkblue'>'''u-boot-dtb.img'''</font>  +| full size u-boot with a stripped device tree (''cat u-boot.img some_stripped_devicetree.dtb > u-boot-dtb.img'')  +|-  +|valign='top'| <font color='darkblue'>'''devicetree.dtb'''</font>  +| 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  +|-  +| <font color='darkblue'>'''uImage'''</font>  +| kernel, drivers  +|-  +| <font color='darkblue'>'''rootfs.ubifs''', '''rootfs.ubi''', '''rootfs.tar.gz'''</font>  +| rootfs in different formats - *.ubi* for NAND, *.tar.gz for mmc  +|}    −They are found at '''elphel393/bootable-images/''', which is a link (for convenience) to poky's deploy directory '''elphel393/poky/build/tmp/deploy/images/elphel393/'''+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 in NAND Flash: ''elphel393/bootable-images/nand/'' Line 126: Line 122:     ===<font color="blue">All targets</font>=== ===<font color="blue">All targets</font>===  +<font size='2'>    bitbake u-boot device-tree linux-xlnx core-image-elphel393   bitbake u-boot device-tree linux-xlnx core-image-elphel393 − +</font>  ===<font color="blue">Bootloader</font>=== ===<font color="blue">Bootloader</font>===  <font size='2'> <font size='2'> Line 174: Line 171:     ==<font color="blue">Notes</font>== ==<font color="blue">Notes</font>== −* <span style='color:green'>[FIXED]</span> lighttpd-1.4.39, mod-cgi+* <span style='color:green'>'''[FIXED]'''</span> lighttpd-1.4.39, mod-cgi  compile warning:   compile warning:    +<font size='2'>    implicit declaration of function 'chunkqueue_written'   implicit declaration of function 'chunkqueue_written'  +</font>  results in lighttpd failing to start if mod-cgi is enabled: results in lighttpd failing to start if mod-cgi is enabled:  +<font size='2'>    Starting Lighttpd Web Server: 2016-01-26 18:42:17: (/data/GIT_fresh/poky/build/tmp/work/cortexa9-vfp-neon-poky-linux-gnueabi/lighttpd/1.4.36-r0/lighttpd-1.4.36/src/plugin.c.169) dlopen() failed for: /usr/lib/mod_cgi.so /usr/lib/mod_cgi.so: undefined symbol: chunkqueue_w     Starting Lighttpd Web Server: 2016-01-26 18:42:17: (/data/GIT_fresh/poky/build/tmp/work/cortexa9-vfp-neon-poky-linux-gnueabi/lighttpd/1.4.36-r0/lighttpd-1.4.36/src/plugin.c.169) dlopen() failed for: /usr/lib/mod_cgi.so /usr/lib/mod_cgi.so: undefined symbol: chunkqueue_w      2016-01-26 18:42:17: (/data/GIT_fresh/poky/build/tmp/work/cortexa9-vfp-neon-poky-linux-gnueabi/lighttpd/1.4.36-r0/lighttpd-1.4.36/src/server.c.679) loading plugins finally failed     2016-01-26 18:42:17: (/data/GIT_fresh/poky/build/tmp/work/cortexa9-vfp-neon-poky-linux-gnueabi/lighttpd/1.4.36-r0/lighttpd-1.4.36/src/server.c.679) loading plugins finally failed      lighttpd.   lighttpd.  +</font>  Note: why 1.4.36?!! Note: why 1.4.36?!!    Line 187: Line 188:  * '''Invalidate chache/checksum on package code changes''' * '''Invalidate chache/checksum on package code changes'''  ** SRCREV = "${AUTOREV}" - updates the checksum but the cache is not cleared/invalidated? ** SRCREV = "${AUTOREV}" - updates the checksum but the cache is not cleared/invalidated?  +<font size='2'>    SRCREV <- AUTOREV <- AUTOREV <- "${@bb.fetch2.get_autorev(d)}" (bitbake/lib/bb/__init__.py)   SRCREV <- AUTOREV <- AUTOREV <- "${@bb.fetch2.get_autorev(d)}" (bitbake/lib/bb/__init__.py)          Line 196: Line 198:             BB_DONT_CACHE ?!!!!!!!   BB_DONT_CACHE ?!!!!!!! − +</font>  Force to always execute recipe starting from a certain task: Force to always execute recipe starting from a certain task:  +<font size='2'>    recipe-outside-of-task: <font size='2' color='green'><b>do_compile[nostamp]="1"</b></font>   recipe-outside-of-task: <font size='2' color='green'><b>do_compile[nostamp]="1"</b></font>    or   or    recipe-class-inside-task: <font size='2' color='green'><b>d.setVarFlag('do_compile', 'nostamp', '1')</b></font>   recipe-class-inside-task: <font size='2' color='green'><b>d.setVarFlag('do_compile', 'nostamp', '1')</b></font> − +</font>  * clone git repo over https in a recipe * clone git repo over https in a recipe  +<font size='2'>    SRC_URI = "git://git.elphel.com/project.git;protocol=https;branch=master"   SRC_URI = "git://git.elphel.com/project.git;protocol=https;branch=master"  +</font>     ==<font color="blue">Errors</font>== ==<font color="blue">Errors</font>== Line 210: Line 215:  ** Possible reason - Kubuntu 14.04 - the system libraries are too old? The up-to-date Kubuntu release is 16.04. ** Possible reason - Kubuntu 14.04 - the system libraries are too old? The up-to-date Kubuntu release is 16.04.  ** Command (example): ** Command (example):  +<font size='2'>    bitbake libxau-native   bitbake libxau-native  +</font>  ** log: ** log:  +<font size='2'>    | x86_64-linux-libtool: link: ar cru .libs/libXau.a  AuDispose.o AuFileName.o AuGetAddr.o AuGetBest.o AuLock.o AuRead.o AuUnlock.o AuWrite.o   | x86_64-linux-libtool: link: ar cru .libs/libXau.a  AuDispose.o AuFileName.o AuGetAddr.o AuGetBest.o AuLock.o AuRead.o AuUnlock.o AuWrite.o    | *** buffer overflow detected ***: ar terminated   | *** buffer overflow detected ***: ar terminated Line 261: Line 269:    | make: *** [all] Error 2   | make: *** [all] Error 2    | ERROR: oe_runmake failed   | ERROR: oe_runmake failed  +</font> Oleg

Poky 2.0 manual

Wiki Recent Changes - Fri, 01/19/2018 - 17:57

Oleg moved page Poky 2.0 manual to Poky manual also relates to Poky 2.4

Oleg

Tmp manual

Wiki Recent Changes - Fri, 01/19/2018 - 17:49

‎Proper shutdown

Show changes Oleg

01/19/18 [elphel-web-393][] by Oleg Dzhimiev: updated index page with a link to raw.php

Elphel GIT logs - Fri, 01/19/2018 - 15:52
Oleg Dzhimiev committed changes to the Elphel git project :
updated index page with a link to raw.php

01/19/18 [meta-elphel393][master-next] by Oleg Dzhimiev: increased max upload size to 512M

Elphel GIT logs - Fri, 01/19/2018 - 13:52
Oleg Dzhimiev committed changes to the Elphel git project :
increased max upload size to 512M

Poky 2.0 manual

Wiki Recent Changes - Fri, 01/19/2018 - 11:51

‎Setup

← Older revision Revision as of 18:51, 19 January 2018 Line 80: Line 80:     ==<font color="blue">Setup</font>== ==<font color="blue">Setup</font>== −* Poky 2.4 Rocko (latest)+* Poky 2.4 Rocko  <font size='2'> <font size='2'>    git clone -b rocko https://git.elphel.com/Elphel/elphel393.git   git clone -b rocko https://git.elphel.com/Elphel/elphel393.git −</font>  −* Poky 2.2 Jethro  −<font size='2'>  − git clone https://git.elphel.com/Elphel/elphel393.git # or git clone git@git.elphel.com:Elphel/elphel393.git # if ssh public key is uploaded     cd elphel393   cd elphel393    ./setup.py   ./setup.py Line 92: Line 88:    . ./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>  +* Poky 2.2 Jethro  +<font size='2'>  + git clone https://git.elphel.com/Elphel/elphel393.git # or git clone git@git.elphel.com:Elphel/elphel393.git # if ssh public key is uploaded  + # then follow the same steps as for Jethro  </font> </font>    Oleg

Poky 2.0 manual

Wiki Recent Changes - Fri, 01/19/2018 - 11:51

‎Setup

← Older revision Revision as of 18:51, 19 January 2018 (2 intermediate revisions by the same user not shown)Line 2: Line 2:     * 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.0 (Jethro)+* Yocto Poky revision = 2.0 (Jethro), recently updated to 2.4 (Rocko)     ==<font color="blue">Features</font>== ==<font color="blue">Features</font>== Line 80: Line 80:     ==<font color="blue">Setup</font>== ==<font color="blue">Setup</font>==  +* Poky 2.4 Rocko  <font size='2'> <font size='2'> −  git clone https://git.elphel.com/Elphel/elphel393.git # or git clone git@git.elphel.com:Elphel/elphel393.git # if ssh public key is uploaded+  git clone -b rocko https://git.elphel.com/Elphel/elphel393.git    cd elphel393   cd elphel393    ./setup.py   ./setup.py Line 87: Line 88:    . ./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>  +* Poky 2.2 Jethro  +<font size='2'>  + git clone https://git.elphel.com/Elphel/elphel393.git # or git clone git@git.elphel.com:Elphel/elphel393.git # if ssh public key is uploaded  + # then follow the same steps as for Jethro  </font> </font>    Oleg

Tmp manual

Wiki Recent Changes - Thu, 01/18/2018 - 18:28

‎Firmware images

← Older revision Revision as of 01:28, 19 January 2018 Line 267: Line 267:     ==<font color="blue">Firmware images</font>== ==<font color="blue">Firmware images</font>== −* [https://community.elphel.com/files/393/20180116/ '''20180116''']+* [https://community.elphel.com/files/393/20180118/ '''20180118''']  +* [https://community.elphel.com/files/393/20180116/ 20180116]  * [https://community.elphel.com/files/393/20180109/ 20180109] * [https://community.elphel.com/files/393/20180109/ 20180109]  * [https://community.elphel.com/files/393/20171120/ 20171120] * [https://community.elphel.com/files/393/20171120/ 20171120] Oleg

Working with raw image data

Wiki Recent Changes - Thu, 01/18/2018 - 18:27

‎Capturing and downloading

← Older revision Revision as of 01:27, 19 January 2018 (6 intermediate revisions by the same user not shown)Line 1: Line 1: −==<font color='darkblue'>Downloading</font>==+==<font color='darkblue'>Capturing and downloading</font>==  +===raw.php (demo)===  +* capture (for ports 0 and 1):  + <font size='2em'>http://192.168.0.9/raw.php?cmd=run&ports=0x3</font>  +* download  + <font size='2em'>http://192.168.0.9/raw.php?cmd=run&ports=0x1</font>  + <font size='2em'>http://192.168.0.9/raw.php?cmd=run&ports=0x2</font>  +* description:  + <font size='2em'>'''<font color='darkblue'>help:</font>'''  + 1. without parameters will print help  + '''<font color='darkblue'>capture request:</font>'''  + 2. decodes requested ports  + 3. reads current frame_number  + 4. sets buffers sizes  + 5. triggers copying pixel data from video memory to system memory for the frame_number+1 (waiting is implemented in the videomem driver).  +    Image numbers might not match - this depends on fps.  + 6. prints debug info and links to download raw images  + '''<font color='darkblue'>download request:</font>'''  + 7. decodes raw info from sysfs and calculates the number of bytes needed to be read  +    There is '''fullwidth''','''width''' and '''height''' - the raw image size is '''fullwidth x height x bytes_per_pixel/8''',  +    '''fullwidth''' is the '''width''' upped to the whole number of 128-bit bursts.  +    And so the '''width''' is the number of valid pixels.  + 8. sets http response headers  + 9. outputs pixel data</font>  +   +===raw.py (demo)===  +* run:  + <font size='2em'>'''root@elphel393:~# raw.py'''</font>  +* description:  + <font size='2em'>1. scans all available ports, determines the trigger master  + 2. reads current frame_number to be used later  + 3. formats system memory buffers and mmaps to user memory (all available ports)  + 4. selects position in video memory (0 or 1)  + 5. triggers copying pixel data from video memory to system memory for the frame_number+1 (waiting is implemented in the videomem driver).  +    Image numbers might not match - this depends on fps.  + 6. prints the first 16 bytes of the image  + 7. prints raw image info for each port</font>  +   +===Command line===  * Available options (channels can be 0..3): * Available options (channels can be 0..3):    <font size='2em'># set receiving buffer size in 4kB pages (thus 4096 equals to 16MB)   <font size='2em'># set receiving buffer size in 4kB pages (thus 4096 equals to 16MB) Line 19: Line 57:    '''echo 0 > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2'''   '''echo 0 > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2'''    '''cat /dev/image_raw2 > /tmp/test.raw'''</font>   '''cat /dev/image_raw2 > /tmp/test.raw'''</font> −  −      ==<font color='darkblue'>Displaying</font>== ==<font color='darkblue'>Displaying</font>== Line 39: Line 75:  ===Python=== ===Python===  * Camera settings: 2592x1936 JPEG: * Camera settings: 2592x1936 JPEG:  +** a)  + <font size='2em'>#!/usr/bin/env python  + import cv2  + import numpy as np  +  + width = 2608  + height = 1940  +  + with open("test.raw", "rb") as rawimg:  +    img = np.fromfile(rawimg, np.dtype('u1'), width * height).reshape(height, width)  +    img.tofile("test2.raw")  +    colimg = cv2.cvtColor(img, cv2.COLOR_BAYER_GB2BGR)  +    cv2.imwrite("test.jpeg", colimg)  +    #cv2.imshow("color", colimg)  +    #cv2.waitKey(0)</font>  +  +** b) for PC:    <font size='2em'>''#!/usr/bin/python3''   <font size='2em'>''#!/usr/bin/python3''    from PIL import Image   from PIL import Image Oleg

Working with raw image data

Wiki Recent Changes - Thu, 01/18/2018 - 18:02

‎Downloading

← Older revision Revision as of 01:02, 19 January 2018 (2 intermediate revisions by the same user not shown)Line 1: Line 1: −==<font color='darkblue'>Downloading</font>==+==<font color='darkblue'>Capturing and downloading</font>==  +===Command line, demo script: raw.py ===  +* run:  + <font size='2em'>'''root@elphel393:~# raw.py'''</font>  +* description:  + <font size='2em'>1. scans all available ports, determines the trigger master  + 2. reads current frame_number to be used later  + 3. formats system memory buffers and mmaps to user memory (all available ports)  + 4. selects position in video memory (0 or 1)  + 5. triggers copying pixel data from video memory to system memory for the frame_number+1 (waiting is implemented in the videomem driver)  + 6. prints the first 16 bytes of the image  + 7. prints raw image info for each port</font>  +   +===Command line===  * Available options (channels can be 0..3): * Available options (channels can be 0..3):    <font size='2em'># set receiving buffer size in 4kB pages (thus 4096 equals to 16MB)   <font size='2em'># set receiving buffer size in 4kB pages (thus 4096 equals to 16MB) Line 19: Line 32:    '''echo 0 > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2'''   '''echo 0 > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2'''    '''cat /dev/image_raw2 > /tmp/test.raw'''</font>   '''cat /dev/image_raw2 > /tmp/test.raw'''</font> −  −      ==<font color='darkblue'>Displaying</font>== ==<font color='darkblue'>Displaying</font>== Line 39: Line 50:  ===Python=== ===Python===  * Camera settings: 2592x1936 JPEG: * Camera settings: 2592x1936 JPEG:  +** a)  + <font size='2em'>#!/usr/bin/env python  + import cv2  + import numpy as np  +  + width = 2608  + height = 1940  +  + with open("test.raw", "rb") as rawimg:  +    img = np.fromfile(rawimg, np.dtype('u1'), width * height).reshape(height, width)  +    img.tofile("test2.raw")  +    colimg = cv2.cvtColor(img, cv2.COLOR_BAYER_GB2BGR)  +    cv2.imwrite("test.jpeg", colimg)  +    #cv2.imshow("color", colimg)  +    #cv2.waitKey(0)</font>  +  +** b) for PC:    <font size='2em'>''#!/usr/bin/python3''   <font size='2em'>''#!/usr/bin/python3''    from PIL import Image   from PIL import Image Oleg

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: forgot to install raw.php

Elphel GIT logs - Thu, 01/18/2018 - 17:28
Oleg Dzhimiev committed changes to the Elphel git project :
forgot to install raw.php

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: more comments

Elphel GIT logs - Thu, 01/18/2018 - 17:15
Oleg Dzhimiev committed changes to the Elphel git project :
more comments

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: +help

Elphel GIT logs - Thu, 01/18/2018 - 17:01
Oleg Dzhimiev committed changes to the Elphel git project :
+help

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: test and added help

Elphel GIT logs - Thu, 01/18/2018 - 16:59
Oleg Dzhimiev committed changes to the Elphel git project :
test and added help

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: moved raw.php to php_top

Elphel GIT logs - Thu, 01/18/2018 - 13:52
Oleg Dzhimiev committed changes to the Elphel git project :
moved raw.php to php_top

01/18/18 [meta-elphel393][master-next] by Oleg Dzhimiev: Added python3 and python3-opencv

Elphel GIT logs - Thu, 01/18/2018 - 13:48
Oleg Dzhimiev committed changes to the Elphel git project :
Added python3 and python3-opencv

01/18/18 [x393][CMV300] by Oleg Dzhimiev: minor change in shebang

Elphel GIT logs - Thu, 01/18/2018 - 13:37
Oleg Dzhimiev committed changes to the Elphel git project :
minor change in shebang

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: cleanup

Elphel GIT logs - Thu, 01/18/2018 - 11:21
Oleg Dzhimiev committed changes to the Elphel git project :
cleanup

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: minor changes

Elphel GIT logs - Thu, 01/18/2018 - 11:17
Oleg Dzhimiev committed changes to the Elphel git project :
minor changes

Working with raw image data

Wiki Recent Changes - Thu, 01/18/2018 - 11:10

‎Python

← Older revision Revision as of 18:10, 18 January 2018 (One intermediate revision by the same user not shown)Line 39: Line 39:  ===Python=== ===Python===  * Camera settings: 2592x1936 JPEG: * Camera settings: 2592x1936 JPEG:  +** a)  + <font size='2em'>#!/usr/bin/env python  + import cv2  + import numpy as np  +  + width = 2608  + height = 1940  +  + with open("test.raw", "rb") as rawimg:  +    img = np.fromfile(rawimg, np.dtype('u1'), width * height).reshape(height, width)  +    img.tofile("test2.raw")  +    colimg = cv2.cvtColor(img, cv2.COLOR_BAYER_GB2BGR)  +    cv2.imwrite("test.jpeg", colimg)  +    #cv2.imshow("color", colimg)  +    #cv2.waitKey(0)</font>  +  +** b) for PC:    <font size='2em'>''#!/usr/bin/python3''   <font size='2em'>''#!/usr/bin/python3''    from PIL import Image   from PIL import Image Oleg

Pages

Subscribe to www3.elphel.com aggregator