Construction d’une image Raspberry Pi avec le BSP Yocto v2.
Distribution de travail : Ubuntu 12.04 LTS
1) Dépendance à installer :
[~] ➔ sudo apt-get install diffstat gawk chrpath texinfo p7zip-full
2) Répertoire de travail :
[~] ➔ mkdir -p RASPBERRYPI/BSP [~] ➔ cd RASPBERRYPI/BSP [~/RASPBERRYPI/BSP] ➔
3) Clone de Yocto :
[~/RASPBERRYPI/BSP] ➔ git clone -b dora git://git.yoctoproject.org/poky.git Cloning into 'poky'... remote: Counting objects: 228961, done. remote: Compressing objects: 100% (57432/57432), done. remote: Total 228961 (delta 166940), reused 228543 (delta 166522) Receiving objects: 100% (228961/228961), 101.51 MiB | 373 KiB/s, done. Resolving deltas: 100% (166940/166940), done. [~/RASPBERRYPI/BSP] ➔ cd poky/ [~/RASPBERRYPI/BSP/poky (dora)] ➔
4) Clone du meta de Raspberry Pi :
[~/RASPBERRYPI/BSP/poky (dora)] ➔ git clone -b dora https://github.com/djwillis/meta-raspberrypi.git Cloning into 'meta-raspberrypi'... remote: Reusing existing pack: 1359, done. remote: Total 1359 (delta 0), reused 0 (delta 0) Receiving objects: 100% (1359/1359), 287.53 KiB | 447 KiB/s, done. Resolving deltas: 100% (488/488), done. [~/RASPBERRYPI/BSP/poky (dora)] ➔
5) Clone du meta Open Embedded :
[~/RASPBERRYPI/BSP/poky (dora)] ➔ git clone -b dora https://github.com/openembedded/meta-oe.git Cloning into 'meta-oe'... remote: Counting objects: 34712, done. remote: Compressing objects: 100% (14568/14568), done. remote: Total 34712 (delta 18562), reused 34619 (delta 18505) Receiving objects: 100% (34712/34712), 21.00 MiB | 989 KiB/s, done. Resolving deltas: 100% (18562/18562), done. [~/RASPBERRYPI/BSP/poky (dora)] ➔
6) Initialisation de la configuration :
[~/RASPBERRYPI/BSP/poky (dora)] ➔ source oe-init-build-env raspberryPiBuild/ ... ### Shell environment set up for builds. ### You can now run 'bitbake' Common targets are: core-image-minimal core-image-sato meta-toolchain meta-toolchain-sdk adt-installer meta-ide-support You can also run generated qemu images with a command like 'runqemu qemux86' [~/RASPBERRYPI/BSP/poky/raspberryPiBuild (dora)⚡] ➔
7) Fichiers de configuration :
Ouvrir :
local.conf
Chercher :
MACHINE ??= "qemux86"
Remplacer par :
MACHINE ?= "raspberrypi"
Chercher :
PACKAGE_CLASSES ?= "package_rpm"
Remplacer par :
PACKAGE_CLASSES ?= "package_deb"
Ajouter à la fin :
BBMASK = "meta-raspberrypi/recipes-multimedia/libav|meta-raspberrypi/recipes-core/systemd"
Ouvrir :
conf/bblayers.conf
Chercher :
BBLAYERS ?= " \ /home/util01/RASPBERRYPI/BSP/poky/meta \ /home/util01/RASPBERRYPI/BSP/poky/meta-yocto \ /home/util01/RASPBERRYPI/BSP/poky/meta-yocto-bsp \ "
Remplacer par :
BBLAYERS ?= " \ /home/util01/RASPBERRYPI/BSP/poky/meta \ /home/util01/RASPBERRYPI/BSP/poky/meta-yocto \ /home/util01/RASPBERRYPI/BSP/poky/meta-yocto-bsp \ /home/util01/RASPBERRYPI/BSP/poky/meta-raspberrypi \ /home/util01/RASPBERRYPI/BSP/poky/meta-oe/meta-oe \ "
8) Construction de l’image sans un environnement graphique :
[~/RASPBERRYPI/BSP/poky/raspberryPiBuild (dora)⚡] ➔ bitbake core-image-minimal Parsing recipes: 100% |############################################################################################################################################| ETA: 00:00:00 Parsing of 1296 .bb files complete (0 cached, 1296 parsed). 1683 targets, 64 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "1.20.0" BUILD_SYS = "i686-linux" NATIVELSBSTRING = "Ubuntu-12.04" TARGET_SYS = "arm-poky-linux-gnueabi" MACHINE = "raspberrypi" DISTRO = "poky" DISTRO_VERSION = "1.5.1" TUNE_FEATURES = "armv6 vfp" TARGET_FPU = "vfp" meta meta-yocto meta-yocto-bsp = "dora:f1276b066223e7f501f7f711680215ff8edee252" meta-raspberrypi = "dora:1c696a95f16337e4168a045479a386194d32e18f" meta-oe = "dora:40e0f371f3eb1628655c484feac0cebf810737b4" NOTE: Preparing runqueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks WARNING: Failed to fetch URL http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz, attempting MIRRORS if available WARNING: Failed to fetch URL ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz, attempting MIRRORS if available WARNING: Failed to fetch URL http://zlib.net/pigz/pigz-2.3.tar.gz, attempting MIRRORS if available WARNING: Failed to fetch URL http://www.apache.org/dist/apr/apr-1.4.8.tar.bz2, attempting MIRRORS if available WARNING: Failed to fetch URL http://www.apache.org/dist/apr/apr-util-1.5.2.tar.gz, attempting MIRRORS if available WARNING: Failed to fetch URL http://www.apache.org/dist/subversion/subversion-1.7.10.tar.bz2, attempting MIRRORS if available WARNING: Failed to fetch URL ftp://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_1.17.1.tar.xz, attempting MIRRORS if available WARNING: Failed to fetch URL ftp://ftp.debian.org/debian/pool/main/n/netbase/netbase_5.1.tar.gz, attempting MIRRORS if available WARNING: Failed to fetch URL ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-2.11.src.tar.gz, attempting MIRRORS if available WARNING: Failed to fetch URL http://ftp.de.debian.org/debian/pool/main/m/mklibs/mklibs_0.1.38.tar.gz, attempting MIRRORS if available WARNING: Failed to fetch URL ftp://ftp.debian.org/debian/pool/main/a/apt/apt_0.9.9.4.tar.gz, attempting MIRRORS if available NOTE: Tasks Summary: Attempted 1582 tasks of which 246 didn't need to be rerun and all succeeded. Summary: There were 11 WARNING messages shown. [~/RASPBERRYPI/BSP/poky/raspberryPiBuild (dora)⚡] ➔
9) Vérification :
[~/RASPBERRYPI/BSP/poky/raspberryPiBuild (dora)⚡] ➔ ls -l tmp/deploy/images/raspberrypi/ bcm2835-bootfiles/ core-image-minimal-raspberrypi-20140330074619.rootfs.ext3 core-image-minimal-raspberrypi-20140330074619.rootfs.rpi-sdimg core-image-minimal-raspberrypi-20140330074619.rootfs.tar.bz2 core-image-minimal-raspberrypi.ext3 core-image-minimal-raspberrypi.rpi-sdimg core-image-minimal-raspberrypi.tar.bz2 Image Image--3.6.11+git63b69a8806ce1890711ff55280c90673ea415933-r7-raspberrypi-20140330074619.bin Image-raspberrypi.bin modules--3.6.11+git63b69a8806ce1890711ff55280c90673ea415933-r7-raspberrypi-20140330074619.tgz modules-raspberrypi.tgz README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt [~/RASPBERRYPI/BSP/poky/raspberryPiBuild (dora)⚡] ➔
10) Graver l’image sur une carte mémoire :
[~/RASPBERRYPI/BSP/poky/raspberryPiBuild (dora)⚡] ➔ cd tmp/deploy/images/raspberrypi/ [~/RASPBERRYPI/BSP/poky/raspberryPiBuild/tmp/deploy/images/raspberrypi (dora)⚡] ➔ sudo dd bs=1M if=core-image-minimal-raspberrypi.rpi-sdimg of=/dev/mmcblk0 32+0 enregistrements lus 32+0 enregistrements écrits 33554432 octets (34 MB) copiés, 5,87112 s, 5,7 MB/s
11) Connexion :
Login : root Mot de passe :
12) Liens :
http://mytechpg.blogspot.fr/2013/06/raspberrypi-and-yocto.html
http://www.cnx-software.com/2013/07/05/12mb-minimal-image-for-raspberry-pi-using-the-yocto-project/