This breaks all imx builds because our distros in our layers are not in the places you check. Do not hardcode the location to check.
Please remove checks so we can get our builds working again. Thanks Lauren -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Fabio Berton Sent: Monday, November 07, 2016 7:30 AM To: [email protected] Subject: [meta-freescale] [base][PATCH v2 1/2] setup-environment: Add support for set distro 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 <[email protected]> --- 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 <build-dir> <build-dir>: specifies the build directory location (required) + <distro>: 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=<machine> source $PROGNAME <build-dir> -" +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=<machine> DISTRO=<distro> source $PROGNAME <build-dir> +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 -- _______________________________________________ meta-freescale mailing list [email protected] https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Flistinfo%2Fmeta-freescale&data=01%7C01%7Clauren.post%40nxp.com%7Ca586f5939ad244b9693808d407126c57%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=BT5j1Sk95aLA7HX%2Fu%2BnwK3tj%2F3hNb4RU1gmitExP0R4%3D&reserved=0 -- _______________________________________________ meta-freescale mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-freescale
