Custom initramfs for dom0 (#7, #55)

New initramfs contains:
 - all modules needed for AESNI
 - pciback bounded to all network devices - to prevent loading real drivers in
   dom0
This commit is contained in:
Marek Marczykowski 2011-07-14 02:02:02 +02:00
parent 1fb715d099
commit e20f891181

View File

@ -307,9 +307,21 @@ do
done
%post
#Find all network devices
HIDE_PCI=`lspci -mm -n | grep '^[^ ]* "02'|awk '{ ORS="";print "(" $1 ")";}'`
echo "# This file is autogenerated by kernel post-install script" > /etc/modprobe.d/pciback.conf
echo "# DO NOT EDIT" >> /etc/modprobe.d/pciback.conf
echo "" >> /etc/modprobe.d/pciback.conf
echo "options pciback hide=$HIDE_PCI" >> /etc/modprobe.d/pciback.conf
dracut --force --add-drivers 'xts aesni-intel aes-x86_64 crc32c-intel fpu ghash-clmulni-intel salsa20-x86_64 twofish-x86_64 pciback' \
/boot/initramfs-%{kernelrelease}.img %{kernelrelease}
/sbin/new-kernel-pkg --package %{name}-%{kernelrelease}\
--mkinitrd --depmod --dracut\
--kernel-args="max_loop=255"\
--initrdfile=/boot/initramfs-%{kernelrelease}.img\
--depmod --kernel-args="max_loop=255 rdloaddriver=pciback"\
--multiboot=/boot/xen.gz --banner="Qubes"\
--make-default --install %{kernelrelease}
@ -327,6 +339,7 @@ fi
%files
%defattr(-, root, root)
%ghost /boot/initramfs-%{kernelrelease}.img
%ghost %attr(0644, root, root) /etc/modprobe.d/pciback.conf
/boot/System.map-%{kernelrelease}
/boot/config-%{kernelrelease}
/boot/symvers-%kernelrelease.gz