[LEDE-DEV] [PATCH] ar71xx: Fix sysupgrade for the Airtight Networks C-55

Mathias Kresin dev at kresin.me
Sun Sep 11 10:48:17 PDT 2016


11.09.2016 17:40, Chris Blake:
> It appears that $$$$(KERNEL_SIZE) was not passing to append-kernel,
> causing sysupgrade images to brick units due to the invalid rootfs
> offset. This is fixed by removing the 2 extra $$'s in front of the
> variables. Additionally, check-size was added to ensure that we don't
> have a kernel larger than our partition.
>
> Before: kernel at 0x0,rootfs at 0x13EDF8
> After: kernel at 0x0,rootfs at 0x200000
>
> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
> ---
>  target/linux/ar71xx/image/generic.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
> index bd92a84..5144334 100644
> --- a/target/linux/ar71xx/image/generic.mk
> +++ b/target/linux/ar71xx/image/generic.mk
> @@ -443,7 +443,7 @@ define Device/c-55
>    KERNEL_SIZE = 2048k
>    IMAGE_SIZE = 15872k
>    MTDPARTS = spi0.0:256k(u-boot)ro,128k(u-boot-env)ro,2048k(kernel),13824k(rootfs),13824k(opt)ro,2624k(failsafe)ro,64k(art)ro,15872k at 0x60000(firmware)
> -  IMAGE/sysupgrade.bin = append-kernel $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
> +  IMAGE/sysupgrade.bin = append-kernel $$(KERNEL_SIZE) | check-size $$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$(IMAGE_SIZE)
>  endef
>
>  TARGET_DEVICES += c-55
>

Hey Chris,

I've pushed my fix. But it doesn't include the kernel size check.

Would you please rebase your patch on HEAD and send it again. It would 
be neat if you add the kernel size check to all build recipes having a 
kernel size based padding.

Mathias



More information about the Lede-dev mailing list