From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.0.45; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=meenakshi.aggarwal@nxp.com; receiver=edk2-devel@lists.01.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00045.outbound.protection.outlook.com [40.107.0.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 822CA223230CE for ; Fri, 16 Feb 2018 00:47:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=tG6pFeFkFNfxxoksoS1Ahw/bo4H2OtRj25bnHTOBuC4=; b=cNc92vTKduqMBKMa7jqznL79U3dwEynFs5QOlfnHzz6vTteO5u++ryFi6wpO/loqWE4y+siwfA8e2ceVpIrRbxWEojUU3LT4sKqE5Z/poFR3k8Gxnku0ClukMZ/OwNUbg4ZxonDqcurZCwCaIMv2gxIwQ2Z1tpZ9Udqq81jNTYY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=meenakshi.aggarwal@nxp.com; Received: from idcbfarm.ap.freescale.net (192.88.169.1) by VI1PR04MB1008.eurprd04.prod.outlook.com (2a01:111:e400:5090::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Fri, 16 Feb 2018 08:53:01 +0000 From: Meenakshi To: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, michael.d.kinney@intel.com, edk2-devel@lists.01.org Date: Fri, 16 Feb 2018 14:20:05 +0530 Message-Id: <1518771035-6733-10-git-send-email-meenakshi.aggarwal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1518771035-6733-1-git-send-email-meenakshi.aggarwal@nxp.com> References: <1518771035-6733-1-git-send-email-meenakshi.aggarwal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: HK2PR02CA0172.apcprd02.prod.outlook.com (2603:1096:201:1f::32) To VI1PR04MB1008.eurprd04.prod.outlook.com (2a01:111:e400:5090::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1df06bca-7ccc-407d-8a84-08d5751ab18d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:VI1PR04MB1008; X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1008; 3:FZwrlZ/fByPuvBfQlOpuU2UGzqtVOBzWN3TZ76mHP0HSOnvyFzY9AcXQ8msgNLcPWu5oE6zkFc7qrF26tPJ4mKSAU7ydumjMDJQswz6ET8DR84q7TxRDQ8kqhktKXSzFyK/BfS+I0qEXxrLKDD8FlxgUYTdupJW6no5fQYvaYkZlsJ/v4olr71wYnL5nyMFCBVByITUTzEiK9HE40Y19K6Ze020bi4KKs4TKBRys1EDmMNCoPFIu/bzTIm3icTEX; 25:hTk6zkBEfX1SUoYqO15G/Bh2QPB7du0TVCiiHfHXL3nCguFm3HPYoBzNDDHavXNY2v4j7MJ6sQCnkvyYdPVxdeTXQYNXQ5WqebCTDcE7gW+odlirs/G7/vhLuAyHzapVARpLAeaA0dXf+C/v44M7abdQ19Eb8Qkt4m966dVlZ1tOZcVxXs+8UBNT4SwnCrMWCrTXHn5EV4fT9/0lNkBZgaX1k4QH83Hkk6Dwk9UEG73+a6/Qg8DVUJY/g/zdE219+UI4my0u43lqiU2Hsts6eBSH528V6FoN01tYGwGDeKlcugFA0a9nBI53nqxTTyWf+fvIkgihYjkGCpf6rfeesw==; 31:YSl00340YPYH7rLrEECuhwhUOy5QKjTqNDa92Pa690rEbLpTlfZxFIDYwXLx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Y5UUWLgrNhA8RT1LIW5csCzTkl2myn75C0zRqf643rh76Cc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(111885846020525); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231101)(944501161)(6055026)(6041288)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR04MB1008; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB1008; X-Forefront-PRVS: 0585417D7B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(39380400002)(396003)(39860400002)(366004)(199004)(189003)(174874002)(86362001)(6486002)(8676002)(76176011)(36756003)(53376002)(966005)(4326008)(6116002)(15188155005)(16799955002)(7736002)(386003)(68736007)(186003)(26005)(53936002)(305945005)(16526019)(81156014)(3846002)(6506007)(478600001)(50226002)(16586007)(8936002)(2950100002)(316002)(2906002)(59450400001)(25786009)(97736004)(50466002)(48376002)(105586002)(52116002)(47776003)(81166006)(51416003)(5660300001)(106356001)(66066001)(54906003)(6306002)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB1008; H:idcbfarm.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR04MB1008; 23:n4jTO8wvxMI4Cl0CaexwGYUr+VPuwxmp9vNdSxN59?= =?us-ascii?Q?QI1KzIgW8ODaNok5JWPAt7mSEQWLpOL28Y3cTkTT+X4VZNU7QsaMrVWowvR0?= =?us-ascii?Q?gGvPC3qdHi/cfoujEeq1QyfaUhl+5GPv928Pr36TLZsnt5ehAf4LZGHEU93P?= =?us-ascii?Q?jIspRuwwMx088Nh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FKJY2KWk4ZoCpylcGUz+TBD7Yo8EyMMbfhTLE2gnmn5X6VfOc/XlauicRXb2GQrdGWZJhvv7eGScilS9lhTZlKLQ0G55jjyZOnCXrzisTxZAfjaPv8Ec6pVOOBFHVFekx9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2018 08:53:01.7954 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1df06bca-7ccc-407d-8a84-08d5751ab18d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB1008 Subject: [PATCH edk2-platforms 09/39] Build : Add build script and environment script X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Feb 2018 08:47:16 -0000 Content-Type: text/plain From: Meenakshi Aggarwal 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 Signed-off-by: Wasim Khan --- Platform/NXP/Env.cshrc | 78 +++++++++++++++++++++++++++++++++ Platform/NXP/Readme.md | 17 +++++++ Platform/NXP/build.sh | 117 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 212 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..eb51018 --- /dev/null +++ b/Platform/NXP/Env.cshrc @@ -0,0 +1,78 @@ +# @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 the edk2-platforms path +export PACKAGES_PATH=`dirname \`dirname "$PWD"\`` diff --git a/Platform/NXP/Readme.md b/Platform/NXP/Readme.md new file mode 100644 index 0000000..94174a7 --- /dev/null +++ b/Platform/NXP/Readme.md @@ -0,0 +1,17 @@ +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. source Env.cshrc + +2. Build desired board + ./build.sh (optional) + + Soc-name : LS1043 / LS1046 / LS2088 + board-type : RDB / QDS + build-candidate : DEBUG / RELEASE + diff --git a/Platform/NXP/build.sh b/Platform/NXP/build.sh new file mode 100755 index 0000000..eea83ee --- /dev/null +++ b/Platform/NXP/build.sh @@ -0,0 +1,117 @@ +#!/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): SoC Type (can be LS1043 / LS1046 / LS2088)." + echo " Arg 2 (mandatory): Board Type (can be RDB / QDS)." + echo " Arg 3 (mandatory): Build candidate (can be RELEASE or DEBUG). By + default we build the RELEASE candidate." + echo " Arg 4 (optional): clean - To do a 'make clean' operation." +} + +# Check for total num of input arguments +if [[ "$#" -gt 4 ]]; then + echo "Illegal number of parameters" + print_usage_banner + exit +fi + +# Check for third parameter to be clean only +if [[ "$4" && $4 != "clean" ]]; then + echo "Error ! Either clean or emplty" + print_usage_banner + exit +fi + +# Check for input arguments +if [[ $1 == "" || $2 == "" || $3 == "" ]]; then + echo "Error !" + print_usage_banner + exit +fi + +# Check for input arguments +if [[ $1 != "LS1043" && $1 != "LS1046" && $1 != "LS2088" ]]; then + echo "Error ! Incorrect Soc Type specified." + print_usage_banner + exit +fi + +# Check for input arguments +if [[ $2 != "RDB" && $2 != "QDS" ]]; then + echo "Error ! Incorrect Board Type specified." + print_usage_banner + exit +fi + +# Check for input arguments +if [[ $3 != "RELEASE" ]]; then + if [[ $3 != "DEBUG" ]]; then + echo "Error ! Incorrect build target specified." + print_usage_banner + exit + fi +fi + +# Set Package drirectory +if [[ $2 == "RDB" ]]; then + PKG="aRdbPkg" + if [[ $2 == "QDS" ]]; then + PKG="aQdsPkg" + fi +fi + +echo ".........................................." +echo "Welcome to $1$PKG UEFI Build environment" +echo ".........................................." + +if [[ $4 == "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 "$PACKAGES_PATH/Platform/NXP/$1$PKG/$1$PKG.dsc" -a $ARCH -t $TARGET_TOOLS -b $3 -- 1.9.1