will a buildroot build for BBB work out of the box?

just a yes or no ... if i configure and build buildroot for a BBB,
will the generated artifacts simply "work" if i copy them to an
appropriately formatted SD card?

  i ask as i downloaded the current state of buildroot, did the
obligatory:

  $ make beaglebone_defconfig
  $ make

and got fairly predictable results:

-rw-rw-r--. 1 rpjday rpjday 34004 Apr 15 10:41 am335x-boneblack.dtb
-rw-rw-r--. 1 rpjday rpjday 32858 Apr 15 10:41 am335x-bone.dtb
-rw-rw-r--. 1 rpjday rpjday 102416 Apr 15 10:07 MLO
-rw-rw-r--. 1 rpjday rpjday 3013632 Apr 15 10:41 rootfs.ext2
-rw-rw-r--. 1 rpjday rpjday 364200 Apr 15 10:07 u-boot.img
-rw-rw-r--. 1 rpjday rpjday 96 Apr 15 10:41 uEnv.txt
-rwxrwxr-x. 1 rpjday rpjday 3600224 Apr 15 10:41 zImage

  *however*, without a chance to test this at the moment, i note that
the contents of uEnv.txt are kind of skimpy:

bootpart=0:1
bootdir=
uenvcmd=run loadimage;run loadramdisk;run findfdt;run loadfdt;run ramboot

as in, no reference to the kernel image file or the dtb file, so i'm
only assuming that all of that is somehow encoded in the u-boot.img.

  i'm going to dig deeper later, but can anyone who's done this verify
that just copying those artifacts to an SD card will give me a
bootable system? thanks.

rday

Hello.

I’ve seen your work on the yocto list.

It looks like you have most of the parts there. I think the am335x will use the file system and load the mlo. So yep, it looks like you can copy the files over and the bbb should boot off of it (assuming you hold the boot button or have zeroed out the first block of emmc). At least you should get into uboot. Not sure what that roofs.ext2 is but that’s probably because we boot to another partition, that may work just fine.

Chris

Apologies for the late follow-up here. I’ve pretty much the same problem. Using BR 2015.02 I get a sane looking set of outputs post build.

u-boot spew follows.

Both mmc 0:1 and mmc 0:2 show the expected SD card content. It just looks like uEnv is wrong (?).

Any help here would be much appreciated. TVMIA

-----------------------snip----------------------------------------
micro SD card found
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
96 bytes read in 3 ms (31.3 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
## Error: "loadimage" not defined
reading ramdisk.gz
** Unable to read file ramdisk.gz **
reading /am335x-boneblack.dtb
34004 bytes read in 9 ms (3.6 MiB/s)
Booting from ramdisk ...
Wrong Image Format for bootm command
ERROR: can't get kernel image!
gpio: pin 55 (gpio 55) value is 1
reading /uImage
** Unable to read file /uImage **
U-Boot#
-----------------------snip---------------------------------------

Lets see what your uEnv.txt looks like.

Apologies for the late follow-up here. I’ve pretty much the same problem. Using BR 2015.02 I get a sane looking set of outputs post build.

u-boot spew follows.

Both mmc 0:1 and mmc 0:2 show the expected SD card content. It just looks like uEnv is wrong (?).

Any help here would be much appreciated. TVMIA

-----------------------snip----------------------------------------
micro SD card found
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
96 bytes read in 3 ms (31.3 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
## Error: "loadimage" not defined
reading ramdisk.gz
** Unable to read file ramdisk.gz **
reading /am335x-boneblack.dtb
34004 bytes read in 9 ms (3.6 MiB/s)
Booting from ramdisk ...
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Yuck! bootm!!

gpio: pin 55 (gpio 55) value is 1
reading /uImage
** Unable to read file /uImage **
U-Boot#
-----------------------snip---------------------------------------

You have a really old bootloader in eMMC.. Robert's original post
assumes at-least the Debian May 2014 release or newer stored in eMMC..

http://beagleboard.org/latest-images

Regards,

Thanks.

You have a really old bootloader in eMMC.. Robert's original post assumes at-
least the Debian May 2014 release or newer stored in eMMC..

http://beagleboard.org/latest-images

Ah. That would make an awful lot of sense. I will reflash and report back.

BR,

Thanks. With luck this is just for the record …

bootpart=0:1

bootdir=

bootfile=zImage

uenvcmd=run loadimage;run loadramdisk;run findfdt;run loadfdt;run ramboot

Lets see what your uEnv.txt looks like.

OK so . …

reading uEnv.txt
96 bytes read in 3 ms (31.3 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc …
Running uenvcmd …
## Error: “loadimage” not defined

This is what a “modern” "first stage " uEnv.txt looks like ( Debian wheezy 7.8 )

http://pastebin.com/uheBAu99

Particularly:

loadximage=load mmc 0:1 ${loadaddr} /boot/vmlinuz-${uname_r}

Is you version of uboot patched with the beaglebone patchset ?