[PATCH 2/2] defaultenv-2: net: use oftree when existing

Sascha Hauer s.hauer at pengutronix.de
Wed Apr 17 07:40:03 EDT 2013


For booting with devicetree we had to adjust /env/boot/net manually.
Instead, test if a devicetree exists and if yes, use it. This makes
for a better default.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 defaultenv-2/base/boot/net | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/defaultenv-2/base/boot/net b/defaultenv-2/base/boot/net
index 90c25aa..05bb728 100644
--- a/defaultenv-2/base/boot/net
+++ b/defaultenv-2/base/boot/net
@@ -8,7 +8,12 @@ fi
 path="/mnt/tftp"
 
 global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
-#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
+
+oftree="${path}/${global.user}-oftree-${global.hostname}"
+if [ -f "${oftree}" ]; then
+	global.bootm.oftree="$oftree"
+fi
+
 nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
 bootargs-ip
 global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
-- 
1.8.2.rc2




More information about the barebox mailing list