1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
| After connecting the serial lines, I could see that pressing 'u' at boot with
the usual uboot, I saw in the serial line:
<verbatim>
NAND Secondary Program Loader
[U] pressed, goto USBBOOT mode
</verbabtim>
That means I can use xbboot or usbboot from the xburst tools. I have a jz-3.2
kernel built (vmlinuz.bin). I used this command line, stored in the kernel:
<verbatim>
CONFIG_CMDLINE="mem=32M console=ttyS0,9600n8 ubi.mtd=2 rootfstype=ubifs root=ubi0:rootfs rw rootwait"
</verbatim>
I load it this way:
<verbatim>
# xbboot -u 0x80600000 vmlinuz.bin
Info - found XBurst boot device.
set_addr 80002000h
bulk_write successfully wrote 6088 bytes.
start1 80002000h
VR_GET_CPU_INFO JZ4740V1
set_addr 80600000h
bulk_write successfully wrote 2054683 bytes.
VR_FLUSH_CACHES
start2 80600000h
</verbatim>
And at boot it says:
<verbatim>
Ben NanoNote
GPIO, clocks, SDRAM, UART setup
now jump back to BOOT ROM...
ziess 80010000
Nkernel...
the kernel...
[ 0.000000] Linux version 3.2.0prova-86405-gc97b223 (viric@bergamota) (collect2: ld returned 1 exit status) #5 PREEMPT Wed Jan 11 20:03:56 CET 2012
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 0ad0024f (Ingenic JZRISC)
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] User-defined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00002000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[1] active PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00002000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: mem=32M console=ttyS0,9600n8 ubi.mtd=2 rootfstype=ubifs root=ubi0:rootfs rw rootwait
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[ 0.000000] Memory: 27616k/32768k available (3140k kernel code, 5152k reserved, 1060k data, 176k init, 0k highmem)
[ 0.000000] NR_IRQS:190
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] Calibrating delay loop... 250.67 BogoMIPS (lpj=1253376)
[ 0.090000] pid_max: default: 32768 minimum: 301
[ 0.100000] Mount-cache hash table entries: 512
[ 0.110000] Performance counters: No available PMU.
[ 0.130000] NET: Registered protocol family 16
[ 0.160000] JZ4740 GPIO initialized
[ 0.180000] Qi Hardware JZ4740 QI LB60 setup
[ 0.290000] bio: create slab <bio-0> at 0
[ 0.310000] Advanced Linux Sound Architecture Driver Version 1.0.24.
[ 0.320000] Switching to clocksource jz4740-timer
[ 0.480000] NET: Registered protocol family 2
[ 0.490000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.500000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.510000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.520000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.530000] TCP reno registered
[ 0.540000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.550000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.560000] NET: Registered protocol family 1
[ 0.590000] JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.600000] msgmni has been set to 53
[ 0.620000] io scheduler noop registered
[ 0.620000] io scheduler deadline registered (default)
[ 0.660000] Console: switching to colour frame buffer device 40x15
[ 0.710000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.730000] serial8250.0: ttyS0 at MMIO 0x10030000 (irq = 17) is a 16550
(AND NOW, LOTS of ^@, so, zeroes)
</verbatim>
<h2>Failures<h2>
<h3>After serial8250.0..., I see lots of zeroes</h3>
Loading the driver sets 57600n8 ttyS0 configuration. Then, you better use that console
setting, instead of overriding it with things like <code>console=ttyS0,9600n8</code>.
<h3>UBI error: cannot initialize UBI, error -19</h3>
Thats in (drivers/mtd/ubi/build.c:536). -19 means, as -errno, for errno=ENODEV (No such device).
It can be the next line to:
<verbatim>
[ 0.800000] jz4740-nand jz4740-nand.0: No NAND chips found
</verbatim>
(I still don't know how to solve that. Someone (mth?) may have broken that)
|