aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/image
diff options
context:
space:
mode:
authorGregory Detal <gregory.detal@tessares.net>2022-09-02 10:02:19 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2022-09-11 01:36:25 +0200
commit0be1b78856794589a552f662f428081600e837cc (patch)
tree518bcda12c0ac0d3c91b5f7cfc728fb72e7fa767 /target/linux/ipq40xx/image
parentf1d112ee5a43e8c4a22db05b94bbcd0677a34486 (diff)
downloadupstream-0be1b78856794589a552f662f428081600e837cc.tar.gz
upstream-0be1b78856794589a552f662f428081600e837cc.tar.bz2
upstream-0be1b78856794589a552f662f428081600e837cc.zip
ipq40xx: cellc_rtl30vw: fix imagebuilder generation
The image build process was modifying the generated IMAGE_KERNEL to append rootfs information (crc). This caused: - sysupgrade & factory images to contain 2 times the root.squashfs information due to both modifying the same IMAGE_KERNEL. - the generated imagebuilder to contain an erroneous IMAGE_KERNEL that contained references to an unexisting root.squashfs (the one from previous cause). The RTL30VW wasn't therefore able to boot the generated images as they contained checksums from non existing rootfs. This commit makes sure to use a temporary IMAGE_KERNEL to append the rootfs information for both factory and sysupgrade images. Fixes: #10511 Signed-off-by: Gregory Detal <gregory.detal@tessares.net>
Diffstat (limited to 'target/linux/ipq40xx/image')
-rw-r--r--target/linux/ipq40xx/image/generic.mk9
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 102de5c8bf..8e15f7ea20 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -43,7 +43,8 @@ define Build/append-rootfshdr
-O linux -T filesystem \
-C lzma -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-n root.squashfs -d $(IMAGE_ROOTFS) $@.new
- dd if=$@.new bs=64 count=1 >> $(IMAGE_KERNEL)
+ cat $(IMAGE_KERNEL) > $@.$1
+ dd if=$@.new bs=64 count=1 >> $@.$1
endef
define Build/append-rutx-metadata
@@ -89,7 +90,7 @@ endef
define Build/qsdk-ipq-factory-nand-askey
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh $@.its\
- askey_kernel $(IMAGE_KERNEL) \
+ askey_kernel $@.$1 \
askey_fs $(IMAGE_ROOTFS) \
ubifs $@
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
@@ -313,8 +314,8 @@ define Device/cellc_rtl30vw
KERNEL_NAME := zImage
KERNEL_IN_UBI :=
IMAGES := nand-factory.bin nand-sysupgrade.bin
- IMAGE/nand-factory.bin := append-rootfshdr | append-ubi | qsdk-ipq-factory-nand-askey
- IMAGE/nand-sysupgrade.bin := append-rootfshdr | sysupgrade-tar | append-metadata
+ IMAGE/nand-factory.bin := append-rootfshdr kernel | append-ubi | qsdk-ipq-factory-nand-askey kernel
+ IMAGE/nand-sysupgrade.bin := append-rootfshdr kernel | sysupgrade-tar kernel=$$$$@.kernel | append-metadata
DEVICE_VENDOR := Cell C
DEVICE_MODEL := RTL30VW
SOC := qcom-ipq4019