mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-15 09:27:35 +00:00
4c78028737
In situations like an autobuilder we are likely to not have bl31.bin present and thus would fail to build and propagate the error upwards. Instead, print a big warning to stderr so that human will see that something is wrong but complete the build. Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
81 lines
1.5 KiB
Bash
Executable file
81 lines
1.5 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# script to generate FIT image source for 64-bit sunxi boards with
|
|
# ARM Trusted Firmware and multiple device trees (given on the command line)
|
|
#
|
|
# usage: $0 <dt_name> [<dt_name> [<dt_name] ...]
|
|
|
|
[ -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
|
|
fi
|
|
|
|
cat << __HEADER_EOF
|
|
/dts-v1/;
|
|
|
|
/ {
|
|
description = "Configuration to load ATF before U-Boot";
|
|
#address-cells = <1>;
|
|
|
|
images {
|
|
uboot@1 {
|
|
description = "U-Boot (64-bit)";
|
|
data = /incbin/("u-boot-nodtb.bin");
|
|
type = "standalone";
|
|
arch = "arm64";
|
|
compression = "none";
|
|
load = <0x4a000000>;
|
|
};
|
|
atf@1 {
|
|
description = "ARM Trusted Firmware";
|
|
data = /incbin/("$BL31");
|
|
type = "firmware";
|
|
arch = "arm64";
|
|
compression = "none";
|
|
load = <0x44000>;
|
|
entry = <0x44000>;
|
|
};
|
|
__HEADER_EOF
|
|
|
|
cnt=1
|
|
for dtname in $*
|
|
do
|
|
cat << __FDT_IMAGE_EOF
|
|
fdt@$cnt {
|
|
description = "$(basename $dtname .dtb)";
|
|
data = /incbin/("$dtname");
|
|
type = "flat_dt";
|
|
compression = "none";
|
|
};
|
|
__FDT_IMAGE_EOF
|
|
cnt=$((cnt+1))
|
|
done
|
|
|
|
cat << __CONF_HEADER_EOF
|
|
};
|
|
configurations {
|
|
default = "config@1";
|
|
|
|
__CONF_HEADER_EOF
|
|
|
|
cnt=1
|
|
for dtname in $*
|
|
do
|
|
cat << __CONF_SECTION_EOF
|
|
config@$cnt {
|
|
description = "$(basename $dtname .dtb)";
|
|
firmware = "uboot@1";
|
|
loadables = "atf@1";
|
|
fdt = "fdt@$cnt";
|
|
};
|
|
__CONF_SECTION_EOF
|
|
cnt=$((cnt+1))
|
|
done
|
|
|
|
cat << __ITS_EOF
|
|
};
|
|
};
|
|
__ITS_EOF
|