Package: src:arm-trusted-firmware Followup-For: Bug #979278 Please use the attached diff instead. It fixes an important typo in the target list, and makes the rest less intrusive.
>From 1de0943e55a19614c814d55c924ff439744a903d Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Sun, 10 Jan 2021 19:29:15 +0100 Subject: Make each command run by Make visible in the build log
The information flow is easyer to understand in named Make variables than in shell pipes. Also, errors are handled properly. For example, chmod is currently emitting an error message in the amd64 logs (of course, *this* error can be ignored). diff --git a/debian/arm-trusted-firmware.install b/debian/arm-trusted-firmware.install deleted file mode 100755 index e8c531430..000000000 --- a/debian/arm-trusted-firmware.install +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -grep -v '^#' debian/targets | while read plat targets ; do - for target in $targets ; do - chmod a-x build/$plat/debug/$target - echo build/$plat/debug/$target usr/lib/arm-trusted-firmware/$plat/ - done -done diff --git a/debian/rules b/debian/rules index a8e1f93af..108b18e7a 100755 --- a/debian/rules +++ b/debian/rules @@ -9,6 +9,14 @@ else VERBOSE=1 endif +platforms := g12a gxbb sun50i_a64 sun50i_h6 rk3328 rk3399 +g12a_targets := bl31.bin +gxbb_targets := bl31.bin +sun50i_a64_targets := bl31.bin +sun50i_h6_targets := bl31.bin +rk3328_targets := bl31/bl31.elf +rk3399_targets := bl31/bl31.elf + %: dh $@ @@ -21,11 +29,18 @@ endif # Only build firmware on arm64. ifeq ($(DEB_HOST_ARCH),arm64) # Always set CROSS_COMPILE, which also works for native builds. - grep -v '^#' debian/targets | while read plat targets ; do \ + for plat in $(platforms); do \ CROSS_COMPILE=aarch64-linux-gnu- CFLAGS= LDFLAGS= dh_auto_build -- V=$(VERBOSE) DEBUG=1 PLAT=$$plat bl31 ; \ done endif +ifeq ($(DEB_HOST_ARCH),arm64) + execute_after_dh_install: $(addprefix install-,$(platforms)) + install-%: + dh_install -parm-trusted-firmware $(addprefix build/$*/debug/,$($*_targets)) usr/lib/arm-trusted-firmware/$* + chmod a-x debian/arm-trusted-firmware/usr/lib/arm-trusted-firmware/$*/* +endif + override_dh_installchangelogs: dh_installchangelogs -parm-trusted-firmware docs/change-log.rst dh_installchangelogs -parm-trusted-firmware-tools diff --git a/debian/targets b/debian/targets deleted file mode 100644 index a6f72441c..000000000 --- a/debian/targets +++ /dev/null @@ -1,6 +0,0 @@ -g12a bl31.bin -gxbb bl31.bin -sun50i_a64 bl31.bin -sun50i_h6 bl31.bin -rk3328 bl31/bl31.elf -rk3399 bl31/bl31.elf