From 0e72b739ca4dd6ee19ae05e9d4a0ac4db5546f65 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 2 Dec 2022 22:09:35 +0800 Subject: [PATCH] ramips: HATLab GateBoard-One using gen_image_generic.sh to gen image --- target/linux/ramips/Makefile | 2 +- target/linux/ramips/image/mt7621.mk | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile index d3f2d4b8f..3053906f6 100644 --- a/target/linux/ramips/Makefile +++ b/target/linux/ramips/Makefile @@ -8,7 +8,7 @@ ARCH:=mipsel BOARD:=ramips BOARDNAME:=MediaTek Ralink MIPS SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883 -FEATURES:=squashfs gpio +FEATURES:=squashfs gpio boot-part rootfs-part KERNEL_PATCHVER:=5.4 KERNEL_TESTING_PATCHVER:=5.10 diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index f872deb98..22cfc4214 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -27,18 +27,17 @@ define Build/gemtek-trailer endef define Build/hatlab-gateboard-combined - rm -fR $@.bootfs.img + rm -fR $@.bootfs.img mkfs.fat $@.bootfs.img -C 16384 mcopy -i $@.bootfs.img $(IMAGE_KERNEL) ::vmlinux.itb - ( \ - set $$(ptgen -o $@ -h 4 -s 63 -l 1024 -g -p 16M -p "${CONFIG_TARGET_ROOTFS_PARTSIZE}M" -G ${IMG_PART_DISKGUID}); \ - BOOTFSOFFSET="$$(($$1 / 512))"; \ - ROOTFSOFFSET="$$(($$3 / 512))"; \ - dd if="$@.bootfs.img" of="$@" bs=512 seek="$${BOOTFSOFFSET}" conv=notrunc; \ - dd if="${IMAGE_ROOTFS}" of="$@" bs=512 seek="$${ROOTFSOFFSET}" conv=notrunc; \ - ) + PADDING="1" SIGNATURE="$(IMG_PART_SIGNATURE)" \ + GUID="$(IMG_PART_DISKGUID)" $(SCRIPT_DIR)/gen_image_generic.sh \ + $@ \ + $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.bootfs.img \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \ + 256 endef define Build/hatlab-gateboard-kernel