OpenEmbedded

Installation

  • installation de open-embedded core
sudo apt-get install libxml2-utils
sudo apt-get install xsltproc


sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib  build-essential chrpath libsdl1.2-dev xterm


git clone git://git.openembedded.org/openembedded-core oe-core
cd oe-core


  • installation de bitbake
git clone git://git.openembedded.org/bitbake bitbake
sudo mkdir build
sudo chmod 777 build


  • compilation
cd /opt/build
source ../oe-core/oe-init-build-env /opt/build
bitbake core-image-minimal


L'image générée est sous tmp-eglibc/deploy/images/qemux86/

Ajout d'un module à l'image générée

sans succès car le lien vers le targz helloworld ne fonctionne plus.


  • J'ai adapté le script amhello.bb


#
# my-helloworld bb file
#
DESCRIPTION = "Helloworld software"
LICENSE = "CLOSED"
PR = "r0"
SRC_URI = "ftp://pxe.ustc.edu.cn/Gentoo/eta/usr/share/doc/automake-1.11.1/amhello-1.0.tar.gz"
SRC_URI[md5sum] = "fe54cfd6f074daf8447e1c776295d632"
SRC_URI[sha256sum] = "4474b41e4b1fff5bdf88839ce1a371b4130e2574244b5e20af9b98d6cce083b9"

do_install() {
        oe_runmake install DESTDIR=${D}
}


inherit autotools gettext



  • J'ai ajouté le répertoire meta-examples/recipes/amhello/ avec le bb cité dedans
  • J'ai ajouté la déclaration de la collection dans le fichier local.conf
BBFILE_COLLECTIONS += "examples"
BBFILE_PATTERN_examples := "^${TOPDIR}/"
BBFILE_PRIORITY_examples := "5"
BBFILES += "${TOPDIR}/*/recipes/*/*.bb"


  • J'ai ajouté la prise en compte du binaire hello pour l'image générée dans le fichier local.conf
IMAGE_INSTALL_append = " amhello"


Vérification de l'image générée avec qemu

  • lancer
. /opt/oe-core/oe-init-build-env /opt/build/
/opt/oe-core/scripts/runqemu /opt/build/tmp-eglibc/deploy/images/qemux86/bzImage-qemux86.bin


  • on vérifie que le binaire hello est bien dans l'image
hello
Hello World!
This is amhello 1.0.


Liens Externes