diff --git a/documentation/boot/overview.rst b/documentation/boot/overview.rst index 9c22297..3b5970a 100644 --- a/documentation/boot/overview.rst +++ b/documentation/boot/overview.rst @@ -63,6 +63,11 @@ machine. Firmware requirements --------------------- +.. warning:: + + CoreOS support at the moment only hardware that contains a block storage + device (SD Card, eMMC, ...) formatted with GPT. MBR disk or MTD device are + not supported. ARM32 / AArch32 based machine ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -70,10 +75,7 @@ ARM32 / AArch32 based machine The firmware for ARM32 should implement a subset of the UEFI specification, as defined by the EBBR Specification. As this architecure is used on old hardware, it's ok to use the part of the specification that are marked as deprecated or -legacy like: - -- MBR partitionning instead of GPT -- Fixed offsets to firmware data +legacy. We require the firmware to provide a DeviceTree based system description and not an ACPI based table (as allowed by the specification). diff --git a/layers/meta-belden-coreos-bsp/conf/machine/beaglebone.conf b/layers/meta-belden-coreos-bsp/conf/machine/beaglebone.conf index a7e1f4c..792d995 100644 --- a/layers/meta-belden-coreos-bsp/conf/machine/beaglebone.conf +++ b/layers/meta-belden-coreos-bsp/conf/machine/beaglebone.conf @@ -59,12 +59,5 @@ QB_TCPSERIAL_OPT = "-device virtio-serial-device -chardev socket,id=virtcon,port # No watchdog available yet EFIBOOTGUARD_TIMEOUT ?= "0" -# MBR disk can't select the root device by partition label as MBR doesn't have -# a partition label. Using filesystem label only work with an initramfs and we -# don't support it yet. -COREOS_PLATFORM0_ROOT ?= "/dev/mmcblk0p3" -COREOS_PLATFORM1_ROOT ?= "/dev/mmcblk0p4" - require conf/machine/include/coreos-generic-features/efi.inc -require conf/machine/include/coreos-generic-features/legacy-mbr-disk.inc require conf/machine/include/coreos-generic-features/emmc.inc diff --git a/layers/meta-belden-coreos-bsp/wic/beaglebone-sdcard.wks.in b/layers/meta-belden-coreos-bsp/wic/beaglebone-sdcard.wks.in index c915464..714169d 100644 --- a/layers/meta-belden-coreos-bsp/wic/beaglebone-sdcard.wks.in +++ b/layers/meta-belden-coreos-bsp/wic/beaglebone-sdcard.wks.in @@ -1,11 +1,20 @@ # short-description: Create SD card image for Beaglebone # long-description: Creates a partitioned SD card image for Beaglebone. -# Boot files are located in the first vfat partition. -part --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 --size 32M --extra-space 0 --overhead-factor 1 -${WKS_PART_EFI} --ondisk mmcblk0 --align 1024 --size 32M --extra-space 0 --overhead-factor 1 -${WKS_PART_ROOT_A} --ondisk mmcblk0 --size 2G --extra-space 0 --overhead-factor 1 -${WKS_PART_ROOT_B} --ondisk mmcblk0 --size 2G --extra-space 0 --overhead-factor 1 +# offset 1S => 1 sector (1x512 byte) +# The bootloader can be at 4 different position in raw mode: 0S, 256S, 512S, 768S +# MBR disk use only the sector 0, so 1S is free +# GPT disk use sector 0-33S, so first free slot is 256S +# Offset are from the BBB default settings +part --offset 256S --source rawcopy --sourceparams="file=MLO" --ondisk mmcblk0 +part --offset 768S --source rawcopy --sourceparams="file=u-boot.img" --ondisk mmcblk0 + + +# Let's define a 4MiB maximum size for the bootloader +# 4MiB => 4*1024*1024/512=8192S | 768S + 8192S => 8960S +${WKS_PART_EFI} --ondisk mmcblk0 --offset 8960S --align 1024 --size 32M --extra-space 0 --overhead-factor 1 +${WKS_PART_ROOT_A} --ondisk mmcblk0 --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1 +${WKS_PART_ROOT_B} --ondisk mmcblk0 --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1 ${WKS_PART_EFIBOOTGUARD_A} --ondisk mmcblk0 --align 1024 --size 128M --extra-space 0 --overhead-factor 1 ${WKS_PART_EFIBOOTGUARD_B} --ondisk mmcblk0 --align 1024 --size 128M --extra-space 0 --overhead-factor 1 -bootloader --ptable msdos +bootloader --ptable gpt diff --git a/layers/meta-belden-coreos/recipes-support/swupdate/swupdate/sw-collections-config.sh b/layers/meta-belden-coreos/recipes-support/swupdate/swupdate/sw-collections-config.sh index 961ba60..5a630de 100644 --- a/layers/meta-belden-coreos/recipes-support/swupdate/swupdate/sw-collections-config.sh +++ b/layers/meta-belden-coreos/recipes-support/swupdate/swupdate/sw-collections-config.sh @@ -17,8 +17,8 @@ echo "Root partition is on device ${DISK_DEVICE_NAME} - type ${DISK_PARTITION_TY if [ "${DISK_PARTITION_TYPE}" == "gpt" ]; then ROOT_PARTLABEL=$(lsblk -dno PARTLABEL "${ROOT_PART}") else - echo "Using MBR disk is less reliable than GPT disk!" - ROOT_PARTLABEL=$(lsblk -dno LABEL "${ROOT_PART}") + echo "Using MBR is not supported" + exit 1 fi echo "Root partition label is ${ROOT_PARTLABEL}"