diff mbox series

[RFC,3/9] mksunxi_fit_atf.sh: produce working binaries by default

Message ID 20200318095757.9365-4-ynezz@true.cz
State New
Headers show
Series produce working binaries by default | expand

Commit Message

Petr Štetiar March 18, 2020, 9:57 a.m. UTC
At this moment unusable binaries are produced if bl31.bin file is
missing in order to allow passing of various CI tests. This intention of
broken binaries has to be now explicitly confirmed via new
BUILDBOT_BROKEN_BINARIES config option, so usable binaries are produced
by default from now on.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 board/sunxi/mksunxi_fit_atf.sh | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Harald Seiler March 18, 2020, 10:10 a.m. UTC | #1
Hi,

On Wed, 2020-03-18 at 10:57 +0100, Petr ?tetiar wrote:
> At this moment unusable binaries are produced if bl31.bin file is
> missing in order to allow passing of various CI tests. This intention of
> broken binaries has to be now explicitly confirmed via new
> BUILDBOT_BROKEN_BINARIES config option, so usable binaries are produced
> by default from now on.
> 
> Signed-off-by: Petr ?tetiar <ynezz at true.cz>
> ---
>  board/sunxi/mksunxi_fit_atf.sh | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/board/sunxi/mksunxi_fit_atf.sh b/board/sunxi/mksunxi_fit_atf.sh
> index 88ad71974706..708b4248549d 100755
> --- a/board/sunxi/mksunxi_fit_atf.sh
> +++ b/board/sunxi/mksunxi_fit_atf.sh
> @@ -8,9 +8,13 @@
>  [ -z "$BL31" ] && BL31="bl31.bin"
>  
>  if [ ! -f $BL31 ]; then
> -	echo "WARNING: BL31 file $BL31 NOT found, resulting binary is non-functional" >&2
> -	echo "Please read the section on ARM Trusted Firmware (ATF) in board/sunxi/README.sunxi64" >&2
> -	BL31=/dev/null
> +	if [ "$BUILDBOT_BROKEN_BINARIES" = "y" ]; then
> +		BL31=/dev/null
> +	else
> +		echo "ERROR: BL31 file $BL31 NOT found, resulting binary is non-functional" >&2

This error message is not quite correct anymore because no binary is built now.

> +		echo "Please read the section on ARM Trusted Firmware (ATF) in board/sunxi/README.sunxi64" >&2

Not only relevant to this patch, but to the following ones as well: Maybe
it makes sense to mention CONFIG_BUILDBOT_BROKEN_BINARIES in the error
message so people who are not aware of this change and want to continue
building broken binaries don't have to search the list archive to find out
what to do?  For example:

+		echo "ERROR: BL31 file $BL31 NOT found." >&2
+		echo "Please read the section on ARM Trusted Firmware (ATF) in board/sunxi/README.sunxi64" >&2
+		echo "" >&2
+		echo "If you want to build without a BL31 file (creating a NON-FUNCTIONAL binary), please" >&2
+		echo "enable CONFIG_BUILDBOT_BROKEN_BINARIES." >&2

> +		exit 1
> +	fi
>  fi
>  
>  if grep -q "^CONFIG_MACH_SUN50I_H6=y" .config; then
diff mbox series

Patch

diff --git a/board/sunxi/mksunxi_fit_atf.sh b/board/sunxi/mksunxi_fit_atf.sh
index 88ad71974706..708b4248549d 100755
--- a/board/sunxi/mksunxi_fit_atf.sh
+++ b/board/sunxi/mksunxi_fit_atf.sh
@@ -8,9 +8,13 @@ 
 [ -z "$BL31" ] && BL31="bl31.bin"
 
 if [ ! -f $BL31 ]; then
-	echo "WARNING: BL31 file $BL31 NOT found, resulting binary is non-functional" >&2
-	echo "Please read the section on ARM Trusted Firmware (ATF) in board/sunxi/README.sunxi64" >&2
-	BL31=/dev/null
+	if [ "$BUILDBOT_BROKEN_BINARIES" = "y" ]; then
+		BL31=/dev/null
+	else
+		echo "ERROR: BL31 file $BL31 NOT found, resulting binary is non-functional" >&2
+		echo "Please read the section on ARM Trusted Firmware (ATF) in board/sunxi/README.sunxi64" >&2
+		exit 1
+	fi
 fi
 
 if grep -q "^CONFIG_MACH_SUN50I_H6=y" .config; then