[elbe-devel] [PATCH v2 3/5] debianize: add support for multiple barebox configurations

Torben Hohn torben.hohn at linutronix.de
Thu Apr 2 11:00:46 CEST 2020


On Fri, Mar 27, 2020 at 03:53:27PM +0100, yegorslists at googlemail.com wrote:
> From: Yegor Yefremov <yegorslists at googlemail.com>
> 
> Some architectures like am335x need two images. Allow to
> specify two space-separated images and defonfigs.
> 
> Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>

i would be happier, if this would support N images.
But that is probably overkill.

Acked-by: Torben Hohn <torben.hohn at linutronix.de>


> ---
>  .../makofiles/debianize/barebox/rules.mako    | 41 ++++++++++++++++---
>  1 file changed, 35 insertions(+), 6 deletions(-)
> 
> diff --git a/elbepack/makofiles/debianize/barebox/rules.mako b/elbepack/makofiles/debianize/barebox/rules.mako
> index e9efa0e11..9e08f1773 100755
> --- a/elbepack/makofiles/debianize/barebox/rules.mako
> +++ b/elbepack/makofiles/debianize/barebox/rules.mako
> @@ -6,35 +6,64 @@
>  ##
>  #!/usr/bin/make -f
>  
> +<%
> +items = imgname.split(' ')
> +img_name_aux = ''
> +img_name = items[0]
> +if len(items) > 1:
> +    img_name_aux = items[1]
> +
> +items = defconfig.split(' ')
> +def_config_aux = ''
> +def_config = items[0]
> +if len(items) > 1:
> +    def_config_aux = items[1]
> +%>
> +
>  BOOT_PATH=`pwd`/debian/tmp/boot
>  TOOL_PATH=`pwd`/debian/tmp/usr/bin
>  
>  MAKE_OPTS= \
>  ARCH=${k_arch} \
>  CROSS_COMPILE=${cross_compile} \
> -KERNELRELEASE=${k_version}-${p_name} \
> -O=debian/build
> +KERNELRELEASE=${k_version}-${p_name}
>  
>  #export DH_VERBOSE=1
>  export LDFLAGS=
>  
>  override_dh_auto_clean:
>  	mkdir -p debian/build
> +% if def_config_aux:
> +	mkdir -p debian/build-aux
> +% endif
>  	rm -f debian/files
>  	rm -rf debian/tmp
> -	make $(MAKE_OPTS) clean
> +	make $(MAKE_OPTS) O=debian/build clean
> +% if def_config_aux:
> +	make $(MAKE_OPTS) O=debian/build-aux clean
> +% endif
>  
>  override_dh_auto_configure:
>  	mkdir -p debian/build
> -	make $(MAKE_OPTS) ${defconfig}
> +	make $(MAKE_OPTS) O=debian/build ${def_config}
> +% if def_config_aux:
> +	mkdir -p debian/build-aux
> +	make $(MAKE_OPTS) O=debian/build-aux ${def_config_aux}
> +% endif
>  
>  override_dh_auto_build:
>  	rm -rf include/config
> -	make -j`nproc` $(MAKE_OPTS)
> +	make -j`nproc` $(MAKE_OPTS) O=debian/build
> +% if def_config_aux:
> +	make -j`nproc` $(MAKE_OPTS) O=debian/build-aux
> +% endif
>  
>  override_dh_auto_install:
>  	mkdir -p $(TOOL_PATH) $(BOOT_PATH)
> -	cp debian/build/images/${imgname} $(BOOT_PATH)
> +	cp debian/build/images/${img_name} $(BOOT_PATH)
> +% if img_name_aux:
> +	cp debian/build-aux/images/${img_name_aux} $(BOOT_PATH)
> +% endif
>  	-cp debian/build/scripts/bareboxcrc32-target $(TOOL_PATH)/bareboxcrc32
>  	-cp debian/build/scripts/bareboxenv-target $(TOOL_PATH)/bareboxenv
>  
> -- 
> 2.17.0
> 

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list