[OpenWrt-Devel] [PATCH - for comment only] lantiq: use UbinizeImage instead lantiq-specific ubinize.cfg files
John Crispin
john at phrozen.org
Mon Jun 30 08:43:49 EDT 2014
On 30/06/2014 13:40, Ben Mulvihill wrote:
> Hello Daniel and John,
>
> Could you have a look at this patch, and let me know if this is the
> best approach? I have defined new make targets for lantiq called
> Image/BuildNAND/squashfs and Image/BuildNAND/ubifs, making use of
> the UbinizeImage machanism. For the moment, I only enable them for
> the BTHOMEHUBV2B, because that is the only lantiq board I have to
> test, but I don't see any reason why they couldn't be used for the
> EASY80920NAND and the P2812HNUFX too. As far as I can see, that
> only leaves one more lantiq nand board, the FRITZ3370, which has a
> dedicated make target. Once that has been modified as well the make
> targets Image/Build/ubifs and Image/Build/ubi can be removed from
> target/linux/lantiq/image/Makefile.
>
> Thanks,
>
> Ben
in general there are no guidelines to this stuff. every target
maintainer sort of has his own pattern for the image/Makefile. some
patterns have proven to be good and get reused etc etc.
that being said, i know felix is planning to globally rework the image
generation in owrt and unify it between all targets. so, if your patch
works and causes no regression i am happy to take it. it looks good
and i think i would have come up with a similar patch
John
>
> Signed-off-by: Ben Mulvihill <ben.mulvihill at gmail.com> --- ---
> a/target/linux/lantiq/image/Makefile 2014-06-30 11:49:59.562213352
> +0200 +++ b/target/linux/lantiq/image/Makefile 2014-06-30
> 11:54:07.211979129 +0200 @@ -82,6 +82,14 @@ define
> Image/Build/squashfs $(if $(3),$(call MkBrnImage,$(3),$(4),
> $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-brnImage,$(2),$(1),$(5))) endef
>
> +define Image/BuildNAND/squashfs + +ifneq
> ($($(PROFILE)_UBI_OPTS),) + $(call
> prepare_generic_squashfs,$(KDIR)/root.$(1)) + $(call
> Image/Build/UbinizeImage,$(PROFILE),,squashfs,
> $($(PROFILE)_UBI_OPTS)) +endif +endef + DGN3500_SKERNEL=0x50000
> DGN3500_SKERNEL_DECIMAL=327680 define Image/BuildDGN3500/squashfs
> @@ -185,6 +193,17 @@ ifneq ($($(PROFILE)_UBI_OPTS),) endif endef
>
> + +define Image/BuildNAND/ubifs + +ifneq
> ($($(PROFILE)_UBIFS_OPTS),) +ifneq ($($(PROFILE)_UBI_OPTS),) +
> $(call Image/Build/UbinizeImage,$(PROFILE),,ubifs,
> $($(PROFILE)_UBI_OPTS)) +endif +endif +endef + + define
> Image/InstallKernel/Template
>
> ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL),) @@ -293,7 +312,7 @@
> ifeq ($(CONFIG_TARGET_lantiq_xway),y)
>
> # Danube Image/BuildKernel/Profile/BTHOMEHUBV2B=$(call
> Image/BuildKernel/Template,BTHOMEHUBV2B)
> -Image/Build/Profile/BTHOMEHUBV2B=$(call Image/Build/$(1),
> $(1),BTHOMEHUBV2B) +Image/Build/Profile/BTHOMEHUBV2B=$(call
> Image/BuildNAND/$(1), $(1),BTHOMEHUBV2B)
>
> Image/BuildKernel/Profile/EASY50712=$(call
> Image/BuildKernel/Template,EASY50712)
> Image/Build/Profile/EASY50712=$(call
> Image/Build/$(1),$(1),EASY50712)
>
>
_______________________________________________
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