diff options
author | Antoine Ginies <aginies@mandriva.com> | 2011-01-20 09:46:28 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2011-01-20 09:46:28 +0000 |
commit | 766a76838cb0588786f014582caa7e1768e4650d (patch) | |
tree | 1a6f07f8bedd0af201ef9191b2fb687f290c41ae | |
parent | 05a66f00e8fe396900d5c15c57d7f4d27410becd (diff) | |
download | drakx-backup-do-not-use-766a76838cb0588786f014582caa7e1768e4650d.tar drakx-backup-do-not-use-766a76838cb0588786f014582caa7e1768e4650d.tar.gz drakx-backup-do-not-use-766a76838cb0588786f014582caa7e1768e4650d.tar.bz2 drakx-backup-do-not-use-766a76838cb0588786f014582caa7e1768e4650d.tar.xz drakx-backup-do-not-use-766a76838cb0588786f014582caa7e1768e4650d.zip |
add get_firmware function
-rw-r--r-- | kernel/modules.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/modules.pl b/kernel/modules.pl index 6fd0fd07d..2f4f4557e 100644 --- a/kernel/modules.pl +++ b/kernel/modules.pl @@ -41,6 +41,18 @@ sub modules() { @nls_modules, map { category2modules($_) } split(' ', $images_cat); } +sub get_firmwares() { + my ($kern_ver) = @_; + + foreach (all("all.kernels/$kern_ver/modules")) { + foreach(`/sbin/modinfo -Ffirmware "all.kernels/$kern_ver/modules/$_"`) { + mkdir_p(dirname("all.kernels/$kern_ver/firmware/$_")); + eval { cp_af("/lib/firmware/$_", "all.kernels/$kern_ver/firmware/$_"); }; + } + } +} + + sub remove_unneeded_modules { my ($kern_ver) = @_; |