Re: [PATCH] defaultenv-2: Add bootargs for booting from disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Wed, Jul 25, 2012 at 2:55 PM, Teresa Gámez <t.gamez@xxxxxxxxx> wrote:
> Add support in defaultenv-2 for booting from disk (SD-Card, USB-Stick).
>
> Signed-off-by: Teresa Gámez <t.gamez@xxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux