Forum: Mikrocontroller und Digitale Elektronik SD-Karte Problem Grasshopper


von E. G. (grasshuepf)


Lesenswert?

Hallo Allerseits,

habe seit einigen TAgen das Problem. Das mein Grasshopper die SD-Karte 
nicht mehr erkennt.
zu beginn ging diese Allerdings geht es jetzt nicht mehr.
Habe folgenden boot-log:
1
## Booting image at 11000000 ...
2
   Image Name:   Linux-2.6.28.4
3
   Image Type:   AVR32 Linux Kernel Image (gzip compressed)
4
   Data Size:    1396596 Bytes =  1.3 MB
5
   Load Address: 10000000
6
   Entry Point:  90000000
7
   Verifying Checksum ... OK
8
   Uncompressing Kernel Image ... OK
9
10
Starting kernel at 90000000 (params at 13fa5008)...
11
12
Linux version 2.6.28.4 (root@ANT-PC5) (gcc version 4.2.2-atmel.1.1.3.avr32linux.1) #2 Tue Oct 27 12:56:41 CET 2009
13
CPU: AT32AP700x chip revision C
14
CPU: AP7 [01] core revision 0 (AVR32B arch revision 1)
15
CPU: MMU configuration: Shared TLB
16
CPU: features: dsp simd ocd perfctr java
17
CPU: Running at 140.000 MHz
18
Physical memory:
19
  10000000-13ffffff
20
Reserved memory:
21
  10000000-1019549f: Kernel code
22
  101954a0-1025109f: Kernel data
23
Exception vectors start at 90011000
24
CPU: Paging enabled
25
Node 0: start_pfn = 0x10000, low = 0x14000
26
Node 0: mem_map starts at 90254000
27
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
28
Kernel command line: root=nfs nfsroot=xxx:/freigaben/root ip=xxx:xxx::255.255.255.0::eth0:none mtdparts=physmap-flash.0:128k(boot)ro,64k(env)ro,-(root)
29
PID hash table entries: 256 (order: 8, 1024 bytes)
30
avr32_comparator: irq 0, 140.000 MHz
31
Console: colour dummy device 80x25
32
console [tty0] enabled
33
console [ttyS0] enabled
34
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
35
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
36
Memory: 62528k/62588k available (1553k kernel code, 2948k reserved, 143k data, 68k init)
37
Calibrating delay using timer specific routine.. 281.62 BogoMIPS (lpj=469796)
38
Mount-cache hash table entries: 512
39
net_namespace: 716 bytes
40
smc smc.0: Atmel Static Memory Controller at 0xfff03400
41
NET: Registered protocol family 16
42
pdc pdc.0: Atmel Peripheral DMA Controller enabled
43
at32_eic at32_eic.0: External Interrupt Controller at 0xfff00100, IRQ 19
44
at32_eic at32_eic.0: Handling 4 external IRQs, starting with IRQ 64
45
AVR32 AP Power Management enabled
46
ICnova: 9 Leds
47
bio: create slab <bio-0> at 0
48
NET: Registered protocol family 2
49
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
50
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
51
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
52
TCP: Hash tables configured (established 2048 bind 2048)
53
TCP reno registered
54
NET: Registered protocol family 1
55
audit: initializing netlink socket (disabled)
56
type=2000 audit(1167609600.366:1): initialized
57
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
58
msgmni has been set to 122
59
alg: hash: Chunking test 1 failed for md5-generic
60
00000000: 24 e5 f6 e1 36 2e 67 bb a6 f6 2f 5f 81 ff bb a4
61
alg: No test for stdrng (krng)
62
io scheduler noop registered
63
io scheduler cfq registered (default)
64
atmel_usart.0: ttyS0 at MMIO 0xffe01000 (irq = 7) is a ATMEL_SERIAL
65
atmel_usart.1: ttyS1 at MMIO 0xffe00c00 (irq = 6) is a ATMEL_SERIAL
66
eth0 (macb): not using net_device_ops yet
67
MACB_mii_bus: probed
68
eth0: Atmel MACB at 0xfff01800 irq 25 (00:1f:e5:00:09:30)
69
eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=0:00, irq=67)
70
physmap platform flash device: 00800000 at 00000000
71
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
72
 Amd/Fujitsu Extended Query Table at 0x0041
73
number of CFI chips: 1
74
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
75
3 cmdlinepart partitions found on MTD device physmap-flash.0
76
Creating 3 MTD partitions on "physmap-flash.0":
77
0x00000000-0x00020000 : "boot"
78
0x00020000-0x00030000 : "env"
79
0x00030000-0x00800000 : "root"
80
------------[ cut here ]------------
81
WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x1c/0x2c()
82
sysfs: duplicate filename 'physmap-flash.0' can not be created
83
Modules linked in:
84
Call trace:
85
 [<9001b752>] warn_slowpath+0x42/0x54
86
 [<900d4068>] vsnprintf+0x25c/0x5de
87
 [<900d4068>] vsnprintf+0x25c/0x5de
88
 [<90016ab0>] dequeue_task+0x4e/0x56
89
 [<90017ade>] __dequeue_entity+0x22/0x24
90
 [<90017af0>] set_next_entity+0x10/0x24
91
 [<90017c96>] pick_next_task_fair+0x56/0x5c
92
 [<900d074c>] ida_get_new_above+0x1c/0x10c
93
 [<90056a84>] ifind+0x8/0x3c
94
 [<90072a52>] sysfs_ilookup_test+0x0/0xa
95
 [<9000030c>] kernel_init+0x0/0x90
96
 [<90056ad6>] ilookup5+0x1e/0x24
97
 [<90072f2c>] sysfs_add_one+0x1c/0x2c
98
 [<9000030c>] kernel_init+0x0/0x90
99
 [<90073396>] create_dir+0x32/0x5c
100
 [<900733e2>] sysfs_create_dir+0x22/0x30
101
 [<90008af4>] physmap_init+0x0/0x20
102
 [<9000030c>] kernel_init+0x0/0x90
103
 [<900d0f04>] kobject_add_internal+0x90/0x140
104
 [<900d0f12>] kobject_add_internal+0x9e/0x140
105
 [<90008af4>] physmap_init+0x0/0x20
106
 [<900d1048>] kobject_add_varg+0x20/0x2c
107
 [<90008af4>] physmap_init+0x0/0x20
108
 [<9000030c>] kernel_init+0x0/0x90
109
 [<900d10a8>] kobject_add+0x30/0x3c
110
 [<90008af4>] physmap_init+0x0/0x20
111
 [<900f1f88>] device_add+0x64/0x38c
112
 [<900d0c0e>] kobject_init_internal+0xe/0x30
113
 [<9001bff8>] printk+0xc/0x10
114
 [<900f4664>] platform_device_add+0xc0/0x110
115
 [<90008af4>] physmap_init+0x0/0x20
116
 [<9000030c>] kernel_init+0x0/0x90
117
 [<900f46fe>] platform_device_register+0xe/0x10
118
 [<90008af4>] physmap_init+0x0/0x20
119
 [<90008b0c>] physmap_init+0x18/0x20
120
 [<90008af4>] physmap_init+0x0/0x20
121
 [<900122f2>] do_one_initcall+0x32/0x104
122
 [<900106f8>] __early_initcall_end+0x29c/0x32c
123
 [<9001045c>] __early_initcall_end+0x0/0x32c
124
 [<90008af4>] physmap_init+0x0/0x20
125
 [<900364a4>] register_irq_proc+0x48/0x6c
126
 [<900364ee>] init_irq_proc+0x26/0x48
127
 [<90000352>] kernel_init+0x46/0x90
128
 [<900106f8>] __early_initcall_end+0x29c/0x32c
129
 [<9001045c>] __early_initcall_end+0x0/0x32c
130
 [<9001d9c0>] do_exit+0x0/0x460
131
 [<9000030c>] kernel_init+0x0/0x90
132
 [<9001d9c0>] do_exit+0x0/0x460
133
134
---[ end trace f6954b461f4ef2fc ]---
135
kobject_add_internal failed for physmap-flash.0 with -EEXIST, don't try to register things with the same name in the same directory.
136
Call trace:
137
 [<900d1338>] kobject_rename+0xdc/0x11c
138
 [<900d0f70>] kobject_add_internal+0xfc/0x140
139
 [<900d1048>] kobject_add_varg+0x20/0x2c
140
 [<90008af4>] physmap_init+0x0/0x20
141
 [<9000030c>] kernel_init+0x0/0x90
142
 [<900d10a8>] kobject_add+0x30/0x3c
143
 [<90008af4>] physmap_init+0x0/0x20
144
 [<900f1f88>] device_add+0x64/0x38c
145
 [<900d0c0e>] kobject_init_internal+0xe/0x30
146
 [<9001bff8>] printk+0xc/0x10
147
 [<900f4664>] platform_device_add+0xc0/0x110
148
 [<90008af4>] physmap_init+0x0/0x20
149
 [<9000030c>] kernel_init+0x0/0x90
150
 [<900f46fe>] platform_device_register+0xe/0x10
151
 [<90008af4>] physmap_init+0x0/0x20
152
 [<90008b0c>] physmap_init+0x18/0x20
153
 [<90008af4>] physmap_init+0x0/0x20
154
 [<900122f2>] do_one_initcall+0x32/0x104
155
 [<900106f8>] __early_initcall_end+0x29c/0x32c
156
 [<9001045c>] __early_initcall_end+0x0/0x32c
157
 [<90008af4>] physmap_init+0x0/0x20
158
 [<900364a4>] register_irq_proc+0x48/0x6c
159
 [<900364ee>] init_irq_proc+0x26/0x48
160
 [<90000352>] kernel_init+0x46/0x90
161
 [<900106f8>] __early_initcall_end+0x29c/0x32c
162
 [<9001045c>] __early_initcall_end+0x0/0x32c
163
 [<9001d9c0>] do_exit+0x0/0x460
164
 [<9000030c>] kernel_init+0x0/0x90
165
 [<9001d9c0>] do_exit+0x0/0x460
166
167
at32_wdt at32_wdt.0: AT32AP700X WDT at 0xfff000b0, timeout 2 sec (nowayout=0)
168
sdhci: Secure Digital Host Controller Interface driver
169
sdhci: Copyright(c) Pierre Ossman
170
Registered led device: led1:green
171
Registered led device: led2:green
172
Registered led device: led3:green
173
Registered led device: led4:green
174
Registered led device: led5:green
175
Registered led device: led6:green
176
Registered led device: led7:green
177
Registered led device: led8:green
178
Registered led device: pwrled:red
179
dw_dmac.0: DesignWare DMA Controller, 3 channels
180
TCP cubic registered
181
NET: Registered protocol family 10
182
IPv6 over IPv4 tunneling driver
183
NET: Registered protocol family 17
184
RPC: Registered udp transport module.
185
RPC: Registered tcp transport module.
186
cpufreq: AT32AP CPU frequency driver
187
atmel_mci atmel_mci.0: Atmel MCI controller at 0xfff02400 irq 28, 1 slots
188
IP-Config: Complete:
189
     device=eth0, addr=xxx, mask=255.255.255.0, gw=255.255.255.255,
190
     host=xxx, domain=, nis-domain=(none),
191
     bootserver=xxx, rootserver=xxx, rootpath=
192
Looking up port of RPC 100003/2 on xxx
193
eth0: link up (100/Full)
194
Looking up port of RPC 100005/1 on xxx
195
VFS: Mounted root (nfs filesystem) on device 0:12.
196
Freeing init memory: 68K (90000000 - 90011000)
197
Starting portmap: done
198
Initializing random number generator... done.
199
Starting network...
200
Starting httpd
201
Starting telnetd

Habe kein Idee warum es nicht mehr geht. Weiß jemand ein Rat?
Ich habe nichts an der HW oder auch Kernel verändert

von ... (Gast)


Lesenswert?

stop mal am uboot command und poste mal dein env.
Also "printenv" am uboot_cmd eingeben.

Willst du von der Karte booten, oder die Karte nur mounten?

von E. G. (grasshuepf)


Lesenswert?

Ich habe bis jetzt immer über NFS das rootfs und den kernel geladen:
und bei der kernel erstellung die SD karte nicht als Modul eingebaut 
sondern direkt in den kernel.

folgende printenv ausgabe habe ich:
1
bootdelay=3
2
baudrate=115200
3
ethact=macb0
4
ethaddr=xx:xx:xx:00:09:30
5
bootcmd=mtdparts default
6
bootargs=nfsroot=xxx.11.160.xxx:/freigaben/root ip=139.11.160.118:xxx.11.160.xxx::255.255.128.0::eth0:none
7
filesize=153FEE
8
fileaddr=11000000
9
ipaddr=xxx.11.160.xxx
10
serverip=xxx.11.160.xxx
11
stdin=serial
12
stdout=serial
13
stderr=serial
14
mtdids=nor0=physmap-flash.0
15
mtdparts=mtdparts=physmap-flash.0:128k(boot)ro,64k(env)ro,-(root)
16
partition=nor0,0
17
mtddevnum=0
18
mtddevname=boot

Kernel lade ich über:
1
nfs 11000000 xxx.11.160.xxx:/freigaben/root/boot/uImage;bootm

von ... (Gast)


Lesenswert?

welche printenv-Ausgabe ist denn jetzt aktuell?

Die von oben:
1
bootdelay=3
2
baudrate=115200
3
ethact=macb0
4
ethaddr=xx:xx:xx:00:09:30
5
bootcmd=mtdparts default
6
bootargs=nfsroot=xxx.11.160.xxx:/freigaben/root ip=139.11.160.118:xxx.11.160.xxx::255.255.128.0::eth0:none
7
filesize=153FEE
8
fileaddr=11000000
9
ipaddr=xxx.11.160.xxx
10
serverip=xxx.11.160.xxx
11
stdin=serial
12
stdout=serial
13
stderr=serial
14
mtdids=nor0=physmap-flash.0
15
mtdparts=mtdparts=physmap-flash.0:128k(boot)ro,64k(env)ro,-(root)
16
partition=nor0,0
17
mtddevnum=0
18
mtddevname=boot

oder die, die du bei AVR-Freaks gepostet hast:
1
ICnova> printenv
2
bootcmd=mtdparts default;chpart nor0,2;fsload /boot/uImage;bootm ${fileaddr}
3
bootdelay=3
4
baudrate=115200
5
ethact=macb0
6
ethaddr=00:1F:E5:00:09:30
7
ipaddr=139.11.160.118
8
serverip=139.11.160.105
9
mtdids=nor0=physmap-flash.0
10
mtdparts=mtdparts=physmap-flash.0:128k(boot)ro,64k(env)ro,-(root)
11
partition=nor0,0
12
mtddevnum=0
13
mtddevname=boot
14
bootargs=root=nfs nfsroot=xxx.xxx.xxx.xxx:/freigaben/root ip=xxx.xxx.xxx.xxx:xxx.xxx.xxx.xxx::255.255.255.0::eth0:none 
15
mtdparts=physmap-flash.0:128k(boot)ro,64k(env)ro,-(root)
16
stdin=serial
17
stdout=serial
18
stderr=serial

von E. G. (grasshuepf)


Lesenswert?

Es ging bei beiden nicht. ich habe schon alles möglich versucht was mir 
bekannt ist.
Habe sogar ein neuen kernel erzeugt, allerdings keine wirkung

von ... (Gast)


Lesenswert?

ok, der Kernel bootet ja aber.
Wo ist jetzt dein Problem? Bekommst du die Karte nicht gemountet? Wie 
mountest du die denn oder hast die früher gemountet.

von e.Grass (Gast)


Lesenswert?

zu beginn wurde beim boot die SD-Karte noch angezigt, sodass ich sie 
nach dem laden des dateisystems mounten konnte.
Der kernel lädt und das system läuft auch. Allerding funktioniert die 
SD-Karte nicht mehr.
Es ging von heut auf morgen nicht( wobei die zeitspanne ca 2 Monate 
ist). Das was ich nicht verstehe ist, das ich nichts geändert habe. Also 
keine kerneeinstelugen oder auch an der Hardware.
Das einzige wäre, bootloader einstellungen.

Woran kann es also liegen, dass ich z.B. heute meine SD-Karte mounten 
kann. Und das system herunterfahre und morgen starte und nix geht. :)

von ... (Gast)


Lesenswert?

hast du mal versucht die Karte zu mounten?
mkdir /mnt/sd
mount -t vfat /dev/mmcblk0p1 /mnt/sd

von E. G. (grasshuepf)


Lesenswert?

Mounten habe ich schon versucht(wie schon erwähnt), geht auch nicht 
mehr. Habe auch getestet ob die Karten(3 stück) vielleicht defekt sind. 
Allerdings nicht.
1
mount: mounting /dev/mmcblk0p1 on /mnt failed: No such device or address

von ... (Gast)


Lesenswert?

Dann hast du mci im Kernel nicht eingeschaltet. Wie /Warum auch immer.
Karte ist partitioniert? Spannungsversorgung an der Karte vorhanden? 
Nachmessen!

von E. G. (grasshuepf)


Lesenswert?

MCi ist eingeschaltet
1
atmel_mci atmel_mci.0: Atmel MCI controller at 0xfff02400 irq 28, 1 slots
und Karte ist auch partitioniert.
Spannungen habe ich auch gemessen
Alles hat funktioniert vor 2 monaten und und nun geht nichts mehr.

ich mach jetzt alles neu!
mal sehen was dann passiert:)
mich würde einfach nur interessieen warum es vorher ging und dann nicht 
mehr :)

von ... (Gast)


Lesenswert?

gib mal am uboot_cmd  mciinit ein.

von E. G. (grasshuepf)


Lesenswert?

Ich habe habe uboot 2009.03:

die eingabe von mciinit  gibt:
1
Unknown command 'mciinit' - try 'help'

eignetlich müsste uboot den befehl kennen

von E. G. (grasshuepf)


Lesenswert?

habs jetzt mal mit der buildroot 2.3.0 versucht. nun klappt es.
anscheinend liegt es doch an einer eintellungen. Jedoch wüsste ich nicht 
welche das sein soll. Da es einem zum anderen mal nicht funktionierte.

von ... (Gast)


Lesenswert?

> gib mal am uboot_cmd  mciinit ein.

sorry, da habe ich mich vertan, es muss "mmcinit" heißen.

aber:

> Ich habe habe uboot 2009.03:

Bei neueren uboot-Versionen (weis jetzt nicht, ob schon bei 2009.03) 
heißt der Befehl nicht mehr "mmcinit" sonder "mmc init (device)"

von E. G. (grasshuepf)


Lesenswert?

die u-boot 2009.08 hat "mmcinit" oder auch "mmc init" nicht, habe mir 
jetzt die u-boot1.3.4 bon der atmel seite genommen. die hat "mmcinit"

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.