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

[Xen-devel] [PATCH OSSTEST v5 6/9] Debian.pm: load flask policy in uboot



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/Debian.pm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index cc6791e..eebd140 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -150,6 +150,24 @@ sub setupboot_uboot ($$$$) {
        my $kern = "vmlinuz-$want_kernver";
        my $initrd = "initrd.img-$want_kernver";
 
+       my $flask_commands = "";
+       if ($want_xsm) {
+           my $flaskpolicy = $r{flaskpolicy};
+           $flask_commands = <<END;
+
+setenv flask_policy_addr_r 0x1200000
+flaskpolicy=`readlink /boot/$flaskpolicy`
+ext2load scsi 0 \\\${flask_policy_addr_r} \$flaskpolicy
+fdt mknod /chosen module\@2
+fdt set /chosen/module\@2 compatible "xen,xsm-policy"
+fdt set /chosen/module\@2 reg <\\\${flask_policy_addr_r} \\\${filesize}>
+echo Loaded $flaskpolicy to \\\${flask_policy_addr_r} (\\\${filesize})
+
+END
+       }
+
+       my $root= target_guest_lv_name($ho,"root");
+
        logm("Xen options: $xenhopt");
 
        # Common kernel options
@@ -238,6 +256,8 @@ fdt set /chosen/module\@1 compatible "xen,linux-initrd" 
"xen,multiboot-module"
 fdt set /chosen/module\@1 reg <\\\${ramdisk_addr_r} 
${size_hex_prefix}\\\${filesize}>
 echo Loaded $initrd to \\\${ramdisk_addr_r} (\\\${filesize})
 
+${flask_commands}
+
 fdt print /chosen
 
 echo Booting \\\${xen_addr_r} - \\\${fdt_addr}
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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