]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
Debian: Apply uboot size_hex_prefix workaround to XSM policy too
authorIan Campbell <ian.campbell@citrix.com>
Mon, 4 May 2015 08:18:54 +0000 (09:18 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 14 May 2015 10:56:19 +0000 (11:56 +0100)
Worksaround "Sorry, I could not convert "be700c>"" messages.

The big comment and code which determines $size_hex_prefix is moved
unchanged.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Debian.pm

index 7a4dd01488c0c739a4fffa2ce423bef09f234c62..2b44396d1cd3b1b78deb27fcf61b69ef93476220 100644 (file)
@@ -157,6 +157,22 @@ sub setupboot_uboot ($$$$) {
        my $kern = "vmlinuz-$want_kernver";
        my $initrd = "initrd.img-$want_kernver";
 
+       # According to u-boot policy $filesize is an unprefixed hex
+       # number, but fdt set requires numbers to be prefixed
+       # (e.g. with 0x for a hex number). See:
+       #
+       # http://lists.denx.de/pipermail/u-boot/2014-October/193622.html,
+       # http://lists.denx.de/pipermail/u-boot/2014-November/194150.html and
+       # http://lists.denx.de/pipermail/u-boot/2014-November/194150.html.
+       #
+       # However some older u-boot versions (e.g. on midway) erroneously
+       # include the 0x prefix when setting $filesize from ext*load
+       # commands, meaning we cannot simply unconditionally prepend
+       # the 0x. Base it on a host flag quirk.
+       my $size_hex_prefix =
+           $ho->{Flags}{'quirk-load-filesize-has-0x-prefix'} ?
+           '' : '0x';
+
        my $flask_commands = "";
        if ($want_xsm) {
            # Use the flaskpolicy from tools build job because we might
@@ -176,7 +192,7 @@ 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"
-fdt set /chosen/module\@2 reg <\\\${flask_policy_addr_r} \\\${filesize}>
+fdt set /chosen/module\@2 reg <\\\${flask_policy_addr_r} ${size_hex_prefix}\\\${filesize}>
 echo Loaded $flaskpolicy to \\\${flask_policy_addr_r} (\\\${filesize})
 
 END
@@ -213,22 +229,6 @@ END
        my $set_xen_addr_r =
            $xen_addr_r ? "setenv xen_addr_r $xen_addr_r" : "";
 
-       # According to u-boot policy $filesize is an unprefixed hex
-       # number, but fdt set requires numbers to be prefixed
-       # (e.g. with 0x for a hex number). See:
-       #
-       # http://lists.denx.de/pipermail/u-boot/2014-October/193622.html,
-       # http://lists.denx.de/pipermail/u-boot/2014-November/194150.html and
-       # http://lists.denx.de/pipermail/u-boot/2014-November/194150.html.
-       #
-       # However some older u-boot versions (e.g. on midway) erroneously
-       # include the 0x prefix when setting $filesize from ext*load
-       # commands, meaning we cannot simply unconditionally prepend
-       # the 0x. Base it on a host flag quirk.
-       my $size_hex_prefix =
-           $ho->{Flags}{'quirk-load-filesize-has-0x-prefix'} ?
-           '' : '0x';
-
        target_cmd_root($ho, <<END);
 if test ! -f /boot/$kern ; then
     exit 1