From 766a76838cb0588786f014582caa7e1768e4650d Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Thu, 20 Jan 2011 09:46:28 +0000 Subject: add get_firmware function --- kernel/modules.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) = @_; -- cgit v1.2.1