From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.34.67; helo=nam01-by2-obe.outbound.protection.outlook.com; envelope-from=meenakshi.aggarwal@nxp.com; receiver=edk2-devel@lists.01.org Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0067.outbound.protection.outlook.com [104.47.34.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3AE5B2211B400 for ; Sun, 26 Nov 2017 21:00:12 -0800 (PST) Received: from CY1PR03CA0024.namprd03.prod.outlook.com (10.174.128.34) by BN3PR03MB2356.namprd03.prod.outlook.com (10.166.74.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Mon, 27 Nov 2017 05:04:32 +0000 Received: from BL2FFO11OLC012.protection.gbl (2a01:111:f400:7c09::161) by CY1PR03CA0024.outlook.office365.com (2603:10b6:600::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.260.4 via Frontend Transport; Mon, 27 Nov 2017 05:04:32 +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 BL2FFO11OLC012.mail.protection.outlook.com (10.173.160.159) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.218.12 via Frontend Transport; Mon, 27 Nov 2017 05:04:32 +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 vAR53iMb000785; Sun, 26 Nov 2017 22:04:29 -0700 From: Meenakshi Aggarwal To: , , , Date: Mon, 27 Nov 2017 16:21:57 +0530 Message-ID: <1511779917-9255-10-git-send-email-meenakshi.aggarwal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1511779917-9255-1-git-send-email-meenakshi.aggarwal@nxp.com> References: <1511779917-9255-1-git-send-email-meenakshi.aggarwal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131562326725089512; (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)(346002)(39860400002)(376002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(174874002)(50986999)(8936002)(51416003)(16799955002)(966005)(2950100002)(68736007)(6666003)(50226002)(77096006)(498600001)(86362001)(48376002)(85426001)(53376002)(4326008)(189998001)(2201001)(15188155005)(36756003)(316002)(54906003)(110136005)(106466001)(53936002)(5660300001)(50466002)(104016004)(6306002)(33646002)(105606002)(97736004)(76176999)(8656006)(305945005)(47776003)(81166006)(16586007)(8676002)(81156014)(356003)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2356; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC012; 1:pJO6iiR1N0FudqTWEW4mAutHH3b4y0QyV7YvUCueZsMdjT9qJOJbJ/9KWlXEIiyzR6y7osniKy224vGPvmVvSKyIVAkeg21Eyriy5H4YA6mV1xz/aFVh0RcKJtfyPJ+e MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1dc3877-cee8-4ab9-162e-08d5355458b8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603258); SRVR:BN3PR03MB2356; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2356; 3:pQLjPZA7LngVffK4jMQJtsuzRgr7QxiziJHgrsE9mKzIrvMKT6pUX9YqvxIC6I81bz0rJuPWdD9uCtC21Kkjgvignw3SuHbzf4PXDIXrf4kNFrpQHTB7Bq1lKSJY9nmcpHgVEQhLCdyDGjqTP0b7/YzfkZJYKWx7hcJ73g+GNoNqZJ1UG5ZMsAE0UmuWUwECC0EdLN/WZCUzXhhRu2OBlUdlSUv3QMwLZlKHI7m7b+5PUrhZEe0oW3ctwBA8bgc5aPwH1QXTOnpGs2muRfXw+MeuTPsB3Y89Hkx7kQLsZeF570nDnBfYWmn+Up403ymCYw26z9qeqjXIZl+3qObxYfv1VRJUb7QqF/e4W2CgyyM=; 25:mOvpd4MlIIhGWOQWs6bzlMVsDge+4QLhlgRAybXiuznktaQ95hrRffsHxx4Mh9c0VEqyb83N1m5JWBO58PWkE8rjMRkqhrCIXfAc86eUu5NYfbsTittk7pqAfYjh8it8ZIDt0fkaqMZY2X2Fy/vd5sUQwhwldjDpacE3Rrzrs/h2Nt5W5xD49j1qwhoVEOvULnMRB6OnjhKz9TExwf6B1siSnTLdgb5HUGySk0qBwtPo0/wqhV/npJU3UN/16euxFwg+KySHOmAax83op6s3ljoGR36DzVwsD2dVUjo9uf3AgCp4hL5qdG7+yS9QrftGqdIqyjv+V87b31a2lx4q1A== X-MS-TrafficTypeDiagnostic: BN3PR03MB2356: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2356; 31:CmdhNSqcwk0/Stn+ZIMpChxG/zR71GBItJobl6tHsPdAwcCY3QeKcMBAk/lajX2ZocvQR5/IHtSM1v2+i6alcQbwViGVO1uSkorPVVevb8ersjLOP/UQZgx1jqOg6nCW5OUoK7EgXrRhG338hTDVU1IfReuzMp8GIvgATp4audgJzASrJbU2FBnFr2KU1W1kXq+XJ0N1LOQOWuSVJgjwX5uTBFCy8YPkAbclymMxgxA=; 4:Z0xIp9ImkATGIcnf4A2OQHkEifDBoLE95mZNAI/iAcmSXblVy45tloMHBFpD/VVkl+vn1979pXA/KvSfEYfsjG1X4bEqa+k+n8o2QpIW6HRxHrB+8xW9Gmu30znJdIHv7gnGJpC5C2aKOgVJLv87DI4nuHsXVzx1BIRdqAZ+JDIsAdom+bpqfxnbMbtG7vOj+tuTcgS+5N5eoWh5U5McOUYbp1N1MIDNxfH1buR/l9V4wrxmMS77d7U5QP6WqeVlljxq2fXjZ5m+xa77QungXfnFAnWOtAXHr1Py5eBbAFoZTLRUdoUwaqeKYMIAglkyQTW+E8ILDNuV6pYIdG+AhHDkEGluFG6f0Vrcpknpj6w= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(111885846020525); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231022)(93006095)(93001095)(6055026)(6096035)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(20161123559100)(20161123563025)(20161123565025)(201708071742011); SRVR:BN3PR03MB2356; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2356; X-Forefront-PRVS: 0504F29D72 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2356; 23:nrqNvi3g4+R7FOtzDa/PY2Ka5yNpFatjDd23dkoWx?= =?us-ascii?Q?PgeW7Wwcw213j4xe447nNCKTD9UrDVUpvMStFOFxjVLJIiyf2Z9VJVagZOx+?= =?us-ascii?Q?TKaQcOFqaPCYZXW/d4yZ267i5tLiiGY4dwSMkr4qx+bszkGKDAAjrAKNuZZZ?= =?us-ascii?Q?Wx8ItNpZzWiRIfu7lc2ukZVKk8bWbHq+rwlkYyqPSQZJxS0oOpBxI6X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yZpH7sVmcEoat3L14iFEPG1ccmB7pM8S9sRIcowJnnbCmDQRCknubecUncjfaUuTx5u6nco2OcT9h8T1lhKuHQv1xFGnhbRSkYhTik1wwUYwYDdDWpR9SpczgAeYMI5lC0nDj0WGCN+ovSJY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2017 05:04:32.3217 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1dc3877-cee8-4ab9-162e-08d5355458b8 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: BN3PR03MB2356 Subject: [PATCH edk2-platforms] [PATCH v3 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: Mon, 27 Nov 2017 05:00:12 -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..a11b90c --- /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