[PATCH 11/13] defaultenv: use /env/oftree if it exists

Jan Luebbe jlu at pengutronix.de
Mon Aug 20 10:20:26 EDT 2012


Signed-off-by: Jan Luebbe <jlu at pengutronix.de>
---
 defaultenv/bin/boot |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index cc72af5..bf6ec76 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -135,8 +135,10 @@ else
 	exit 1
 fi
 
-if [ x$oftree_loc = xnfs -o x$oftree_loc = xtftp ]; then
-	odev=/oftree
+if [ -e /env/oftree ]; then
+	odev="/env/oftree"
+elif [ x$oftree_loc = xnfs -o x$oftree_loc = xtftp ]; then
+	odev="/oftree"
 	$oftree_loc $oftreeimage $odev || exit 1
 elif [ x$oftree_loc = xnor ]; then
 	odev="/dev/nor0.oftree"
-- 
1.7.10.4




More information about the barebox mailing list