[openwrt/openwrt] gemini: pad storlink reference firmware to 128kb
LEDE Commits
lede-commits at lists.infradead.org
Tue Feb 10 23:48:20 PST 2026
linusw pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/43547e93144432f535b1a852eb365fb37c66e401
commit 43547e93144432f535b1a852eb365fb37c66e401
Author: Linus Walleij <linusw at kernel.org>
AuthorDate: Sun Jan 25 21:01:47 2026 +0100
gemini: pad storlink reference firmware to 128kb
The redboot partition parser gets upset if a partition
doesn't end on an even erase block and marks the partition
read-only.
Fix this by always padding the three firmware items to
128kb.
It is no longer required for the filesystem to be padded
to 6144kb, so we pad this to just 128kb like the kernel
images.
Link: https://github.com/openwrt/openwrt/pull/21750
(cherry picked from commit db7a2fb217d7e5480e3f5c57c061a675cf9dd83a)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw at kernel.org>
---
target/linux/gemini/image/Makefile | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile
index 7e208ed981..1b5961db4e 100644
--- a/target/linux/gemini/image/Makefile
+++ b/target/linux/gemini/image/Makefile
@@ -99,8 +99,10 @@ define CreateStorlinkTarfile
$(call Image/pad-to,$@.tmp/zImage,512)
# Copy first part of the kernel into zImage
dd if=$(IMAGE_KERNEL) of=$@.tmp/zImage bs=1 seek=512 count=$(3)
+ $(call Image/pad-to,$@.tmp/zImage,128k)
# Put the rest of the kernel into the "ramdisk"
dd if=$(IMAGE_KERNEL) of=$@.tmp/rd.gz bs=1 skip=$(3) count=6144k conv=sync
+ $(call Image/pad-to,$@.tmp/rd.gz,128k)
cp ./ImageInfo-$(1) $@.tmp/ImageInfo
sed -i -e "s/DATESTR/`date +%Y%m%d $(if $(SOURCE_DATE_EPOCH),--date "@$(SOURCE_DATE_EPOCH)")`/g" $@.tmp/ImageInfo
@@ -200,9 +202,9 @@ define Device/storlink-reference
# 2096640 bytes zImage
# Ramdisk 6144k remaining zImage
# Application 6144k
- IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 6144k | \
+ IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 128k | \
storlink-default-image $(1)
- IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 6144k | \
+ IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 128k | \
storlink-default-image $(1) | append-metadata
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES)
endef
@@ -225,9 +227,9 @@ define Device/raidsonic_ib-4220-b
# Kern 3072k - 512 | = 3145216
# Ramdisk 6144k | = 9216k
# Application 6144k | = 15360k
- IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 6144k | \
+ IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 128k | \
raidsonic-ib-4220-b-image $(1)
- IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 6144k | \
+ IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 128k | \
raidsonic-ib-4220-b-image $(1) | append-metadata
endef
TARGET_DEVICES += raidsonic_ib-4220-b
More information about the lede-commits
mailing list