Revision: 5335 http://ipcop.svn.sourceforge.net/ipcop/?rev=5335&view=rev Author: gespinasse Date: 2011-01-13 07:09:31 +0000 (Thu, 13 Jan 2011)
Log Message: ----------- Strip kernel modules on installation. This save a bit of space on installed modules and reduce mini-initramfs fro floppy boot Tested to give a bit smaller modules with --strip-unneeded that with INSTALL_MOD_STRIP=1 that translate to strip --strip-debug Add too 2 patches that could make isapnpn more pnp but we need an additional parsing to retrieve the event I don't know exactly what that parsing is yet. Modified Paths: -------------- ipcop/trunk/lfs/linux Added Paths: ----------- ipcop/trunk/src/patches/linux-2.6.32_isapnp1.patch ipcop/trunk/src/patches/linux-2.6.32_isapnp2.patch Modified: ipcop/trunk/lfs/linux =================================================================== --- ipcop/trunk/lfs/linux 2011-01-13 06:54:21 UTC (rev 5334) +++ ipcop/trunk/lfs/linux 2011-01-13 07:09:31 UTC (rev 5335) @@ -101,6 +101,10 @@ # Remove patch level in EXTRAVERSION and add our own versioning (wanpipe-3.5.11 does not support localversion). cd $(DIR_APP) && sed -i -e "s/EXTRAVERSION\ =.*/EXTRAVERSION\ =$(IPCOPKRELEASE)/" Makefile + # get working isapnp, not yet ready, need some others changes to retrieve the events + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)_isapnp1.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)_isapnp2.patch + cd $(DIR_APP) && sed -i -e 's/gettext//' scripts/kconfig/lkc.h # ATM Header fix @@ -129,7 +133,7 @@ cd $(DIR_APP) && cp -f System.map /boot/System.map-$(KVER) ln -sf vmlinuz-$(KVER) /boot/vmlinuz ln -sf System.map-$(KVER) /boot/System.map - cd $(DIR_APP) && make modules_install + cd $(DIR_APP) && make INSTALL_MOD_STRIP=--strip-unneeded modules_install endif ifeq "$(MACHINE)" "alpha" @@ -139,7 +143,7 @@ ln -sf vmlinuz-$(KVER) /boot/vmlinuz ln -sf System.map-$(KVER) /boot/System.map cd $(DIR_APP) && make -j $(PARALLELISM) modules - cd $(DIR_APP) && make modules_install + cd $(DIR_APP) && make INSTALL_MOD_STRIP=--strip-unneeded modules_install endif ifeq "$(MACHINE)" "ppc" @@ -150,7 +154,7 @@ cd $(DIR_APP) && cp -f System.map /boot/System.map-$(KVER) ln -sf vmlinuz-$(KVER) /boot/vmlinuz ln -sf System.map-$(KVER) /boot/System.map - cd $(DIR_APP) && make modules_install + cd $(DIR_APP) && make INSTALL_MOD_STRIP=--strip-unneeded modules_install endif ifeq "$(MACHINE)" "sparc" @@ -159,7 +163,7 @@ cd $(DIR_APP) && cp -f System.map /boot/System.map-$(KVER) ln -sf vmlinuz-$(KVER) /boot/vmlinuz ln -sf System.map-$(KVER) /boot/System.map - cd $(DIR_APP) && make CROSS_COMPILE=$(MACHINE_REAL)-linux-gnu- modules_install + cd $(DIR_APP) && make CROSS_COMPILE=$(MACHINE_REAL)-linux-gnu- INSTALL_MOD_STRIP=--strip-unneeded modules_install endif # remove symlinked pcmcia directory Added: ipcop/trunk/src/patches/linux-2.6.32_isapnp1.patch =================================================================== --- ipcop/trunk/src/patches/linux-2.6.32_isapnp1.patch (rev 0) +++ ipcop/trunk/src/patches/linux-2.6.32_isapnp1.patch 2011-01-13 07:09:31 UTC (rev 5335) @@ -0,0 +1,44 @@ +diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h +--- a/include/linux/isapnp.h ++++ b/include/linux/isapnp.h +@@ -43,10 +43,10 @@ + */ + + #ifdef __KERNEL__ ++#include <linux/mod_devicetable.h> + + #define DEVICE_COUNT_COMPATIBLE 4 + +-#define ISAPNP_ANY_ID 0xffff + #define ISAPNP_CARD_DEVS 8 + + #define ISAPNP_CARD_ID(_va, _vb, _vc, _device) \ +@@ -74,12 +74,6 @@ struct isapnp_card_id { + #define ISAPNP_DEVICE_SINGLE_END \ + .card_vendor = 0, .card_device = 0 + +-struct isapnp_device_id { +- unsigned short card_vendor, card_device; +- unsigned short vendor, function; +- unsigned long driver_data; /* data private to the driver */ +-}; +- + #if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE)) + + #define __ISAPNP__ +diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h +--- a/include/linux/mod_devicetable.h ++++ b/include/linux/mod_devicetable.h +@@ -474,4 +474,11 @@ struct platform_device_id { + __attribute__((aligned(sizeof(kernel_ulong_t)))); + }; + ++#define ISAPNP_ANY_ID 0xffff ++struct isapnp_device_id { ++ unsigned short card_vendor, card_device; ++ unsigned short vendor, function; ++ kernel_ulong_t driver_data; /* data private to the driver */ ++}; ++ + #endif /* LINUX_MOD_DEVICETABLE_H */ + Added: ipcop/trunk/src/patches/linux-2.6.32_isapnp2.patch =================================================================== --- ipcop/trunk/src/patches/linux-2.6.32_isapnp2.patch (rev 0) +++ ipcop/trunk/src/patches/linux-2.6.32_isapnp2.patch 2011-01-13 07:09:31 UTC (rev 5335) @@ -0,0 +1,47 @@ +--- linux-source-2.6.32-orig/scripts/mod/file2alias.c 2009-12-03 04:51:21.000000000 +0100 ++++ linux-source-2.6.32/scripts/mod/file2alias.c 2009-12-18 20:20:57.000000000 +0100 +@@ -727,6 +727,19 @@ static int do_platform_entry(const char + return 1; + } + ++/* looks like: "pnp:dD" */ ++static int do_isapnp_entry(const char *filename, ++ struct isapnp_device_id *id, char *alias) ++{ ++ sprintf(alias, "pnp:d%c%c%c%x%x%x%x*", ++ 'A' + ((id->vendor >> 2) & 0x3f) - 1, ++ 'A' + (((id->vendor & 3) << 3) | ((id->vendor >> 13) & 7)) - 1, ++ 'A' + ((id->vendor >> 8) & 0x1f) - 1, ++ (id->function >> 4) & 0x0f, id->function & 0x0f, ++ (id->function >> 12) & 0x0f, (id->function >> 8) & 0x0f); ++ return 1; ++} ++ + /* Ignore any prefix, eg. some architectures prepend _ */ + static inline int sym_is(const char *symbol, const char *name) + { +@@ -874,6 +887,10 @@ void handle_moddevtable(struct module *m + do_table(symval, sym->st_size, + sizeof(struct platform_device_id), "platform", + do_platform_entry, mod); ++ else if (sym_is(symname, "__mod_isapnp_device_table")) ++ do_table(symval, sym->st_size, ++ sizeof(struct isapnp_device_id), "isa", ++ do_isapnp_entry, mod); + free(zeros); + } + +--- linux-source-2.6.32-orig/drivers/isdn/hisax/hisax_fcpcipnp.c 2009-12-03 04:51:21.000000000 +0100 ++++ linux-source-2.6.32/drivers/isdn/hisax/hisax_fcpcipnp.c 2009-12-17 23:55:08.000000000 +0100 +@@ -74,9 +74,10 @@ static struct pnp_device_id fcpnp_ids[] + .id = "AVM0900", + .driver_data = (unsigned long) "Fritz!Card PnP", + }, ++ { .id = "" } + }; + +-MODULE_DEVICE_TABLE(isapnp, fcpnp_ids); ++MODULE_DEVICE_TABLE(pnp, fcpnp_ids); + #endif + + static int protocol = 2; /* EURO-ISDN Default */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn