Hey all,

I don't know if this helps, but I have been documenting the build of 
modules for the MT7601U and these are the steps I've taken.  They are 
unclear, unrefined, unorganized, and quite possibly unintelligible, but 
since this question seems to be asked a lot and hasn't been answered (I had 
to figure this out all my self ;-) I thought I would post my steps:

This assumes some unix environment with the essential build toolchain for 
cross compiling binaries from EABIHF

Follow this and compile a kernel : 

https://github.com/RobertCNelson/linux-dev/tree/am33x-v3.12


Then

 

# wget 
https://googledrive.com/host/0B_JlgOR4VNe0Sjg4ei0ySEY4aUE/DPA_MT7601U_LinuxSTA_3.0.0.3_20130717_LS.tar.bz2

# tar -xvjpf DPA_MT7601U_LinuxSTA_3.0.0.3_20130717_LS.tar.bz2

# cd DPA_MT7601U_LinuxSTA_3.0.0.3_20130717_LS


unfuck Makefile.inc

ifeq ($(PLATFORM),PC)

# Linux 2.6

LINUX_SRC = /home/coreyfro/build/linux-dev/KERNEL/

# Linux 2.4 Change to your local setting

#LINUX_SRC = /usr/src/linux-2.4

LINUX_SRC_MODULE = /home/coreyfro/build/linux-dev/KERNEL/drivers/

CROSS_COMPILE = arm-linux-gnueabihf-

ARCH=arm

export ARCH

export CROSS_COMPILE

endif

# export ARCH=arm && export CROSS_COMPILE=arm-linux-gnueabihf-

# ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make all -j6

# mkdir -p /media/coreyfro/rootfs/etc/Wireless/RT2870STA

# cp RT2870STA.dat /media/coreyfro/rootfs/etc/Wireless/RT2870STA

# cp MODULE/os/linux/mt7601Usta.ko 
/media/coreyfro/rootfs/lib/modules/$(uname -r)

# cp UTIL/os/linux/mtutil7601Usta.ko 
/media/coreyfro/rootfs/lib/modules/$(uname -r)

# cp NETIF/os/linux/mtnet7601Usta.ko 
/media/coreyfro/rootfs/lib/modules/$(uname -r)

# depmod -a

# echo mtnet7601Usta > /etc/modules

Edit uEnv.txt and add optargs=coherent_pool=1M 


On Tuesday, October 1, 2013 2:23:14 AM UTC-7, Leonardo Gabrielli wrote:
>
> Hello, just wanted to bump this topic. 
> I think this is of general use: how to compile modules for your beagle 
> against a specific kernel version without messing with the CFLAGS?
>
> On Thursday, September 26, 2013 12:31:29 PM UTC+2, Leonardo Gabrielli 
> wrote:
>>
>> Hello,
>> I've browsed the group looking for cross-compiling Ralink WIFI drivers 
>> for the BeagleBoard xM or other Beagle platforms, but couldn't find a good 
>> guide on this.
>>
>> I need to cross-compile the Ralink 5370 staging drivers 
>> (DPO_RT5572_LinuxSTA_2.6.1.3_20121022) from a Ubuntu host on a BBxM with 
>> custom Kernel (this: https://ccrma.stanford.edu/~eberdahl/Satellite/). 
>> I've been given the kernel sources (it's 3.2.30-x4) and I already succeeded 
>> in compiling a Realtek USB dongle kernel module (based on rtl8192cu). My 
>> toolchain is based on code sourcery arm-none-linux-gnueabi
>>
>> However, differently from the Realtek one, the Ralink package has a ugly 
>> makefile and thus:
>> 1- if I leave the CFLAGS to the default it will go for normal x86 compile 
>> and the arm gcc toolchain won't recognize x86 related flags (of course)
>> 2- If I attempt to change the CFLAGS, I get the following error:
>>
>> make[1]: Entering directory 
>> `/mnt/DATA/UNIVPM/TECHNICAL/beagleboard/SatelliteCCRMA/SatelliteCCRMA-Berdahl-Kernel-3.2.30-x14_img1.0.1'
>> scripts/Makefile.build:49: *** CFLAGS was changed in 
>> "/mnt/DATA/UNIVPM/TECHNICAL/beagleboard/ZZRALINK2012/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/Makefile".
>>  
>> Fix it to use ccflags-y. Stop.
>>
>>
>> I've gone through reading about ccflags-y on the kernel docs, but 
>> couldn't figure out how to apply this here, and on the other side, I can 
>> just guess what gcc flags are good to compile this driver on the beagle 
>> (e.g. march=armv7-a) but I'm not expert enough to guess them all right. It 
>> will take months to guess them ok.
>>
>> Some insight on this or past experience would be helpful.
>> Thanks, L
>>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to