set -e
set +e
if [ -n "$D" ]; then
    ln -sf vmlinux-6.6.111-yocto-standard $D/boot/vmlinux > /dev/null 2>&1
else
    ln -sf vmlinux-6.6.111-yocto-standard boot/vmlinux > /dev/null 2>&1
    if [ $? -ne 0 ]; then
        echo "Filesystem on boot/ doesn't support symlinks, falling back to copied image (vmlinux)."
        install -m 0644 boot/vmlinux-6.6.111-yocto-standard boot/vmlinux
    fi
fi
set -e
