The policy is not a symlink, so readlink will return nothing.
We cannot use readlink -f because that will return an absolute path
and we need a path relative to the filesystem root (in this case
/boot).
Keep flaskpolicy=$flaskpolicy as a shell variable rather than
unescaping the uses (so they are interpreted by Perl) to easy any
future changes.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
$flask_commands = <<END;
setenv flask_policy_addr_r 0x1200000
-flaskpolicy=`readlink /boot/$flaskpolicy`
+flaskpolicy=$flaskpolicy
ext2load scsi 0 \\\${flask_policy_addr_r} \$flaskpolicy
fdt mknod /chosen module\@2
fdt set /chosen/module\@2 compatible "xen,xsm-policy" "xen,multiboot-module"