mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] defaultenv/boot: add -r and -T option to select rootfs location and type
Date: Fri,  8 Apr 2011 15:40:07 +0200	[thread overview]
Message-ID: <1302270008-21346-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20110408133713.GC13978@game.jcrosoft.org>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 defaultenv/bin/boot      |   17 ++++++++++++++++-
 defaultenv/bin/boot_help |    4 +++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 597b080..bae73d4 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -4,8 +4,9 @@
 
 opt_mode=""
 opt_kernel_loc=""
+opt_rootfs_loc=""
 
-while getopt "hm:k:t:" Option
+while getopt "hm:k:t:r:T:" Option
 do
 if [ ${Option} = m ]; then
 	opt_mode=${OPTARG}
@@ -13,6 +14,10 @@ elif [ ${Option} = k ]; then
 	opt_kernel_loc=${OPTARG}
 elif [ ${Option} = t ]; then
 	kernelimage_type=${OPTARG}
+elif [ ${Option} = r ]; then
+	opt_rootfs_loc=${OPTARG}
+elif [ ${Option} = T ]; then
+	rootfs_type=${OPTARG}
 else
 	. /env/bin/boot_help
 	exit 0
@@ -43,6 +48,16 @@ elif [ x${opt_kernel_loc} = xtftp ]; then
 	kernel_loc=tftp
 fi
 
+if [ x${opt_rootfs_loc} = xnand ]; then
+	rootfs_loc=nand
+elif [ x${opt_rootfs_loc} = xnor ]; then
+	rootfs_loc=nor
+elif [ x${opt_rootfs_loc} = xnfs ]; then
+	rootfs_loc=nfs
+elif [ x${opt_rootfs_loc} = xinitrd ]; then
+	rootfs_loc=initrd
+fi
+
 if [ x$ip = xdhcp ]; then
 	bootargs="$bootargs ip=dhcp"
 elif [ x$ip = xnone ]; then
diff --git a/defaultenv/bin/boot_help b/defaultenv/bin/boot_help
index 28436b8..41b5353 100644
--- a/defaultenv/bin/boot_help
+++ b/defaultenv/bin/boot_help
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-echo "usage: boot [-m <mode>] [-k <kernel location>] [-t <kernel image type]"
+echo "usage: boot [-m <mode>] [-k <kernel location>] [-t <kernel image type] [-r <rootfs location>] [-T <rootfs type>]"
 echo "boot."
 echo ""
 echo "options"
@@ -13,6 +13,8 @@ echo "         nand      nand       nand"
 echo ""
 echo " -k      kernel location tftp, nfs, nand, nor"
 echo " -t      kernel image type uimage, zimage, raw or raw_lzo"
+echo " -r      rootfs location nfs, nand, nor, initrd"
+echo " -T      rootfs type ubi, jffs2, ext2, etc..."
 echo ""
 echo ""
 echo "default is"
-- 
1.7.4.1


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

  parent reply	other threads:[~2011-04-08 13:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 13:37 [PATCH 0/4] defaultenv boot updates Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 1/4] defaultenv/boot: switch to getopt Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 2/4] defaultenv/boot: add -k and -t option to specify the kernel location and image type Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-04-08 13:40 ` [PATCH 4/4] defaultenv/boot: add -i option to select the ip mode Jean-Christophe PLAGNIOL-VILLARD
2011-04-11 10:16 ` [PATCH 0/4] defaultenv boot updates Sascha Hauer
2011-04-11 10:17   ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-11 10:55     ` Sascha Hauer
2011-04-23  2:16       ` Jean-Christophe PLAGNIOL-VILLARD

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=1302270008-21346-3-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox