BBB meta-bb

From Crashcourse Wiki

Jump to: navigation, search

Contents

[edit] Overview

Notes on configuring, building and testing a core-image-minimal for the BBB using the meta-beagleboard layer. Unless stated otherwise, I am using the master branches for everything, and I want the end result to be a bootable BBB image that has full IPK-based package management, and full functionality over the USB tether (storage plus networking).

That first part is easy; the second not so much.

[edit] The repos to check out

I keep all my Git checkouts in the same directory:

  • oe-core from here
  • meta-openembedded from here
  • meta-beagleboard from here
  • bitbake from here

Simply symlink "bitbake" from the top level of the oe-core checkout to the bitbake checkout, so that OE-core automatically uses that latest BitBake.

[edit] The configuration

[edit] local.conf

MACHINE ??= "beaglebone"
PACKAGE_CLASSES ?= "package_ipk"
IMAGE_FEATURES += "package-management"
CORE_IMAGE_EXTRA_INSTALL = "gadget-init"

The gadget-init package is allegedly what is responsible for the USB tethering operation -- I'm still working on this.

[edit] bblayers.conf

BBLAYERS ?= " \
  /home/rpjday/oe/dist/layers/oe-core/meta \
  /home/rpjday/oe/dist/layers/meta-openembedded/meta-oe \
  /home/rpjday/oe/dist/layers/meta-beagleboard/common-bsp \
  /home/rpjday/oe/dist/layers/meta-beagleboard/meta-beagleboard-extras \
  "

We need that final layer for the gadget-init recipe.

[edit] Build configuration

Here's my current config:

BB_VERSION        = "1.19.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-12.04"
TARGET_SYS        = "arm-oe-linux-gnueabi"
MACHINE           = "beaglebone"
DISTRO_VERSION    = "oe-core.0"
TUNE_FEATURES     = "armv7a vfp neon"
TARGET_FPU        = "vfp-neon"
meta              = "master:fd9e591f266e1a6c183e77f24e50d31e0d52bdd5"
common-bsp        
meta-beagleboard-extras = "master:464ee3d081ada3a759c8c710effc6ad6b714fc4d"
meta-oe           = "master:d4571b3d94d999ad54d8965f0d049dcfd34da504"

[edit] Building a core-image-minimal

The eventual generated artifacts (several symlinks):

core-image-minimal-beaglebone-20130819170041.rootfs.tar.gz
core-image-minimal-beaglebone-20130819170041.rootfs.tar.xz
core-image-minimal-beaglebone.tar.gz@
core-image-minimal-beaglebone.tar.xz@
MLO@
MLO-beaglebone@
MLO-beaglebone-2013.04*
modules--3.8.13-r23a-beaglebone-20130819165645.tgz
modules-beaglebone.tgz@
README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
u-boot-beaglebone-2013.04-r0.img*
u-boot-beaglebone.img@
u-boot.img@
uImage@
uImage--3.8.13-r23a-beaglebone-20130819165645.bin
uImage-beaglebone.bin@

In particular:

  • MLO file
  • uImage file
  • modules tarball
  • root filesystem

The device tree blob file is still way down in the work directory.

[edit] Formatting/populating the uSD card

Follow the formatting instructions [here] to format a bootable SD card, with initially empty FAT and Linux partitions.

[edit] Booting

[edit] Just MLO and u-boot.img

Should be able to boot to U-Boot with only these two files -- confirmed.

[edit] Adding the kernel and DTB files to the mix

Some variation of:

$ sudo mkdir -p /media/linux/boot
$ cp tmp-eglibc/work/beaglebone-oe-linux-gnueabi/linux-mainline/3.8.13-r23a/image/boot/am335x-boneblack.dtb /media/linux/boot
$ cp tmp-eglibc/deploy/images/uImage /media/linux/boot

Optionally, uEnv.txt in FAT partition, such as:

optargs=run_hardware_tests quiet

Confirmed that this boots kernel up to (non-existent) root filesystem.

[edit] Adding root filesystem and kernel modules

Some variation of:

$ sudo tar -C /media/linux/ -xvzf core-image-minimal-beaglebone.tar.gz
$ sudo tar -C /media/linux/ -xvzf modules-beaglebone.tgz
$ sudo depmod -b /media/linux "3.8.13"

Confirmed that this boots to full Linux.



(Back to BeagleBone_Black page.)

Personal tools