From 4d43f79dd5d884cf3b89ac33b790454bbc97db9a Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 17 Apr 2013 11:42:01 +0200 Subject: [PATCH] defaultenv-2: net: use oftree when existing 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 --- 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 90c25aa14..05bb728fa 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"