openwrt 给没有usb的机子加入usb支持

#./target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd.c

build_dir/linux-ar71xx_generic/linux-3.3.8/arch/mips/ath79/mach-tl-wr741nd.c
开头加入
#include “dev-usb.h”
找到函数
static void __init tl_wr741nd_setup(void)
里边加入
/* USB */
ath79_register_usb();

================================
build_dir/linux-ar71xx_generic/linux-3.3.8/arch/mips/ath79/Kconfig

config ATH79_MACH_TL_WR741ND
bool “TP-LINK TL-WR741ND support”
select SOC_AR724X
select ATH79_DEV_AP9X_PCI if PCI
select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80
select ATH79_DEV_USB

加入了这个”select ATH79_DEV_USB”

===================================
Compile it for the first time, with the modules/settings you want.
For mounting USB drives, select kernel kmod modules:
USB support: usb2, ohci, storage
Filesystems: ext4, ntfs, vfat
Native language support: cp437,cp852,iso-8859-1, utf8.

If you want R/W NTFS support, select:
Utilities/filesystems/ntfs-3g

Then go to build_dir/linux-ar71xx_generic/linux-3.3.8/arch/mips/ath79
Edit this files:

mach-tl-wr741nd-v4.c
add #include “dev-usb.h” at the top of the file
add ath79_register_usb(); before ath79_register_m25p80(&tl_wr741ndv4_flash_data)

Kconfig
add select ATH79_DEV_USB under “config ATH79_MACH_TL_WR741ND_V4”

Now, run make again. Now the USB will work.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注