mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-29 15:44:04 +00:00
kirkwood: resize kernel partition for kirkwood devices
The 6.1 kernel has caused another increase in kernel size, and now it's more than 3MB: WARNING: Image file iom_ix4-200d-uImage is too big: 3170394 > 3145728 WARNING: Image file iom_ix2-200-uImage is too big: 3171494 > 3145728 WARNING: Image file linksys_e4200-v2-uImage is too big: 3171879 > 3145728 WARNING: Image file linksys_ea4500-uImage is too big: 3171871 > 3145728 WARNING: Image file linksys_ea3500-uImage is too big: 3171651 > 3145728 This causes problems for 5 devices: - Iomega StorCenter ix2/ix4 - Linksys EA3500/EA4200/EA4500 They have enough resources for proper operation with 6.1, but all of them had a 3MB kernel size limit. Let's keep them alive and resize kernel partitions to 4MB. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
This commit is contained in:
parent
93b3334a35
commit
f89bdab832
@ -8,10 +8,14 @@
|
||||
board_config_update
|
||||
|
||||
case "$(board_name)" in
|
||||
iom,ix2-200|\
|
||||
iom,ix4-200d)
|
||||
ucidef_set_compat_version "2.0"
|
||||
;;
|
||||
linksys,e4200-v2|\
|
||||
linksys,ea3500|\
|
||||
linksys,ea4500)
|
||||
ucidef_set_compat_version "2.0"
|
||||
ucidef_set_compat_version "3.0"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -168,9 +168,9 @@
|
||||
reg = <0x200000 0x1400000>;
|
||||
};
|
||||
|
||||
partition@500000 {
|
||||
partition@600000 {
|
||||
label = "rootfs1";
|
||||
reg = <0x500000 0x1100000>;
|
||||
reg = <0x600000 0x1000000>;
|
||||
};
|
||||
|
||||
partition@1600000 {
|
||||
@ -178,9 +178,9 @@
|
||||
reg = <0x1600000 0x1400000>;
|
||||
};
|
||||
|
||||
partition@1900000 {
|
||||
partition@1a00000 {
|
||||
label = "rootfs2";
|
||||
reg = <0x1900000 0x1100000>;
|
||||
reg = <0x1a00000 0x1000000>;
|
||||
};
|
||||
|
||||
partition@2a00000 {
|
||||
|
@ -180,12 +180,12 @@
|
||||
|
||||
partition@100000 {
|
||||
label = "kernel";
|
||||
reg = <0x100000 0x300000>;
|
||||
reg = <0x100000 0x400000>;
|
||||
};
|
||||
|
||||
partition@400000 {
|
||||
partition@500000 {
|
||||
label = "ubi";
|
||||
reg = <0x400000 0x1C00000>;
|
||||
reg = <0x500000 0x1B00000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -64,12 +64,50 @@ define Build/ctera-firmware
|
||||
rm -rf $@.tmp
|
||||
endef
|
||||
|
||||
define Device/kernel-size-migration
|
||||
define Device/kernel-size-migration-iomega
|
||||
DEVICE_COMPAT_VERSION := 2.0
|
||||
DEVICE_COMPAT_MESSAGE := Partition design has changed compared to \
|
||||
older versions (up to 21.02) due to kernel size restrictions. \
|
||||
DEVICE_COMPAT_MESSAGE := \n$\
|
||||
!The partitioning of the router has changed! \n$\
|
||||
Partition design has changed compared to \
|
||||
older versions (up to 23.05) due to kernel size restrictions. \
|
||||
Upgrade via sysupgrade mechanism is not possible, so new \
|
||||
installation via factory style image is required.
|
||||
installation via initramfs image is required.\n$\
|
||||
Please adjust bootcmd in u-boot console:\n$\
|
||||
setenv bootcmd \
|
||||
'setenv bootargs $$$${console} $$$${mtdparts} $$$${bootargs_root}; \
|
||||
nand read.e 0x800000 0x100000 0x400000; bootm 0x00800000'\n$\
|
||||
saveenv\n$\
|
||||
or use OpenWrt shell:\n$\
|
||||
fw_setenv bootcmd \
|
||||
"setenv bootargs $$$${console} $$$${mtdparts} $$$${bootargs_root};\
|
||||
nand read.e 0x800000 0x100000 0x400000; bootm 0x00800000"\n$\
|
||||
and reinstall image with initramfs image. \
|
||||
Please see original instructions for more details.
|
||||
endef
|
||||
|
||||
define Device/kernel-size-migration-linksys
|
||||
DEVICE_COMPAT_VERSION := 3.0
|
||||
DEVICE_COMPAT_MESSAGE := \n$\
|
||||
!The partitioning of the router has changed! \n$\
|
||||
Partition design has changed compared to \
|
||||
older versions (up to 23.05) due to kernel size restrictions. \n$\
|
||||
Upgrade via sysupgrade mechanism is not possible, so u-boot args \
|
||||
adjustment and new installation via factory style image is required. \n$\
|
||||
Upgrade instructions: \n$\
|
||||
2. Run folowing commands in console (ssh or serial): \n$\
|
||||
\t fw_printenv \n$\
|
||||
\t fw_setenv nandboot \
|
||||
"$$$$(fw_printenv nandboot | awk -F= '{sub(/^nandboot=/, "");print}' \
|
||||
| sed 's/0x300000/0x400000/g')"\n$\
|
||||
\t fw_setenv altnandboot \
|
||||
"$$$$(fw_printenv altnandboot | awk -F= '{sub(/^altnandboot=/, "");print}' \
|
||||
| sed 's/0x300000/0x400000/g')"\n$\
|
||||
3. Test if envs are ok by 'fw_printenv'. \
|
||||
It should be the same except last argument of\
|
||||
'nand read.e' in 'nandboot' and 'altnandboot'.\n$\
|
||||
4. If envs are ok, please apply FACTORY image with command:\n$\
|
||||
\t sysupgrade -F -n OPENWRT_FACTORY_IMAGE.bin \n$\
|
||||
5. System should start normally. If not, serial console will be required.
|
||||
endef
|
||||
|
||||
define Device/Default
|
||||
@ -169,6 +207,7 @@ endef
|
||||
TARGET_DEVICES += iom_iconnect-1.1
|
||||
|
||||
define Device/iom_ix2-200
|
||||
$(Device/kernel-size-migration-iomega)
|
||||
DEVICE_VENDOR := Iomega
|
||||
DEVICE_MODEL := StorCenter ix2-200
|
||||
DEVICE_DTS := kirkwood-iomega_ix2_200
|
||||
@ -177,7 +216,7 @@ define Device/iom_ix2-200
|
||||
PAGESIZE := 512
|
||||
SUBPAGESIZE := 256
|
||||
BLOCKSIZE := 16k
|
||||
KERNEL_SIZE := 3072k
|
||||
KERNEL_SIZE := 4096k
|
||||
KERNEL_IN_UBI :=
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGE_SIZE := 31744k
|
||||
@ -187,6 +226,7 @@ endef
|
||||
TARGET_DEVICES += iom_ix2-200
|
||||
|
||||
define Device/iom_ix4-200d
|
||||
$(Device/kernel-size-migration-iomega)
|
||||
DEVICE_VENDOR := Iomega
|
||||
DEVICE_MODEL := StorCenter ix4-200d
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \
|
||||
@ -195,7 +235,7 @@ define Device/iom_ix4-200d
|
||||
PAGESIZE := 512
|
||||
SUBPAGESIZE := 256
|
||||
BLOCKSIZE := 16k
|
||||
KERNEL_SIZE := 3072k
|
||||
KERNEL_SIZE := 4096k
|
||||
KERNEL_IN_UBI :=
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGE_SIZE := 31744k
|
||||
@ -221,41 +261,37 @@ endef
|
||||
TARGET_DEVICES += iptime_nas1
|
||||
|
||||
define Device/linksys
|
||||
$(Device/kernel-size-migration-linksys)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_PACKAGES := kmod-mwl8k wpad-basic-mbedtls kmod-gpio-button-hotplug \
|
||||
kmod-rtc-mv
|
||||
KERNEL_IN_UBI :=
|
||||
KERNEL_SIZE := 4096k
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
||||
endef
|
||||
|
||||
define Device/linksys_e4200-v2
|
||||
$(Device/linksys)
|
||||
$(Device/kernel-size-migration)
|
||||
DEVICE_MODEL := E4200
|
||||
DEVICE_VARIANT := v2
|
||||
KERNEL_SIZE := 3072k
|
||||
SUPPORTED_DEVICES += linksys,viper linksys-viper
|
||||
endef
|
||||
TARGET_DEVICES += linksys_e4200-v2
|
||||
|
||||
define Device/linksys_ea3500
|
||||
$(Device/linksys)
|
||||
$(Device/kernel-size-migration)
|
||||
DEVICE_MODEL := EA3500
|
||||
PAGESIZE := 512
|
||||
SUBPAGESIZE := 256
|
||||
BLOCKSIZE := 16k
|
||||
KERNEL_SIZE := 3072k
|
||||
SUPPORTED_DEVICES += linksys,audi linksys-audi
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea3500
|
||||
|
||||
define Device/linksys_ea4500
|
||||
$(Device/linksys)
|
||||
$(Device/kernel-size-migration)
|
||||
DEVICE_MODEL := EA4500
|
||||
KERNEL_SIZE := 3072k
|
||||
SUPPORTED_DEVICES += linksys,viper linksys-viper
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea4500
|
||||
|
@ -34,7 +34,7 @@
|
||||
label = "status:red:health_led";
|
||||
gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
@@ -186,18 +193,18 @@
|
||||
@@ -186,19 +193,19 @@
|
||||
};
|
||||
|
||||
partition@a0000 {
|
||||
@ -46,16 +46,20 @@
|
||||
|
||||
partition@100000 {
|
||||
- label = "uImage";
|
||||
- reg = <0x100000 0x300000>;
|
||||
+ label = "kernel";
|
||||
reg = <0x100000 0x300000>;
|
||||
+ reg = <0x100000 0x400000>;
|
||||
};
|
||||
|
||||
partition@400000 {
|
||||
- partition@400000 {
|
||||
- label = "rootfs";
|
||||
- reg = <0x400000 0x1C00000>;
|
||||
+ partition@500000 {
|
||||
+ label = "ubi";
|
||||
reg = <0x400000 0x1C00000>;
|
||||
+ reg = <0x500000 0x1C00000>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -211,7 +218,7 @@
|
||||
};
|
||||
|
||||
|
@ -36,9 +36,9 @@
|
||||
- partition@4a0000 {
|
||||
- label = "rootfs";
|
||||
- reg = <0x4A0000 0x1760000>;
|
||||
+ partition@500000 {
|
||||
+ partition@600000 {
|
||||
+ label = "rootfs1";
|
||||
+ reg = <0x500000 0x1700000>;
|
||||
+ reg = <0x600000 0x1600000>;
|
||||
};
|
||||
|
||||
partition@1c00000 {
|
||||
@ -51,9 +51,9 @@
|
||||
- partition@1ea0000 {
|
||||
- label = "alt_rootfs";
|
||||
- reg = <0x1EA0000 0x1760000>;
|
||||
+ partition@1f00000 {
|
||||
+ partition@2000000 {
|
||||
+ label = "rootfs2";
|
||||
+ reg = <0x1F00000 0x1700000>;
|
||||
+ reg = <0x2000000 0x1600000>;
|
||||
};
|
||||
|
||||
partition@3600000 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user