How are the production BBB images built?

Right, I didn’t expect the core of angstrom to handle this either. Doesn’t that still leave a gap in the documentation going from the angstrom build outputs to the production image, or did that address your question? Imo I think there still is a bit of a gap. The emmc-prepare.sh appears to be in a bitbake layer, meta-begleboard, if I have the terminology correct, but I’m not sure how to use these scripts in conjunction with angstrom to build the production image files, both the emmc programming image and the sd boot images.

Chris

I’ve had some time to go through the emmc-prepare.sh, mmc-prepare.sh and mkcard.sh and I still can’t figure out how the images are built.

Let me try to explain with actual commands.

build the uboot, cloud9-gnome-image rootfs etc.

MACHINE=beaglebone ./oebb.sh bitbake cloud9-gnome-image

files are now in images/beagleboard

./mkcard.sh /dev/mmcblk0

mount the sd card partitions

copy the files to the appropriate locations on the card

unmount the sd card partitions

make the image from the card

dd if=/dev/mmcblk0 of=production.img bs=1M

and now you can insert new sd cards and copy the image over per the instructions using dd

Is this close? It would be neat if the image could be made without needing a physical card, and sized to the minimum size required but maybe it isn’t possible to mount and format partitions on a virtual device, this seems like something Linux should be able to do.

Chris

Chris, I’m not entirely sure I am following the main thrust of your question but I may be able to help with a tiny part.

It is possible to locally mount a disk image and write to it (assuming sudo) without having to write the image to a card and then mount that. You can use “losetup” to create a local loop.
I’ve included details about that in a blog post about shrinking a disk image (here).
Hope it help
Martin

Hi Martin.

I took a look at your post and I can certainly follow it in terms of working with an existing image, but I don’t believe that the appropriate images are created by Angstrom, or at least my eyes are failing me and I haven’t spotted them.

In this case I have a rootfs tarball, a uboot binary, the MLO etc, all of the separate components, and a blank microsd card, which I believe to be what the BBB recipes generate if you follow the instructions in the BB white srm and on the angstrom wiki with MACHINE=beaglebone.

I’m trying to figure out how to generate the production programming image, the one on the wiki that boots and programs the production image to the emmc, as well as the bootable image, the one where you can boot the production image directly off of the microsd card.

Clearly I can do everything by programming the existing image onto an sd card, mounting it and altering it. That doesn’t seem like The Right Thing to do though.

Chris

If I might ask…how much disk is taken up by the cloud9-gnome-image build?
The machine I’m using is a little resource constrained and I’ve filled 30+G of disk in my attempt.
The specific command I’m using is: MACHINE=beaglebone bitbake cloud9-gnome-image

Thanks,
Dale
ps. FWIW, I was able to build virtual/kernel, but I haven’t yet tried the resulting kernel, so I may have failed to setup something correctly.

I crossed my fingers, and resized partitions…got past the disk exhaustion, and strangely now my disk only has 22G. So somewhere between the old 30G and the now available 53G was the magic number.
Now unfortunately I’m encountering a build failure with nodejs…google told me to raise ulimit -s for this…and that didn’t work. The build machine is Debian Wheezy (linux 3.2 if I read things correctly), am I out of luck with the following?

ERROR: Function failed: do_compile (see /home/dales/beagleBoneBlack/angstrom/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.8.22-r0/temp/log.do_compile.16430 for further information)
ERROR: Logfile of failure stored in: /home/dales/beagleBoneBlack/angstrom/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.8.22-r0/temp/log.do_compile.16430
Log data follows:

DEBUG: Executing shell function do_compile
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory /home/dales/beagleBoneBlack/angstrom/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.8.22-r0/node-v0.8.22/out' make[1]: execvp: printf: Argument list too long make[1]: *** [/home/dales/beagleBoneBlack/angstrom/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.8.22-r0/node-v0.8.22/out/Release/obj.target/deps/openssl/libopenssl.a] Error 127 make[1]: Leaving directory /home/dales/beagleBoneBlack/angstrom/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.8.22-r0/node-v0.8.22/out’
make: *** [node] Error 2
ERROR: Function failed: do_compile (see /home/dales/beagleBoneBlack/angstrom/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.8.22-r0/temp/log.do_compile.16430 for further information)
ERROR: Task 861 (/home/dales/beagleBoneBlack/angstrom/setup-scripts/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_0.8.22.bb, do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 6529 tasks of which 6526 didn’t need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Thanks,
Dale

Odd.

I’ve been building on ubuntu 13.04 without issues…

I’m not sure how much that recipe might take to build but it is a bit :slight_smile:

Robert,

Have you resolved any of these mysteries in the mean time?

I got into this by trying to “bitbake” a simpler image, such as console-image, since I need no graphics or fancy webserver with node.js foo. So far I have failed to boot from the SD card with anything which has been made by the oebb.sh script or bitbake build system. Even Derek’s 2-year-old instructions seem not to work for “console-image”.

After I succeed at booting the BBB with my own custom image, I plan on updating u-boot to allow “fastboot”, an feature more commonly supported by Android which allows one to boot or flash over USB, ethernet, etc. Maybe we can become free from SD cards in the near future for BBB development.

Cheers,
Joe

Maybe we can become free from SD cards in the near future for BBB development.

Doesn’t uboot support network boot already?

Maybe we can become free from SD cards in the near future for BBB development.

Doesn’t uboot support network boot already?

Hi Brandon,

I use u-boot on my BBB to tftp zImage from my desktop and then mount rootfs via NFS on my desktop. Is that what you want?

Regards,
John

Don’t follow Derek’s instructions as they are slightly out of date. To build a Angstrom console image on an SD-card:

Angstrom Master

Hi,

I’m now getting this error on v2013.12-yocto1.5 cloud9-image.bb, while compiling on xubuntu 32-bit 12.04.3. Disk exhaustion is not the cause and I don’t think it is memory exhaustion. It may be an internal make error. Are you compiling on a 32-bit or 64-bit platform?

I’ll investigate further and maybe post the results on the Angstrom list.

Other Angstrom images seem to be OK.

Regards …

Two things. First, I have had success with my bitbaked images. After I grabbed my console serial cable from work it seemed my boot was failing to find /dtbs/am355x…dtb for the bbb, so I created the folder on the boot partition and added the dtb file and it has since worked.

Second, while netboot is cool, it’s not quite as cool as fastboot. Here is a fan review and tutorial for Android BBB, AM335x eMMC booting doc by TI, and the succinct fastboot protocol here.

As it happens, I have just connected to u-boot from linux host using fastboot. Next steps are to see if I can boot or flash an Angstrom image over USB.

Cheers,
Joe Gorse