[OpenWrt-Devel] [PATCHv2] apm821xx: remove unnecessary kernel padding

Russell Senior russell at personaltelco.net
Mon Sep 23 19:56:47 EDT 2019


Chris,

Could you test v2 on a Meraki MX60?  I only have MR24's.

Thanks!

-- 
Russell Senior
russell at personaltelco.net

On Sat, Sep 21, 2019 at 1:58 AM Russell Senior <russell at personaltelco.net>
wrote:

>
> The allocation of LEBs to ubi volumes is handled by the sysupgrade script:
>
>   package/base-files/files/lib/upgrade/nand.sh
>
> and the ubimkvol and or ubirsvol command. Therefore, padding of the
> kernel blob is not needed at all, so use cat instead of dd. The
> BLOCKSIZE variable was only used in the dd command.  In any case, 63k
> made no sense for the way BLOCKSIZE was being used.
>
> 63k (64512) does make sense for DTB_SIZE because of the offsets expected
> by u-boot given extant u-boot-env variables.
>
> Tested on Meraki MR24.
>
> Signed-off-by: Russell Senior <russell at personaltelco.net>
> ---
>
> v2: got rid of blocking the kernel blob altogether
>
>  target/linux/apm821xx/image/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/target/linux/apm821xx/image/Makefile
> b/target/linux/apm821xx/image/Makefile
> index 8203de39c5..108f63cb7a 100644
> --- a/target/linux/apm821xx/image/Makefile
> +++ b/target/linux/apm821xx/image/Makefile
> @@ -58,7 +58,7 @@ define Build/MerakiAdd-dtb
>         $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb)
>         ( \
>                 dd if=$@.dtb bs=$(DTB_SIZE) conv=sync; \
> -               dd if=$@ bs=$(BLOCKSIZE) conv=sync; \
> +               cat $@ ; \
>         ) > $@.new
>         @mv $@.new $@
>  endef
> @@ -127,7 +127,6 @@ define Device/meraki_mr24
>    DEVICE_PACKAGES := kmod-spi-gpio -swconfig
>    BOARD_NAME := mr24
>    DEVICE_DTS := meraki-mr24
> -  BLOCKSIZE := 63k
>    IMAGES := sysupgrade.bin
>    DTB_SIZE := 64512
>    IMAGE_SIZE := 8191k
> --
> 2.23.0
>
>
>
> --
> Russell Senior, President
> russell at personaltelco.net
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190923/06b0231f/attachment.htm>
-------------- 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