defaultenv-2: Add bootargs for booting from disk
PATCH v2 1/1 defaultenv-2: Add bootargs for booting from disk
Add support in defaultenv-2 for booting from disk (SD-Card, USB-Stick).
Signed-off-by Teresa Gámez <[email protected]>
---
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
defaultenv-2/base/bin/bootargs-root-disk new file +26 -0
@@ -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"
Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 3 lines · Teresa Gámez
Add support in defaultenv-2 for booting from disk (SD-Card, USB-Stick).
Signed-off-by Teresa Gámez <[email protected]>
Applied, thanks
Sascha
Quoted 49 lines
---
Fixed since v1:
- spell fix
- added return value on failuredefaultenv-2/base/bin/bootargs-root-disk | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) create mode 100644 defaultenv-2/base/bin/bootargs-root-diskdefaultenv-2/base/bin/bootargs-root-disk new file +26
-0@@ -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"Signature · 7 lines
1.7.0.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox