diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2016-06-29 16:14:59 +0100 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2016-09-02 16:02:35 +0100 |
commit | b5dba2250e6e3b9d64934063ec9e53bef4b059c0 (patch) | |
tree | 6d00531dab72909596ed82832df7cd434db7ebb3 | |
parent | 6602a2d3643fd071eb7a94ee44b1d4218a4d4c86 (diff) |
ARMLT: add uefi filesystem
ARMLT builds a UEFI only output. This isn't a filesystem as such, but
with the architecture of the build scripts, using it as a filesystem
flavour is the obvious way to create platform independent output dirs.
Change-Id: I3eaa5d165ac02758b0a2e372f36918a11dfb9ff4
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-x | build-target-bins.sh | 8 | ||||
-rw-r--r-- | filesystems/uefi | 45 | ||||
-rw-r--r-- | platforms/common/common.base | 5 | ||||
-rw-r--r-- | platforms/fvp/fvp | 6 | ||||
-rw-r--r-- | platforms/juno/juno | 5 | ||||
-rw-r--r-- | platforms/tc2/tc2 | 5 |
6 files changed, 71 insertions, 3 deletions
diff --git a/build-target-bins.sh b/build-target-bins.sh index 3dfde8f..8b3b027 100755 --- a/build-target-bins.sh +++ b/build-target-bins.sh @@ -230,8 +230,12 @@ do_package() for target in $TARGET_BINS_PLATS; do local tf_out=TARGET_$target[arm-tf] local scp_out=TARGET_$target[scp] - local uboot_out=TARGET_$target[uboot] - local uefi_out=TARGET_$target[uefi] + if [ "$UBOOT_BUILD_ENABLED" == "1" ]; then + local uboot_out=TARGET_$target[uboot] + fi + if [ "$UEFI_BUILD_ENABLED" == "1" ]; then + local uefi_out=TARGET_$target[uefi] + fi local fdt_pattern=TARGET_$target[fdts] local linux_bins=TARGET_$target[linux] local bl2_fip_param="${bl2_param_id} ${OUTDIR}/${!tf_out}/tf-bl2.bin" diff --git a/filesystems/uefi b/filesystems/uefi new file mode 100644 index 0000000..8df7dd8 --- /dev/null +++ b/filesystems/uefi @@ -0,0 +1,45 @@ +# Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# Neither the name of ARM nor the names of its contributors may be used +# to endorse or promote products derived from this software without specific +# prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +if [ "$BUSYBOX_BUILD_ENABLED" != "1" ]; then + # We aren't really looking specifically for BusyBox + # We actually want to know if we're building the UEFI "filesystem" only + # or if we're building "all". + # If we're building "all", we don't want to disable this stuff. + LINUX_BUILD_ENABLED=0 + UBOOT_BUILD_ENABLED=0 + OPTEE_BUILD_ENABLED=0 + TARGET_juno[optee]=0 +fi + +#Append TARGET_BINS_COPY_LIST_UEFI into TARGET_BINS_COPY_LIST +index=${#TARGET_BINS_COPY_LIST[@]} +uefi_length=${#TARGET_BINS_COPY_LIST_UEFI[@]} +for (( i=0; i<${uefi_length}; i++)); do + TARGET_BINS_COPY_LIST[$[index++]]="${TARGET_BINS_COPY_LIST_UEFI[$i]}" +done diff --git a/platforms/common/common.base b/platforms/common/common.base index a4550af..48a9416 100644 --- a/platforms/common/common.base +++ b/platforms/common/common.base @@ -200,6 +200,9 @@ declare -a TARGET_BINS_COPY_LIST_OE #TARGET_BINS_COPY_LIST_ANDROID - An array just like TARGET_BINS_COPY_LIST # except it only applies if the android filesystem is being built declare -a TARGET_BINS_COPY_LIST_ANDROID +#TARGET_BINS_COPY_LIST_UEFI - An array just like TARGET_BINS_COPY_LIST +# except it only applies if the UEFI only "filesystem" is being built +declare -a TARGET_BINS_COPY_LIST_UEFI #TARGET_BINS_EXTRA_TAR_LIST - A string list of folders that need to be # tarred up. Space delimited. The tar name is just the folder name # with ".tar.gz" appended on the end. @@ -221,6 +224,6 @@ fi # platform. If your platform only supports particular platforms, then reduce # this list. This means the build scripts will only source files under the # filesystems directory that apply to your platform. -VALID_FILESYSTEMS="android oe busybox" +VALID_FILESYSTEMS="android oe busybox uefi" COMPONENT_FLAVOUR=$FLAVOUR diff --git a/platforms/fvp/fvp b/platforms/fvp/fvp index 88b903b..b9fb3ce 100644 --- a/platforms/fvp/fvp +++ b/platforms/fvp/fvp @@ -98,6 +98,12 @@ TARGET_BINS_COPY_LIST_ANDROID[$[index++]]="${OUTDIR}/fvp/tf-bl1.bin ${FVP_UBOOT_ TARGET_BINS_COPY_LIST_ANDROID[$[index++]]="${PLATDIR}/fvp-uInitrd-android.0x84000000 ${FVP_UBOOT_ANDROID_FOLDER}/ramdisk.img" TARGET_BINS_COPY_LIST_ANDROID[$[index++]]="${PLATDIR}/fvp/fip-uboot.bin ${FVP_UBOOT_ANDROID_FOLDER}/fip.bin" + +FVP_UEFI_FOLDER=$PLATDIR/fvp-uefi/uefi +index=${#TARGET_BINS_COPY_LIST_UEFI[@]} +TARGET_BINS_COPY_LIST_UEFI[$[index++]]="${OUTDIR}/fvp/tf-bl1.bin ${FVP_UEFI_FOLDER}/bl1.bin" +TARGET_BINS_COPY_LIST_UEFI[$[index++]]="${PLATDIR}/fvp/fip-uefi.bin ${FVP_UEFI_FOLDER}/fip.bin" + FLAVOUR_BUILD_SCRIPTS="build-uboot.sh build-uefi.sh build-linux.sh build-devtrees.sh build-scp.sh build-arm-tf.sh build-optee-os.sh build-target-bins.sh build-android.sh" UBOOT_BOARDS="vexpress_aemv8a_dram" diff --git a/platforms/juno/juno b/platforms/juno/juno index e63ff2d..0110c94 100644 --- a/platforms/juno/juno +++ b/platforms/juno/juno @@ -106,6 +106,11 @@ TARGET_BINS_COPY_LIST_ANDROID[$[index++]]="${OUTDIR}/juno/tf-bl1.bin ${JUNO_UBOO TARGET_BINS_COPY_LIST_ANDROID[$[index++]]="${PLATDIR}/juno/fip-uboot.bin ${JUNO_UBOOT_ANDROID_FOLDER}/fip.bin" TARGET_BINS_COPY_LIST_ANDROID[$[index++]]="${PLATDIR}/juno-uInitrd-android.0x84000000 ${JUNO_UBOOT_ANDROID_FOLDER}/ramdisk.img" +JUNO_UEFI_FOLDER=$PLATDIR/juno-uefi/uefi +index=${#TARGET_BINS_COPY_LIST_UEFI[@]} +TARGET_BINS_COPY_LIST_UEFI[$[index++]]="${OUTDIR}/juno/tf-bl1.bin ${JUNO_UEFI_FOLDER}/bl1.bin" +TARGET_BINS_COPY_LIST_UEFI[$[index++]]="${PLATDIR}/juno/fip-uefi.bin ${JUNO_UEFI_FOLDER}/fip.bin" + #Create complete firmware bundles that can directly be copied onto juno MMC mounted over USB oe_copy_index=${#TARGET_BINS_COPY_LIST_OE[@]} diff --git a/platforms/tc2/tc2 b/platforms/tc2/tc2 index 4efa4a7..2a332b5 100644 --- a/platforms/tc2/tc2 +++ b/platforms/tc2/tc2 @@ -132,4 +132,9 @@ if [ "$UBOOT_BUILD_ENABLED" == "1" ]; then TARGET_BINS_COPY_LIST_ANDROID[$[index++]]="${OUTDIR}/tc2/uboot.bin ${TC2_ANDROID_UBOOT_FOLDER}/boot-tc2.bin" fi +TC2_UEFI_FOLDER=$PLATDIR/tc2-uefi/uefi +index=${#TARGET_BINS_COPY_LIST_UEFI[@]} +TARGET_BINS_COPY_LIST_UEFI[$[index++]]="${OUTDIR}/tc2/uefi.bin ${TC2_UEFI_FOLDER}/boot-tc2.bin" +TARGET_BINS_COPY_LIST_UEFI[$[index++]]="${TOP_DIR}/vexpress-firmware/SOFTWARE/bootuefi.txt ${TC2_UEFI_FOLDER}/bootscr.txt" + FLAVOUR_BUILD_SCRIPTS="build-uboot.sh build-uefi.sh build-linux.sh build-devtrees.sh build-scp.sh build-arm-tf.sh build-optee-os.sh build-android.sh build-target-bins.sh" |