Temat: Uruchomienie OpenWrt na klonie AT91SAM9G20EK
Witam wszystkich miłośników OpenWrt.
Nabyłem ostatnio całkiem niezłą płytkę SBC6020 (http://www.armkits.com/product/sbc6020.asp), która miałaby posłużyć m.in. jako router 3G wykorzystując modemy na miniPCI. Oczywiście producent dostarczył działający system, jednakże wiele w nim brakuje, więc i tak korzystne będzie przygotowanie własnego. OpenWrt jest idealne do tego celu. Producent owej płytki niestety nie daje żadnego wsparcia dla tej dystrybucji (odpowiedź na próbę kontaktu: "Sorry, we never try OpenWRT...."), więc należy wszystko przygotować samemu. Jedyne co posiadam co spatchowany kernel 2.6.30 dla tej płytki, który zawiera już wszelkie zmiany dla peryferiów. Udało mi się podłożyć cały kernel do OpenWrt (12.09), skompilować i coś uruchomić. Niestety kernel nie uruchamia się do końca, nie jestem do końca przekonany co może być przyczyną. Log uruchomienia poniżej:
RomBOOT
U-Boot 1.3.4 (Jan 28 2010 - 11:36:04)
DRAM: 64 MB
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0xc1e1)
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0xa0000, size 0x300000
3145728 bytes read: OK
## Booting kernel from Legacy Image at 22000000 ...
Image Name: linux-2.6
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3106016 Bytes = 3 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
[ 0.000000] Linux version 2.6.30 (lukasz@hp) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #2 Tue Aug 27 12:05:03 CEST 2013
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: Atmel AT91SAM9G20-EK
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] Clocks: CPU 396 MHz, master 132 MHz, main 18.432 MHz
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock5 mtdparts=atmel_nand:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,4M(linux),-(root) rw rootfstype=jffs2
[ 0.000000] NR_IRQS:192
[ 0.000000] AT91: 96 gpio irqs in 3 banks
[ 0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] console [ttyS0] enabled
[ 0.080000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.090000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.100000] Memory: 64MB = 64MB total
[ 0.100000] Memory: 61712KB available (2792K code, 237K data, 120K init, 0K highmem)
[ 0.110000] Calibrating delay loop... 197.83 BogoMIPS (lpj=989184)
[ 0.330000] Mount-cache hash table entries: 512
[ 0.330000] CPU: Testing write buffer coherency: ok
[ 0.340000] net_namespace: 296 bytes
[ 0.350000] NET: Registered protocol family 16
[ 0.360000] AT91: Power Management
[ 0.360000] AT91: Starting after user reset
[ 0.390000] bio: create slab <bio-0> at 0
[ 0.400000] SCSI subsystem initialized
[ 0.400000] usbcore: registered new interface driver usbfs
[ 0.410000] usbcore: registered new interface driver hub
[ 0.420000] usbcore: registered new device driver usb
[ 0.430000] NET: Registered protocol family 2
[ 0.430000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.440000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.450000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.450000] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.460000] TCP reno registered
[ 0.460000] NET: Registered protocol family 1
[ 0.470000] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.480000] JFFS2 version 2.2. (NAND) 2001-2006 Red Hat, Inc.
[ 0.490000] msgmni has been set to 120
[ 0.490000] io scheduler noop registered
[ 0.490000] io scheduler anticipatory registered (default)
[ 0.540000] atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
[ 0.550000] atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
[ 0.560000] atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
[ 0.570000] atmel_usart.3: ttyS3 at MMIO 0xfffb8000 (irq = 8) is a ATMEL_SERIAL
[ 0.580000] atmel_usart.4: ttyS4 at MMIO 0xfffd0000 (irq = 23) is a ATMEL_SERIAL
[ 0.580000] atmel_usart.5: ttyS5 at MMIO 0xfffd4000 (irq = 24) is a ATMEL_SERIAL
[ 0.590000] atmel_usart.6: ttyS6 at MMIO 0xfffd8000 (irq = 25) is a ATMEL_SERIAL
[ 0.610000] brd: module loaded
[ 0.630000] loop: module loaded
[ 0.630000] ssc ssc.0: Atmel SSC device at 0xc4898000 (irq 14)
[ 0.640000] Driver 'sd' needs updating - please use bus_type methods
[ 0.640000] scsi0 : pata_at91
[ 0.650000] ata1: PATA max PIO4 mmio cmd 0x50c00000 ctl 0x50e00000 irq 88
[ 0.650000] dm9000 Ethernet Driver, V1.31
[ 0.660000] dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig
[ 0.670000] eth0 (dm9000): not using net_device_ops yet
[ 0.670000] eth0: dm9000e at c4876000,c487e004 IRQ 89 MAC: 00:00:00:00:00:00 (chip)
[ 0.690000] MACB_mii_bus: probed
[ 0.690000] eth1: Atmel MACB at 0xfffc4000 irq 21 (00:04:9f:ef:01:01)
[ 0.700000] eth1: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
[ 0.710000] NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
[ 0.720000] AT91 NAND: 8-bit, Software ECC
[ 0.730000] Scanning device for bad blocks
[ 0.740000] Bad eraseblock 386 at 0x000003040000
[ 0.760000] 6 cmdlinepart partitions found on MTD device atmel_nand
[ 0.770000] Creating 6 MTD partitions on "atmel_nand":
[ 0.780000] 0x000000000000-0x000000020000 : "bootstrap"
[ 0.780000] 0x000000020000-0x000000060000 : "uboot"
[ 0.790000] 0x000000060000-0x000000080000 : "env1"
[ 0.800000] 0x000000080000-0x0000000a0000 : "env2"
[ 0.800000] 0x0000000a0000-0x0000004a0000 : "linux"
[ 0.810000] 0x0000004a0000-0x000008000000 : "root"
[ 0.820000] usbmon: debugfs is not available
[ 0.820000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.830000] at91_ohci at91_ohci: AT91 OHCI
[ 0.840000] at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
[ 0.840000] at91_ohci at91_ohci: irq 20, io mem 0x00500000
[ 0.910000] usb usb1: configuration #1 chosen from 1 choice
[ 0.920000] hub 1-0:1.0: USB hub found
[ 0.920000] hub 1-0:1.0: 2 ports detected
[ 0.930000] Initializing USB Mass Storage driver...
[ 0.930000] usbcore: registered new interface driver usb-storage
[ 0.940000] USB Mass Storage support registered.
[ 0.940000] udc: at91_udc version 3 May 2006
[ 0.950000] mice: PS/2 mouse device common for all mice
[ 0.950000] rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
[ 0.960000] IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs
[ 0.970000] rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
[ 0.970000] i2c /dev entries driver
[ 0.980000] at24 0-0050: 256 byte 24c02 EEPROM (writable)
[ 0.980000] i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
[ 0.990000] Registered led device: ds1
[ 1.000000] usbcore: registered new interface driver usbhid
[ 1.010000] usbhid: v2.6:USB HID core driver
[ 1.010000] TCP cubic registered
[ 1.020000] NET: Registered protocol family 17
[ 1.020000] RPC: Registered udp transport module.
[ 1.030000] RPC: Registered tcp transport module.
[ 1.030000] rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
[ 1.040000] CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
[ 1.060000] CLEANMARKER node found at 0x00020000 has totlen 0xc != normal 0x0
[ 1.090000] CLEANMARKER node found at 0x00040000 has totlen 0xc != normal 0x0
[ 1.110000] CLEANMARKER node found at 0x00060000 has totlen 0xc != normal 0x0
[ 1.130000] CLEANMARKER node found at 0x00080000 has totlen 0xc != normal 0x0
[ 1.150000] CLEANMARKER node found at 0x000a0000 has totlen 0xc != normal 0x0
[ 1.180000] CLEANMARKER node found at 0x000c0000 has totlen 0xc != normal 0x0
[ 1.200000] CLEANMARKER node found at 0x000e0000 has totlen 0xc != normal 0x0
[ 1.240000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100000: 0xadde instead
[ 1.820000] VFS: Mounted root (jffs2 filesystem) on device 31:5.
[ 1.830000] Freeing init memory: 120K
[ 1.830000] Warning: unable to open an initial console.
[ 1.930000] Kernel panic - not syncing: Attempted to kill init!
[ 1.940000] Backtrace:
[ 1.940000] [<c002a35c>] (dump_backtrace+0x0/0x110) from [<c0240138>] (dump_stack+0x18/0x1c)
[ 1.950000] r6:c3812c40 r5:0000000b r4:c02fe7d4
[ 1.950000] [<c0240120>] (dump_stack+0x0/0x1c) from [<c0240298>] (panic+0x48/0x10c)
[ 1.960000] [<c0240250>] (panic+0x0/0x10c) from [<c003d398>] (do_exit+0x68/0x5c0)
[ 1.970000] r3:c02e7b1c r2:00000017 r1:00002710 r0:c029ff12
[ 1.970000] r7:c3818e40
[ 1.980000] [<c003d330>] (do_exit+0x0/0x5c0) from [<c003dbec>] (do_group_exit+0x94/0xc8)
[ 1.980000] r7:c3818e40
[ 1.990000] [<c003db58>] (do_group_exit+0x0/0xc8) from [<c00464d0>] (get_signal_to_deliver+0x300/0x338)
[ 2.000000] r4:00106001
[ 2.000000] [<c00461d0>] (get_signal_to_deliver+0x0/0x338) from [<c0028eb0>] (do_signal.part.0+0x68/0x4c8)
[ 2.010000] [<c0028e48>] (do_signal.part.0+0x0/0x4c8) from [<c002978c>] (do_notify_resume+0x40/0x44)
[ 2.020000] [<c002974c>] (do_notify_resume+0x0/0x44) from [<c0026c4c>] (work_pending+0x1c/0x20)Komunikat Kernel panic - not syncing: Attempted to kill init! jest zbyt ogólny, więc nie wiem w czym problem. Oczywiście pomijając Backtrace, z którego dla mnie nic nie wynika.
Może Ktoś z doświadczonych forumowiczów jest w stanie naprowadzić mnie na źródło problemu. Wydaje mi się że gdzieś widziałem jakąś opcję w kernelu, aby podczas uruchamiania wyświetlał więcej komunikatów, które może naprowadzą na problem. Niestety nie pamiętam jak to mogło się nazywać ?
Pozdrawiam