[][OpenWrt Dev][Add support to embed squashfs rootfs hash into kernel fit image]

[Description]
Add support to embed squashfs rootfs hash into kernel fit image

[Release-log]
N/A

Change-Id: Ic917b109ff8cb1f355ed2f954b6cfd49f0f09401
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/5605207
diff --git a/openwrt_patches-21.02/9993-fit-embed-squashfs-rootfs-hash-into-kernel-fit-image.patch b/openwrt_patches-21.02/9993-fit-embed-squashfs-rootfs-hash-into-kernel-fit-image.patch
new file mode 100644
index 0000000..df26bf7
--- /dev/null
+++ b/openwrt_patches-21.02/9993-fit-embed-squashfs-rootfs-hash-into-kernel-fit-image.patch
@@ -0,0 +1,12 @@
+--- a/include/image-commands.mk
++++ b/include/image-commands.mk
+@@ -203,7 +203,8 @@ define Build/fit
+ 		-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
+ 		$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
+ 		-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
+-		-A $(LINUX_KARCH) -v $(LINUX_VERSION)
++		-A $(LINUX_KARCH) -v $(LINUX_VERSION) \
++		$(if $(CONFIG_TARGET_ROOTFS_SQUASHFS),-R $(ROOTFS/squashfs/$(DEVICE_NAME)))
+ 	PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
+ 	@mv $@.new $@
+ endef