[BusyBox] insmod on old kernels

Nicolas Ferre nicolas.ferre at fr.alcove.com
Wed Feb 21 14:28:32 UTC 2001


Hi,

Running uClinux on our ARM7TDMI target, we use the BusyBox insmod utility.
But, before the 2.4 port of uClinux is complete, we always use the 2.0 ;-)

I cannot compile modutils with the BB_FEATURE_OLD_MODULE_INTERFACE enabled any
more !

I also do not understand the Config.h last 5 lines...

This (little) patch seems to solve the problem...




--
Nicolas Ferre, Open Source Software Engineer : Nicolas.Ferre at fr.alcove.com
Alcove, liberating software                  : http://www.alcove.com
                                             : +33 1 49 22 68 00
-------------- next part --------------
diff -u /home/nico/travail/aplio/bb_make_patch/Config.h ./Config.h
--- /home/nico/travail/aplio/bb_make_patch/Config.h	Wed Feb 21 12:58:46 2001
+++ ./Config.h	Wed Feb 21 15:18:01 2001
@@ -396,7 +396,7 @@
 #endif
 //
 #if defined BB_INSMOD || defined BB_LSMOD
-#ifndef BB_FEATURE_NEW_MODULE_INTERFACE
+#ifndef BB_FEATURE_OLD_MODULE_INTERFACE
 #define BB_FEATURE_NEW_MODULE_INTERFACE
 #endif
 #endif
diff -u /home/nico/travail/aplio/bb_make_patch/utility.c ./utility.c
--- /home/nico/travail/aplio/bb_make_patch/utility.c	Wed Feb 21 12:58:56 2001
+++ ./utility.c	Wed Feb 21 14:23:53 2001
@@ -203,12 +203,14 @@
 #endif
 
 #if defined BB_INSMOD || defined BB_LSMOD
+#if defined BB_FEATURE_NEW_MODULE_INTERFACE
 #ifndef __NR_query_module
 static const int __NR_query_module = 167;
 #endif
 _syscall5(int, query_module, const char *, name, int, which,
 		void *, buf, size_t, bufsize, size_t*, ret);
 #endif
+#endif
 
 
 #if defined (BB_CP_MV) || defined (BB_DU)
@@ -1715,8 +1717,8 @@
 
 struct BB_applet *find_applet_by_name(const char *name)
 {
-	return bsearch(name, applets, NUM_APPLETS, sizeof(struct BB_applet),
-			applet_name_compare);
+	return (struct BB_applet *) bsearch(name, applets, NUM_APPLETS,
+			sizeof(struct BB_applet), applet_name_compare);
 }
 
 void run_applet_by_name(const char *name, int argc, char **argv)


More information about the busybox mailing list