[OpenWrt-Devel] [PATCH v2 12/12] target/linux/mvebu: generate a FIT image on Armada XP GP with dm-verity

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Nov 21 11:23:22 EST 2019


When a dm-verity capable is selected, the user will most likely need
the U-Boot script that contains the various dm-verity related
configuration details, needed by U-Boot to build the kernel command
line with the appropriate dm="..." argument.

Therefore, for the Marvell Armada XP GP platform, make sure a FIT
image containing the dm-verity related U-Boot script is produced when
CONFIG_TARGET_ROOTFS_SQUASHFS_HASHED is enabled.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 target/linux/mvebu/image/cortex-a9.mk | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/target/linux/mvebu/image/cortex-a9.mk b/target/linux/mvebu/image/cortex-a9.mk
index cf70031b99..1d3d37e987 100644
--- a/target/linux/mvebu/image/cortex-a9.mk
+++ b/target/linux/mvebu/image/cortex-a9.mk
@@ -142,6 +142,19 @@ define Device/marvell_axp-db
 endef
 TARGET_DEVICES += marvell_axp-db
 
+ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS_HASHED),y)
+define Device/armada-xp-gp/kernel
+	ITS_UBOOT_SCRIPT := $(KDIR)/root.squashfs-hashed-dm-verity-uboot-script.txt
+	KERNEL := kernel-bin | append-dtb | fit none
+	KERNEL_SIZE := 4096k
+endef
+else
+define Device/armada-xp-gp/kernel
+	KERNEL := kernel-bin | append-dtb | uImage none
+	KERNEL_SIZE := 4096k
+endef
+endif
+
 define Device/marvell_axp-gp
   $(Device/NAND-512K)
   DEVICE_VENDOR := Marvell
@@ -149,6 +162,7 @@ define Device/marvell_axp-gp
   DEVICE_DTS := armada-xp-gp
   SUPPORTED_DEVICES += armada-xp-gp
   IMAGES += factory.img
+  $(Device/armada-xp-gp/kernel)
 endef
 TARGET_DEVICES += marvell_axp-gp
 
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list