public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@arm.com>
To: devel@edk2.groups.io, G Edhaya Chandran <Edhaya.Chandran@arm.com>,
	Barton Gao <gaojie@byosoft.com.cn>
Cc: nd@arm.com, Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
	Grant Likely <grant.likely@arm.com>
Subject: [edk2-sct PATCH 3/3] edk2-test: Helper script to build SCT+Shell in a bootable format
Date: Thu, 11 Feb 2021 17:46:05 +0000	[thread overview]
Message-ID: <20210211174605.17937-3-grant.likely@arm.com> (raw)
In-Reply-To: <20210211174605.17937-1-grant.likely@arm.com>

The buildzip.sh script builds the SCT and the EFI Shell, and then zips
them up in a file structure that can be booted when unzipped to a USB
drive or other block storage.

Signed-off-by: Grant Likely <grant.likely@arm.com>
---
 uefi-sct/SctPkg/buildzip.sh | 67 +++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100755 uefi-sct/SctPkg/buildzip.sh

diff --git a/uefi-sct/SctPkg/buildzip.sh b/uefi-sct/SctPkg/buildzip.sh
new file mode 100755
index 00000000..c5bf20df
--- /dev/null
+++ b/uefi-sct/SctPkg/buildzip.sh
@@ -0,0 +1,67 @@
+#!/bin/bash
+#
+#  EDK2 SCT build script for SCT+Shell in a zip file
+#
+#  Copyright (c) 2021, ARM Ltd. All rights reserved.
+#
+#  This program and the accompanying materials
+#  are licensed and made available under the terms and conditions of the BSD License
+#  which accompanies this distribution.  The full text of the license may be found at 
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+set -e
+
+TARGET_ARCH=$1
+
+if [ X"${TARGET_ARCH}" == X"" ]
+then
+	echo  "Usage: $0 <ARM|AARCH64>"
+	exit
+fi
+
+case $TARGET_ARCH in
+	AARCH64)
+		BOOT_IMAGE_NAME=BOOTAA64.efi;;
+	*)
+		BOOT_IMAGE_NAME=BOOT${TARGET_ARCH}.efi;;
+esac
+
+# clear all positional parameters
+set --
+
+source ./edk2/edksetup.sh
+
+getconf _NPROCESSORS_ONLN
+NUM_CPUS=$((`getconf _NPROCESSORS_ONLN` + 2))
+
+make -j"$NUM_CPUS" -C edk2/BaseTools/
+
+# Build the SCT and the shell
+DSC_EXTRA=ShellPkg/ShellPkg.dsc ./SctPkg/build.sh ${TARGET_ARCH} GCC RELEASE -j"$NUM_CPUS"
+
+# Assemble all the files that need to be in the zip file
+mkdir -p ${TARGET_ARCH}_SCT/EFI/BOOT
+cp Build/Shell/RELEASE_GCC5/${TARGET_ARCH}/Shell_EA4BB293-2D7F-4456-A681-1F22F42CD0BC.efi ${TARGET_ARCH}_SCT/EFI/BOOT/${BOOT_IMAGE_NAME}
+
+mkdir -p ${TARGET_ARCH}_SCT/SCT
+cp -r Build/UefiSct/RELEASE_GCC5/SctPackage${TARGET_ARCH}/${TARGET_ARCH}/* ${TARGET_ARCH}_SCT/SCT/
+cp Build/UefiSct/RELEASE_GCC5/SctPackage${TARGET_ARCH}/SctStartup.nsh ${TARGET_ARCH}_SCT/Startup.nsh
+
+# Copy the SCT Parser tool into the repo
+cp sct_parser/* ${TARGET_ARCH}_SCT/SCT/Sequence/
+
+# Put some version information into the ESP directory
+cat > ./${TARGET_ARCH}_SCT/versions.txt << EOF
+EDK2_VER=`git -C ./edk2 describe`
+EDK2_TEST_VER=`git -C ./edk2-test describe`
+BUILD_DATE="`date`"
+EOF
+
+# Zip up the test folder
+cd ${TARGET_ARCH}_SCT
+zip -r ../edk2-test-${TARGET_ARCH,,}.zip *
+cd ..
+
-- 
2.20.1


  parent reply	other threads:[~2021-02-11 17:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 17:46 [edk2-sct PATCH 1/3] edk2-test: Add support for building extra packages Grant Likely
2021-02-11 17:46 ` [edk2-sct PATCH 2/3] edk2-test: use bash 'shift' in build.sh to manage arguments Grant Likely
2021-02-15 11:45   ` G Edhaya Chandran
2021-02-20 16:03   ` Samer El-Haj-Mahmoud
2021-02-22 12:50     ` [edk2-devel] " G Edhaya Chandran
2021-02-11 17:46 ` Grant Likely [this message]
2021-02-15 12:30   ` [edk2-sct PATCH 3/3] edk2-test: Helper script to build SCT+Shell in a bootable format G Edhaya Chandran
2021-02-19 18:01     ` Grant Likely
2021-02-19 18:39       ` G Edhaya Chandran
2021-02-22 12:58       ` [edk2-devel] " G Edhaya Chandran
2021-02-20 16:03   ` Samer El-Haj-Mahmoud
2021-02-15 11:43 ` [edk2-sct PATCH 1/3] edk2-test: Add support for building extra packages G Edhaya Chandran
2021-02-20 16:03 ` Samer El-Haj-Mahmoud
2021-02-22 12:17   ` [edk2-devel] " G Edhaya Chandran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210211174605.17937-3-grant.likely@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox