Попала в мои руки плата аргуссофта AS-9260 (аналог атмелевской at91sam9260ek)
Пытаюсь разобраться с тем как там все работает. Из-за того, что исходников u-boot и linux в комплекте нет, тока бинарники решил начать с того что бы собрать свои версии u-boot и linux.
с первым проблем не возникло, u-boot-2009.01 вроде бы работает без проблем. скомпилирована для arm-elf-gcc.
а вот linux никак не дается.
Перепробовал кучу тулчейнов, несколько версий ядра - компилируется, но при загрузке выдает вот такой лог.
CODE
RomBOOT
>
U-Boot 2009.01 (Feb 03 2009 - 12:18:13)
DRAM: 64 MB
NAND: No NAND device found!!!
0 MiB
DataFlash:AT45DB642
Nb pages: 8192
Page Size: 1056
Size= 8650752 bytes
Logical address: 0xD0000000
Area 0: D0000000 to D00041FF (RO) Bootstrap
Area 1: D0004200 to D00083FF Environment
Area 2: D0008400 to D0041FFF (RO) U-Boot
Area 3: D0042000 to D0251FFF Kernel
Area 4: D0252000 to D083FFFF FS
In: serial
Out: serial
Err: serial
Net: macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation timed out (status=0x7849)
macb0: link down (status: 0x7849)
Hit any key to stop autoboot: 3 2 1 0
## Booting kernel from Legacy Image at 21500000 ...
Image Name: Linux-2.6.26.8
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1101312 Bytes = 1.1 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux........................................................................ done, booting the kernel.
Linux version 2.6.26.8 (quantum@quantum-osu) (gcc version 4.3.2 (crosstool-NG-1.3.2) ) #1 Tue Feb 10 16:07:17 MSK 2009
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9260-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: console=ttyS0,115200 mem64M initrd=0x21100000,3145728 root=/dev/ram0 rw
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59520KB available (1996K code, 182K data, 108K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 192 bytes
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
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
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
Freeing initrd memory: 3072K
NetWinder Floating Point Emulator V0.97 (double precision)
msgmni has been set to 122
io scheduler noop registered
io scheduler anticipatory registered (default)
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.26.8 #1)
PC is at kfree+0x74/0x130
LR is at call_usermodehelper_freeinfo+0x30/0x34
pc : [<c007b680>] lr : [<c0049488>] psr: 00000093
sp : c3c19d78 ip : c3c19d9c fp : c3c19d98
r10: c0225cf4 r9 : 00000000 r8 : a0000013
r7 : c3c9b260 r6 : 00000000 r5 : c3c9b260 r4 : 00000000
r3 : 00000080 r2 : c3c00120 r1 : c0245000 r0 : c02be360
Flags: nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 20004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc3c18260)
Stack: (0xc3c19d78 to 0xc3c1a000)
9d60: c3c9b260 c3c9b260
9d80: 00000000 00000000 c3c3c9e0 c3c19dac c3c19d9c c0049488 c007b61c fffffffe
9da0: c3c19dd8 c3c19db0 c0049514 c0049468 00000000 c3c19db4 c3c19db4 00000018
9dc0: 00000000 00000007 c3c26000 c3c19e24 c3c19ddc c00e4ef8 c004949c 000000d0
9de0: 00000000 c3f8c2a0 c01ece8c c01f6a86 c0222600 c01f6a86 00000000 c3f8f200
9e00: c3f8f200 c3f8f28c 00000000 00000000 00000000 c3f8f268 c3c19e34 c3c19e28
9e20: c00e4f74 c00e4bf4 c3c19e68 c3c19e38 c010a5c0 c00e4f70 00000000 c3c39b00
9e40: c3f8f200 c3c39b00 00400027 00000000 00000000 c3c19f88 c001f4fc c3c19e7c
9e60: c3c19e6c c010a730 c010a224 c3f8f200 c3c19ea0 c3c19e80 c010a7a8 c010a724
9e80: 00000026 00000001 00000004 00000000 c3c18000 c3c19eb8 c3c19ea4 c010a808
9ea0: c010a744 c3c19ec4 c3c19ec0 c3c19f20 c3c19ec0 c00f1150 c010a7f0 c3c19ec4
9ec0: c3c11c00 33797474 c3c10039 c3c19ed8 c010dc00 c01a6a00 00000004 c3c39ec4
9ee0: c3c39ec0 c3c3b000 00000000 c3c18000 c3c19f88 c001f4fc c3c19f20 c3c19f08
9f00: c00819dc 00000027 c3c39ec0 c3c3b000 00000000 c3c19f44 c3c19f24 c00f1e04
9f20: c00f10a4 00400001 c0240674 c023eca0 00000000 c0017590 c3c19f58 c3c19f48
9f40: c0018000 c00f1c88 00000000 c3c19f70 c3c19f5c c0017704 c0017f3c 00000000
9f60: 00000000 c3c19ff4 c3c19f74 c0008610 c00175a0 f7bfbfff ffffffff 00000000
9f80: fffbfffd c3c18000 00000000 c3c19fac c3c19f9c c0037bbc c0037974 00000000
9fa0: 00000000 c3c19fb0 c0023b24 c0037bac 00000000 00000000 c0008550 c003d310
9fc0: 00000000 00000000 00000001 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 c3c19ff8 c003d310 c0008560 77fffeaf fff7baff
Backtrace:
[<c007b60c>] (kfree+0x0/0x130) from [<c0049488>] (call_usermodehelper_freeinfo+0x30/0x34)
r8:c3c3c9e0 r7:00000000 r6:00000000 r5:c3c9b260 r4:c3c9b260
[<c0049458>] (call_usermodehelper_freeinfo+0x0/0x34) from [<c0049514>] (call_usermodehelper_exec+0x88/0x98)
r4:fffffffe
[<c004948c>] (call_usermodehelper_exec+0x0/0x98) from [<c00e4ef8>] (kobject_uevent_env+0x314/0x37c)
r7:c3c26000 r6:00000007 r5:00000000 r4:00000018
[<c00e4be4>] (kobject_uevent_env+0x0/0x37c) from [<c00e4f74>] (kobject_uevent+0x14/0x18)
[<c00e4f60>] (kobject_uevent+0x0/0x18) from [<c010a5c0>] (device_add+0x3ac/0x500)
[<c010a214>] (device_add+0x0/0x500) from [<c010a730>] (device_register+0x1c/0x20)
[<c010a714>] (device_register+0x0/0x20) from [<c010a7a8>] (device_create_vargs+0x74/0xa8)
r4:c3f8f200
[<c010a734>] (device_create_vargs+0x0/0xa8) from [<c010a808>] (device_create+0x2c/0x34)
r8:c3c18000 r7:00000000 r6:00000004 r5:00000001 r4:00000026
[<c010a7e0>] (device_create+0x4/0x34) from [<c00f1150>] (tty_register_device+0xbc/0xdc)
[<c00f1094>] (tty_register_device+0x0/0xdc) from [<c00f1e04>] (tty_register_driver+0x18c/0x1c8)
r7:00000000 r6:c3c3b000 r5:c3c39ec0 r4:00000027
[<c00f1c78>] (tty_register_driver+0x0/0x1c8) from [<c0018000>] (vty_init+0xd4/0x110)
r7:c0017590 r6:00000000 r5:c023eca0 r4:c0240674
[<c0017f2c>] (vty_init+0x0/0x110) from [<c0017704>] (tty_init+0x174/0x1d4)
r4:00000000
[<c0017590>] (tty_init+0x0/0x1d4) from [<c0008610>] (kernel_init+0xc0/0x26c)
r5:00000000 r4:00000000
[<c0008550>] (kernel_init+0x0/0x26c) from [<c003d310>] (do_exit+0x0/0x614)
Code: e59f10c0 ebfeaf0d e5902018 e5924000 (e894000a)
---[ end trace 7765c1f84d796d5c ]---
Kernel panic - not syncing: Attempted to kill init!
>
U-Boot 2009.01 (Feb 03 2009 - 12:18:13)
DRAM: 64 MB
NAND: No NAND device found!!!
0 MiB
DataFlash:AT45DB642
Nb pages: 8192
Page Size: 1056
Size= 8650752 bytes
Logical address: 0xD0000000
Area 0: D0000000 to D00041FF (RO) Bootstrap
Area 1: D0004200 to D00083FF Environment
Area 2: D0008400 to D0041FFF (RO) U-Boot
Area 3: D0042000 to D0251FFF Kernel
Area 4: D0252000 to D083FFFF FS
In: serial
Out: serial
Err: serial
Net: macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation timed out (status=0x7849)
macb0: link down (status: 0x7849)
Hit any key to stop autoboot: 3 2 1 0
## Booting kernel from Legacy Image at 21500000 ...
Image Name: Linux-2.6.26.8
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1101312 Bytes = 1.1 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux........................................................................ done, booting the kernel.
Linux version 2.6.26.8 (quantum@quantum-osu) (gcc version 4.3.2 (crosstool-NG-1.3.2) ) #1 Tue Feb 10 16:07:17 MSK 2009
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9260-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: console=ttyS0,115200 mem64M initrd=0x21100000,3145728 root=/dev/ram0 rw
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59520KB available (1996K code, 182K data, 108K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 192 bytes
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
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
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
Freeing initrd memory: 3072K
NetWinder Floating Point Emulator V0.97 (double precision)
msgmni has been set to 122
io scheduler noop registered
io scheduler anticipatory registered (default)
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.26.8 #1)
PC is at kfree+0x74/0x130
LR is at call_usermodehelper_freeinfo+0x30/0x34
pc : [<c007b680>] lr : [<c0049488>] psr: 00000093
sp : c3c19d78 ip : c3c19d9c fp : c3c19d98
r10: c0225cf4 r9 : 00000000 r8 : a0000013
r7 : c3c9b260 r6 : 00000000 r5 : c3c9b260 r4 : 00000000
r3 : 00000080 r2 : c3c00120 r1 : c0245000 r0 : c02be360
Flags: nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 20004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc3c18260)
Stack: (0xc3c19d78 to 0xc3c1a000)
9d60: c3c9b260 c3c9b260
9d80: 00000000 00000000 c3c3c9e0 c3c19dac c3c19d9c c0049488 c007b61c fffffffe
9da0: c3c19dd8 c3c19db0 c0049514 c0049468 00000000 c3c19db4 c3c19db4 00000018
9dc0: 00000000 00000007 c3c26000 c3c19e24 c3c19ddc c00e4ef8 c004949c 000000d0
9de0: 00000000 c3f8c2a0 c01ece8c c01f6a86 c0222600 c01f6a86 00000000 c3f8f200
9e00: c3f8f200 c3f8f28c 00000000 00000000 00000000 c3f8f268 c3c19e34 c3c19e28
9e20: c00e4f74 c00e4bf4 c3c19e68 c3c19e38 c010a5c0 c00e4f70 00000000 c3c39b00
9e40: c3f8f200 c3c39b00 00400027 00000000 00000000 c3c19f88 c001f4fc c3c19e7c
9e60: c3c19e6c c010a730 c010a224 c3f8f200 c3c19ea0 c3c19e80 c010a7a8 c010a724
9e80: 00000026 00000001 00000004 00000000 c3c18000 c3c19eb8 c3c19ea4 c010a808
9ea0: c010a744 c3c19ec4 c3c19ec0 c3c19f20 c3c19ec0 c00f1150 c010a7f0 c3c19ec4
9ec0: c3c11c00 33797474 c3c10039 c3c19ed8 c010dc00 c01a6a00 00000004 c3c39ec4
9ee0: c3c39ec0 c3c3b000 00000000 c3c18000 c3c19f88 c001f4fc c3c19f20 c3c19f08
9f00: c00819dc 00000027 c3c39ec0 c3c3b000 00000000 c3c19f44 c3c19f24 c00f1e04
9f20: c00f10a4 00400001 c0240674 c023eca0 00000000 c0017590 c3c19f58 c3c19f48
9f40: c0018000 c00f1c88 00000000 c3c19f70 c3c19f5c c0017704 c0017f3c 00000000
9f60: 00000000 c3c19ff4 c3c19f74 c0008610 c00175a0 f7bfbfff ffffffff 00000000
9f80: fffbfffd c3c18000 00000000 c3c19fac c3c19f9c c0037bbc c0037974 00000000
9fa0: 00000000 c3c19fb0 c0023b24 c0037bac 00000000 00000000 c0008550 c003d310
9fc0: 00000000 00000000 00000001 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 c3c19ff8 c003d310 c0008560 77fffeaf fff7baff
Backtrace:
[<c007b60c>] (kfree+0x0/0x130) from [<c0049488>] (call_usermodehelper_freeinfo+0x30/0x34)
r8:c3c3c9e0 r7:00000000 r6:00000000 r5:c3c9b260 r4:c3c9b260
[<c0049458>] (call_usermodehelper_freeinfo+0x0/0x34) from [<c0049514>] (call_usermodehelper_exec+0x88/0x98)
r4:fffffffe
[<c004948c>] (call_usermodehelper_exec+0x0/0x98) from [<c00e4ef8>] (kobject_uevent_env+0x314/0x37c)
r7:c3c26000 r6:00000007 r5:00000000 r4:00000018
[<c00e4be4>] (kobject_uevent_env+0x0/0x37c) from [<c00e4f74>] (kobject_uevent+0x14/0x18)
[<c00e4f60>] (kobject_uevent+0x0/0x18) from [<c010a5c0>] (device_add+0x3ac/0x500)
[<c010a214>] (device_add+0x0/0x500) from [<c010a730>] (device_register+0x1c/0x20)
[<c010a714>] (device_register+0x0/0x20) from [<c010a7a8>] (device_create_vargs+0x74/0xa8)
r4:c3f8f200
[<c010a734>] (device_create_vargs+0x0/0xa8) from [<c010a808>] (device_create+0x2c/0x34)
r8:c3c18000 r7:00000000 r6:00000004 r5:00000001 r4:00000026
[<c010a7e0>] (device_create+0x4/0x34) from [<c00f1150>] (tty_register_device+0xbc/0xdc)
[<c00f1094>] (tty_register_device+0x0/0xdc) from [<c00f1e04>] (tty_register_driver+0x18c/0x1c8)
r7:00000000 r6:c3c3b000 r5:c3c39ec0 r4:00000027
[<c00f1c78>] (tty_register_driver+0x0/0x1c8) from [<c0018000>] (vty_init+0xd4/0x110)
r7:c0017590 r6:00000000 r5:c023eca0 r4:c0240674
[<c0017f2c>] (vty_init+0x0/0x110) from [<c0017704>] (tty_init+0x174/0x1d4)
r4:00000000
[<c0017590>] (tty_init+0x0/0x1d4) from [<c0008610>] (kernel_init+0xc0/0x26c)
r5:00000000 r4:00000000
[<c0008550>] (kernel_init+0x0/0x26c) from [<c003d310>] (do_exit+0x0/0x614)
Code: e59f10c0 ebfeaf0d e5902018 e5924000 (e894000a)
---[ end trace 7765c1f84d796d5c ]---
Kernel panic - not syncing: Attempted to kill init!
Конкретно этот - ядро 2.6.26.8 скомпилировано тулчейном собранным с помощью crosstool-NG-1.3.2 со стандартным конфигом arm-unknown-linux-gnu
Код
arm-unknown-linux-gnu [g ]
OS : linux-2.6.26.8
GMP/MPFR : gmp-4.2.4 / mpfr-2.3.2
binutils : binutils-2.19
C compiler: gcc-4.3.2 (C,C++,Fortran,Java)
C library : glibc-2.7
Tools :
OS : linux-2.6.26.8
GMP/MPFR : gmp-4.2.4 / mpfr-2.3.2
binutils : binutils-2.19
C compiler: gcc-4.3.2 (C,C++,Fortran,Java)
C library : glibc-2.7
Tools :
Конфигурацию линукса брал из arch/arm/configs/at91sam9260ek_defconfig
т.к. в логе исходной версии линукса в на месте ошибки идут строчки
CODE
io scheduler noop registered
io scheduler anticipatory registered (default)
AT91_SPI probe : clock = C01E2EC4
at91_spi: Baud rate set to 5518222
AT91 SPI driver loaded
at91_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a AT91_SERIAL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
physmap platform flash device: 00800000 at 10000000
physmap-flash physmap-flash.0: map_probe failed
Read manufacturer IDs
Device IDs
maf_id = 42, dev_id = 00
No NAND device found!!!
at91_nand_probe nand_scan failed
usbmon: debugfs is not available
io scheduler anticipatory registered (default)
AT91_SPI probe : clock = C01E2EC4
at91_spi: Baud rate set to 5518222
AT91 SPI driver loaded
at91_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a AT91_SERIAL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
physmap platform flash device: 00800000 at 10000000
physmap-flash physmap-flash.0: map_probe failed
Read manufacturer IDs
Device IDs
maf_id = 42, dev_id = 00
No NAND device found!!!
at91_nand_probe nand_scan failed
usbmon: debugfs is not available
то насколько я понял в этом месте должная ити инициализация spi - пробовал компилировать вот с такими строчками
CODE
#
# SPI support
#
CONFIG_SPI=y
CONFIG_SPI_MASTER=y
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
# SPI support
#
CONFIG_SPI=y
CONFIG_SPI_MASTER=y
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
результат абсолютно тот же.
Прошу сильно не ругаться, если ошибка на поверхности лежит, и тыкнуть носом куда надо)