Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 91776E009C9; Mon, 7 Nov 2016 03:54:57 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.213.65 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-f65.google.com (mail-vk0-f65.google.com [209.85.213.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 8AB04E00563 for ; Mon, 7 Nov 2016 03:54:54 -0800 (PST) Received: by mail-vk0-f65.google.com with SMTP id x186so5966942vkd.2 for ; Mon, 07 Nov 2016 03:54:54 -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=lgMwr0pMe+77sjs8/aEYBa+nugr7g3YZQxlKwVXNVFw=; b=kIIQSCHzbcbqLcwPxCSLU2B1GaWqBezVXt8Zm1zTm/TejfaMuIFT/+NuuhSbCY+osN u8zUcmUOO5rJjjLMJSXzO05wFS/2G00VgbjLFSYg9F86IeNKex3z9h9MI65c4Pkzurg7 /toorcLHDuqfi1iB6ukGQI+pGCgKrMhwgqu9Ff1u/lu6wKeoxy7uoD7eSFQGddAR2YP3 6lQM7QF2bHWBV2QfPRydg6VAIgoU4D/FLBJkKXV2UWE3ieqd3w6rNmJiw+22KLgs+Lvc +VcnHYIMsbEJj5Can1giaTWE/616SJj9veyeLFVoXdJOnGFauOMIdgY8jyXQnWL6VlKY UUmw== 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=lgMwr0pMe+77sjs8/aEYBa+nugr7g3YZQxlKwVXNVFw=; b=dh1tMkyxsGyusLyNwtf9JtcWl0F8/tRbUyVRSdbl8JeIFg3T+VLlPpHFmYT+5Z12wp gGVCdnAko+J/gOnCON2HTxXOzvUobxrKHHTRUM2dWiXja1n+4ObCKbqgeGcbnj7hEicc UQjDF8c7bp5p3gqY9uAie5c2rIhNEl1CUo71py0koGJwiMt351pdU1CjTsSr/P3N9WJ5 ya1/Rr/duQhcrmC5ifjVW66wETkaza0wEkk4kfiKN6HgPt+pdVhH1GRES656b9i5ZoxS QRLj+pDZnXweyTvru6CZOKagKoT4d4gGUMW7XzHQLDLIFMMP6+//ZClGpm45xkFtyRJk 16+g== X-Gm-Message-State: ABUngvd7HJ2K2KS6kvGYQrz6XqsPhM4KecfDBcDf/l895T436wzJMwQO6tUwhTyFXvEx2Q== X-Received: by 10.31.216.4 with SMTP id p4mr2896785vkg.51.1478519694098; Mon, 07 Nov 2016 03:54:54 -0800 (PST) Received: from monster.lab.ossystems.com.br ([187.23.155.148]) by smtp.gmail.com with ESMTPSA id 140sm6072290vkl.28.2016.11.07.03.54.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Nov 2016 03:54:52 -0800 (PST) From: Fabio Berton To: meta-freescale@yoctoproject.org Date: Mon, 7 Nov 2016 09:54:31 -0200 Message-Id: <1478519672-1615-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 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 11:54:57 -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..a955182 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 disto 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