mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCHv2] defaultenv-2: Add bootargs for booting from disk
@ 2012-07-25 14:42 Teresa Gámez
  2012-07-26 10:43 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Teresa Gámez @ 2012-07-25 14:42 UTC (permalink / raw)
  To: barebox

Add support in defaultenv-2 for booting from disk (SD-Card, USB-Stick).

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
---
Fixed since v1:
	- spell fix
	- added return value on failure

 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..df8750e
--- /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 partition given"
+	exit 1
+fi
+
+if [ -z "${fstype}" ]; then
+	echo "$0: no filesystem type given"
+	exit 1
+fi
+
+global.linux.bootargs.root="root=/dev/$part rootfstype=$fstype rootwait"
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCHv2] defaultenv-2: Add bootargs for booting from disk
  2012-07-25 14:42 [PATCHv2] defaultenv-2: Add bootargs for booting from disk Teresa Gámez
@ 2012-07-26 10:43 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-07-26 10:43 UTC (permalink / raw)
  To: Teresa Gámez; +Cc: barebox

On Wed, Jul 25, 2012 at 04:42:05PM +0200, Teresa Gámez wrote:
> Add support in defaultenv-2 for booting from disk (SD-Card, USB-Stick).
> 
> Signed-off-by: Teresa Gámez <t.gamez@phytec.de>

Applied, thanks

  Sascha

> ---
> Fixed since v1:
> 	- spell fix
> 	- added return value on failure
> 
>  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..df8750e
> --- /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 partition given"
> +	exit 1
> +fi
> +
> +if [ -z "${fstype}" ]; then
> +	echo "$0: no filesystem type given"
> +	exit 1
> +fi
> +
> +global.linux.bootargs.root="root=/dev/$part rootfstype=$fstype rootwait"
> -- 
> 1.7.0.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-26 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25 14:42 [PATCHv2] defaultenv-2: Add bootargs for booting from disk Teresa Gámez
2012-07-26 10:43 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox