Enable PCI GW-USMicroN on Linux and Android
先到Ralink網站下載linux driver and firmware, chip是rt3070USBCompile - Linux (x86)
http://www.ralinktech.com.tw/support.php?s=2
$ cd driver_folderCompile - Android (omap35xx)
$ make
$ cd driver_folderCopy firmware to special path
$ vi Makefile
PLATFORM=ARM
ifeq ($(PLATFORM),ARM)
LINUX_SRC = /home/vanix/embinux_android_on_beagle_0708/kernel
CROSS_COMPILE = /home/vanix/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-
endif
$ vi os/linux/config.mk
ifeq ($(PLATFORM), ARM)
EXTRA_CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fwrapv -DMODULE $(WFLAGS)
export EXTRA_CFLAGS
endif
$ vi os/linux/usb_device.xxx
把device id加進去,可用lsusb查詢
$ cp RT2870STA.dat /etc/Wireless/RT2870STA/
Insert module
$ insmod driver_folder/os/linux/rt3070sta.ko
請問Compile - Android (omap35xx)指的是修改從Ralink所下載的檔案嗎?謝謝
回覆刪除請問Compile - Android (omap35xx)是指直接在CPU上make嗎?謝謝
回覆刪除不好意思,因為是個人筆記所以寫得很概略
回覆刪除"Compile - Android (omap35xx)" 是指用cross-compiler將driver編成給ARM用的module
另外是從Ralink下載的原始碼沒錯
感謝你的回應。所以我如果是要在Devkit8000上(TI OMAP3530 CPU) run,我的PLATFORM就要設成ARM,即使我是在PC上compile的,是嗎?謝謝
回覆刪除是。
回覆刪除你需要cross-compile toolchain, 我是使用codesourcery的toolchain
不好意思,我make完的結果如下,不知是有那裡做錯了呢?謝謝
回覆刪除root@ubuntu:~/project5/android/RT3070# make
make -C tools
make[1]: Entering directory `/root/project5/android/RT3070/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/root/project5/android/RT3070/tools'
/root/project5/android/RT3070/tools/bin2h
cp -f os/linux/Makefile.6 /root/project5/android/RT3070/os/linux/Makefile
make -C SUBDIRS=/root/project5/android/RT3070/os/linux modules
make: *** SUBDIRS=/root/project5/android/RT3070/os/linux: No such file or directory. Stop.
make: *** [LINUX] Error 2
再附上我的設定如下,謝謝
回覆刪除ifeq ($(PLATFORM),ARM)
LINUX_SRC = /root/project5/android/kernel
CROSS_COMPILE = /root/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc
#CROSS_COMPILE = /lib/modules/2.6.32-24-generic/build
endif
kernel是來自哪裡?
回覆刪除以下是我取得Linux kernel的方式
回覆刪除$ git clone git://gitorious.org/0xlab-kernel/kernel.git
$ cd kernel
$ git checkout -b kernel_omap3 origin/omap3-2.6.32
請問下列檔案的設定是根據什麼文件或檔案呢?謝謝
回覆刪除$ vi os/linux/config.mk
ifeq ($(PLATFORM), ARM)
EXTRA_CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fwrapv -DMODULE $(WFLAGS)
export EXTRA_CFLAGS
endif
CROSS_COMPILE = /home/vanix/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-
回覆刪除去掉gcc試試
感謝回應,去掉gcc後,的確是可以但還是有新的問題如下
回覆刪除root@ubuntu:~/project5/android/RT3070_# make
make -C tools
make[1]: Entering directory `/root/project5/android/RT3070_/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/root/project5/android/RT3070_/tools'
/root/project5/android/RT3070_/tools/bin2h
cp -f os/linux/Makefile.6 /root/project5/android/RT3070_/os/linux/Makefile
make -C /root/project5/android/kernel SUBDIRS=/root/project5/android/RT3070_/os/linux modules
make[1]: Entering directory `/root/project5/android/kernel'
CC [M] /root/project5/android/RT3070_/os/linux/../../common/crypt_md5.o
cc1: error: unrecognized command line option "-m64"
cc1: error: unrecognized command line option "-mno-red-zone"
cc1: error: unrecognized command line option "-mcmodel=kernel"
cc1: error: unrecognized command line option "-maccumulate-outgoing-args"
make[2]: *** [/root/project5/android/RT3070_/os/linux/../../common/crypt_md5.o] Error 1
make[1]: *** [_module_/root/project5/android/RT3070_/os/linux] Error 2
make[1]: Leaving directory `/root/project5/android/kernel'
make: *** [LINUX] Error 2
EXTRA_CFLAGS的參數要弄清楚再用
回覆刪除你的error message有提到錯誤問題了
EXTRA_CFLAGS := -D__KERNEL__ $(WFLAGS) -I$(RT28xx_DIR)/include
回覆刪除先把CFLAGS改掉試試
請問你的platform 是Beagle board 還是 Devkit8000?
回覆刪除gumstix overo~
回覆刪除