[OpenWrt-Devel] [PATCH 1/2] include: add a new ubinize-image build target

Jonas Gorski jogo at openwrt.org
Fri Aug 21 05:49:07 EDT 2015


On Fri, Aug 21, 2015 at 3:34 AM, Mathieu Olivari <mathieu at codeaurora.org> wrote:
> This new build target can be used to generate a ubinized.bin file,
> including the kernel and the FS specified as an argument.
>
> Signed-off-by: Mathieu Olivari <mathieu at codeaurora.org>

I have a slightly different approach in my queue that uses
scripts/ubinize-image.sh which allows using per device block- and
pagesizes, and control whether the kernel should be included on a per
device basis. E.g. the Netgear R7500 has the kernel raw on the flash,
so the kernel should not be included there. I plan to push it today,
if that approach is okay with you.

I also have a buildstep for wrapping the ubi in a itb file so
qsdk-sysupgrade accepts it, but when I did this it seemed to flashed
correctly, and u-boot was able to load the kenrel, but openwrt then
failed to mount the on flash ubi. Unfortunately I forgot to backup the
original firmware, so I will need to free up some space for qsdk to
reproduce it. Sysupgrade from within OpenWrt is working fine though.


Jonas

> ---
>  include/image.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/include/image.mk b/include/image.mk
> index 73fc805..f98d871 100644
> --- a/include/image.mk
> +++ b/include/image.mk
> @@ -380,6 +380,12 @@ define Build/combined-image
>         @mv $@.new $@
>  endef
>
> +define Build/ubinize-image
> +       $(if $(filter $(1),$(TARGET_FILESYSTEMS)), \
> +               $(call Image/Build/UbinizeImage,$(DEVICE_NAME),--kernel $(word 1,$^),$(1),$(UBINIZE_OPTS)); \
> +               cp $(KDIR)/$(IMG_PREFIX)-$(DEVICE_NAME)-$(1)-ubinized.bin $@)
> +endef
> +
>  define Device/Init
>    PROFILES := $(PROFILE)
>    DEVICE_NAME := $(1)
> --
> 2.1.4
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list