* In krogoth, the device trees are installed as symlinks to absolute
  paths within the filesystem.
* This breaks loading the device trees over NFS as the symlinks will
  not resolve on the NFS server.
* Therefore replace the ROOTFS_POSTPROCESS_COMMAND
  make_zimage_symlink_relative with a more general routine to make all
  symlinks in /boot relative.

Signed-off-by: Jacob Stiffler <j-stiff...@ti.com>
---
 meta-arago-distro/recipes-core/images/arago-image.inc | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/meta-arago-distro/recipes-core/images/arago-image.inc 
b/meta-arago-distro/recipes-core/images/arago-image.inc
index 7fb5726..af28cd0 100644
--- a/meta-arago-distro/recipes-core/images/arago-image.inc
+++ b/meta-arago-distro/recipes-core/images/arago-image.inc
@@ -21,6 +21,22 @@ export IMAGE_BASENAME = "arago-image"
 
 IMAGE_LINGUAS = ""
 
-ROOTFS_POSTPROCESS_COMMAND += "make_zimage_symlink_relative;"
+make_bootfiles_symlinks_relative() {
+    for f in "${IMAGE_ROOTFS}/boot"/*
+    do
+        [ -L "$f" ] || continue
+
+        l=$(readlink "$f")
+        if [ "${l:0:6}" == "/boot/" ]
+        then
+            ln -sf "${l##/boot/}" "$f"
+        elif ["${l:0:1}" == "/" ]
+        then
+            ln -sf "..$l" "$f"
+        fi
+    done
+}
+
+ROOTFS_POSTPROCESS_COMMAND += "make_bootfiles_symlinks_relative;"
 
 inherit core-image
-- 
2.7.4

_______________________________________________
meta-arago mailing list
meta-arago@arago-project.org
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to