[PATCH 4/4] defaultenv/boot: add -i option to select the ip mode
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Apr 8 09:40:08 EDT 2011
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
defaultenv/bin/boot | 4 +++-
defaultenv/bin/boot_help | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index bae73d4..a020cd3 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -6,7 +6,7 @@ opt_mode=""
opt_kernel_loc=""
opt_rootfs_loc=""
-while getopt "hm:k:t:r:T:" Option
+while getopt "hm:k:t:r:T:i:" Option
do
if [ ${Option} = m ]; then
opt_mode=${OPTARG}
@@ -18,6 +18,8 @@ elif [ ${Option} = r ]; then
opt_rootfs_loc=${OPTARG}
elif [ ${Option} = T ]; then
rootfs_type=${OPTARG}
+elif [ ${Option} = i ]; then
+ ip=${OPTARG}
else
. /env/bin/boot_help
exit 0
diff --git a/defaultenv/bin/boot_help b/defaultenv/bin/boot_help
index 41b5353..8e00977 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] [-r <rootfs location>] [-T <rootfs type>]"
+echo "usage: boot [-m <mode>] [-k <kernel location>] [-t <kernel image type] [-r <rootfs location>] [-T <rootfs type>] [-i <ip mode>]"
echo "boot."
echo ""
echo "options"
@@ -15,6 +15,7 @@ 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 " -i ip mode dhcp, none, static"
echo ""
echo ""
echo "default is"
--
1.7.4.1
More information about the barebox
mailing list