Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id C6DA7E00831; Mon, 7 Nov 2016 05:30:55 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-HAM-Report: * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * [209.85.213.66 listed in dnsbl.sorbs.net] * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.213.66 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-vk0-f66.google.com (mail-vk0-f66.google.com [209.85.213.66]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id A39F0E00563 for ; Mon, 7 Nov 2016 05:30:49 -0800 (PST) Received: by mail-vk0-f66.google.com with SMTP id 5so3810941vkf.0 for ; Mon, 07 Nov 2016 05:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ossystems-com-br.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization; bh=8lgqIBvKQinZhmzikDCxUKwwJNbzpY3nvNa6ronm78A=; b=fPPsJjAlogNH7mRCZ2rblwxxtUx1L43wotdgRLqIJi+bsylyX1663n0bJJBCeKvZZ0 NCJL3oskXF3KLXwGLyB2mTaEdGCcK8J8ch2nVO0kNMprPJV39bBywzz50DXOzTWKb0Y4 uUJop/roriHyPlFoeB9U4fFc6aGYy7xGiZCOSaB+tiCVigKDT+EkbQMaCnXQfV8bwYQ1 EAHVhAjFTqNuqigm5STAysq/3XGWGdXIwx6vCIbp/ZMZmMQPKIuPQa4g0XSIl/UxcWfH DbycOd7LgImpxSqvHdey2shqCjiizdnBBaHFq5pW/e5gqy6BgbUugmzi3y6g/h2EUI+p Iavg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization; bh=8lgqIBvKQinZhmzikDCxUKwwJNbzpY3nvNa6ronm78A=; b=Lk1rF3CdC+eRlKrMAGquNTBIfdo1e+Qt3AHSqr9iSsBlJasFqxe3L9+rZlFkbWVK6u ImbIltXaf19cJkjcWJrSJ+4XoIH3aAxJ8dH/MOdx9TxkuQUIoFE8Tm4h6l4BwGWMRKdh CRAuDa7rwCgdwbdqmXy/tqcNZ7znI+JDzgb87lx1nb2gWmr6AbJmtVE+C7S9M7e7BEPW B4PNMucNWe8a4KMabvoa1E713kpww5d/XuqTXly6Ggmkd+W7Y0QkPiAeaujX3H4QqNVC zmYFysKJsfCURs37CaosusPvmLFH6PvpZl/zAegnLAUmo/KJDgMFwiutPTct68ynrthr CyCA== X-Gm-Message-State: ABUngvfWCV0AmKBybuT7/5VcaGXbhNl7Ln+ejQWj30rTi24i2IFxIeVEoxIsWp+LRBOIEw== X-Received: by 10.31.3.78 with SMTP id 75mr464069vkd.121.1478525448480; Mon, 07 Nov 2016 05:30:48 -0800 (PST) Received: from monster.lab.ossystems.com.br ([187.23.155.148]) by smtp.gmail.com with ESMTPSA id q7sm6145705vke.20.2016.11.07.05.30.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Nov 2016 05:30:47 -0800 (PST) From: Fabio Berton To: meta-freescale@yoctoproject.org Date: Mon, 7 Nov 2016 11:29:58 -0200 Message-Id: <1478525399-3645-1-git-send-email-fabio.berton@ossystems.com.br> X-Mailer: git-send-email 2.1.4 Organization: O.S. Systems Software LTDA. Subject: [base][PATCH v2 1/2] setup-environment: Add support for set distro X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2016 13:30:55 -0000 To run setup-environment you need to set one of distros listed on supported distros using command like: MACHINE=imx6qsabresd DISTRO=fslc-framebuffer source setup-environment build Note that DISTRO is a required variable and won't be set if not defined. Signed-off-by: Fabio Berton --- setup-environment | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/setup-environment b/setup-environment index 099b21b..797a6aa 100755 --- a/setup-environment +++ b/setup-environment @@ -27,19 +27,25 @@ usage() { echo -e "\nUsage: source $PROGNAME : specifies the build directory location (required) + : specifies the distro name If undefined, this script will set \$MACHINE to 'imx6qsabresd'. +You need to set DISTRO to use this environment. " ls sources/*/conf/machine/*.conf > /dev/null 2>&1 + ls sources/meta-freescale-distro/conf/distro/fslc-*.conf > /dev/null 2>&1 if [ $? -eq 0 ]; then echo -e " Supported machines: `echo; ls sources/*/conf/machine/*.conf \ | sed s/\.conf//g | sed -r 's/^.+\///' | xargs -I% echo -e "\t%"` -To build for a machine listed above, run this script as: -MACHINE= source $PROGNAME -" +Supported distros: `echo; ls sources/meta-freescale-distro/conf/distro/fslc-*.conf \ +| sed s/\.conf//g | sed -r 's/^.+\///' | xargs -I% echo -e "\t%"` + +To build for a distro and machine listed above, run this script as: +MACHINE= DISTRO= source $PROGNAME +Ex: MACHINE=imx6qsabresd DISTRO=fslc-framebuffer source $PROGNAME build" fi } @@ -105,7 +111,19 @@ if [ -z "$SDKMACHINE" ]; then fi if [ -z "$DISTRO" ]; then - DISTRO='poky' + echo "You must set DISTRO before setting up the environment." +fi +# Check the machine type specified +LIST_DISTROS=`ls -1 $CWD/sources/meta-freescale-distro/conf/distro` +VALID_DISTRO=`echo -e "$LIST_DISTROS" | grep ${DISTRO}.conf$ | wc -l` +if [ "x$DISTRO" = "x" ] || [ "$VALID_DISTRO" = "0" ]; then + echo -e "The \$DISTRO you have specified ($DISTRO) is not supported by this build setup\n" + usage && clean_up + return 1 +else + if [ ! -e $1/conf/local.conf.sample ]; then + echo "Configuring for ${DISTRO}" + fi fi OEROOT=$PWD/sources/poky -- 2.1.4