Summary of setup of sam9x5 platform and rt3070 driver migration

Source: Internet
Author: User

........................................ ........................................ ............................

PC: Ubuntu 11.10

Linux Kerner: 2.6.39

........................................ ........................................ ............................

The rt3070 driver compilation process is not much said. If there is no problem with the modification and the kernel has been configured accordingly, many errors will still occur during compilation. In this case, we recommend that you find a new driver source code from the Internet for compilation. I tried to Compile two 3070 drivers of different versions. One can be compiled successfully, but the other cannot.

After the driver is compiled, download it to the board,

> [Root @ mcuzone/Home] # insmod rt3070sta. Ko
Rt3070sta: Unknown symbol _ bswapi2 (ERR 0)
Insmod: Can't insert 'rt3070sta. ko': Unknown symbol in module or invalid Parameter

The displayed _ bswapsi2. Because the Board kernel is built-in, consider whether the kernel does not add the corresponding thing, so compile the kernel on the PC, use the SAM-BA to burn the writing board, restart, appear:

Nand read: device 0 offset 0x200000, size 0x300000
Atmel_nand: multiple errors detected. Unable to correct.
Nand read from offset 200000 failed-1
88064 bytes read: Error
Wrong image format for bootm command
Error: Can't Get kernel image!
U-boot>

Read the development materials carefully and find that the manufacturer only recommends using the provided BAT burning mode. Then, connect to J-link and replace the kernel in the file with the compiled one, discover terminal print only

Roomboot

After several tests, I found a small detail and used the bat-based writing method. After the test, I had to close the board and pull out the J-link before restarting.

During this period, I made an NFS file system for ease of writing.

Ending DHCP requests .....
Eth0: link up (100/full)
., OK
IP-config: Got DHCP answer from 0.0.0.0, my address is 192.168.1.102
IP-config: complete:
Device = eth0, ADDR = 192.168.1.102, mask = 255.255.255.0, GW = 192.168.1.1,
Host = 192.168.1.102, domain =, Nis-domain = (none ),
Bootserver = 0.0.0.0, rootserver = 0.0.0.0, rootpath =, MTU = 576
VFS: cannot open root device "NFS" or unknown-block (0,255)
Please append a correct "root =" Boot option; here are the available partitions:
1f00 65536 mtdblock0 (driver ?)
1f01 196608 mtdblock1 (driver ?)
Kernel panic-not syncing: VFS: Unable to mount root FS on unknown-block (0,255)

[<C0036b10>] (unwind_backtrace + 0x0/0xe0) from [<c0358050>] (panic + 0x50/0x170)
[<C0358050>] (panic + 0x50/0x170) from [<c0008d20>] (mount_block_root + 0x234/0x284)

[<C0008d20>] (mount_block_root + 0x234/0x284) from [<c000902c>] (prepare_namespace
+ 0x164/0 x1b8)
[<C000902c>] (prepare_namespace + 0x164/0 x1b8) from [<c00089ac>] (kernel_init + 0x10
0/0x13c)
[<C00089ac>] (kernel_init + 0x100/0 x13c) from [<c0032b14>] (kernel_thread_exit + 0x0
/0x8)

Similar to the error message. After viewing the error message, we found that there was no mount. The mout format is as follows:

> Setenv bootargs mem = 128 M console = ttys0, 115200 root =/dev/nfs RW nfsroot = 192.168.1.108:/mcuzone/nfsroot/my_rootfs IP = DHCP

After the kernel is replaced, the driver can be loaded. After the kernel is tested, it is still printed-bswapsi2. This was due to the kernel. I searched the internet for relevant information and said it was a GCC bug. So I considered replacing GCC.

Decompress with arm-2007q1-10-arm-none-linux-gnueabi.tar.bz2, compile the driver with the new GCC, and then download it to the board.

> Rt3070sta: Version magic '2. 6.39 mod_unload armv5 p2v8 'should be '2. 6.39 mod_unload armv5'
> Insmod: Can't insert 'rt3070sta. ko': Invalid module format

When the kernel version does not match, it suddenly reminds me that uimage is compiled with GCC of version 2011. 03.-41, and the driver uses GCC of version 2007q1-10. Therefore, GCC of version 2007-q1-10 is used to compile the kernel and make install to compile the driver code. Note that the pre-and post-order cannot be changed. Otherwise, the kernel has been changed. The driver still uses the previously compiled kernel, and the driver will be loaded.

> Rt3070sta: Version magic '2. 6.39 mod_unload armv5 'should be '2. 6.39 mod_unload armv5 p2v8'

> Insmod: Can't insert 'rt3070sta. ko': Invalid module format

Now the driver can be loaded

[Root @ mcuzone/Home] # chmod 777 rt3070sta. Ko
[Root @ mcuzone/Home] # insmod rt3070sta. Ko
Rtusb init --->
Usbcore: registered new interface driver rt2870

Haha

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.