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

2016-09-11 Thread Mathias Kresin

11.09.2016 17:43, Chris Blake:

Additionally, it appears that other devices like the ZyXEL NBG6616 may
be affected by this.


I'm working on the same at the moment. And till now the ZyXEL NBG6616 
and the Ubiquiti UAP Pro are affected by the same error as well. I'm 
compiling a few more targets to check for more affected devices.


@nbd

I would like to get rid of the optional padding parameter for 
append-kernel/append-rootfs and force the use of pad-to. It is way more 
obvious what is done and it throws an error in case the param is 
missing. At the moment I'm using pad-to to find more of these kind of 
errors.


Any opinion on that?

Mathias

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


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

2016-09-11 Thread Chris Blake
On Sun, Sep 11, 2016 at 10:40 AM, Chris Blake  wrote:
> 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@0x0,rootfs@0x13EDF8
> After: kernel@0x0,rootfs@0x20
>
> Signed-off-by: Chris Blake 
> ---
>  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@0x6(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
> --
> 2.7.4
>

Additionally, it appears that other devices like the ZyXEL NBG6616 may
be affected by this.

- Chris Blake

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev