Error building cloud9-image from Angstrom

I keep getting the following error when attempting to build the beaglebone cloud9-image from scratch.
Any ideas as to what I am doing wrong?

This is the procedure I am using:

dlambert@development:~/src/beaglebone$ rm ~/.oe/*
dlambert@development:~/src/beaglebone$ git clone git://git.angstrom-distribution.org/setup-scripts
dlambert@development:~/src/beaglebone$ cd setup-scripts
dlambert@development:~/src/beaglebone/setup-scripts$ MACHINE=beaglebone ./oebb.sh config beaglebone
dlambert@development:~/src/beaglebone/setup-scripts$ MACHINE=beaglebone ./oebb.sh update
dlambert@development:~/src/beaglebone/setup-scripts$ ./oebb.sh bitbake virtual/kernel
....
No errors
....
dlambert@development:~/src/beaglebone/setup-scripts$ . ~/.oe/environment-oecore
dlambert@development:~/src/beaglebone/setup-scripts$ bitbake systemd-image
....
No errors
dlambert@development:~/src/beaglebone/setup-scripts$ bitbake cloud9-image

---snip---

./media/ram/
/etc/fstab entries need to be created with the user flag for the loop

devices like:

/dev/loop2

/home/dlambert/src/beaglebone/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-image-1.0-r0/tmp-mnt-boot vfat user 0 0
NOTE: package cloud9-image-1.0-r0: task do_rootfs: Failed
ERROR: Task 8 (/home/dlambert/src/beaglebone/setup-scripts/sources/meta-ti/recipes-misc/images/cloud9-image.bb, do_rootfs) failed with exit code '1'
ERROR: '/home/dlambert/src/beaglebone/setup-scripts/sources/meta-ti/recipes-misc/images/cloud9-image.bb' failed
dlambert@development:~/src/beaglebone/setup-scripts$

You need to add a line in your /etc/fstab as directed by the bit you just pasted in your email: this is used by bitbake to build the SD image - while systemd-image and most other targets just create the various bits which you have to assemble by hand to create a bootable SD image, the cloud9-image target attempts to create a SD.img file which you can just dd/cat to your microSD. On my system, I manage to get all the way to SD image file creation and the bitbake process stops there with an error (‘file too large’).

Thanks - it took me some time before I realized I needed to make this modification on my HOST machine :-[

Dave.

Yeah, is is a bit counterintuitive until you look at the actual script. I am interested if you manage to get to the end of the build process, on my system it keeps hitting this 2GB file size limit when running “dd” through bitbake to make sd.img, I really have no idea where this comes from… Running Ubuntu 32bits, but still, the same dd command from the command line works fine!

Yeah, is is a bit counterintuitive until you look at the actual script. I am interested if you manage to get to the end of the build process, on my system it keeps hitting this 2GB file size limit when running "dd" through bitbake to make sd.img, I really have no idea where this comes from... Running Ubuntu 32bits, but still, the same dd command from the command line works fine! --
You received this message because you are subscribed to the Google Groups "Beagle Board" group.
To view this discussion on the web visit https://groups.google.com/d/msg/beagleboard/-/KhB2-3EaVm4J.
To post to this group, send email to beagleboard@googlegroups.com.
To unsubscribe from this group, send email to beagleboard+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.

I think I am now getting a similar result to you on the first pass, but I am now getting some permission denied errors deleting loop devices? Next step is to bitbake -c clean cloud9-image, then remake.

./media/ram/
loop: can't delete device /dev/loop1: Permission denied
loop: can't delete device /dev/loop2: Permission denied
loop: can't delete device /dev/loop3: Permission denied
/dev/loop1: Permission denied

NOTE: package cloud9-image-1.0-r0: task do_rootfs: Failed
ERROR: Task 8 (/home/dlambert/src/beaglebone/setup-scripts/sources/meta-ti/recipes-misc/images/cloud9-image.bb, do_rootfs) failed with exit code '1'
ERROR: '/home/dlambert/src/beaglebone/setup-scripts/sources/meta-ti/recipes-misc/images/cloud9-image.bb' failed

You should add yourself to the ‘disk’ group (adduser Xxx disk) and logout/login to refresh your rights…

Thanks. After doing that, I tried a clean followed by a build, and success!

NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 3504 of 3506 (ID: 8, /home/dlambert/src/beaglebone/setup-scripts/sources/meta-ti/recipes-misc/images/cloud9-image.bb, do_rootfs)
NOTE: package cloud9-image-1.0-r0: task do_rootfs: Started
NOTE: package cloud9-image-1.0-r0: task do_rootfs: Succeeded
NOTE: Running noexec task 3506 of 3506 (ID: 5, /home/dlambert/src/beaglebone/setup-scripts/sources/meta-ti/recipes-misc/images/cloud9-image.bb, do_build)
NOTE: Tasks Summary: Attempted 3506 tasks of which 3504 didn't need to be rerun and 0 failed.
dlambert@development:~/src/beaglebone/setup-scripts$

I'm stuck even earlier, with
  unparsed line: 'TUNE_ARCH ??= "INVALID"
just as in this report:
  http://osdir.com/ml/beagleboard/2011-12/msg00563.html

I tried changing ??= to ?= in all the conf files, but it fails again
later with Python errors.

Perhaps there's some version skew between what oe wants and the
bitbake provided by Ubuntu 11.04 (BitBake Build Tool Core version
1.8.18, bitbake version 1.8.18).

That's what you get for not following the instructions on the angstrom site.

Perfect! I’m still stuck at this “dd” 32 bit issue… Can you tell me what host operating system you are using? Ubuntu, what version, 32 or 64 bits ? Also what amount of RAM do you have on your system? Thanks in advance,

Ed

Except for the wiki link right Koen? The last edit was in 2009. Its no wonder people get confused. You should change that to legacy wiki.

Ubuntu 11.04 running on a Intel(R) Core(TM)2 Quad CPU Q8300 @ 2.50GHz, 3GB memory. I too got the "too big" error, but it seemed to disappear after the fixes you suggested and after doing a "bitbake -c clean cloud9-image", followed by a "bitbake cloud9-image". I am not clear on what fixed it however.

Dave.

ok… in my case, running bitback cloud9-image twice in a row make it succeed, but… if I look closely at the SD image that is generated, it is only 2GB large, whereas it should actually be a 4GB image, as far as I can tell… Just trying to build everything from scratch from a clean Ubuntu 11.10 64bit VM at the moment. Nothing but Ubuntu, the few prerequisites needed to compile, and instructions from the angstrom wiki. Compilation fails at nodejs rootfs creation for the cloud9-image, I’m doing a systemd-image to see how it goes.

ok... in my case, running bitback cloud9-image twice in a row make it succeed, but... if I look closely at the SD image that is generated, it is only 2GB large, whereas it should actually be a 4GB image, as far as I can tell...

In my case the compressed SD image is only ~190MB, which compares well with Koen's images on http://dominion.thruhere.net/koen/angstrom/beaglebone/. I do not think the image is required to fill the SD card, merely populate the partition table, the boot and root partitions and their contents.

I've succeded finally. But as for "no following instructions," I've
done nothing but follow instructions for 3 days.
The problem is there's lots of partial instructions floating around,
even on the angstrom site.

The problem above problem turned out to be the link from /bin/sh to /
bin/dash on Ubuntu.

Next problem was that I can't get it to boot without copying a uImage
file from the rootfs to the FAT32 system. If I don't do that I get
nothing, not even blinkey lights. Copy that file from /boot to the
FAT32 partition as uImage.bin and it boots right away. That's not
listed in the demo/beaglebone site.

So let's take a look at the partial instructions:
1. http://www.angstrom-distribution.org/demo/beaglebone/
It says to use mkcard.txt. But if I do that, my kernel gets confused
about the newly-created sdcard partitions. So I needed to run the
last step (the mkfs steps) by hand, after physically removing the USB
device and putting it back in. There's lots of folks complaining
about being stuck here, with "partition appears to be still in use"
and various suggested fixes (write zeros using dd) but none of them
work.

2. http://www.angstrom-distribution.org/demo/beaglebone/ again
The last line "How to reproduce?" says
  MACHINE=beaglebone ./oebb.sh bitbake systemd-image
Once I got the various dependencies and the dash problem solved, this
worked. Or at least it finished.
Last night I commiserated with another beaglebone owner here in
Silicon Valley, who said he'd gotten this far as well.
But now what? Where are the files?

3.http://www.angstrom-distribution.org/building-angstrom
Step 2 tells you go go here if you get stuck, so I guess falling off
the end of #2 with no further instructions constitutes stuck.
Unfortunately, it's pretty much the same as #2, except not beign
specific to the beaglebone. I
It has a step 3 too, which says "Follow the below tutorial." Sadly,
that's the last line on the page, with no tutorial below.
It does have its own "if you get stuck" section so let's follow that.
It has the title "Gettign Started"

4. http://wiki.openembedded.org/index.php/Getting_Started
Odd that Step 4 is getting started, but I'm game for it.
OK, I've done most of this already, but it has the following helpful-
seeming comments near the end:
  Output of the build process (temporary files, log files and the
binaries) all ends up in the tmp directory.
  Most interesting is probably the tmp/work/ directory. Just have a
look around the DirectoryStructure.
  Images generated by building package groups like opie-image or
pivotboot-image are placed in the tmp/deploy/images/ directory.

OK, so maybe there are some output files somewhere. A few quality
minutes with find tell me this, and I've hit paydirt.

$ ls setup-scripts/build/tmp-angstrom_2010_x-eglibc/deploy/images/
beaglebone/
-rw-r--r-- 1 klotz klotz 12460887 2012-01-07 12:43 Angstrom-systemd-
image-eglibc-ipk-v2012.01-core-beaglebone.rootfs.tar.bz2
drwxr-xr-x 2 klotz klotz 4096 2012-01-07 12:43 Angstrom-systemd-
image-eglibc-ipk-v2012.01-core-beaglebone-testlab
-rw-r--r-- 1 klotz klotz 84568 2012-01-07 00:43 config-3.1-r2h
+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d-beaglebone.config
lrwxrwxrwx 1 klotz klotz 77 2012-01-07 00:43 config-
beaglebone.config -> config-3.1-r2h
+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d-beaglebone.config
lrwxrwxrwx 1 klotz klotz 26 2012-01-07 12:37 MLO -> MLO-
beaglebone-2011.09+git
lrwxrwxrwx 1 klotz klotz 26 2012-01-07 12:37 MLO-beaglebone ->
MLO-beaglebone-2011.09+git
-rwxr-xr-x 1 klotz klotz 37135 2012-01-07 12:37 MLO-
beaglebone-2011.09+git
-rw-r--r-- 1 klotz klotz 6099382 2012-01-07 00:43 modules-3.1.0+-r2h
+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d-beaglebone.tgz
lrwxrwxrwx 1 klotz klotz 4 2012-01-07 00:43 modules-
beaglebone.tgz -> .tgz
-rw-r--r-- 1 klotz klotz 294 2012-01-07 12:41 README_-
_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
lrwxrwxrwx 1 klotz klotz 73 2012-01-07 12:43 systemd-image-
beaglebone.tar.bz2 -> Angstrom-systemd-image-eglibc-ipk-v2012.01-core-
beaglebone.rootfs.tar.bz2
-rwxr-xr-x 1 klotz klotz 230308 2012-01-07 12:37 u-boot-
beaglebone-2011.09+git-r25.img
lrwxrwxrwx 1 klotz klotz 37 2012-01-07 12:37 u-boot-
beaglebone.img -> u-boot-beaglebone-2011.09+git-r25.img
lrwxrwxrwx 1 klotz klotz 37 2012-01-07 12:37 u-boot.img -> u-
boot-beaglebone-2011.09+git-r25.img
-rw-r--r-- 1 klotz klotz 3029656 2012-01-07 00:43 uImage-3.1-r2h
+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d-
beaglebone-20120107073417.bin
lrwxrwxrwx 1 klotz klotz 89 2012-01-07 00:43 uImage-
beaglebone.bin -> uImage-3.1-r2h
+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d-
beaglebone-20120107073417.bin

OK, so now I can go back to step 1 and copy the linked file MLO to
actual MLO (first, which is totally critical but there's very little
indication of how critical that it be first), then u-boot.img, then
copy uImage-beaglebone.bin to uImage on the boot partition.

Next step, the untar of systemd-image-beaglebone.tar.bz2 to the second
partition as described on the http://www.angstrom-distribution.org/demo/beaglebone/
page (step 1) worked great. Except it doesn't tell you that you
probably also need to untar the kernel modules file as well in case
you want to use any USB devices. But this time the linked file
modules-beaglebone.tgz isn't linked to the right place so you have to
notice that and use modules-3.1.0+-r2h
+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d-beaglebone.tgz directly
instead (or whatever it is for you).

Once I did all that, I got it to boot! Yay!

Now, I go back to my original task, which is trying to add a package
that's already present in Narcissus, but Narcissus doesn't have a
beaglebone target. Of course, I learned about narcissus in the first
place because my beaglebone web server helpfully told me to go there
and build for it, but it only has beagleboard, not beaglebone, but
that only took me a couple of hours of fiddling to figure out that the
resulting images don't work.

So yes, I followed the directions. I read about 150 messages on this
group. I read through many sites. I re-imaged several SD cards of
various sizes. I even took a look at the included TI SDK before I
decided it was for some alternate universe. And now I am able to
build exactly the Cloud9 image with modules, but I still can't add a
package.

There are instructions at http://wiki.openembedded.org/index.php/Getting_Started#Adding_Packages
but they're pretty much on the order of "1. add package. 2. compile
package and test it. 3. submit patch" which is quite literally
unhelpful. I expect the route to getting to understand this will be a
similar journey to the route I took to build the copy of the shipped
image, that is, several days. So I can go do that, or I can hope that
in the time it takes me to figure this out, Narcissus will get updated
with whatever config file is necessary and I can just use the cloud-
based build and download a single image and be done with it. Because
once I do figure it out, it won't be useful, because nobody else will
take the time to follow all this procedure, and the packages are
already on Narcissus anyway so all they have to do is wait as well.

So yes, I followed the instructions on the angstrom site, and Yes, I
finally got it to work. Thanks for your help!