feat(cn9130-cf-pro): add u-boot update functionality to swupdate

This commit is contained in:
Samuel Dolt 2023-05-15 17:55:32 +02:00
parent 518c651ef9
commit 952a80baa5
3 changed files with 21 additions and 3 deletions

View File

@ -0,0 +1,18 @@
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"),
}
boot1 = boot0.copy()
return [boot0, boot1]

View File

@ -54,6 +54,7 @@ WKS_FILE = "cn913x-sdcard.wks.in"
IMAGE_FSTYPES += "wic.xz wic.bmap" IMAGE_FSTYPES += "wic.xz wic.bmap"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " kernel-modules kernel-devicetree" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " kernel-modules kernel-devicetree"
COREOS_IMAGE_SWUPDATE_EXTRACLASSES += " coreos-image-swupdate-cn913x"
# No watchdog available yet # No watchdog available yet
EFIBOOTGUARD_TIMEOUT ?= "0" EFIBOOTGUARD_TIMEOUT ?= "0"

View File

@ -8,9 +8,8 @@
# Current bootloader is about 1.8MB, so if we put it at 4096S and 12288S we # 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 # 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 --size 4M --extra-space 0 --overhead-factor 1 --part-name fw0
part --offset 4096S --source rawcopy --sourceparams="file=flash-image.bin" --ondisk mmcblk1 part --offset 12288S --source rawcopy --sourceparams="file=flash-image.bin" --ondisk mmcblk1 --size 4M --extra-space 0 --overhead-factor 1 --part-name fw1
part --offset 12288S --source rawcopy --sourceparams="file=flash-image.bin" --ondisk mmcblk1
${WKS_PART_EFI} --ondisk mmcblk1 --offset 20480S --size 64M --extra-space 0 --overhead-factor 1 ${WKS_PART_EFI} --ondisk mmcblk1 --offset 20480S --size 64M --extra-space 0 --overhead-factor 1
${WKS_PART_ROOT_A} --ondisk mmcblk1 --size 2G --extra-space 0 --overhead-factor 1 ${WKS_PART_ROOT_A} --ondisk mmcblk1 --size 2G --extra-space 0 --overhead-factor 1