From: Roberto Nibali <rnibali@gmail.com>
To: "Teresa Gámez" <t.gamez@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] defaultenv-2: Add bootargs for booting from disk
Date: Wed, 25 Jul 2012 16:22:09 +0200 [thread overview]
Message-ID: <CAONxwYM7q_TsB3T93q6JsaLeU8sOB+Auy7yHVAZ-+vdkP0gHSw@mail.gmail.com> (raw)
In-Reply-To: <1343220907-28336-1-git-send-email-t.gamez@phytec.de>
Hi
On Wed, Jul 25, 2012 at 2:55 PM, Teresa Gámez <t.gamez@phytec.de> wrote:
> Add support in defaultenv-2 for booting from disk (SD-Card, USB-Stick).
>
> Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
> ---
> defaultenv-2/base/bin/bootargs-root-disk | 26 ++++++++++++++++++++++++++
> 1 files changed, 26 insertions(+), 0 deletions(-)
> create mode 100644 defaultenv-2/base/bin/bootargs-root-disk
>
> diff --git a/defaultenv-2/base/bin/bootargs-root-disk b/defaultenv-2/base/bin/bootargs-root-disk
> new file mode 100644
> index 0000000..076afdf
> --- /dev/null
> +++ b/defaultenv-2/base/bin/bootargs-root-disk
> @@ -0,0 +1,26 @@
> +#!/bin/sh
> +
> +usage="$0 [OPTIONS]\n -p <partition>\n -t <fstype>"
> +
> +while getopt "p:t:h" opt; do
> + if [ ${opt} = p ]; then
> + part=${OPTARG}
> + elif [ ${opt} = t ]; then
> + fstype=${OPTARG}
> + elif [ ${opt} = h ]; then
> + echo -e "$usage"
> + exit 0
> + fi
> +done
> +
> +if [ -z "${part}" ]; then
> + echo "$0: no partiton given"
s/partiton/partition/
> + exit
> +fi
> +
> +if [ -z "${fstype}" ]; then
> + echo "$0: no filesystem type given"
> + exit
> +fi
> +
> +global.linux.bootargs.root="root=/dev/$part rootfstype=$fstype rootwait"
Looks fine otherwise, besides considering returning a non-zero return
value upon exit for errors.
Regards
Roberto
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2012-07-25 14:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 12:55 Teresa Gámez
2012-07-25 14:22 ` Roberto Nibali [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=CAONxwYM7q_TsB3T93q6JsaLeU8sOB+Auy7yHVAZ-+vdkP0gHSw@mail.gmail.com \
--to=rnibali@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=t.gamez@phytec.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox