blob: 5f0caa4eccff38dae545f4f44e8a9578dea1e8c7 [file] [log] [blame]
Andrew Geissler2daf84b2023-03-31 09:57:23 -05001dm-verity and beaglebone-black
2------------------------------
3Set/uncomment the MACHINE line for "beaglebone-yocto" if you haven't yet.
4
5In addition to the basic dm-verity settings, you'll also want in local.conf:
6
7IMAGE_BOOT_FILES:remove = "zImage"
8IMAGE_BOOT_FILES:append = " zImage-initramfs-${MACHINE}.bin;zImage"
9WKS_FILES = "${MACHINE}-verity.wks.in"
10
11Read-only issues: The beaglebone BSP by default declares the following:
12
13 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0"
14 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
15
16...which are variables used by sysV init, in order to determine the
17appropriate /etc/inittab entries. The problem that arises is that by
18default, an on-target runtime check of /proc/consoles is used to finalize
19the /etc/inittab -- and of course that fails a build with read-only-rootfs
20[see the pkg_postinst_ontarget rule in the sysvinit rule for details.]
21
22If you don't need a serial console, the quick fix is to add in local.conf
23
24SERIAL_CONSOLES = ""
25
26If you do need/want a serial console, then probably a local bbappend to
27manually set the /etc/inittab as desired is easiest.
28
29After running "wic create -e core-image-minimal beaglebone-yocto-verity"
30you should have a "direct" image ready to write to a u-SD card. Remember
31that the "direct" image contains the bootloader and partition table
32already, so you'll be writing it to a device such as /dev/sdb and not
33just a partition -- like /dev/sdb1
34
35Also recall that booting from u-SD requires pressing and holding the S2
36(SYSBOOT) button during power-on in order to divert the boot from the normal
37soldered on storage and to the removable u-SD card.