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

yegorslists at googlemail.com yegorslists at googlemail.com
Thu Apr 2 18:23:11 CEST 2020


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>
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




More information about the elbe-devel mailing list