From 8121e80db0ce7052daf1799b9e26407eca1dca28 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Fri, 15 Jul 2011 12:52:01 +0200 Subject: [PATCH] dom0: script for initrd regeneration (#7) --- dom0/aux-tools/regenerate_initramfs.sh | 17 +++++++++++++++++ rpm_spec/core-dom0.spec | 2 ++ 2 files changed, 19 insertions(+) create mode 100755 dom0/aux-tools/regenerate_initramfs.sh diff --git a/dom0/aux-tools/regenerate_initramfs.sh b/dom0/aux-tools/regenerate_initramfs.sh new file mode 100755 index 00000000..1458838b --- /dev/null +++ b/dom0/aux-tools/regenerate_initramfs.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +KERNEL_VER=$1 +if [ -z "$KERNEL_VER" ]; then + KERNEL_VER=`uname -r` +fi + +#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-$KERNEL_VER.img $KERNEL_VER diff --git a/rpm_spec/core-dom0.spec b/rpm_spec/core-dom0.spec index d93c3cba..e809551e 100644 --- a/rpm_spec/core-dom0.spec +++ b/rpm_spec/core-dom0.spec @@ -91,6 +91,7 @@ cp aux-tools/convert_dirtemplate2vm.sh $RPM_BUILD_ROOT/usr/lib/qubes cp aux-tools/create_apps_for_appvm.sh $RPM_BUILD_ROOT/usr/lib/qubes cp aux-tools/remove_appvm_appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes cp aux-tools/reset_vm_configs.py $RPM_BUILD_ROOT/usr/lib/qubes +cp aux-tools/regenerate_initramfs.sh $RPM_BUILD_ROOT/usr/lib/qubes cp aux-tools/sync_rpmdb_updatevm.sh $RPM_BUILD_ROOT/usr/lib/qubes/ cp qmemman/server.py $RPM_BUILD_ROOT/usr/lib/qubes/qmemman_daemon.py cp ../common/meminfo-writer $RPM_BUILD_ROOT/usr/lib/qubes/ @@ -300,6 +301,7 @@ fi /usr/lib/qubes/qmemman_daemon.py* /usr/lib/qubes/meminfo-writer /usr/lib/qubes/qfile-daemon-dvm* +/usr/lib/qubes/regenerate_initramfs.sh /usr/lib/qubes/sync_rpmdb_updatevm.sh /usr/lib/qubes/qubes-receive-updates %attr(4750,root,qubes) /usr/lib/qubes/qfile-dom0-unpacker