Skip to contentSkip to conversation

RaspberryPi with Poky

DISCUSSION Gary Thomas 3 participants 4 messages Jun 8, 2012 – Jun 10, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I've tried to build a simple Poky image for the RaspberryPi but it seems some bits are missing. Here's what I have in my deploy/images

[gthomas@europa rpi_poky]$ ls -l tmp/deploy/images/
total 113300
drwxr-xr-x 2 gthomas gthomas 4096 May 21 14:35 bcm2835-bootfiles
-rw-r--r-- 1 gthomas gthomas 46157543 May 21 16:36 core-image-sato-raspberrypi-20120521220319.rootfs.tar.bz2
lrwxrwxrwx 1 gthomas gthomas 59 May 21 16:37 core-image-sato-raspberrypi.rpi-sdimg -> core-image-sato-raspberrypi-20120521220319.rootfs.rpi-sdimg
lrwxrwxrwx 1 gthomas gthomas 57 May 21 16:37 core-image-sato-raspberrypi.tar.bz2 -> core-image-sato-raspberrypi-20120521220319.rootfs.tar.bz2
-rw-rw-r-- 1 gthomas gthomas 67036854 May 21 16:19 modules-3.1.9-r1-raspberrypi.tgz
-rw-rw-r-- 1 gthomas gthomas 294 May 21 16:25 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
lrwxrwxrwx 1 gthomas gthomas 97 May 21 16:19 zImage -> zImage-3.1.9-rpi+r1+git0ec4154d64ebba48ca2446cde60a90546311defc-r1-raspberrypi-20120521220319.bin
-rw-r--r-- 1 gthomas gthomas 2802952 May 21 16:18 zImage-3.1.9-rpi+r1+git0ec4154d64ebba48ca2446cde60a90546311defc-r1-raspberrypi-20120521220319.bin
lrwxrwxrwx 1 gthomas gthomas 97 May 21 16:19 zImage-raspberrypi.bin -> zImage-3.1.9-rpi+r1+git0ec4154d64ebba48ca2446cde60a90546311defc-r1-raspberrypi-20120521220319.bin
[gthomas@europa rpi_poky]$ ls -l tmp/deploy/images/bcm2835-bootfiles/
total 8328
-rwxrwxr-x 1 gthomas gthomas 2036936 May 21 14:29 arm128_start.elf
-rwxrwxr-x 1 gthomas gthomas 2036936 May 21 14:29 arm192_start.elf
-rwxrwxr-x 1 gthomas gthomas 2036936 May 21 14:29 arm224_start.elf
-rwxrwxr-x 1 gthomas gthomas 16528 May 21 14:29 bootcode.bin
-rw-rw-r-- 1 gthomas gthomas 32768 May 21 14:35 kernel.img
-rwxrwxr-x 1 gthomas gthomas 314691 May 21 14:29 loader.bin
-rwxrwxr-x 1 gthomas gthomas 2036936 May 21 14:29 start.elf

First problem: 'core-image-sato-raspberrypi.rpi-sdimg' is broken (no file) Second problem: the boot file 'kernel.img' only has the header/wrapper, no actual kernel code.

Has anyone succeeded in building a bootable image using Poky?

Note: I built this some days ago when the discussions on this list were hot, but I only received my board yesterday :-)

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw
Quoted 1 line · Gary Thomas

First problem: 'core-image-sato-raspberrypi.rpi-sdimg' is broken (no file)

I noticed this the the other day; on further investigation the sdimg class in meta-raspberrypi is rather nasty, IIRC you need to set up some stuff by hand on the build machine first and then run the build as root as well. I am not sure there is any need for the sdimg either, you should be able to use the tarball to extract the rootfs onto the SD card.

Tomas

#2 lore raw
Quoted 8 lines · On Friday 08 June 2012 13:46:09 Tomas Frydrych wrote:
Quoted 1 line · Gary Thomas

First problem: 'core-image-sato-raspberrypi.rpi-sdimg' is broken (no file)

I noticed this the the other day; on further investigation the sdimg class in meta-raspberrypi is rather nasty, IIRC you need to set up some stuff by hand on the build machine first and then run the build as root as well. I am not sure there is any need for the sdimg either, you should be able to use the tarball to extract the rootfs onto the SD card.

Yes, I looked at this too. If nobody else gets to it first I might try to rework this in a manner similar to our current live images for x86 so that you don't have to have loopback devices pre-configured.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw
Quoted 10 lines · Paul Eggleton
Quoted 8 lines · On Friday 08 June 2012 13:46:09 Tomas Frydrych wrote:
Quoted 1 line · Gary Thomas

First problem: 'core-image-sato-raspberrypi.rpi-sdimg' is broken (no file)

I noticed this the the other day; on further investigation the sdimg class in meta-raspberrypi is rather nasty, IIRC you need to set up some stuff by hand on the build machine first and then run the build as root as well. I am not sure there is any need for the sdimg either, you should be able to use the tarball to extract the rootfs onto the SD card.

Quoted 3 lines

Yes, I looked at this too. If nobody else gets to it first I might try to rework this in a manner similar to our current live images for x86 so that you don't have to have loopback devices pre-configured.

Turns out this is a dependency issue. I added this patch to fix it:

recipes-bcm/kernel-image/bcm2835-kernel-image.bb +1 -1
index ced20b0..0b1a159 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 COMPATIBLE_MACHINE = "raspberrypi"
 PR = "${MACHINE_KERNEL_PR}.1"
 
-DEPENDS = "bcm2835-bootfiles bcm2835-mkimage-native"
+DEPENDS = "bcm2835-bootfiles bcm2835-mkimage-native virtual/kernel"
 
 S = "${WORKDIR}"
 

I also needed this patch to get a working system, otherwise it hangs up trying to talk to ttyS0:

conf/machine/raspberrypi.conf +1 -1
index f3b33bb..86fd1b8 100755
@@ -11,7 +11,7 @@ GUI_MACHINE_CLASS = "bigscreen"
 
 IMAGE_FSTYPES += "tar.bz2 rpi-sdimg"
 
-SERIAL_CONSOLE = "115200 ttyS0"
+SERIAL_CONSOLE = "115200 ttyAMA0"
 
 PREFERRED_PROVIDER_virtual/kernel = "linux-${MACHINE}"
 MACHINE_KERNEL_PR = "r4"

I'm planning on sending a push for these tomorrow (today I have other commitments) :-)

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------