[OpenWrt-Devel] [PATCH 1/2] ramips: define image recipe for plain lzma-loader for advanced cases

mail at adrianschmutzler.de mail at adrianschmutzler.de
Sun Apr 19 08:29:52 EDT 2020


Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Szabolcs Hubai
> Sent: Sonntag, 19. April 2020 02:37
> To: openwrt-devel at lists.openwrt.org
> Cc: Szabolcs Hubai <szab.hu at gmail.com>
> Subject: [OpenWrt-Devel] [PATCH 1/2] ramips: define image recipe for plain
> lzma-loader for advanced cases
> 
> This change allows to make other transformations to kernel before uImage
> 
> Signed-off-by: Szabolcs Hubai <szab.hu at gmail.com>
> ---
>  target/linux/ramips/image/Makefile | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/target/linux/ramips/image/Makefile
> b/target/linux/ramips/image/Makefile
> index f93ea8ab2a..707bc85f9a 100644
> --- a/target/linux/ramips/image/Makefile
> +++ b/target/linux/ramips/image/Makefile
> @@ -37,9 +37,14 @@ define Device/Default
>    IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs |
> append-metadata | check-size  endef
> 
> -define Device/uimage-lzma-loader
> +define Device/lzma-loader
>    LOADER_TYPE := bin
> -  KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
> +  KERNEL := kernel-bin | append-dtb | lzma | loader-kernel endef
> +
> +define Device/uimage-lzma-loader
> +  $(Device/lzma-loader)
> +  KERNEL += | uImage none

IMO, this is more complicated to read than just keeping the full command.
Since it's only two lines of which one is different, I'd prefer to just add the lzma-loader without referencing:

define Device/lzma-loader
  LOADER_TYPE := bin
  KERNEL := kernel-bin | append-dtb | lzma | loader-kernel
endef

(with no change to uimage-lzma-loader)

This should also be consistent with the rest, I don't think we use KERNEL += | ... anywhere.

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200419/0df53a27/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list