[OpenWrt-Devel] [PATCH 1/2] image: make the folder that gets included intot he RootFS configurable

Jo-Philipp Wich jo at mein.io
Tue Jun 4 03:04:13 EDT 2019


Hi,

comments inline.

~ Jo

On 6/4/19 7:55 AM, John Crispin wrote:
> This allows managing several different folder for varying env profiles.
> 
> Signed-off-by: John Crispin <john at phrozen.org>
> ---
>  config/Config-images.in | 6 ++++++
>  package/Makefile        | 2 +-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/config/Config-images.in b/config/Config-images.in
> index 8548c7cd24..a618da1b6c 100644
> --- a/config/Config-images.in
> +++ b/config/Config-images.in
> @@ -286,4 +286,10 @@ menu "Target Images"
>  		  it will be mounted by PARTUUID which makes the kernel find the
>  		  appropriate disk automatically.
>  
> +	config TARGET_ROOTFS_INCLUDE_FOLDER
> +		string "RootFS include folder"
> +		default "files"
> +		help
> +		  Override the folder that is included into the RootFS by default.
> +
>  endmenu
> diff --git a/package/Makefile b/package/Makefile
> index abbf5f91f2..054e5b5820 100644
> --- a/package/Makefile
> +++ b/package/Makefile
> @@ -76,7 +76,7 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE
>  
>  	$(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
>  
> -	$(call prepare_rootfs,$(TARGET_DIR),$(TOPDIR)/files)
> +	$(call prepare_rootfs,$(TARGET_DIR),$(TOPDIR)/$(if ifeq "$(CONFIG_TARGET_ROOTFS_INCLUDE_FOLDER)" "",files,$(CONFIG_TARGET_ROOTFS_INCLUDE_FOLDER)))

I don't think that $(if ifeq ...) is a valid Make construct, to me it looks
as if it'll simply always evaluate to $(CONFIG_TARGET_ROOTFS_INCLUDE_FOLDER).
Also don't we need to filter this through the "qstrip" macro? The .config
symbol will contain leading and trailing quotes for string value options.

>  
>  $(curdir)/index: FORCE
>  	@echo Generating package index...
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190604/cfa580a6/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