From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/4] defaultenv/boot: add -k and -t option to specify the kernel location and image type
Date: Fri, 8 Apr 2011 15:40:06 +0200 [thread overview]
Message-ID: <1302270008-21346-2-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 | 6 +++++-
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 4289b29..597b080 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -3,11 +3,16 @@
. /env/config
opt_mode=""
+opt_kernel_loc=""
-while getopt "hm:" Option
+while getopt "hm:k:t:" Option
do
if [ ${Option} = m ]; then
opt_mode=${OPTARG}
+elif [ ${Option} = k ]; then
+ opt_kernel_loc=${OPTARG}
+elif [ ${Option} = t ]; then
+ kernelimage_type=${OPTARG}
else
. /env/bin/boot_help
exit 0
@@ -28,6 +33,16 @@ elif [ x${opt_mode} = xtftp ]; then
kernel_loc=tftp
fi
+if [ x${opt_kernel_loc} = xnand ]; then
+ kernel_loc=nand
+elif [ x${opt_kernel_loc} = xnor ]; then
+ kernel_loc=nor
+elif [ x${opt_kernel_loc} = xnfs ]; then
+ kernel_loc=nfs
+elif [ x${opt_kernel_loc} = xtftp ]; then
+ kernel_loc=tftp
+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 425c718..28436b8 100644
--- a/defaultenv/bin/boot_help
+++ b/defaultenv/bin/boot_help
@@ -1,6 +1,6 @@
#!/bin/sh
-echo "usage: boot [-m <mode>]"
+echo "usage: boot [-m <mode>] [-k <kernel location>] [-t <kernel image type]"
echo "boot."
echo ""
echo "options"
@@ -11,6 +11,10 @@ echo " tftp tftp nfs"
echo " nor nor nor"
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 ""
+echo ""
echo "default is"
echo -n "kernel_loc "
echo ${kernel_loc}
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev 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 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-04-08 13:40 ` [PATCH 3/4] defaultenv/boot: add -r and -T option to select rootfs location and type Jean-Christophe PLAGNIOL-VILLARD
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-2-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