fix broadcom-wl patchtable

SVN-Revision: 4247
This commit is contained in:
Felix Fietkau 2006-07-24 07:10:13 +00:00
parent 07eaf1e1b1
commit c6a54e2f10
3 changed files with 7 additions and 13 deletions

View File

@ -96,7 +96,7 @@ define wl_template
install -d -m0755 $(1)/etc/modules.d install -d -m0755 $(1)/etc/modules.d
echo "wl$(2)" > $(1)/etc/modules.d/20-wl$(2) echo "wl$(2)" > $(1)/etc/modules.d/20-wl$(2)
install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
install -m0644 $(PKG_BUILD_DIR)/kmod/wl$(2).o $(1)/lib/modules/$(LINUX_VERSION)/ install -m0644 $(PKG_BUILD_DIR)/kmod/wl$(2).o $(PKG_BUILD_DIR)/kmod/wl$(2).o.patch $(1)/lib/modules/$(LINUX_VERSION)/
endef endef
define Package/kmod-brcm-wl/install define Package/kmod-brcm-wl/install

View File

@ -13,7 +13,7 @@
EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER EXTRA_CFLAGS += -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCMDRIVER
O_TARGET := wl_link$(MOD_NAME).o O_TARGET := wl$(MOD_NAME).o
obj-y := wl_mod$(MOD_NAME).o obj-y := wl_mod$(MOD_NAME).o
obj-y += bcmutils.o hnddma.o linux_osl.o obj-y += bcmutils.o hnddma.o linux_osl.o
@ -23,10 +23,9 @@ obj-m := $(O_TARGET)
wl_mod$(MOD_NAME).o: wl_apsta$(MOD_NAME).o wl_mod$(MOD_NAME).o: wl_apsta$(MOD_NAME).o
sed -e 's,eth%d,wl%d\x00,g' < $< > $@ sed -e 's,eth%d,wl%d\x00,g' < $< > $@
wl$(MOD_NAME).o: wl_link$(MOD_NAME).o wl$(MOD_NAME).o.patch: wl$(MOD_NAME).o
$(OBJDUMP) -d $< | perl patchtable.pl > patchtable.bin $(OBJDUMP) -d $< | perl patchtable.pl > $@
cat wl_link$(MOD_NAME).o patchtable.bin > $@
modules: wl$(MOD_NAME).o modules: wl$(MOD_NAME).o.patch
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make

View File

@ -128,7 +128,7 @@ static int ptable_init(void)
if (ptable[0] == PTABLE_MAGIC) if (ptable[0] == PTABLE_MAGIC)
return 0; return 0;
glob("/lib/modules/2.4.*/wl.o", 0, NULL, &globbuf); glob("/lib/modules/2.4.*/wl.o.patch", 0, NULL, &globbuf);
if (globbuf.gl_pathv[0] == NULL) if (globbuf.gl_pathv[0] == NULL)
return -1; return -1;
@ -139,13 +139,8 @@ static int ptable_init(void)
if (fstat(fd, &statbuf) < 0) if (fstat(fd, &statbuf) < 0)
goto failed; goto failed;
if (statbuf.st_size <= 512) if (statbuf.st_size < 512)
goto failed; goto failed;
if (lseek(fd, statbuf.st_size - 512, SEEK_SET) < 0) {
perror("lseek");
goto failed;
}
if (read(fd, ptable, 512) < 512) if (read(fd, ptable, 512) < 512)
goto failed; goto failed;