Hi Guys,
I try to add new kmod packege to buildroot but the package creation does not work.
I read the next documents: 1, 2, 3.
I can compile the module wiht the next command:
make module KERNDIR=/usr/src/whiterussian/openwrt/build_mipsel/linux-2.4-brcm/linux-2.4.30 \
PATCHLEVEL=4 \
CC=/usr/src/whiterussian/openwrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc \
LD=/usr/src/whiterussian/openwrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-ld
If I copy the rt2570.o to the router and load with insmod then the device works fine.
I created an rt2570 directory in openwrt/target/linux/package directory.
I made a Make file:
include $(TOPDIR)/rules.mk
PKG_NAME:=rt2570
PKG_VERSION:=1.1.0-b2
PKG_RELEASE:=1
PKG_MD5SUM:=f4131d670920a878b4d4a0f5d4d8b93a
PKG_SOURCE_URL:=@SF/rt2400
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,KMOD_RT2570,kmod-rt2570,$(LINUX_VERSION)$(BOARD)+$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH),kern
el ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR)/Module \
PATCHLEVEL=4 \
KERNDIR="$(KERNEL_DIR)" \
LD="$(KERNEL_CROSS)ld" \
CC="$(KERNEL_CROSS)gcc"
touch $@
$(IPKG_KMOD_RT2570):
mkdir -p $(IDIR_KMOD_RT2570)/lib/modules/$(LINUX_VERSION)
cp -fpR $(PKG_BUILD_DIR)/Module/rt2570.o \
$(IDIR_KMOD_RT2570)/lib/modules/$(LINUX_VERSION)/
$(IPKG_BUILD) $(IDIR_KMOD_RT2570) $(PACKAGE_DIR)
and a Config.in:
config BR2_PACKAGE_KMOD_RT2570
prompt "kmod-rt2570 - RaLink 2570 Wifi driver"
tristate
default m
help
Driver for RaLink 2570 802.11g USB Chipset
Afterthat I added the necessary lines to the openwrt/target/linux/package/Makefile and openwrt/target/linux/package/Config.in
part of Makefile:
package-$(BR2_PACKAGE_KMOD_MADWIFI) += madwifi
package-$(BR2_PACKAGE_KMOD_MINI_FO) += mini_fo
package-$(BR2_PACKAGE_KMOD_RT2570) += rt2570
package-y += openwrt
package-$(BR2_PACKAGE_KMOD_WLCOMPAT) += wlcompat
wlcompat-compile: openwrt-compile
all: compile install
part of Config.in
source "target/linux/package/wlcompat/Config.in"
source "target/linux/package/madwifi/Config.in"
source "target/linux/package/mini_fo/Config.in"
source "target/linux/package/fuse/Config.in"
source "target/linux/package/shfs/Config.in"
source "target/linux/package/nozomi/Config.in"
source "target/linux/package/switch/Config.in"
source "target/linux/package/openswan/Config.in"
source "target/linux/package/rt2570/Config.in"
If I use the make menuconfig command in the openwrt directory then the new package appears as
Kernel Configuration / Device Support ---> <M> kmod-rt2570 - RaLink 2570 Wifi driver .
I select that as module and save the new config. Afterthat I try to compile the firmware again, then in the output of make I do not find anything about the new package and it will be not created.
Why have not been compiled my new package? Are there any other files to edit?