blazewiczp DD-WRT Novice
Joined: 02 Jul 2015 Posts: 1
|
Posted: Thu Jul 02, 2015 12:44 Post subject: hw_cdc_driver, e3372 and AC68U |
|
Hi guys,
I am desperately trying to compile the huawei data driver (http://consumer.huawei.com/en/support/downloads/detail/index.htm?id=13971) under 3.10 kernel r27453 for my asus rt-ac68u device. The goal is to use the hw_cdc_driver to run huawei e3372 non-hilink stick. People from OpenWrt managed to compile and run it, so thought I would give it a try under dd-wrt.
I am sort of new to kernel compilation side of things, but managed to successfully compile it using mips architecture, but upon loading the module file with insmod hw_cdc_driver.ko I am getting Code: | insmod: cannot insert 'hw_cdc_driver.ko': invalid module format |
Something tells me that I should use ARCH=arm, but that unfortunately gives me lots of compilation problems (not sure which toolchain to use).
Long story short, I would greatly appreciate if someone could shed some light on the custom module compilation for the arm architecture. Or perhaps someone could be kind enough and compile it for the community
Thanks
#: uname -a Code: | Linux 3.10.81 #4339 SMP Wed Jun 24 07:45:40 CEST 2015 armv7l GNU/Linux
|
edit: just for the record this what I roughly did
Code: |
cd /opt
wget http://download1.dd-wrt.com/dd-wrtv2/downloads/toolchains/toolchains.tar.xz
tar -xvf toolchains.tar.xz
cd ~/dd-wrt
svn checkout svn://svn.dd-wrt.com/DD-WRT/src/linux/universal/linux-3.10 -r 27453
cd linux-3.10
cp .config_std .config
export PATH=$PATH:/opt/toolchain-mipsel_gcc4.1.2/bin
make modules ARCH=mips
|
I had to remove ralink wireless modules from KConfig file, but that's pretty much it. Other modules are compiled, but cannot insmod them on the router.
Tried make modules ARCH=arm as well, but after a ton of questions getting the following output:
Code: | CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mabi=apcs-gnu"
cc1: error: unrecognized command line option "-march=armv5t"
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
|
edit 2: Great success!!!
In case anyone is interested here is how I finally managed to compile the hw_cdc_driver though I am not 100% sure it is correct, but it least it works:
Code: |
cd /opt
wget http://download1.dd-wrt.com/dd-wrtv2/downloads/toolchains/toolchains.tar.xz
tar -xvf toolchains.tar.xz
cd ~/dd-wrt
svn checkout svn://svn.dd-wrt.com/DD-WRT/src/linux/universal/linux-3.10
cd linux-3.10
cp .config_northstar_smp .config
export PATH=$PATH:/opt/toolchain-arm_cortex-a9_gcc-4.8-linaro_musl-1.1.5_eabi/bin
make modules ARCH=arm
|
Copy hw_cdc_driver.ko to router and enjoy |
|