From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.36.80; helo=nam02-sn1-obe.outbound.protection.outlook.com; envelope-from=meenakshi.aggarwal@nxp.com; receiver=edk2-devel@lists.01.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0080.outbound.protection.outlook.com [104.47.36.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B95DC220C1602 for ; Wed, 22 Nov 2017 01:57:30 -0800 (PST) Received: from DM5PR03CA0039.namprd03.prod.outlook.com (10.174.189.156) by CY4PR03MB2696.namprd03.prod.outlook.com (10.173.43.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Wed, 22 Nov 2017 10:01:45 +0000 Received: from BN1AFFO11FD008.protection.gbl (2a01:111:f400:7c10::175) by DM5PR03CA0039.outlook.office365.com (2603:10b6:4:3b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.239.5 via Frontend Transport; Wed, 22 Nov 2017 10:01:45 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD008.mail.protection.outlook.com (10.58.52.68) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.218.12 via Frontend Transport; Wed, 22 Nov 2017 10:01:44 +0000 Received: from uefi-OptiPlex-790.ap.freescale.net (uefi-OptiPlex-790.ap.freescale.net [10.232.132.78]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vAMA0nIC030922; Wed, 22 Nov 2017 03:01:42 -0700 From: Meenakshi Aggarwal To: , , , Date: Wed, 22 Nov 2017 21:19:00 +0530 Message-ID: <1511365740-1157-9-git-send-email-meenakshi.aggarwal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1511365740-1157-1-git-send-email-meenakshi.aggarwal@nxp.com> References: <1510065736-9394-1-git-send-email-meenakshi.aggarwal@nxp.com> <1511365740-1157-1-git-send-email-meenakshi.aggarwal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131558185051277432; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7966004)(376002)(346002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(174874002)(81156014)(54906003)(53936002)(6306002)(104016004)(36756003)(77096006)(2906002)(2201001)(4326008)(97736004)(8936002)(15188155005)(85426001)(16799955002)(53376002)(498600001)(8656006)(966005)(50226002)(356003)(2950100002)(316002)(5660300001)(50986999)(16586007)(86362001)(305945005)(189998001)(6666003)(76176999)(68736007)(8676002)(110136005)(81166006)(105606002)(106466001)(50466002)(33646002)(5003940100001)(47776003)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2696; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD008; 1:QCQyzIccv1DOSLfMbNjAVcmas87dYDuG3LVEKqz8It3iuV91IChuwadE03zPv646LrjvgS77Fvy896XYYe7s2F5OBHsBRGOkJ5bHRMslt7crTjJlYHD0+Lae6gb3RKBz MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 995d99fb-74ba-433d-6718-08d5319009bb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600022)(4604075)(4534020)(4628075)(201703131517081)(2017052603258); SRVR:CY4PR03MB2696; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 3:VDN+6onwhCTQYnVAYwVPlXFEO5PkJqymO0Ck/n5c10iP50jto/XaxvQDnOw2ybTbN2B3KZWa3QMZBaKlXoqYXZEHwrNBBBIHwETWtDFpT/NkzBTjiYc0qKBftE9U5hQhHnjYosbXdlVdN28swETTJfrWzskO78W6JCj12+JfGxR9LxOwLhoq/RhyC5OcP9093D46juaaJUn5AjSVZLjR2uULZGSYcQiVNgPrZ2ISDm8MuzBTYhwhkgLC/JdenVaTl2nGfuHWPTjKFYhNfgq/KLlTYqXqqKudn4/u8IEQ74b4ESASBX6HClY9Tu+f5dlbLtrtu2Ou0E0aDFC2/OrLx1Rsq1Jo1TsElCaEsHPcqCg=; 25:THEVZSOIGnSBEtxeM/LPzaVh2PliYi4S9nQCjSXdGKgj5Vti9pBwwCeQtVTY8RRppNjEYrDpplmlkbKhRcKOnMdA8CD6MUBlqiICdHQqP9gNUn0Q1kEI0eqXZ4Ho+9BK/AqEFGzcJNzAUdZMaIPEmadXxX4rQuIsOneTyKOK3uAGN3WX31QKsmPLHlGSk8UPAeI5YIa1Lg2N59vf0KjQv3D6Kw0MdIotKtPEUxlY8QOco2eqymaAXUFe2vzl3kkSHJedPI6StEEGYbmIvdjSgM/fCZvDnGBcJysV7Mu2K9FVeIQJPDvirKVuBKw2Kskk+Y/PKb6WwEI3NBfa32wWzsnk+0qQB8IJYZZM+EpHXwI= X-MS-TrafficTypeDiagnostic: CY4PR03MB2696: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 31:DzrjdpN+X3xZ+zNcvXsYSDgkj4hRVoDaSnuWWtrfWvOdMg3H/Anhp9IfNnuk6coAXc90Ui+sQ/2FxKhSILQFFc/B4vTbiPPGqLbz6ujbFLoqG8e1nYmD1ogi2hOLlFrPqkuIRHbXWTfo865ZvLvuh/PAwQg2EJeXEk44gZDto8mRfIOwcEeCaxr2CzkZ6ueRBW/X0TXX6RB9iMURTT57DA6X/qkkViwRl8IwiPyCl60=; 4:6UIj0rYC++Dq2ddiOmA+hERbp/Lv6/xzvrrkA39/ZedtlgJ+D17cAvyc0/F17i2e8HI9xbfZt9188kVxrhsiOGC9PYeYgjad/Ts9fGAyISzCUFmp0g+EsBTMG9UG4P+czgnHdphkTryhlUDPD93YmD0iFNY5j4AnDKDgcBnBHGcaZNRoFmBQ++ENSy/aYUtkB5SUbkzRSuextjTRRkGMhvWIy5IQg8MZa3qBiOCJ9eTPIT6sEDaYoanh/uqrJN94tPbFha6CIzIjb3EcFJvdB91CMmcABBlxjUzWVGMsN7f/JjknjWF+JAcA/6hSTjWHt+qUBKxkmHIQmV9ZKhWadY089Qqa6j6SbxY8mnfrtfs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(111885846020525); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(3002001)(3231022)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(20161123556025)(20161123565025)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123559100)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2696; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2696; X-Forefront-PRVS: 0499DAF22A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2696; 23:koTUKQ5zGt1qDWgdjfDnAOSMY04pUypd2mhiKQWHe?= =?us-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:Wo0+AOA42DPtqkze9+V4BIH5FYDhe7lQY5UNlqXjbUfZooeVY25xhxva/3fPeW3Rb0F6HU1Q0uC7w/o7OP4jwPmFmvTKICPo7Bcsx6bpqI0=; 7:ZkY4ecRwXJ48uerJD/MTtAbtPhP3DQ48xPAaWpftgax+RCyDjAaVydrFYnF8HwjLDhjd/UASqX1Y7frzC2huSSQ8rduC2gG0OUcz7h4sniwvjmqWwpK41brUQXcCAkYIDain8e6RnrnehYIfc0XVl52jEpSdXqS2x07lXh1cBgpIhjTVyebz+o6sVi0ow/OhsmnSMCgzlVrzElI6VnJu+rN1h4mBMJWHxuuVLyOXCgaotRO0HVKB65sEAVsNhpON SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2017 10:01:44.9561 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 995d99fb-74ba-433d-6718-08d5319009bb X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2696 Subject: [PATCH v2 9/9] Build : Add build script and environment script X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2017 09:57:31 -0000 Content-Type: text/plain Build script and Environment setup script. Readme to explain how to run build script Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- Platform/NXP/Env.cshrc | 77 ++++++++++++++++++++++++++++++++++++ Platform/NXP/Readme.md | 15 +++++++ Platform/NXP/build.sh | 103 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 195 insertions(+) create mode 100755 Platform/NXP/Env.cshrc create mode 100644 Platform/NXP/Readme.md create mode 100755 Platform/NXP/build.sh diff --git a/Platform/NXP/Env.cshrc b/Platform/NXP/Env.cshrc new file mode 100755 index 0000000..31abb04 --- /dev/null +++ b/Platform/NXP/Env.cshrc @@ -0,0 +1,77 @@ +# @file. +# +# Copyright 2017 NXP +# +# 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. +# +# + +unset GCC_UTILITY GCC_VERSION MajorVersion MinorVersion + +if [ X"$CROSS_COMPILE_64" != X"" ]; then + ARM64_PREFIX="$CROSS_COMPILE_64" +elif [ X"$CROSS_COMPILE" != X"" ]; then + ARM64_PREFIX="$CROSS_COMPILE" +else + ARM64_PREFIX="aarch64-linux-gnu-" +fi + +GCC_UTILITY="${ARM64_PREFIX}gcc" +CheckGcc=`which $GCC_UTILITY >/dev/null 2>&1` +if [ "$?" -eq 0 ];then + GCC_VERSION=`$GCC_UTILITY -v 2>&1 | tail -n 1 | awk '{print $3}'` + MajorVersion=`echo $GCC_VERSION | cut -d . -f 1` + MinorVersion=`echo $GCC_VERSION | cut -d . -f 2` + GCC_ARCH_PREFIX= + NOTSUPPORTED=0 + + case $MajorVersion in + 4) + case $MinorVersion in + 9) + GCC_ARCH_PREFIX="GCC49_AARCH64_PREFIX" + ;; + *) + NOTSUPPORTED=1 + ;; + esac + ;; + 5) + case $MinorVersion in + 4) + GCC_ARCH_PREFIX="GCC5_AARCH64_PREFIX" + ;; + *) + GCC_ARCH_PREFIX="GCC5_AARCH64_PREFIX" + echo "Warning: ${GCC_UTILITY} version ($MajorVersion.$MinorVersion) has not been tested, please use at own risk." + ;; + esac + ;; + *) + NOTSUPPORTED=1 + ;; + esac + + [ "$NOTSUPPORTED" -eq 1 ] && { + echo "Error: ${GCC_UTILITY} version ($MajorVersion.$MinorVersion) not supported ." + unset GCC_UTILITY GCC_VERSION MajorVersion MinorVersion + } + + [ -n "$GCC_ARCH_PREFIX" ] && { + export GCC_ARCH_PREFIX="$GCC_ARCH_PREFIX" + export "$GCC_ARCH_PREFIX=$ARM64_PREFIX" + } + + unset ARCH +else + echo "Error: ${GCC_UTILITY} not found. Please check PATH variable." + unset GCC_UTILITY GCC_VERSION MajorVersion MinorVersion +fi + +export PACKAGES_PATH=$PWD/../../../edk2-platforms diff --git a/Platform/NXP/Readme.md b/Platform/NXP/Readme.md new file mode 100644 index 0000000..2c36f43 --- /dev/null +++ b/Platform/NXP/Readme.md @@ -0,0 +1,15 @@ +Support for all NXP boards is available in this directory. + +# How to build + +build script source environment file Env.cshrc + +user need to run only build command. + +1. Build desired board + ./build.sh (optional) + + board-name : LS1043 / LS1046 / LS2088 + build-candidate : DEBUG / RELEASE + +Currently, support for LS1043 is provided. diff --git a/Platform/NXP/build.sh b/Platform/NXP/build.sh new file mode 100755 index 0000000..e465ebf --- /dev/null +++ b/Platform/NXP/build.sh @@ -0,0 +1,103 @@ +#!/bin/bash + +# UEFI build script for NXP LS SoCs +# +# Copyright 2017 NXP +# +# 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. +# + +# source environment file +source Env.cshrc + +# Global Defaults +ARCH=AARCH64 +TARGET_TOOLS=`echo $GCC_ARCH_PREFIX | cut -d _ -f 1` +BASE_DIR=../../.. + +[ -z "$TARGET_TOOLS" ] && { + echo "TARGET_TOOLS not found. Please run \"source Env.cshrc\" ." + exit 1 +} + +print_usage_banner() +{ + echo "" + echo "This shell script expects:" + echo " Arg 1 (mandatory): Board Type (can be LS1043 / LS1046 / LS2088)." + echo " Arg 2 (mandatory): Build candidate (can be RELEASE or DEBUG). By + default we build the RELEASE candidate." + echo " Arg 3 (optional): clean - To do a 'make clean' operation." +} + +# Check for total num of input arguments +if [[ "$#" -gt 3 ]]; then + echo "Illegal number of parameters" + print_usage_banner + exit +fi + +# Check for third parameter to be clean only +if [[ "$3" && $3 != "clean" ]]; then + echo "Error ! Either clean or emplty" + print_usage_banner + exit +fi + +# Check for input arguments +if [[ $1 == "" || $2 == "" ]]; then + echo "Error !" + print_usage_banner + exit +fi + +# Check for input arguments +if [[ $1 != "LS1043" && $1 != "LS1046" && $1 != "LS2088" ]]; then + echo "Error ! Incorrect Board Type specified." + print_usage_banner + exit +fi + +# Check for input arguments +if [[ $2 != "RELEASE" ]]; then + if [[ $2 != "DEBUG" ]]; then + echo "Error ! Incorrect build target specified." + print_usage_banner + exit + fi +fi + +PKG="aRdbPkg" + +echo ".........................................." +echo "Welcome to $1$PKG UEFI Build environment" +echo ".........................................." + +if [[ $3 == "clean" ]]; then + echo "Cleaning up the build directory '$BASE_DIR/Build/$1$PKG/'.." + rm -rf $BASE_DIR/Build/$1$PKG/* + exit +fi + +# Clean-up +set -e +shopt -s nocasematch + +# +# Setup workspace now +# +echo Initializing workspace +cd $BASE_DIR + +# Use the BaseTools in edk2 +export EDK_TOOLS_PATH=`pwd`/BaseTools +source edksetup.sh BaseTools + + +build -p "$WORKSPACE/edk2-platforms/Platform/NXP/$1$PKG/$1$PKG.dsc" -a $ARCH -t $TARGET_TOOLS -b $2 -- 1.9.1