[Elphel-support] Python on 393

Oleg support-list at support.elphel.com
Tue Mar 28 11:53:03 PDT 2017


Hello Shashank,

*We have recently moved git repositories to our own server -
https://git.elphel.com <https://git.elphel.com>*

Assuming you have followed our setup instuctions
<https://wiki.elphel.com/wiki/Poky_2.0_manual#Setup> - *project path* will
be related to the top project's root.

Python scripts:
1. *init_elphel393.py*
*10393 path*:* /etc/elphel393/*
*Project path*: *elphel393/rootfs-elphel/elphel-init*
*Description*:
* run at boot by /etc/init.d/init_elphel393 with a few parameters defined
in poky's local.conf
* sets the ip address and netmask
* initializes:
** temperature monitor: tempmon.py
** programs USB hub on 10389 (if there is one)
** starts image server (imgsrv, c app) for all detected ports
** starts autoexposure daemon (autoexposure, c app)
** default camera parameters - autocampars.php (results are stored in
/etc/elphel393/autocampars[port#].xml)
** enables SATA switch multiplexing (x393sata.py(init) &
x393sata_control.py(mux)) and loads SATA driver

1a. *tempmon.py*
*10393 path*:* /usr/bin/*
*Project path*: *elphel393/rootfs-elphel/elphel-apps-tempmon/*
*Description*: temperature monitor

1b. python scripts related to SATA (and SATA module in fpga):
*10393 path*: */usr/local/bin/*
*Project path*: *elphel393/fpga-elphel/x393_sata/py393sata/*
*Description*: there are a few scripts, the major one is x393sata.py -
there are examples of usage in the end of the script.

2. Python scripts related to x393 fpga
*10393 path*:  */usr/local/bin/*
*Project path*: *elphel393/fpga-elphel/x393/py393/*
*Description*:
* fpga: memory controller, rtc, gpio, compressor, AXI
* Most of them are not used - but can be used for testing, some have
examples inside.


Don't know if you need it or already figured it out, the whole project
sources structure in short:

https://git.elphel.com/Elphel/elphel393/tree/master:

1. *setup.py*:
* clones all the projects
* rerun to update all repositories - then rebuild with bitbake
* creates a working copy of projects-default.json - projects.json

2.* check_versions.py*:
* ./check_versions.py root at 192.168.0.9)
* compares software versions on the 10393 vs current sources

3. *elphel393/meta/meta-elphel393/* - all of the recipes for the projects.
* rootfs recipe with the list of included packages:
*elphel393/meta/meta-elphel393/recipes-core/images/core-image-elphel393.bb
<http://core-image-elphel393.bb>*

All of the python packages are listed there.

4. Projects:
The paths in the recipes point to the project sources which are cloned
outside of poky structure - so "bitbake ... -c clean" does not remove the
sources (we tried Quilt but it's not convenient). And so all the source
repositories are in:
** elphel393/linux-elphel/ - *which is a kernel tree with our sources only
- it is merged with the full kernel tree.
* *elphel393/rootfs-elphel/ - *user applicatons projects and init scripts,
matching resipes are found in *meta/meta-elphel393/recipes-core/*
* *elphel393/fpga-elphel/ - *fpga projects, matching recipes are in
*meta/meta-elphel393/recipes-core/*

Some of the recipes for applications do not have sources in
*elphel393/rootfs-elphel/*

5. The boot images are linked to the top directory:
* *elphel393/bootable-images/mmc/  *(see
https://wiki.elphel.com/wiki/Sd_boot_rootfs)
* *elphel393/bootable-images/nand/  *(see
https://wiki.elphel.com/wiki/NAND_flash_boot_rootfs)

6. Have a look at the elphel393/poky/build/local.conf
* The default ip address of the rootfs can be set there.

Tips for development:
* Better to boot from a micro SD card (recovery or regular, see boot options
<https://wiki.elphel.com/wiki/Boot_options_393>)
* Most of the projects (even the kernel and fpga) are configured for
Eclipse IDE
** If you build a project it will compile it and copy the binaries (or
installed scripts) to the target hardware - the ip address is set in poky's
local.conf, but the requirement is exporting your key:
ssh-copy-id root at 192.168.0.9
If you prefer to build from the command line then "bitbake ... -c
target_scp" which does binaries/scripts copying

Let us know if you have further questions or need more details.

Best regards,
Oleg Dzhimiev
Electronics Engineer
phone: +1 801 783 5555 x124
Elphel, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20170328/38e239d9/attachment.html>


More information about the Support-list mailing list