09/26/19 [linux-elphel][warrior] by Oleg Dzhimiev: renamed the file back to the changes are minimal from the 4.14
Oleg Dzhimiev committed changes to the Elphel git project :
renamed the file back to the changes are minimal from the 4.14
renamed the file back to the changes are minimal from the 4.14
09/25/19 [linux-elphel][warrior] by Oleg Dzhimiev: updated nand driver from linux-xlnx 4.14 to 4.19
Oleg Dzhimiev committed changes to the Elphel git project :
updated nand driver from linux-xlnx 4.14 to 4.19
updated nand driver from linux-xlnx 4.14 to 4.19
09/23/19 [linux-elphel][warrior] by Oleg Dzhimiev: updated
Oleg Dzhimiev committed changes to the Elphel git project :
updated
updated
09/23/19 [linux-elphel][warrior] by Oleg Dzhimiev: updated
Oleg Dzhimiev committed changes to the Elphel git project :
updated
updated
09/23/19 [linux-elphel][warrior] by Oleg Dzhimiev: missed of.h header file
Oleg Dzhimiev committed changes to the Elphel git project :
missed of.h header file
missed of.h header file
09/23/19 [linux-elphel][warrior] by Oleg Dzhimiev: reintroduced
Oleg Dzhimiev committed changes to the Elphel git project :
reintroduced
reintroduced
09/23/19 [linux-elphel][warrior] by Oleg Dzhimiev: Updated and moved to patch
Oleg Dzhimiev committed changes to the Elphel git project :
Updated and moved to patch
Updated and moved to patch
09/23/19 [linux-elphel][warrior] by Oleg Dzhimiev: Updated and moved to a patch to make it easier to updated next time
Oleg Dzhimiev committed changes to the Elphel git project :
Updated and moved to a patch to make it easier to updated next time
Updated and moved to a patch to make it easier to updated next time
09/23/19 [linux-elphel][warrior] by Oleg Dzhimiev: Updated and moved to a patch to make it easier updating next time
Oleg Dzhimiev committed changes to the Elphel git project :
Updated and moved to a patch to make it easier updating next time
Updated and moved to a patch to make it easier updating next time
09/23/19 [linux-elphel][warrior] by Oleg Dzhimiev: updated and moved changes to a patch so it's easier to update next time
Oleg Dzhimiev committed changes to the Elphel git project :
updated and moved changes to a patch so it's easier to update next time
updated and moved changes to a patch so it's easier to update next time
Poky migration from rocko to warrior
[SOLVED] Note 3: Entropy device hwrng
← Older revision Revision as of 19:06, 10 September 2019 (One intermediate revision by the same user not shown)Line 92: Line 92: ** Haven't found if Xilinx uses any driver for /dev/hwrng ** Haven't found if Xilinx uses any driver for /dev/hwrng ** TODO: Find out if the order of entropy sources can be changed ** TODO: Find out if the order of entropy sources can be changed −** That lag at boot is really annoying - 5-10 seconds?!!+** That lag at boot is really annoying - 5 secs?!! ==<font color='green'>'''[SOLVED]'''</font> Note 4: PHP causing 'unsupported FP instruction in kernel mode'== ==<font color='green'>'''[SOLVED]'''</font> Note 4: PHP causing 'unsupported FP instruction in kernel mode'== Line 148: Line 148: - <s>switched from '''-mfloat-abi=softfp''' to '''-mfloat-abi=hard''' - the problem seems to go away - but is it 100%?</s> - <s>switched from '''-mfloat-abi=softfp''' to '''-mfloat-abi=hard''' - the problem seems to go away - but is it 100%?</s> - used kmalloc instead of auto variable in mt9x001_pgm_initsensor() - no Oopses so far - used kmalloc instead of auto variable in mt9x001_pgm_initsensor() - no Oopses so far + +* More notes on debugging + - CONFIG_DEBUG_STACK_USAGE=y + and it reports how many bytes left in stack for various processes. For that particular process (php) the "bytes left" were '''4''' on successful boots and + ~'''1028''' after a huge variable (of 1024 bytes) got moved to heap. + - Also there's a warning in Eclipse about "frame size" beaing larger than 1024 ==<font color='green'>'''[SOLVED]'''</font> Note 5: Bring up NAND OTP support== ==<font color='green'>'''[SOLVED]'''</font> Note 5: Bring up NAND OTP support== OlegPoky migration from rocko to warrior
[SOLVED] Note 3: Entropy device hwrng
← Older revision Revision as of 19:06, 10 September 2019 (2 intermediate revisions by the same user not shown)Line 92: Line 92: ** Haven't found if Xilinx uses any driver for /dev/hwrng ** Haven't found if Xilinx uses any driver for /dev/hwrng ** TODO: Find out if the order of entropy sources can be changed ** TODO: Find out if the order of entropy sources can be changed −** That lag at boot is really annoying - 5-10 seconds?!!+** That lag at boot is really annoying - 5 secs?!! −==<font color='green'>'''SOLVED'''</font> Note 4: PHP causing 'unsupported FP instruction in kernel mode'==+==<font color='green'>'''[SOLVED]'''</font> Note 4: PHP causing 'unsupported FP instruction in kernel mode'== * Kernel Oops: * Kernel Oops: <font size='1'>[ 35.872118] BUG: unsupported FP instruction in kernel mode <font size='1'>[ 35.872118] BUG: unsupported FP instruction in kernel mode Line 148: Line 148: - <s>switched from '''-mfloat-abi=softfp''' to '''-mfloat-abi=hard''' - the problem seems to go away - but is it 100%?</s> - <s>switched from '''-mfloat-abi=softfp''' to '''-mfloat-abi=hard''' - the problem seems to go away - but is it 100%?</s> - used kmalloc instead of auto variable in mt9x001_pgm_initsensor() - no Oopses so far - used kmalloc instead of auto variable in mt9x001_pgm_initsensor() - no Oopses so far + +* More notes on debugging + - CONFIG_DEBUG_STACK_USAGE=y + and it reports how many bytes left in stack for various processes. For that particular process (php) the "bytes left" were '''4''' on successful boots and + ~'''1028''' after a huge variable (of 1024 bytes) got moved to heap. + - Also there's a warning in Eclipse about "frame size" beaing larger than 1024 ==<font color='green'>'''[SOLVED]'''</font> Note 5: Bring up NAND OTP support== ==<font color='green'>'''[SOLVED]'''</font> Note 5: Bring up NAND OTP support== Oleg09/10/19 [meta-elphel393][warrior] by Oleg Dzhimiev: commented out redundant kernel building in the bundle function
Oleg Dzhimiev committed changes to the Elphel git project :
commented out redundant kernel building in the bundle function
commented out redundant kernel building in the bundle function
09/10/19 [meta-elphel393][warrior] by Oleg Dzhimiev: + CONFIG_DEBUG_STACK_USAGE is not set - to be activated for debugging
Oleg Dzhimiev committed changes to the Elphel git project :
+ CONFIG_DEBUG_STACK_USAGE is not set - to be activated for debugging
+ CONFIG_DEBUG_STACK_USAGE is not set - to be activated for debugging
09/10/19 [linux-elphel][warrior] by Oleg Dzhimiev: left commented out functions used for debugging the stack size, also used CONFIG_DEBUG_STACK_USAGE
Oleg Dzhimiev committed changes to the Elphel git project :
left commented out functions used for debugging the stack size, also used CONFIG_DEBUG_STACK_USAGE
left commented out functions used for debugging the stack size, also used CONFIG_DEBUG_STACK_USAGE
Poky migration from rocko to warrior
← Older revision
Revision as of 19:49, 9 September 2019
Line 94:
Line 94:
** That lag at boot is really annoying - 5-10 seconds?!! ** That lag at boot is really annoying - 5-10 seconds?!!
−==<font color='green'>'''SOLVED'''</font> Note 4: PHP causing 'unsupported FP instruction in kernel mode'==+==<font color='green'>'''[SOLVED]'''</font> Note 4: PHP causing 'unsupported FP instruction in kernel mode'==
* Kernel Oops: * Kernel Oops:
<font size='1'>[ 35.872118] BUG: unsupported FP instruction in kernel mode <font size='1'>[ 35.872118] BUG: unsupported FP instruction in kernel mode
Oleg
Poky manual
← Older revision
Revision as of 19:44, 9 September 2019
(8 intermediate revisions by the same user not shown)Line 1:
Line 1:
+==<font color="blue">Description</font>==
+How to build the firmware for Elphel 10393 series camera systems from scratch.
+
+Prebuilt releases can be found [https://community.elphel.com/files/393/ here].
+
==<font color="blue">Use cases</font>== ==<font color="blue">Use cases</font>==
−* Linux kernel update when adding/developing a driver+* Update Linux Kernel when developing a driver
−* When an application needs to be included into the firmware image archive+* Include application to the default firmware package
* Update Elphel's PHP extension * Update Elphel's PHP extension
* C/C++ applications if developed on PC require a cross-compiler and require Yocto installation or some other alternative. * C/C++ applications if developed on PC require a cross-compiler and require Yocto installation or some other alternative.
−Other projects that use Python, PHP, Javascript, HTML, C/C++ on hardware (compiler is included in the firmware image) do not require this SDK use but it makes the process more convenient, e.g. by copying the built packages straight to the target hardware.+Other projects written in Python, PHP, Javascript, HTML, C/C++ (gcc is installed on the system board) can be developed on the camera. Installing the framework is not required but it can simplify the development process.
==<font color="blue">Description</font>== ==<font color="blue">Description</font>==
* 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.6 (Thud)+* Yocto Poky revision = 2.7.1 (Warrior)
* Yocto Poky revision = 2.4 (Rocko) * Yocto Poky revision = 2.4 (Rocko)
* <s>Yocto Poky revision = 2.0 (Jethro)</s> * <s>Yocto Poky revision = 2.0 (Jethro)</s>
Line 29:
Line 34:
==<font color="blue">Requirements</font>== ==<font color="blue">Requirements</font>==
−* Kubuntu 16.04 x64 (as of Dec 2018) for Poky 2.4 Rocko+* Kubuntu 16.04 x64 (as of Dec 2018) - Poky: 2.4 Rocko, 2.7.1 Warrior
−* Kubuntu 18.04 x64 (as of Dec 2018)+* Kubuntu 18.04 x64 (as of Dec 2018) - Poky: 2.7.1 Warrior (not tested but might build w/o problems)
−* For Poky 2.6 Thud see [http://www.yoctoproject.org/docs/2.6/mega-manual/mega-manual.html Yocto Project Poky 2.6 mega-manual]
==<font color="blue">Output files</font>== ==<font color="blue">Output files</font>==
Line 38:
Line 42:
|- |-
! File(s) ! File(s)
+! Build Command
! Description ! Description
|- |-
| <font color='darkblue'>'''boot.bin'''</font> | <font color='darkblue'>'''boot.bin'''</font>
+| ''bitbake u-boot''
| u-boot as the first stage bootloader = Secondary Program Loader (SPL) that boots '''u-boot-dtb.img''' | 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> | <font color='darkblue'>'''u-boot-dtb.img'''</font>
+| ''bitbake u-boot''
| full size u-boot with a stripped device tree (''cat u-boot.img some_stripped_devicetree.dtb > 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'')
|- |-
|valign='top'| <font color='darkblue'>'''devicetree.dtb'''</font> |valign='top'| <font color='darkblue'>'''devicetree.dtb'''</font>
+| bitbake device-tree
| device tree with listed interfaces, zynq registers, interrupts and drivers | device tree with listed interfaces, zynq registers, interrupts and drivers
* ''elphel393/bootable-images/mmc/devicetree.dtb'' - mount rootfs from mmc partition * ''elphel393/bootable-images/mmc/devicetree.dtb'' - mount rootfs from mmc partition
Line 52:
Line 60:
|- |-
| <font color='darkblue'>'''uImage'''</font> | <font color='darkblue'>'''uImage'''</font>
+| ''bitbake linux-xlnx''
| kernel, drivers | kernel, drivers
|- |-
| <font color='darkblue'>'''rootfs.ubifs''', '''rootfs.ubi''', '''rootfs.tar.gz'''</font> | <font color='darkblue'>'''rootfs.ubifs''', '''rootfs.ubi''', '''rootfs.tar.gz'''</font>
+| ''bitbake core-image-elphel393''
| rootfs in different formats - *.ubi* for NAND, *.tar.gz for mmc | rootfs in different formats - *.ubi* for NAND, *.tar.gz for mmc
|} |}
Line 90:
Line 100:
</font> </font>
−* Poky 2.6 Thud (Kubuntu 18.04)+* Poky 2.7.1 Warrior (Kubuntu 16.04 or 18.04)
<font size='2'> <font size='2'>
− git clone -b '''thud''' https://git.elphel.com/Elphel/elphel393.git+ git clone -b '''warrior''' https://git.elphel.com/Elphel/elphel393.git
cd elphel393 cd elphel393
./setup.py ./setup.py
Line 105:
Line 115:
./check_versions.py root@192.168.0.9 ./check_versions.py root@192.168.0.9
</font> </font>
−
−'''Notes:'''
−* '''deployed''' = running on the target system
{| {|
−|[[File:Check versions.png|thumb|400px|check_versions.py output in terminal]]+|[[File:Check versions.png|thumb|400px|check_versions.py output in terminal (web-393 revision on PC is ahead of the one installed on the camera)]]
|} |}
−
−==<font color="blue">Build</font>==
−
−===<font color="blue">All targets</font>===
−<font size='2'>
− bitbake u-boot device-tree linux-xlnx core-image-elphel393
−</font>
−===<font color="blue">Bootloader</font>===
−<font size='2'>
− bitbake u-boot
−</font>
−====Output====
−* '''boot.bin'''
−* '''u-boot-dtb.img'''
−
−====Notes====
−* Current the recipe installs only binaries. We will upgrade u-boot from '''2016.05''' to the current release later.
−2016.05 will not compile in Kubuntu 18.04
−
−===<font color="blue">Device tree</font>===
−<font size='2'>
− bitbake device-tree
−</font>
−====Output====
−* '''devicetree.dtb'''
−
−===<font color="blue">Kernel</font>===
−<font size='2'>
− bitbake linux-xlnx
−</font>
−====Output====
−* '''uImage'''
−
−====Notes====
−* linux-xlnx '''rocko''' branch was simply moved to '''thud''' branch
−* yocto thud: Kernel version is 4.9.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">Rootfs</font>===
−<font size='2'>
− bitbake core-image-elphel393
−</font>
−====Output====
−* '''rootfs.tar.gz'''
−* '''rootfs.ubi''', '''rootfs.ubifs'''
==<font color="blue">Details for development</font>== ==<font color="blue">Details for development</font>==
[[Development_for_10393|'''Development for 10393''']] [[Development_for_10393|'''Development for 10393''']]
Oleg
Poky manual
Requirements
← Older revision Revision as of 19:09, 9 September 2019 (4 intermediate revisions by the same user not shown)Line 10: Line 10: * 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.6 (Thud)+* Yocto Poky revision = 2.7.1 (Warrior) * Yocto Poky revision = 2.4 (Rocko) * Yocto Poky revision = 2.4 (Rocko) * <s>Yocto Poky revision = 2.0 (Jethro)</s> * <s>Yocto Poky revision = 2.0 (Jethro)</s> Line 29: Line 29: ==<font color="blue">Requirements</font>== ==<font color="blue">Requirements</font>== −* Kubuntu 16.04 x64 (as of Dec 2018) for Poky 2.4 Rocko+* Kubuntu 16.04 x64 (as of Dec 2018) - Poky: 2.4 Rocko, 2.7.1 Warrior −* Kubuntu 18.04 x64 (as of Dec 2018)+* Kubuntu 18.04 x64 (as of Dec 2018) - Poky: 2.7.1 Warrior (not tested but might build w/o problems) −* For Poky 2.6 Thud see [http://www.yoctoproject.org/docs/2.6/mega-manual/mega-manual.html Yocto Project Poky 2.6 mega-manual] ==<font color="blue">Output files</font>== ==<font color="blue">Output files</font>== Line 38: Line 37: |- |- ! File(s) ! File(s) +! Build Command ! Description ! Description |- |- | <font color='darkblue'>'''boot.bin'''</font> | <font color='darkblue'>'''boot.bin'''</font> +| ''bitbake u-boot'' | u-boot as the first stage bootloader = Secondary Program Loader (SPL) that boots '''u-boot-dtb.img''' | 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> | <font color='darkblue'>'''u-boot-dtb.img'''</font> +| ''bitbake u-boot'' | full size u-boot with a stripped device tree (''cat u-boot.img some_stripped_devicetree.dtb > 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'') |- |- |valign='top'| <font color='darkblue'>'''devicetree.dtb'''</font> |valign='top'| <font color='darkblue'>'''devicetree.dtb'''</font> +| bitbake device-tree | device tree with listed interfaces, zynq registers, interrupts and drivers | device tree with listed interfaces, zynq registers, interrupts and drivers * ''elphel393/bootable-images/mmc/devicetree.dtb'' - mount rootfs from mmc partition * ''elphel393/bootable-images/mmc/devicetree.dtb'' - mount rootfs from mmc partition Line 52: Line 55: |- |- | <font color='darkblue'>'''uImage'''</font> | <font color='darkblue'>'''uImage'''</font> +| ''bitbake linux-xlnx'' | kernel, drivers | kernel, drivers |- |- | <font color='darkblue'>'''rootfs.ubifs''', '''rootfs.ubi''', '''rootfs.tar.gz'''</font> | <font color='darkblue'>'''rootfs.ubifs''', '''rootfs.ubi''', '''rootfs.tar.gz'''</font> +| ''bitbake core-image-elphel393'' | rootfs in different formats - *.ubi* for NAND, *.tar.gz for mmc | rootfs in different formats - *.ubi* for NAND, *.tar.gz for mmc |} |} Line 90: Line 95: </font> </font> −* Poky 2.6 Thud (Kubuntu 18.04)+* Poky 2.7.1 Warrior (Kubuntu 16.04 or 18.04) <font size='2'> <font size='2'> − git clone -b '''thud''' https://git.elphel.com/Elphel/elphel393.git+ git clone -b '''warrior''' https://git.elphel.com/Elphel/elphel393.git cd elphel393 cd elphel393 ./setup.py ./setup.py Line 113: Line 118: |} |} −==<font color="blue">Build</font>== − −===<font color="blue">All targets</font>=== −<font size='2'> − bitbake u-boot device-tree linux-xlnx core-image-elphel393 −</font> −===<font color="blue">Bootloader</font>=== −<font size='2'> − bitbake u-boot −</font> −====Output==== −* '''boot.bin''' −* '''u-boot-dtb.img''' − −====Notes==== −* Current the recipe installs only binaries. We will upgrade u-boot from '''2016.05''' to the current release later. −2016.05 will not compile in Kubuntu 18.04 − −===<font color="blue">Device tree</font>=== −<font size='2'> − bitbake device-tree −</font> −====Output==== −* '''devicetree.dtb''' − −===<font color="blue">Kernel</font>=== −<font size='2'> − bitbake linux-xlnx −</font> −====Output==== −* '''uImage''' − −====Notes==== −* linux-xlnx '''rocko''' branch was simply moved to '''thud''' branch −* yocto thud: Kernel version is 4.9.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">Rootfs</font>=== −<font size='2'> − bitbake core-image-elphel393 −</font> −====Output==== −* '''rootfs.tar.gz''' −* '''rootfs.ubi''', '''rootfs.ubifs''' ==<font color="blue">Details for development</font>== ==<font color="blue">Details for development</font>== [[Development_for_10393|'''Development for 10393''']] [[Development_for_10393|'''Development for 10393''']] OlegPoky migration from rocko to warrior
- Note 4: PHP causing 'unsupported FP instruction in kernel mode'
← Older revision Revision as of 18:39, 9 September 2019 (One intermediate revision by the same user not shown)Line 94: Line 94: ** That lag at boot is really annoying - 5-10 seconds?!! ** That lag at boot is really annoying - 5-10 seconds?!! −==<font color='green'>'''-'''</font> Note 4: PHP causing 'unsupported FP instruction in kernel mode'==+==<font color='green'>'''SOLVED'''</font> Note 4: PHP causing 'unsupported FP instruction in kernel mode'== * Kernel Oops: * Kernel Oops: <font size='1'>[ 35.872118] BUG: unsupported FP instruction in kernel mode <font size='1'>[ 35.872118] BUG: unsupported FP instruction in kernel mode Line 134: Line 134: * Causes? * Causes? − - hardware − - power board? − - system board? (probably not cause reproduced on 2 boards) − - temperature? - kernel? - kernel? − - some racing conditions?+ - <s>some racing conditions?</s> − - php? + - huge variables in the stack overflow it at mt9x001.c:mt9x001_pgm_initsensor() + <s>- php? - too old? the version 5.6.40 is EOL - too old? the version 5.6.40 is EOL − - got built with some package that is too new for it? Like it won't build with newer mysql+ - got built with some package that is too new for it? Like it won't build with newer mysql</s> * Solution?: * Solution?: − - Took arch/vfp/vfpmodule.c from kernel 4.19. The current was 4.14. It didn't work. Roll back and check which php call caused it? Also might be a linux driver.+ - <s>Took arch/vfp/vfpmodule.c from kernel 4.19. The current was 4.14. It didn't work. Roll back and check which php call caused it? Also might be a linux driver.</s> − - Try php 7.x.x - need to update the extension+ - <s>Try php 7.x.x - need to update the extension</s> − - Try php 5.6.31 (the one that used to work) - Opps persists+ - <s>Try php 5.6.31 (the one that used to work) - Opps persists</s> − - On the bright side, at least it's not a kernel panic+ - <s>On the bright side, at least it's not a kernel panic</s> − - switched from '''-mfloat-abi=softfp''' to '''-mfloat-abi=hard''' - the problem seems to go away - but is it 100%?+ - <s>switched from '''-mfloat-abi=softfp''' to '''-mfloat-abi=hard''' - the problem seems to go away - but is it 100%?</s> − + - used kmalloc instead of auto variable in mt9x001_pgm_initsensor() - no Oopses so far −* TODO: keep an eye on this, because the real reason is not investigated ==<font color='green'>'''[SOLVED]'''</font> Note 5: Bring up NAND OTP support== ==<font color='green'>'''[SOLVED]'''</font> Note 5: Bring up NAND OTP support== Oleg09/09/19 [linux-elphel][warrior] by Oleg Dzhimiev: switched to kmalloc for reading the registers
Oleg Dzhimiev committed changes to the Elphel git project :
switched to kmalloc for reading the registers
switched to kmalloc for reading the registers
Pages
