arago-image: make all symlinks relative in /boot
PATCH 1/1 arago-image: make all symlinks relative in /boot
* 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 <[email protected]>
--- meta-arago-distro/recipes-core/images/arago-image.inc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
meta-arago-distro/recipes-core/images/arago-image.inc +17 -1
@@ -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
Signature · 1 line
2.7.4