[edk2-devel] [PATCH] Platform/Intel/Vlv2TbltDevicePkg: fix postbuild scripts

Rebecca Cran rebecca at bluestop.org
Sat Jul 13 03:58:53 UTC 2019


Sorry, I forgot to mention this is for edk2-platforms.

> On Jul 12, 2019, at 9:53 PM, rebecca at bsdio.com wrote:
> 
> Add "set -e" to postbuild scripts to cause them to exit if an error
> occurs.
> 
> Since GenCapsuleSampleColor.sh is passed arguments, it should be run
> directly and not sourced into the environment so it can evaluate $1, $2
> etc. Otherwise, it tries to use the toolchain name passed to 'build' as
> the GUID string.
> 
> Signed-off-by: Rebecca Cran <rebecca at bsdio.com>
> ---
> .../Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh   | 10 ++++++----
> .../Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh     |  2 ++
> .../GenerateCapsule/GenCapsuleMinnowMaxRelease.sh      |  2 ++
> .../Capsule/GenerateCapsule/GenCapsuleSampleColor.sh   |  0
> 4 files changed, 10 insertions(+), 4 deletions(-)
> mode change 100644 => 100755 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
> index 7b77b50c3f..22ae72c575 100755
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
> @@ -1,5 +1,5 @@
> # @file
> -#   Linux script file to generate UEFI capsules for system firmware and
> +#   *NIX script file to generate UEFI capsules for system firmware and
> #   firmware for sample devices
> #
> # Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
> @@ -7,6 +7,8 @@
> # SPDX-License-Identifier: BSD-2-Clause-Patent
> #
> 
> +set -e
> +
> cd $(dirname $0)
> 
> EFI_DIR=$WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/X64/
> @@ -28,6 +30,6 @@ else
>     cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/TestCert/CapsuleAppRelease.efi
>     . $SCRIPT_DIR/GenCapsuleMinnowMaxRelease.sh
> fi
> -. $SCRIPT_DIR/GenCapsuleSampleColor.sh Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
> -. $SCRIPT_DIR/GenCapsuleSampleColor.sh Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
> -. $SCRIPT_DIR/GenCapsuleSampleColor.sh Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
> +$SCRIPT_DIR/GenCapsuleSampleColor.sh Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
> +$SCRIPT_DIR/GenCapsuleSampleColor.sh Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
> +$SCRIPT_DIR/GenCapsuleSampleColor.sh Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
> index 114c4a3477..1c9e3613f6 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
> @@ -6,6 +6,8 @@
> # SPDX-License-Identifier: BSD-2-Clause-Patent
> #
> 
> +set -e
> +
> FMP_CAPSULE_VENDOR=Intel
> FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
> FMP_CAPSULE_FILE=MinnowMax.cap
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
> index d2619786e8..e50ef66c03 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
> @@ -6,6 +6,8 @@
> # SPDX-License-Identifier: BSD-2-Clause-Patent
> #
> 
> +set -e
> +
> FMP_CAPSULE_VENDOR=Intel
> FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
> FMP_CAPSULE_FILE=MinnowMaxRelease.cap
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
> old mode 100644
> new mode 100755
> -- 
> 2.22.0
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43699): https://edk2.groups.io/g/devel/message/43699
Mute This Topic: https://groups.io/mt/32456165/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list