Difference between revisions of "Yocto tests"

From ElphelWiki
Jump to: navigation, search
m
m
Line 61: Line 61:
 
** Among all there's no ''python'' in the PACKAGES list.
 
** Among all there's no ''python'' in the PACKAGES list.
 
** Does '''hob''' install all the PACKAGES if ''python'' is checked? Haven't tried, also the used '''hob''' version doesn't support saving recipes.
 
** Does '''hob''' install all the PACKAGES if ''python'' is checked? Haven't tried, also the used '''hob''' version doesn't support saving recipes.
* '''(Is there a better solution?)''' Adding packages : '''apache2''', '''php''', '''i2c-tools''', '''mtd-utils''', steps:
+
* '''(Is there a better solution?)''' Adding packages : '''apache2''', '''php''', '''i2c-tools''', '''mtd-utils''', '''net-tools''' steps:
 
**Clone '''meta-oe''' from OpenEmbedded:  
 
**Clone '''meta-oe''' from OpenEmbedded:  
 
  git clone -b dylan https://github.com/openembedded/meta-oe.git
 
  git clone -b dylan https://github.com/openembedded/meta-oe.git

Revision as of 18:39, 10 November 2013

About

  • All of the described things happen in Kubuntu 13.04
  • Building Linux images for Zynq platform - ARMv7

GIT

git clone -b dylan git://git.yoctoproject.org/poky.git
git clone -b dylan https://github.com/Xilinx/meta-xilinx.git meta-xilinx
git clone git://git.code.sf.net/p/elphel/meta-elphel393 meta-elphel393

Configure

  • Step 1: Init environment

cd poky
. ./oe-init-build-env

  • Step 2: Edit build/conf/bblayers.conf - add paths to BBLAYERS:

<absolute-path>/meta-xilinx \
<absolute-path>/meta-xilinx/meta-zedboard \
<absolute-path>/meta-elphel393 \

  • Step 3: Edit build/conf/local.conf - set MACHINE and other things:

 BB_NUMBER_THREADS = "8" (depends on the PC's CPU)
 PARALLEL_MAKE = "-j 8" (depends on the PC's CPU)
 MACHINE ?= "zedboard"

Notes

  • MACHINE="zedboard" is used to build the kernel. Doesn't matter for ramdisk.image.gz because the recipes don't have any bbappends for core-images.

Build kernel

bitbake linux-xlnx

Notes

  • The dtc script for converting device tree between *.dts and *.dtb formats is built along with the kernel.

Build ramdisk.image.gz

bitbake elphel393

Notes

  • Current packages:
elphel393.bb:
IMAGE_INSTALL = "packagegroup-core-boot python-core ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
  • Also works:
elphel393.bb:
IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
IMAGE_INSTALL_append = "python-core"
  • Why python-core and not just python?
    • poky/meta/recipes-devtools/python/python-2.7-manifest.inc has a list in PACKAGES items from which should go into IMAGE_INSTALL
    • Among all there's no python in the PACKAGES list.
    • Does hob install all the PACKAGES if python is checked? Haven't tried, also the used hob version doesn't support saving recipes.
  • (Is there a better solution?) Adding packages : apache2, php, i2c-tools, mtd-utils, net-tools steps:
    • Clone meta-oe from OpenEmbedded:
git clone -b dylan https://github.com/openembedded/meta-oe.git
    • Lines to bblayers.conf:
   <absolute-path>/meta-oe/meta-oe \
   <absolute-path>/poky/meta-oe/meta-perl \
   <absolute-path>/poky/meta-oe/meta-webserver \
    • elphel393.bb (some discussions mention the leading space is mandatory but somehow it works even without it):
IMAGE_INSTALL_append = "<mandatory space?>python-core \
                       i2c-tools \
                       mtd-utils \
                       net-tools \
                       modphp \
                       apache2 \
                       php-cli"
    • Why php-cli and not just php?
meta-oe/meta-oe/recipes-devtools/php/php.inc:
PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
      • PACKAGES includes php. What is installed? (No php-cli: missing /usr/bin/php) Didn't investigate.
      • What does hob build if php is checked? Didn't test.
      • Using php-cli installs php in the /usr/bin/. Tested.
      • Using php-cli increases the unpacked image size from ~16MB to ~50MB.
    • To fix the ERROR="Could not inherit file classes/vala.bbclass" in bitbake copy vala.bbclass from oe-core? or delete the conflicting recipes (2?)?
    • To fix the ERROR="Failed to parse krb5_1.11.3.bb" in bitbake delete the directory meta-oe/meta-oe/recipes-connectivity/krb5

U-boot and device tree related notes

  • The default UNPACKED ramdisk max size for zynq is 16MB - once it gets bigger you get KERNEL PANIC - the solution is modifying the device tree - then recompile into DTB:
*.dts, add to bootargs parameter ramdisk_size=32768 (takes KB), example:
bootargs = "console=ttyPS0,115200 root=/dev/ram rw ip=192.168.1.10 earlyprintk ramdisk_size=32768";
  • The default COMPRESSED ramdisk max size for zynq is 10MB set in u-boot - change according to your needs, example:
zynq_zed.h:
"sdboot=echo Copying Linux from SD to RAM... && " \
               "mmcinfo && " \
               "fatload mmc 0 0x3000000 ${kernel_image} && " \
               "fatload mmc 0 0x2A00000 ${devicetree_image} && " \
               "fatload mmc 0 0x2000000 ${ramdisk_image} && " \
               "bootm 0x3000000 0x2000000 0x2A00000\0" \

So, the max sizes:
compressed ramdisk    = 0x2A00000 - 0x2000000 = 0xA00000 = 10MB
devicetree = 0x3000000 - 0x2A00000 = 0x600000 = 6MB

Build toolchain

  • Step 1: build

bitbake meta-toolchain

  • Step 2: install - launch installer from <some-path>/poky/build/tmp/deploy/