[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST] Debian: correct u-boot command to load flask policy

The use of the $flaskpolocy variable is escaped only once, meaning it
is interpreted by the shell on the test host, a context in which it
is not set (it is set in Perl, and it would be set in u-boot env by
the line above). The symptom was that the ext2load command got given
no file to load and so tries to load the default "pxelinux.0":

May 14 20:47:47.108243 ## Executing script at 43100000
May 14 20:47:47.111115 Loading dtbs/sun7i-a20-cubietruck.dtb
May 14 20:47:47.114489 22007 bytes read in 114 ms (188.5 KiB/s)
May 14 20:47:47.252237 820116 bytes read in 114 ms (6.9 MiB/s)
May 14 20:47:47.396931 Loaded xen-4.6-unstable to 0x41000000 (c8394)
May 14 20:47:47.400989 command line: [...]
May 14 20:47:47.413380 4963576 bytes read in 214 ms (22.1 MiB/s)
May 14 20:47:47.653005 Loaded vmlinuz-3.16.7-ckt4+ to 0x42000000 (4bbcf8)
May 14 20:47:47.657999 command line: [...]
May 14 20:47:47.671376 12501593 bytes read in 510 ms (23.4 MiB/s)
May 14 20:47:48.203299 Loaded initrd.img-3.16.7-ckt4+ to 0x43300000 (bec259)
May 14 20:47:48.208406 ** File not found pxelinux.0 **
May 14 20:47:48.294291 Loaded xenpolicy-4.6-unstable to 0x41200000 (bec259)

The filesize in the log message remains the same as the initrd because
nothing is actually loaded so the variable isn't updated.

Rather than adding additional backticks to quote it to be interpreted
by u-boot, remove the quoting so it is interpreted by Perl, making
the setting of the u-boot var (which in any case used the wrong
syntax) unnecessary. This matches what we do for the kernel etc too.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Wei Liu <Wei.Liu2@xxxxxxxxxx>
 Osstest/Debian.pm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 0d7cdab..4a1a961 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -184,8 +184,7 @@ sub setupboot_uboot ($$$$) {
            $flask_commands = <<END;
-ext2load scsi 0 \\\${flask_policy_addr_r} \$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"
 fdt set /chosen/module\@2 reg <\\\${flask_policy_addr_r} 

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.