Embedded Projects Forum (Open-Source Hardware)

Discussion and support forum for http://www.embedded-projects.net/

You are not logged in.

Announcement

Please register at the forum. After the registration which takes just a minute you can post messages!
Um an diesem Forum teilnehmen zu können muss man sich zu erst registrieren! Das dauert max. 1 Minute, danach kann man sofort Nachrichten in das Forum schreiben!

#1 2009-10-16 09:10:37

jesperv
Member
Registered: 2009-04-28
Posts: 28

problem loading kernel module

I have build a new rootfs and kernel and have updated my ICnova Base.

#make menuconfig /* loaded the base.config */
#make

after the build finished i booted the icnova board and wget the jffs and updated the flash.

It runs fine and the kernel is updated but when i try to load a kernel module i get this error?

# modprobe spidev.ko
spidev: no symbol version for struct_module
modprobe: Failed to load module spidev: invalid module format.


What have i done wrong?

Offline

 

#2 2009-10-21 14:08:16

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

I get this error when linux boots. Don't know  if it has anything to do with my module loading problem.

<code>
WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x1c/0x2c()
sysfs: duplicate filename 'physmap-flash.0' can not be created
Modules linked in:
Call trace:
[<9001b756>] warn_slowpath+0x42/0x54
[<900ccd8c>] vsnprintf+0x25c/0x5de
[<900ccd8c>] vsnprintf+0x25c/0x5de
[<90016ab4>] dequeue_task+0x4e/0x56
[<90017ae2>] __dequeue_entity+0x22/0x24
[<90017af4>] set_next_entity+0x10/0x24
[<90017c9a>] pick_next_task_fair+0x56/0x5c
[<900c9470>] ida_get_new_above+0x1c/0x10c
[<90056a88>] ifind+0x8/0x3c
[<90072a56>] sysfs_ilookup_test+0x0/0xa
[<9000030c>] kernel_init+0x0/0x90
[<90056ada>] ilookup5+0x1e/0x24
[<90072f30>] sysfs_add_one+0x1c/0x2c
[<9000030c>] kernel_init+0x0/0x90
[<9007339a>] create_dir+0x32/0x5c
[<900733e6>] sysfs_create_dir+0x22/0x30
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900c9c28>] kobject_add_internal+0x90/0x140
[<900c9c36>] kobject_add_internal+0x9e/0x140
[<90008a58>] physmap_init+0x0/0x20
[<900c9d6c>] kobject_add_varg+0x20/0x2c
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900c9dcc>] kobject_add+0x30/0x3c
[<90008a58>] physmap_init+0x0/0x20
[<900eaca4>] device_add+0x64/0x38c
[<900c9932>] kobject_init_internal+0xe/0x30
[<9001bffc>] printk+0xc/0x10
[<900ed380>] platform_device_add+0xc0/0x110
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900ed41a>] platform_device_register+0xe/0x10
[<90008a58>] physmap_init+0x0/0x20
[<90008a70>] physmap_init+0x18/0x20
[<90008a58>] physmap_init+0x0/0x20
[<900122f2>] do_one_initcall+0x32/0x104
[<900100b4>] __early_initcall_end+0x288/0x30c
[<9000fe2c>] __early_initcall_end+0x0/0x30c
[<90008a58>] physmap_init+0x0/0x20
[<900364a8>] register_irq_proc+0x48/0x6c
[<900364f2>] init_irq_proc+0x26/0x48
[<90000352>] kernel_init+0x46/0x90
[<900100b4>] __early_initcall_end+0x288/0x30c
[<9000fe2c>] __early_initcall_end+0x0/0x30c
[<9001d9c4>] do_exit+0x0/0x460
[<9000030c>] kernel_init+0x0/0x90
[<9001d9c4>] do_exit+0x0/0x460

---[ end trace f72005bec19a0a81 ]---
kobject_add_internal failed for physmap-flash.0 with -EEXIST, don't try to register things with the same name in the same directory.
Call trace:
[<900ca05c>] kobject_rename+0xdc/0x11c
[<900c9c94>] kobject_add_internal+0xfc/0x140
[<900c9d6c>] kobject_add_varg+0x20/0x2c
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900c9dcc>] kobject_add+0x30/0x3c
[<90008a58>] physmap_init+0x0/0x20
[<900eaca4>] device_add+0x64/0x38c
[<900c9932>] kobject_init_internal+0xe/0x30
[<9001bffc>] printk+0xc/0x10
[<900ed380>] platform_device_add+0xc0/0x110
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900ed41a>] platform_device_register+0xe/0x10
[<90008a58>] physmap_init+0x0/0x20
[<90008a70>] physmap_init+0x18/0x20
[<90008a58>] physmap_init+0x0/0x20
[<900122f2>] do_one_initcall+0x32/0x104
[<900100b4>] __early_initcall_end+0x288/0x30c
[<9000fe2c>] __early_initcall_end+0x0/0x30c
[<90008a58>] physmap_init+0x0/0x20
[<900364a8>] register_irq_proc+0x48/0x6c
[<900364f2>] init_irq_proc+0x26/0x48
[<90000352>] kernel_init+0x46/0x90
[<900100b4>] __early_initcall_end+0x288/0x30c
[<9000fe2c>] __early_initcall_end+0x0/0x30c
[<9001d9c4>] do_exit+0x0/0x460
[<9000030c>] kernel_init+0x0/0x90
[<9001d9c4>] do_exit+0x0/0x460
</code>

Offline

 

#3 2009-10-28 08:42:41

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

Can no one help me?

Is my approach correct or do i need to use defconfig also?

Ps. I'm using ubuntu 8.04

Offline

 

#4 2009-10-30 14:19:25

in-circuit
Member
From: Dresden
Registered: 2008-04-01
Posts: 238
Website

Re: problem loading kernel module

How exaclty did you update your Rootfs? The best way is to do it while booting via NFS. Booting out of the flash and overwriting the filesystem has the risk of corruoting some data or the whole FS.

best regards

Offline

 

#5 2009-11-02 08:34:46

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

Thanks for replying.
I used the flashing from within linux method. I will try using the booting from NFS method and report back.

Offline

 

#6 2009-11-03 13:07:37

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

I flashed my grasshopper board with a JTAG Ice mk II and avr32program program -v -e -F bin -f cfi@0 -O 0x00030000 ICnova-rootfs.avr32.jffs2

but i get the same modprobe error and booting error message.

Offline

 

#7 2009-11-03 13:24:19

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

by the way i have used the buildroot that comes with the  Icnova.iso posted on this thread in the forum

http://forum.embedded-projects.net/viewtopic.php?id=688

because i've never got at CD with my board.

Offline

 

#8 2009-11-05 12:09:44

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

I have boot the kernel via nfs and the boot error is still present so it seems there's something wrong with the kernel i've built.

Offline

 

#9 2009-11-05 15:00:35

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

Here's the boot listning from a NFS boot:

U-Boot 2009.03-rc1 (Nov 04 2009 - 14:04:59)

U-Boot code: 00000000 -> 0000e3d0  data: 000141c8 -> 0001ab80
malloc: Using memory from 0x13fa5000 to 0x13fe5000
DMA: Using memory from 0x13fa1000 to 0x13fa5000
Flash:  8 MB at address 0x00000000
DRAM Configuration:
Bank #0: 10000000 64 MB
In:    serial
Out:   serial
Err:   serial
Net:   macb0
Press SPACE to abort autoboot in 3 seconds
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0x45e1)
Using macb0 device
File transfer via NFS from server 192.168.18.38; our IP address is 192.168.18.80
Filename '/var/lib/tftpboot/icnova/all/uImage'.
Load address: 0x10400000
Loading: #################################################################
     #################################################################
     #################################################################
     #################################################################
     #####
done
Bytes transferred = 1354713 (14abd9 hex)
ICnova> bootm
## Booting kernel from Legacy Image at 10400000 ...
   Image Name:   Linux-2.6.28.4
   Image Type:   AVR32 Linux Kernel Image (gzip compressed)
   Data Size:    1354649 Bytes =  1.3 MB
   Load Address: 10000000
   Entry Point:  90000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel at 90000000 (params at 13fa5008)...

Linux version 2.6.28.4 (jve@jve-laptop) (gcc version 4.2.2-atmel.1.1.3.avr32linux.1) #2 Wed Nov 4 15:53:50 CET 2009
CPU: AT32AP700x chip revision C
CPU: AP7 [01] core revision 0 (AVR32B arch revision 1)
CPU: MMU configuration: Shared TLB
CPU: features: dsp simd ocd perfctr java
CPU: Running at 140.000 MHz
Physical memory:
  10000000-13ffffff
Reserved memory:
  10000000-10188efd: Kernel code
  10188efe-1023ed4f: Kernel data
Exception vectors start at 90011000
CPU: Paging enabled
Node 0: start_pfn = 0x10000, low = 0x14000
Node 0: mem_map starts at 90241000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: nfsroot=192.168.18.38:/var/lib/tftpboot/icnova/all/test/ ip=192.168.18.80:192.168.18.38::255.255.255.0::eth0:none
PID hash table entries: 256 (order: 8, 1024 bytes)
avr32_comparator: irq 0, 140.000 MHz
Console: colour dummy device 80x25
console [tty0] enabled
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 62596k/62664k available (1503k kernel code, 2872k reserved, 142k data, 68k init)
Calibrating delay using timer specific routine.. 282.70 BogoMIPS (lpj=469933)
Mount-cache hash table entries: 512
net_namespace: 716 bytes
smc smc.0: Atmel Static Memory Controller at 0xfff03400
NET: Registered protocol family 16
pdc pdc.0: Atmel Peripheral DMA Controller enabled
at32_eic at32_eic.0: External Interrupt Controller at 0xfff00100, IRQ 19
at32_eic at32_eic.0: Handling 4 external IRQs, starting with IRQ 64
AVR32 AP Power Management enabled
ICnova: 9 Leds
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
audit: initializing netlink socket (disabled)
type=2000 audit(1167609600.355:1): initialized
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 122
alg: hash: Chunking test 1 failed for md5-generic
00000000: 24 e5 f6 e1 36 2e 67 bb a6 f6 2f 5f 81 ff bb a4
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler cfq registered (default)
atmel_usart.0: ttyS0 at MMIO 0xffe01000 (irq = 7) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xffe00c00 (irq = 6) is a ATMEL_SERIAL
eth0 (macb): not using net_device_ops yet
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfff01800 irq 25 (00:1f:e5:00:09:14)
eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=0:00, irq=67)
physmap platform flash device: 00800000 at 00000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0041
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00020000 : "u-boot"
0x00020000-0x00030000 : "env"
0x00030000-0x00800000 : "root"
------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x1c/0x2c()
sysfs: duplicate filename 'physmap-flash.0' can not be created
Modules linked in:
Call trace:
[<9001b756>] warn_slowpath+0x42/0x54
[<9003a562>] __free_pages+0x22/0x24
[<9001a12a>] free_task+0x1e/0x24
[<9001b33c>] __put_task_struct+0x72/0x76
[<9001c8da>] delayed_put_task_struct+0x1e/0x20
[<90036800>] __rcu_process_callbacks+0xa0/0x168
[<900368da>] rcu_process_callbacks+0x12/0x20
[<900c9470>] ida_get_new_above+0x1c/0x10c
[<90056a88>] ifind+0x8/0x3c
[<90072a56>] sysfs_ilookup_test+0x0/0xa
[<9000030c>] kernel_init+0x0/0x90
[<90056ada>] ilookup5+0x1e/0x24
[<90072f30>] sysfs_add_one+0x1c/0x2c
[<9000030c>] kernel_init+0x0/0x90
[<9007339a>] create_dir+0x32/0x5c
[<900733e6>] sysfs_create_dir+0x22/0x30
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900c9c28>] kobject_add_internal+0x90/0x140
[<900c9c36>] kobject_add_internal+0x9e/0x140
[<90008a58>] physmap_init+0x0/0x20
[<900c9d6c>] kobject_add_varg+0x20/0x2c
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900c9dcc>] kobject_add+0x30/0x3c
[<90008a58>] physmap_init+0x0/0x20
[<900eaca4>] device_add+0x64/0x38c
[<900c9932>] kobject_init_internal+0xe/0x30
[<9001bffc>] printk+0xc/0x10
[<900ed380>] platform_device_add+0xc0/0x110
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900ed41a>] platform_device_register+0xe/0x10
[<90008a58>] physmap_init+0x0/0x20
[<90008a70>] physmap_init+0x18/0x20
[<90008a58>] physmap_init+0x0/0x20
[<900122f2>] do_one_initcall+0x32/0x104
[<90010574>] __early_initcall_end+0x288/0x310
[<900102ec>] __early_initcall_end+0x0/0x310
[<90008a58>] physmap_init+0x0/0x20
[<900364a8>] register_irq_proc+0x48/0x6c
[<900364f2>] init_irq_proc+0x26/0x48
[<90000352>] kernel_init+0x46/0x90
[<90010574>] __early_initcall_end+0x288/0x310
[<900102ec>] __early_initcall_end+0x0/0x310
[<9001d9c4>] do_exit+0x0/0x460
[<9000030c>] kernel_init+0x0/0x90
[<9001d9c4>] do_exit+0x0/0x460

---[ end trace 0f5b70a03eaa4c0f ]---
kobject_add_internal failed for physmap-flash.0 with -EEXIST, don't try to register things with the same name in the same directory.
Call trace:
[<900ca05c>] kobject_rename+0xdc/0x11c
[<900c9c94>] kobject_add_internal+0xfc/0x140
[<900c9d6c>] kobject_add_varg+0x20/0x2c
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900c9dcc>] kobject_add+0x30/0x3c
[<90008a58>] physmap_init+0x0/0x20
[<900eaca4>] device_add+0x64/0x38c
[<900c9932>] kobject_init_internal+0xe/0x30
[<9001bffc>] printk+0xc/0x10
[<900ed380>] platform_device_add+0xc0/0x110
[<90008a58>] physmap_init+0x0/0x20
[<9000030c>] kernel_init+0x0/0x90
[<900ed41a>] platform_device_register+0xe/0x10
[<90008a58>] physmap_init+0x0/0x20
[<90008a70>] physmap_init+0x18/0x20
[<90008a58>] physmap_init+0x0/0x20
[<900122f2>] do_one_initcall+0x32/0x104
[<90010574>] __early_initcall_end+0x288/0x310
[<900102ec>] __early_initcall_end+0x0/0x310
[<90008a58>] physmap_init+0x0/0x20
[<900364a8>] register_irq_proc+0x48/0x6c
[<900364f2>] init_irq_proc+0x26/0x48
[<90000352>] kernel_init+0x46/0x90
[<90010574>] __early_initcall_end+0x288/0x310
[<900102ec>] __early_initcall_end+0x0/0x310
[<9001d9c4>] do_exit+0x0/0x460
[<9000030c>] kernel_init+0x0/0x90
[<9001d9c4>] do_exit+0x0/0x460

atmel_usba_udc atmel_usba_udc.0: MMIO registers at 0xfff03000 mapped at fff03000
atmel_usba_udc atmel_usba_udc.0: FIFO at 0xff300000 mapped at ff300000
i2c /dev entries driver
at32_wdt at32_wdt.0: AT32AP700X WDT at 0xfff000b0, timeout 2 sec (nowayout=0)
dw_dmac.0: DesignWare DMA Controller, 3 channels
TCP cubic registered
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
cpufreq: AT32AP CPU frequency driver
IP-Config: Complete:
     device=eth0, addr=192.168.18.80, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.18.80, domain=, nis-domain=(none),
     bootserver=192.168.18.38, rootserver=192.168.18.38, rootpath=
Looking up port of RPC 100003/2 on 192.168.18.38
eth0: link up (100/Full)
Looking up port of RPC 100005/1 on 192.168.18.38
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 68K (90000000 - 90011000)
Starting portmap: done
Initializing random number generator... done.
Starting network...
Starting httpd
Starting telnetd



Welcome to In-Circuit ICnova
icnova login: root


BusyBox v1.13.2 (2009-11-04 14:08:07 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Offline

 

#10 2009-11-10 08:58:11

in-circuit
Member
From: Dresden
Registered: 2008-04-01
Posts: 238
Website

Re: problem loading kernel module

Hello,

please "make linux26-menuconfig" and change the SPI-Device suppport to be included into the kernel (it must have an asterisk in front). You also should change the file project_build_avr32/base/linux-2.6.28.4/arch/avr32/boards/icnova/spi.c to define the device you would like to use with spi-dev.

best regards

Offline

 

#11 2009-11-11 11:16:52

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

Changing the spi-device from module to built-in with linux26-menuconfig and adding the device to spi.c doesn't help.

If i instead add my spi device and "at32_add_device_spi(0, spi0_board_info,ARRAY_SIZE(spi0_board_info));" to icnova_base.c. I get "atmel_spi atmel_spi.0: Atmel SPI Controller at 0xffe00000 (irq 3)"  when booting but still no spi device under /dev/

Offline

 

#12 2009-11-11 11:41:27

in-circuit
Member
From: Dresden
Registered: 2008-04-01
Posts: 238
Website

Re: problem loading kernel module

The board doesn't create new device-nodes automaticly. Please do it yourself using "mknod /dev/spidev0 c 153 0".

best regards

Offline

 

#13 2009-11-12 08:29:43

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

Thanks.
Now the SPI is appearing to be working but when i execute the spidev_test that can be downloaded from kernel.org, i doesn't get any output on the SPI pins. Here's the result from spidev_test:

# ./spidev_test -D /dev/spidev0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00

Offline

 

#14 2009-11-12 08:38:05

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

# dmesg | tail
spidev spi0.0: setup: 500000 Hz bpw 8 mode 0x0 -> csr0 00004602
spidev spi0.0: spi mode 00
spidev spi0.0: DEactivate 3, mr 000f0011
spidev spi0.0: setup: 500000 Hz bpw 8 mode 0x0 -> csr0 00004602
spidev spi0.0: 8 bits per word
spidev spi0.0: DEactivate 3, mr 000f0011
spidev spi0.0: setup: 500000 Hz bpw 8 mode 0x0 -> csr0 00004602
spidev spi0.0: 500000 Hz (max)
atmel_spi atmel_spi.0: new message 9394dee0 submitted for spi0.0
spidev spi0.0: no protocol options yet

Offline

 

#15 2009-11-12 09:09:28

in-circuit
Member
From: Dresden
Registered: 2008-04-01
Posts: 238
Website

Re: problem loading kernel module

Please make sure you've connected to the correct pins and NCS0. The correct setup would be: PA0=>MISO, PA1=>MOSI, PA2=>SCK, PA4=>CS.

Offline

 

#16 2009-11-12 09:22:54

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

It's working now. Thanks for all the help.

The atmel spi driver doesn't do protocol options like speed and bits per word. If these options are provided SPI won't work.

# ./spidev_test -D /dev/spidev0
spi m
odstarter transfer.
e: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

FF FF FF FF FF FF
40 00 00 00 00 95
FF FF FF FF FF FF
FF FF FF FF FF FF
FF FF FF FF FF FF
DE AD BE EF BA AD
F0 0D

Success!

Offline

 

#17 2010-02-06 06:58:05

niroma
Member
Registered: 2010-02-06
Posts: 1

Re: problem loading kernel module

Hi jesperv,

I know this topic was solved a couple of months ago, but I have a similar problem (same board and kernel version) and some questions.

I also tried to add the new device in spi.c like suggested above without success. Then I found out that spi.c newer got compiled if I didn't add one of the optional spi units (like the M25P80 memory) in linux26-menuconfig.
After adding this I get spi.o in project_build_avr32/base/linux-2.6.28.4/arch/avr32/boards/icnova/ after issuing make, but testing this new build I still get no spi related output during bootup nor from dmesg.

I have also created the /dev/spidev0 using "mknod /dev/spidev0 c 153 0" and tried with spidev_test like you did.
It gives the following output:
# spidev_test -D /dev/spidev0
can't open device: No such device or address
Aborted

I have not connected my spi device (LTC2498) electrically yet.

I still haven't tried to add the device in icnova_base.c though.

By "doesn't do protocol options like speed", do you mean .max_speed_hz?

Edit: Trial and error gave it was .max_speed_hz that must not be set. I have tried to summarize my experiences in this on
http://www.avrfreaks.net/index.php?name … 592#666592

Last edited by niroma (2010-02-07 08:49:55)

Offline

 

#18 2010-02-15 14:20:27

jesperv
Member
Registered: 2009-04-28
Posts: 28

Re: problem loading kernel module

Yes it is speed_hz and bits per word that must be NULL for the driver to work.

An example on a struct:

struct spi_ioc_transfer tr = {
        .tx_buf = (unsigned long)tx,
        .rx_buf = (unsigned long)rx,
        .len = ARRAY_SIZE(tx),
        .delay_usecs = (int) NULL,
        .speed_hz = (int) NULL,
        .bits_per_word = (int) NULL,
    };

Offline

 

#19 2010-03-10 14:58:16

elonica
Member
Registered: 2010-03-10
Posts: 2

Re: problem loading kernel module

Hi all,

Thankyou for all info that I've found here. It helped me a lot when I tried to run SPI on MMNet1002 board.

I'm trying to run the VLSI VS1053 decoder connected to this board.
The problem tahat I've found is:

I see transfer on MOSI line, SCK and CS works fine.
But there are problems on MISO line. I see that this line is pulled low somehow (I see transmission on  osciloscope, but it is shortened to ground).

Do you know this Problem ?
Do you always use external pull-up for MISO lines ?
Who is handling MISO in spi_test application ?

Thank you for your help
Bartek

Last edited by elonica (2010-03-10 14:58:48)

Offline

 

#20 2010-03-17 12:25:59

khurshid_coms
Member
Registered: 2010-03-17
Posts: 1

Re: problem loading kernel module

Hi all,
I am new at this forum and also I am new user of AVR32AP7000. Yesterday, I deleted some kernal file from the board by mistake. Now I am unable to load the board with kernal. Please tell me how can I solve this problem. Is there any way to change the boot sequence or to Reinstall the linux kernal.

Offline

 

#21 2010-03-17 12:39:57

elonica
Member
Registered: 2010-03-10
Posts: 2

Re: problem loading kernel module

Hi,

If you have kernel file you can flash it from u-boot level:

Here is the sequence for u-boot but please read and check the addresses:

//upload kernel to ram 0x22000000 from tftp
tftp 0x22000000 192.168.1.20:uImage

//erase kernel area in nand
nand erase 0x400000 0x200000

//write new kernel (size 0x200000) from RAM 0x22000000 to flash 0x400000
//Hint uImage MUST have 0x200000 size. uImage file needs to be filled with zeros
nand write 0x22000000 0x400000 0x200000

//read back the kernel from Flash to RAM
nand read 0x22000000 0x00400000 0x00200000

//boot Kernel
bootm 0x22000000

If not you can always flash whole board with SAM-BA from Atmel.

BR
Bartek
www.elonica.pl

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson