Author: jsrain Date: Wed Nov 10 10:52:41 2010 New Revision: 62798 URL: http://svn.opensuse.org/viewcvs/yast?rev=62798&view=rev Log: add virtio drivers to initrd if needed (bnc#649755) Modified: branches/SuSE-SLE-10-SP4-Branch/packager/VERSION branches/SuSE-SLE-10-SP4-Branch/packager/package/yast2-packager.changes branches/SuSE-SLE-10-SP4-Branch/packager/src/clients/inst_kickoff.ycp Modified: branches/SuSE-SLE-10-SP4-Branch/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/packager/VERSION?rev=62798&r1=62797&r2=62798&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/packager/VERSION (original) +++ branches/SuSE-SLE-10-SP4-Branch/packager/VERSION Wed Nov 10 10:52:41 2010 @@ -1 +1 @@ -2.13.189 +2.13.190 Modified: branches/SuSE-SLE-10-SP4-Branch/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/packager/package/yast2-packager.changes?rev=62798&r1=62797&r2=62798&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/packager/package/yast2-packager.changes (original) +++ branches/SuSE-SLE-10-SP4-Branch/packager/package/yast2-packager.changes Wed Nov 10 10:52:41 2010 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Nov 10 10:50:57 CET 2010 - jsrain@suse.cz + +- add virtio drivers to initrd if needed (bnc#649755) +- 2.13.190 + +------------------------------------------------------------------- Tue Nov 9 13:50:17 CET 2010 - jsrain@suse.cz - detect HyperV according to lscpu (bnc#652305) Modified: branches/SuSE-SLE-10-SP4-Branch/packager/src/clients/inst_kickoff.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/packager/src/clients/inst_kickoff.ycp?rev=62798&r1=62797&r2=62798&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/packager/src/clients/inst_kickoff.ycp (original) +++ branches/SuSE-SLE-10-SP4-Branch/packager/src/clients/inst_kickoff.ycp Wed Nov 10 10:52:41 2010 @@ -80,6 +80,33 @@ } } +void AddVirtIOToInitrd() { + map<string, map<string, list<string> > > modules_db = $[ + "1af4" : $[ + "1000" : ["virtio-pci", "virtio-net"], + "1001" : ["virtio-pci", "virtio-blk"], + "1002" : ["virtio-pci", "virtio-balloon"], + "1003" : ["virtio-pci", "virtio-console"], + ], + ]; + + map out = (map)SCR::Execute (.target.bash_output, "LANG=C /sbin/lspci -mm -n"); + list<string> devices = splitstring (out["stdout"]:"", "\n"); + foreach (string d, devices, { + if (! regexpmatch (d, "^[0-9a-zA-Z.:]+[ \t]+\"[0-9a-fA-F]+\"[ \t]+\"[0-9a-fA-F]+\".*$")) { + continue; + } + string vendor = regexpsub (d, "^[0-9a-zA-Z.:]+[ \t]+\"([0-9a-fA-F]+)\"[ \t]+\"([0-9a-fA-F]+)\".*$", "\\2"); + string device = regexpsub (d, "^[0-9a-zA-Z.:]+[ \t]+\"([0-9a-fA-F]+)\"[ \t]+\"([0-9a-fA-F]+)\".*$", "\\1"); + foreach (string m, modules_db[vendor, device]:[], { + Initrd::AddModule (m, ""); + }); + }); +} + + + + /** * Write a fake mtab to the target system since some %post scripts might @@ -441,6 +468,7 @@ // add Xen and HyperV PV drivers to initrd XenPVToInitrd(); HyperVPVToInitrd(); + AddVirtIOToInitrd(); if (Stage::initial ()) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org