diff options
Diffstat (limited to 'main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch')
-rw-r--r-- | main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch b/main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch index 9534101692..ccd4f25ffa 100644 --- a/main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch +++ b/main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch @@ -1,7 +1,7 @@ -From 62748c093b0fcf79880b330eea82c84e64daae59 Mon Sep 17 00:00:00 2001 +From 0445b9734e02856a66cc7925a6816f26fedc822d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> Date: Sun, 25 Oct 2015 22:21:41 +0200 -Subject: [PATCH 07/15] depmod: support generating kmod binary index files +Subject: [PATCH 07/12] depmod: support generating kmod binary index files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -16,17 +16,17 @@ the code size a little bit. Signed-off-by: Timo Teräs <timo.teras@iki.fi> --- modutils/Config.src | 10 ++ - modutils/depmod.c | 279 ++++++++++++++++++++++++++++++++++++++++++---------- + modutils/depmod.c | 281 ++++++++++++++++++++++++++++++++++++++++++---------- modutils/modprobe.c | 15 --- modutils/modutils.c | 27 ++++- modutils/modutils.h | 15 +++ - 5 files changed, 280 insertions(+), 66 deletions(-) + 5 files changed, 281 insertions(+), 67 deletions(-) diff --git a/modutils/Config.src b/modutils/Config.src -index 0b11832..09db515 100644 +index 4227f356a..6680044fc 100644 --- a/modutils/Config.src +++ b/modutils/Config.src -@@ -229,6 +229,16 @@ config FEATURE_MODUTILS_ALIAS +@@ -118,6 +118,16 @@ config FEATURE_MODUTILS_ALIAS Say Y if unsure. @@ -44,7 +44,7 @@ index 0b11832..09db515 100644 bool "Support for module.symbols file" default y diff --git a/modutils/depmod.c b/modutils/depmod.c -index e5f0e3d..b73c1e5 100644 +index b9347027e..e3cea18c1 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c @@ -2,7 +2,7 @@ @@ -56,7 +56,7 @@ index e5f0e3d..b73c1e5 100644 * Copyright (c) 2008 Vladimir Dronnikov * * Licensed under GPLv2 or later, see file LICENSE in this source tree. -@@ -14,6 +14,24 @@ +@@ -25,6 +25,24 @@ #include "modutils.h" #include <sys/utsname.h> /* uname() */ @@ -81,7 +81,7 @@ index e5f0e3d..b73c1e5 100644 /* * Theory of operation: * - iterate over all modules and record their full path -@@ -41,18 +59,12 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA +@@ -52,18 +70,12 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA for (ptr = image; ptr < image + len - 10; ptr++) { if (is_prefixed_with(ptr, "depends=")) { @@ -102,7 +102,7 @@ index e5f0e3d..b73c1e5 100644 } else if (ENABLE_FEATURE_MODUTILS_SYMBOLS && is_prefixed_with(ptr, "__ksymtab_") ) { -@@ -62,9 +74,10 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA +@@ -73,9 +85,10 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA ) { continue; } @@ -116,7 +116,7 @@ index e5f0e3d..b73c1e5 100644 } free(image); -@@ -96,12 +109,6 @@ static void order_dep_list(module_db *modules, module_entry *start, llist_t *add +@@ -107,12 +120,6 @@ static void order_dep_list(module_db *modules, module_entry *start, llist_t *add } } @@ -129,7 +129,7 @@ index e5f0e3d..b73c1e5 100644 //usage:#if !ENABLE_MODPROBE_SMALL //usage:#define depmod_trivial_usage "[-n] [-b BASE] [VERSION] [MODFILES]..." //usage:#define depmod_full_usage "\n\n" -@@ -155,6 +162,169 @@ enum { +@@ -166,6 +173,169 @@ enum { OPT_C = (1 << 9), /* -C,--config etc_modules_conf: ignored */ }; @@ -299,7 +299,7 @@ index e5f0e3d..b73c1e5 100644 int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int depmod_main(int argc UNUSED_PARAM, char **argv) { -@@ -166,6 +336,8 @@ int depmod_main(int argc UNUSED_PARAM, char **argv) +@@ -177,6 +347,8 @@ int depmod_main(int argc UNUSED_PARAM, char **argv) unsigned i; int tmp; @@ -308,7 +308,7 @@ index e5f0e3d..b73c1e5 100644 getopt32(argv, "aAb:eF:nruqC:", &moddir_base, NULL, NULL); argv += optind; -@@ -198,53 +370,60 @@ int depmod_main(int argc UNUSED_PARAM, char **argv) +@@ -209,53 +381,60 @@ int depmod_main(int argc UNUSED_PARAM, char **argv) } /* Generate dependency and alias files */ @@ -335,8 +335,7 @@ index e5f0e3d..b73c1e5 100644 - bb_putchar('\n'); + index_add(m->modname, buf, ""); } -+ index_dump(CONFIG_DEFAULT_DEPMOD_FILE, 1); - +- -#if ENABLE_FEATURE_MODUTILS_ALIAS - if (!(option_mask32 & OPT_n)) - xfreopen_write("modules.alias", stdout); @@ -351,6 +350,8 @@ index e5f0e3d..b73c1e5 100644 - printf("alias %s %s\n", - (char*)llist_pop(&m->aliases), - m->modname); ++ index_dump(CONFIG_DEFAULT_DEPMOD_FILE, 1); ++ + if (ENABLE_FEATURE_MODUTILS_ALIAS) { + index_init("modules.alias"); + moddb_foreach_module(&modules, m, i) { @@ -402,10 +403,10 @@ index e5f0e3d..b73c1e5 100644 if (ENABLE_FEATURE_CLEAN_UP) moddb_free(&modules); diff --git a/modutils/modprobe.c b/modutils/modprobe.c -index 8130c40..ec64477 100644 +index d404ef92f..72f449978 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c -@@ -167,21 +167,6 @@ struct globals { +@@ -189,21 +189,6 @@ struct globals { static int read_config(const char *path); @@ -428,10 +429,10 @@ index 8130c40..ec64477 100644 { return moddb_get_or_create(&G.db, module); diff --git a/modutils/modutils.c b/modutils/modutils.c -index 0a05673..8b6298b 100644 +index d36caaf68..aecfc2acb 100644 --- a/modutils/modutils.c +++ b/modutils/modutils.c -@@ -67,6 +67,21 @@ void FAST_FUNC moddb_free(module_db *db) +@@ -70,6 +70,21 @@ void FAST_FUNC moddb_free(module_db *db) } } @@ -453,7 +454,7 @@ index 0a05673..8b6298b 100644 void FAST_FUNC replace(char *s, char what, char with) { while (*s) { -@@ -78,7 +93,17 @@ void FAST_FUNC replace(char *s, char what, char with) +@@ -81,7 +96,17 @@ void FAST_FUNC replace(char *s, char what, char with) char* FAST_FUNC replace_underscores(char *s) { @@ -473,7 +474,7 @@ index 0a05673..8b6298b 100644 } diff --git a/modutils/modutils.h b/modutils/modutils.h -index 2cbd144..dd6f173 100644 +index 2cbd1448a..dd6f173f3 100644 --- a/modutils/modutils.h +++ b/modutils/modutils.h @@ -18,6 +18,20 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN @@ -506,5 +507,5 @@ index 2cbd144..dd6f173 100644 char *replace_underscores(char *s) FAST_FUNC; int string_to_llist(char *string, llist_t **llist, const char *delim) FAST_FUNC; -- -2.9.1 +2.11.0 |