From: Mario Domenech Goulart <mario.goulart@gmail.com>
To: Fabio Berton <fabio.berton@ossystems.com.br>
Cc: meta-freescale@yoctoproject.org
Subject: Re: [base][PATCH 1/2] setup-environment: Add support for set distro
Date: Mon, 07 Nov 2016 14:17:48 +0100 [thread overview]
Message-ID: <87wpgfpgxv.fsf@parenteses.org> (raw)
In-Reply-To: <1478519672-1615-1-git-send-email-fabio.berton@ossystems.com.br> (Fabio Berton's message of "Mon, 7 Nov 2016 09:54:31 -0200")
Hi Fabio,
On Mon, 7 Nov 2016 09:54:31 -0200 Fabio Berton <fabio.berton@ossystems.com.br> wrote:
> 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 <fabio.berton@ossystems.com.br>
> ---
> 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 <build-dir>
> <build-dir>: specifies the build directory location (required)
> + <distro>: specifies the disto name
Small typo: s/disto/distro/
> 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
--
http://parenteses.org/mario
prev parent reply other threads:[~2016-11-07 13:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 11:54 [base][PATCH 1/2] setup-environment: Add support for set distro Fabio Berton
2016-11-07 11:54 ` [base][PATCH 2/2] setup-environment: Move error log from top to bottom Fabio Berton
2016-11-07 13:17 ` Mario Domenech Goulart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wpgfpgxv.fsf@parenteses.org \
--to=mario.goulart@gmail.com \
--cc=fabio.berton@ossystems.com.br \
--cc=meta-freescale@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.