BeagleBone Black
Get meta-ti at https://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/.
Tested with:
poky : warrior:f2b442c5c8e3925a4d3fc9693f1e47863dade2a9
meta-ti : master:59e66caff2568ab32f59596f1aeab8ea27649941
meta-debian : warrior:e87428eec5edfa6ec741eed8827d7044df043625
Build
-
Setup build directory.
$ export TEMPLATECONF=meta-debian/conf $ source ./poky/oe-init-build-env build-bbb
-
Add
meta-ti
andmeta-debian/bsp/meta-ti
toconf/bblayers.conf
.$ vi conf/bblayers.conf ... BBLAYERS ?= " \ /path/to/poky/meta \ /path/to/poky/meta-poky \ /path/to/poky/meta-ti \ /path/to/poky/meta-debian \ /path/to/poky/meta-debian/bsp/meta-ti \ "
-
Set
MACHINE
tobeaglebone
.$ vi conf/local.conf ... MACHINE ??= "beaglebone" ...
-
Build. By default,
DISTRO
is set to 'deby-tiny', so onlycore-image-minimal
is available to build$ bitbake core-image-minimal
In
conf/local.conf
,DISTRO
can be changed to 'deby' for buildingcore-image-base
.
After finish building, in tmp/deploy/images/beaglebone/
, these files should be available:
MLO
u-boot.img
(U-Boot)zImage
(Kernel)am335x-boneblack.dtb
(Kernel device tree)core-image-minimal-beaglebone.cpio.gz
(rootfs)
Boot
-
Create two partitions on the SD card: BOOT (FAT32) and ROOT (ext4).
-
Install the root file system.
$ cd /mount/dir/of/ROOT $ zcat /path/to/core-image-minimal-beaglebone.cpio.gz | sudo cpio -idm --no-absolute-filenames
-
Install the bootloader. If ROOT is the 2nd partition,
mmcroot
should be/dev/mmcblk0p2
.$ sudo cp MLO u-boot.img /mount/dir/of/BOOT $ sudo cat <<\EOF > /mount/dir/of/BOOT/uEnv.txt bootpart=0:2 bootdir=/boot bootfile=zImage console=ttyO0,115200n8 fdtaddr=0x81000000 fdtfile=am335x-boneblack.dtb loadaddr=0x80008000 mmcroot=/dev/mmcblk0p2 ro mmcrootfstype=ext4 rootwait mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile} uenvcmd=if run loadfdt; then echo Loaded ${fdtfile}; if run loadimage; then run mmcargs; bootz ${loadaddr} - ${fdtaddr}; fi; fi; EOF
-
Connect serial cable to the board on jumper J1. We tested with Adafruit 4 Pin Cable which has 4 wires: Black, Green, White, Red. Just leave the RED wire unconnected.
J1 : [GND] * * [RX] [TX] * Cable: [Black] [Green] [White]
Boot the board.
$ sudo picocom -b 115200 /dev/ttyUSB0 picocom v3.1 port is : /dev/ttyUSB0 flowcontrol : none baudrate is : 115200 ...<many logs> U-Boot 2018.03-00002-gac9cce7c6a (Apr 05 2018 - 13:07:46 -0500), Build: jenkins-github_Bootloader-Builder-47 CPU : AM335X-GP rev 2.1 I2C: ready DRAM: 512 MiB ....<many logs> Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.19.13-cip1 (oe-user@oe-host) (gcc version 8.3.0 (GCC)) #1 SMP Thu Mar 21 06:02:24 UTC 2019 [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d .....<many logs> starting pid 64, tty '': '/etc/init.d/rcS' starting pid 66, tty '/dev/ttyS0': '/sbin/getty 115200 ttyS0' Deby 10.0 beaglebone /dev/ttyS0 beaglebone login:
Then login with
root
(no password).