Poky 2.0 manual

From ElphelWiki

Jump to: navigation, search

Contents

Description

Features

Supported OSes

Required packages

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

Other dependencies

sudo apt-get install python-numpy

Output files

The names are listed as they appear in the u-boot configuration header file - actual output files have different names:

They are found poky's deploy directory elphel393/poky/build/tmp/deploy/images/elphel393/, linked to elphel393/bootable-images/ for convenience.

Write files to media and boot

Boot from micro SD card

Detailed instructions

Boot from NAND flash

Detailed instructions

Notes

Setup

git clone https://github.com/Elphel/elphel393.git
cd elphel393
./setup.py
cd poky
. ./oe-init-build-env
bitbake u-boot device-tree linux-xlnx core-image-elphel393

Compare built vs running on target system software

cd elphel393
./check_versions.py root@192.168.0.9

Build bootloader

bitbake u-boot-ezynq
or
bitbake u-boot
or
bitbake virtual/bootloader

Output

Notes

Compile devicetree

bitbake device-tree

Output

Build kernel

bitbake linux-xlnx
or
bitbake virtual/kernel

Output

Notes

Build ramdisk.image.gz

bitbake core-image-elphel393

Output

Notes

compile warning:

implicit declaration of function 'chunkqueue_written'

results in lighttpd failing to start if mod-cgi is enabled:

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 
lighttpd.

Note: why 1.4.36?!!

solution: exclude the 0001-mod_cgi-buffers-data-without-bound.patch from the file list that comes with the poky/meta/recipes-extended/lighttpd_1.4.39.bb

SRCREV <- AUTOREV <- AUTOREV <- "${@bb.fetch2.get_autorev(d)}" (bitbake/lib/bb/__init__.py)

def get_autorev(d):
   #  only not cache src rev in autorev case
   if d.getVar('BB_SRCREV_POLICY', True) != "cache":
       d.setVar('__BB_DONT_CACHE', '1')
   return "AUTOINC"

BB_DONT_CACHE ?!!!!!!!

Force to always execute recipe starting from a certain task:

recipe-outside-of-task: do_compile[nostamp]="1"
or
recipe-class-inside-task: d.setVarFlag('do_compile', 'nostamp', '1')

Errors

bitbake libxau-native
| 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
| ======= Backtrace: =========
| /lib/x86_64-linux-gnu/libc.so.6(+0x7329f)[0x2b732eade29f]
| /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x2b732eb75bbc]
| /lib/x86_64-linux-gnu/libc.so.6(+0x109a90)[0x2b732eb74a90]
| /lib/x86_64-linux-gnu/libc.so.6(+0x108f99)[0x2b732eb73f99]
| /lib/x86_64-linux-gnu/libc.so.6(_IO_default_xsputn+0xbc)[0x2b732eae660c]
| /lib/x86_64-linux-gnu/libc.so.6(_IO_padn+0xa0)[0x2b732eada600]
| /lib/x86_64-linux-gnu/libc.so.6(_IO_vfprintf+0x3c4d)[0x2b732eab888d]
| /lib/x86_64-linux-gnu/libc.so.6(__vsprintf_chk+0x84)[0x2b732eb74024]
| /lib/x86_64-linux-gnu/libc.so.6(__sprintf_chk+0x7d)[0x2b732eb73f7d]
| ar[0x406d20]
| ar[0x4088df]
| ar[0x40bf08]
| ar[0x404a86]
| ar[0x405003]
| ar[0x402a45]
| /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x2b732ea8cf45]
| ar[0x402dc5]
| ======= Memory map: ========
| 00400000-00482000 r-xp 00000000 08:01 27273645                           /usr/local/bin/ar
| 00682000-00683000 r--p 00082000 08:01 27273645                           /usr/local/bin/ar
| 00683000-00684000 rw-p 00083000 08:01 27273645                           /usr/local/bin/ar
| 00776000-007e0000 rw-p 00000000 00:00 0                                  [heap]
| 2b732e846000-2b732e869000 r-xp 00000000 08:01 26740221                   /lib/x86_64-linux-gnu/ld-2.19.so
| 2b732e869000-2b732e86d000 rw-p 00000000 00:00 0
| 2b732e898000-2b732e89b000 rw-p 00000000 00:00 0
| 2b732ea68000-2b732ea69000 r--p 00022000 08:01 26740221                   /lib/x86_64-linux-gnu/ld-2.19.so
| 2b732ea69000-2b732ea6a000 rw-p 00023000 08:01 26740221                   /lib/x86_64-linux-gnu/ld-2.19.so
| 2b732ea6a000-2b732ea6b000 rw-p 00000000 00:00 0
| 2b732ea6b000-2b732ec25000 r-xp 00000000 08:01 26740235                   /lib/x86_64-linux-gnu/libc-2.19.so
| 2b732ec25000-2b732ee25000 ---p 001ba000 08:01 26740235                   /lib/x86_64-linux-gnu/libc-2.19.so
| 2b732ee25000-2b732ee29000 r--p 001ba000 08:01 26740235                   /lib/x86_64-linux-gnu/libc-2.19.so
| 2b732ee29000-2b732ee2b000 rw-p 001be000 08:01 26740235                   /lib/x86_64-linux-gnu/libc-2.19.so
| 2b732ee2b000-2b732ee30000 rw-p 00000000 00:00 0
| 2b732ee30000-2b732ee46000 r-xp 00000000 08:01 26741717                   /lib/x86_64-linux-gnu/libgcc_s.so.1
| 2b732ee46000-2b732f045000 ---p 00016000 08:01 26741717                   /lib/x86_64-linux-gnu/libgcc_s.so.1
| 2b732f045000-2b732f046000 rw-p 00015000 08:01 26741717                   /lib/x86_64-linux-gnu/libgcc_s.so.1
| 7fffb978b000-7fffb97ad000 rw-p 00000000 00:00 0                          [stack]
| 7fffb97f8000-7fffb97fa000 r-xp 00000000 00:00 0                          [vdso]
| ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
| ./x86_64-linux-libtool: line 1723:  8035 Aborted                 (core dumped) ar cru .libs/libXau.a AuDispose.o AuFileName.o AuGetAddr.o AuGetBest.o AuLock.o AuRead.o AuUnlock.o AuWrite.o
| make[2]: *** [libXau.la] Error 134
| make[2]: Leaving directory `/GIT/elphel393/poky/build/tmp/work/x86_64-linux/libxau-native/1_1.0.8-r0/build'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/GIT/elphel393/poky/build/tmp/work/x86_64-linux/libxau-native/1_1.0.8-r0/build'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox