[LEDE-DEV] [PATCH 0/6] Add check-size when append-kernel is used

Mathias Kresin dev at kresin.me
Tue Sep 13 00:58:49 PDT 2016


12.09.2016 06:33, Chris Blake:
> These patches are the outcome of discussions had at http://lists.infradead.org/pipermail/lede-dev/2016-September/002693.html,
> where append-kernel was failing to properly offset kernels due to a typo. Out of this, it was also
> found that kernels are not checked for size, which can cause issues down the line as kernel images get larger
> over time. The following series of patches ensures that any kernel added by append-kernel is checked
> to ensure it fits within it's defined size on targets that use this function.
>
> Cc: Mathias Kresin <dev at kresin.me>
> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
>
> Chris Blake (6):
>   apm821xx: Add default kernel size
>   apm821xx: Add check-size when append-kernel is used
>   ar71xx: Add check-size when append-kernel is used
>   ipq806x: Add check-size when append-kernel is used
>   kirkwood: Add check-size when append-kernel is used
>   mvebu: Add check-size when append-kernel is used
>
>  target/linux/apm821xx/image/Makefile | 5 +++--
>  target/linux/ar71xx/image/generic.mk | 4 ++--
>  target/linux/ar71xx/image/ubnt.mk    | 2 +-
>  target/linux/ipq806x/image/Makefile  | 2 +-
>  target/linux/kirkwood/image/Makefile | 4 ++--
>  target/linux/mvebu/image/Makefile    | 2 +-
>  6 files changed, 10 insertions(+), 9 deletions(-)

During a chat with Christian Lamparter about the factory image format of
the WNDR4700, he pointed out that the kernel size check shouldn't be
required. If KERNEL_SIZE is defined this check is already done on
Device/Build/kernel [0].

Indeed, it works this way for all targets except ar71xx. This leads me
to the conclusion that my last patch just workaround the underlying
issue. I'll try to find the underlying issue later the day.

Sorry for not spotting this before I've requested the changes.

Mathias

[0] https://github.com/lede-project/source/blob/master/include/image.mk#L453



More information about the Lede-dev mailing list