[PATCH 3/5] defaultenv/boot: add boot the kernel from the mem

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sun Jan 15 05:00:19 EST 2012


as example uploaded via dfu

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

diff --git a/defaultenv/bin/_boot_help b/defaultenv/bin/_boot_help
index e7f7f16..660dbf4 100644
--- a/defaultenv/bin/_boot_help
+++ b/defaultenv/bin/_boot_help
@@ -3,7 +3,7 @@
 echo "boot: boot [-m <mode>] [-k <kernel_option>] [-r <rootfs_option>] [-i <ip_mode>]"
 echo ""
 echo "options"
-echo " - kernel        nand, nor, nfs, tftp, disk"
+echo " - kernel        nand, nor, nfs, tftp, disk, mem"
 echo " - rootfs        nand, nor, net, disk"
 echo " - ip            dhcp, none, empty"
 echo ""
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index d37eca8..538f506 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -94,6 +94,8 @@ if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
 	fi
 	kdev=/image
 	$kernel_loc $kernelimage $kdev || exit 1
+elif [ x$kernel_loc = xmem ]; then
+	kdev="/dev/ram0.kernel"
 elif [ x$kernel_loc = xnor ]; then
 	kdev="/dev/nor0.kernel"
 elif [ x$kernel_loc = xnand ]; then
@@ -101,7 +103,7 @@ elif [ x$kernel_loc = xnand ]; then
 elif [ x$kernel_loc = xdisk ]; then
 	kdev="/dev/$kernel_part"
 else
-	echo "error: set kernel_loc to one of 'tftp', 'nfs', 'nand', 'nor' or 'disk'"
+	echo "error: set kernel_loc to one of 'tftp', 'nfs', 'nand', 'nor' , 'mem' or 'disk'"
 	exit 1
 fi
 
-- 
1.7.7




More information about the barebox mailing list