Alright thanks for your advice. I was able to reduce the space by 50% removing LuCi and it's libraries. So one step forward i guess.
I think i've found the issue.
According to
chairman@compile:/tmp$ /tmp/openwrt/staging_dir/host/bin/tplink-safeloader -B EAP120 -V r11431-83b0e20711 -k /tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/eap120-v1-kernel.bin -r /tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/tmp/openwrt-ar71xx-generic-eap120-v1-squashfs-sysupgrade.bin -o /tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/tmp/openwrt-ar71xx-generic-eap120-v1-squashfs-sysupgrade.bin.new -j -S && mv /tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/tmp/openwrt-ar71xx-generic-eap120-v1-squashfs-sysupgrade.bin.new /tmp/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/tmp/openwrt-ar71xx-generic-eap120-v1-squashfs-sysupgrade.bin
os-image partition too big (more than 1572864 bytes): Success
The kernel partition seems to be slightly too small. The kernel is 31 byte larger than it's partition. I've stripped it as much as possible.
Is there a way to change the partiton layout to get it in there? Let's say take away 1M from the rootfs partition (which has plenty of space left), and assign 1M more to the kernel part. I've tried to apply these changes by adjusting the values in target/linux/ar71xx/image/generic-tp-link.mk
, but seems like my changes have no effect.
That's how /tools/firmware-utils/tp-link-safeloader
looks like.
I'll try to adjust the upper boundary of os-image to 0x1bFFFF and see what happens.
EDIT: Seems like the second value is the length of the partition, not the upper boundary. So i have to adjust the file-system offset.
/** Firmware layout for the EAP120 */
{
.id = "EAP120",
.vendor = "EAP120(TP-LINK|UN|N300-2):1.0\r\n",
.support_list =
"SupportList:\r\n"
"EAP120(TP-LINK|UN|N300-2):1.0\r\n",
.support_trail = '\xff',
.soft_ver = NULL,
.partitions = {
{"fs-uboot", 0x00000, 0x20000},
{"partition-table", 0x20000, 0x02000},
{"default-mac", 0x30000, 0x00020},
{"support-list", 0x31000, 0x00100},
{"product-info", 0x31100, 0x00100},
{"soft-version", 0x32000, 0x00100},
{"os-image", 0x40000, 0x180000},
{"file-system", 0x1c0000, 0x600000},
{"user-config", 0x7c0000, 0x10000},
{"backup-config", 0x7d0000, 0x10000},
{"log", 0x7e0000, 0x10000},
{"radio", 0x7f0000, 0x10000},
{NULL, 0, 0}
}
.first_sysupgrade_partition = "os-image",
.last_sysupgrade_partition = "file-system"
},
Yeah it's there! I'm curious if it works.