diff --git a/layers/meta-belden-marvell-bsp/classes/coreos-image-swupdate-cn913x.bbclass b/layers/meta-belden-marvell-bsp/classes/coreos-image-swupdate-cn913x.bbclass new file mode 100644 index 0000000..f03adc8 --- /dev/null +++ b/layers/meta-belden-marvell-bsp/classes/coreos-image-swupdate-cn913x.bbclass @@ -0,0 +1,21 @@ + +SWUPDATE_IMAGES += "flash-image" +SWUPDATE_IMAGES_FSTYPES[flash-image] = ".bin" + +COREOS_SWUPDATE_EXTENDS_FOR:append = "cn913x" + +def coreos_swupdate_extends_images_for_cn913x(d,s): + boot0 = { + "filename" : "flash-image.bin", + "installed-directly" : "true", + "device" : "/dev/mmcblk1", + "type" : "raw", + "sha256" : swupdate_get_sha256(d, s, "flash-image.bin"), + "offset" : "2M" + } + + boot1 = boot0.copy() + boot1["offset"] = "6M" + + + return [boot0, boot1] diff --git a/layers/meta-belden-marvell-bsp/conf/machine/include/cn913x.inc b/layers/meta-belden-marvell-bsp/conf/machine/include/cn913x.inc index bd5c8fd..d090783 100644 --- a/layers/meta-belden-marvell-bsp/conf/machine/include/cn913x.inc +++ b/layers/meta-belden-marvell-bsp/conf/machine/include/cn913x.inc @@ -54,6 +54,7 @@ WKS_FILE = "cn913x-sdcard.wks.in" IMAGE_FSTYPES += "wic.xz wic.bmap" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " kernel-modules kernel-devicetree" +COREOS_IMAGE_SWUPDATE_EXTRACLASSES += " coreos-image-swupdate-cn913x" # No watchdog available yet EFIBOOTGUARD_TIMEOUT ?= "0" diff --git a/layers/meta-belden-marvell-bsp/wic/cn913x-sdcard.wks.in b/layers/meta-belden-marvell-bsp/wic/cn913x-sdcard.wks.in index 687b823..3ad837f 100644 --- a/layers/meta-belden-marvell-bsp/wic/cn913x-sdcard.wks.in +++ b/layers/meta-belden-marvell-bsp/wic/cn913x-sdcard.wks.in @@ -8,9 +8,8 @@ # Current bootloader is about 1.8MB, so if we put it at 4096S and 12288S we # have 4MiB between the first bootloader and the second copy of it -# tfa = TrustedFirmware-A -part --offset 4096S --source rawcopy --sourceparams="file=flash-image.bin" --ondisk mmcblk1 -part --offset 12288S --source rawcopy --sourceparams="file=flash-image.bin" --ondisk mmcblk1 +part --offset 4096S --source rawcopy --sourceparams="file=flash-image.bin" --ondisk mmcblk1 --size 4M --extra-space 0 --overhead-factor 1 --part-name fw0 +part --offset 12288S --source rawcopy --sourceparams="file=flash-image.bin" --ondisk mmcblk1 --size 4M --extra-space 0 --overhead-factor 1 --part-name fw1 ${WKS_PART_EFI} --ondisk mmcblk1 --offset 20480S --size 64M --extra-space 0 --overhead-factor 1 ${WKS_PART_ROOT_A} --ondisk mmcblk1 --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1