[PATCH 1/1] defaultenv: add oftree file support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sun Apr 15 09:15:41 EDT 2012


This will allow to use a file in the env as oftree.

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

diff --git a/defaultenv/bin/_boot_help b/defaultenv/bin/_boot_help
index a07e4e0..c610a9c 100644
--- a/defaultenv/bin/_boot_help
+++ b/defaultenv/bin/_boot_help
@@ -4,7 +4,7 @@ echo "boot: boot [-m <mode>] [-k <kernel_option>] [-r <rootfs_option>] [-i <ip_m
 echo ""
 echo "options"
 echo " - kernel        nand, nor, nfs, tftp, disk"
-echo " - oftree        nand, nor, nfs, tftp, disk or empty"
+echo " - oftree        nand, nor, nfs, tftp, disk, file or empty"
 echo " - rootfs        nand, nor, net, disk"
 echo " - ip            dhcp, dhcp-barebox none, empty"
 echo ""
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 61b893a..a497edf 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -128,6 +128,8 @@ elif [ x$oftree_loc = xnand ]; then
 	odev="/dev/nand0.oftree.bb"
 elif [ x$oftree_loc = xdisk ]; then
 	odev="/dev/$oftree_part"
+elif [ x$oftree_loc = xfile ]; then
+	odev=$oftreeimage
 fi
 
 [ x$odev = x ] || bootm_opt="$bootm_opt -o $odev"
-- 
1.7.9.1




More information about the barebox mailing list