Forums

issue with loading linux using U-boot

Started by suse auto November 10, 2009
hi,

i am using at91SAM 9263EK eval board (Rev B). I have compiled the linux
kernel 2.6.30 with at91 patches. was able to create uImage using mkimage.bin
the board has 8MB dataflash and a NAND flash.
now that while doing some experiment with SAM-BA, I erased both NAND and
data flash. If i restart the board, I see "ROMBoot >" on the serial debug
console.

any info on how to bring the board up?
I guess the BootROM code is in ROM portion of the controller and is never
erasable. I understand from the linux4sam web site that the AT91 boot strap
and U-boot are to be loaded to NAND flash using SAM-BA to start with. This
way you can further FTP the linux image and bring the board up. please
correct if i am wrong.

can I do away with data flash and every component in NAND flash only?

-susan.
On Tue, 10 Nov 2009 15:34:12 +0530
suse auto wrote:
> I guess the BootROM code is in ROM portion of the controller and is
> never erasable.

Right. ROMBoot will go look at your various devices and attempt to load
a boot image off of each of them.

> AT91 boot strap and U-boot are to be loaded to NAND flash using
> SAM-BA to start with. This way you can further FTP the linux image
> and bring the board up. please correct if i am wrong.

Correct. I've always just loaded my kernel image and root filesystem
via SAM-BA rather than using the network, but I've seen U-boot done.

One possible issue: As I mentioned in another email, the parts on our
AT91SAM9261-EK devices were "A" stepping and wouldn't boot off NAND
flash, so I put U-boot in the dataflash for testing. As someone else
mentioned, check the errata for your parts.

Dan
Hi,

Now I am able to bring the U-boot up. I used a demo batch runner available
at the below link:
ftp://www.at91.com/pub/demo/linux4sam_1.7/linux4sam-buildroot-at91sam9263ek.zip
I replaced the kernel bin file by my uImage file and modified the tcl script
to load uImage. I used the bootstrap, u-boot, jffs2 file system files 'as
is' from the package. please note that only the data_flash configuration
worked. There seems to be some issue with NAND flash booting (errata sheets
to explain the issues are available in the net).
After having U-boot up, then kernel image was loaded to the SDRAM to boot
up, but the booting gets stuck in between printing the following error
messages on the serial console. Any input on this is appreciated.
please let me know this requires any changes in the .config file to correct
the problem?

============== START CONSOLE MSG =================GPIO NAND driver, © 2004 Simtec Electronics
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq 14)
mtd_dataflash spi0.0: AT45DB642x (8448 KBytes) pagesize 1056 bytes (OTP)
mice: PS/2 mouse device common for all mice
ads7846 spi0.3: touchscreen, irq 31
input: ADS784x Touchscreen as /class/input/input0
i2c /dev entries driver
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
VFP support v0.3: not present
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing init memory: 116K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to
kernel.
[] (unwind_backtrace+0x0/0xdc) from []
(panic+0x40/0x110)
[] (panic+0x40/0x110) from [] (init_post+0xd0/0xf8)
[] (init_post+0xd0/0xf8) from [] (kernel_init+0xbc/0xe4)
[] (kernel_init+0xbc/0xe4) from [] (do_exit+0x0/0x614)
[] (do_exit+0x0/0x614) from [<00000001>] (0x1)

============== END of CONSOLE MSG =================
regards,
susan.
On Tue, Nov 10, 2009 at 9:45 PM, Dan Lyke wrote:

> On Tue, 10 Nov 2009 15:34:12 +0530
> suse auto > wrote:
> > I guess the BootROM code is in ROM portion of the controller and is
> > never erasable.
>
> Right. ROMBoot will go look at your various devices and attempt to load
> a boot image off of each of them.
> > AT91 boot strap and U-boot are to be loaded to NAND flash using
> > SAM-BA to start with. This way you can further FTP the linux image
> > and bring the board up. please correct if i am wrong.
>
> Correct. I've always just loaded my kernel image and root filesystem
> via SAM-BA rather than using the network, but I've seen U-boot done.
>
> One possible issue: As I mentioned in another email, the parts on our
> AT91SAM9261-EK devices were "A" stepping and wouldn't boot off NAND
> flash, so I put U-boot in the dataflash for testing. As someone else
> mentioned, check the errata for your parts.
>
> Dan
>
On Friday 13 November 2009 08:33:05 suse auto wrote:
> Hi,
>

Hi,

I don't know the AT91 specific procedure, I'll just make a general comment.

[...]
Hi,
here is the complete debug message starting from Romboot. Can any one help
me what could be the reason the for kernel booting to stop in between?
===== START=======RomBOOT >
U-Boot 1.3.4 (Sep 24 2009 - 16:55:26)
DRAM: 64 MB
NAND: 256 MiB
DataFlash:AT45DB642
Nb pages: 8192
Page Size: 1056
Size= 8650752 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C00041FF (RO) Bootstrap
Area 1: C0004200 to C00083FF Environment
Area 2: C0008400 to C0041FFF (RO) U-Boot
Area 3: C0042000 to C0251FFF Kernel
Area 4: C0252000 to C083FFFF FS
In: serial
Out: serial
Err: serial
Net: macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0x45e1)
Hit any key to stop autoboot: 3 2 1 0
## Booting kernel from Legacy Image at 22200000 ...
Image Name: Linux-2.6.30.9
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1431388 Bytes = 1.4 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.30.9 (r...@localhost.localdomain) (gcc version 4.3.2
(Sourcery G++ Lite 2008q3-72) ) #18 Fri Nov 13 17:31:14 IST 2009
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr052173
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9263-EK
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache buffered
Clocks: CPU 199 MHz, master 99 MHz, main 16.367 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: memdM console=ttyS0,115200 root=/dev/mtdblock1 rw
rootfstype=jffs2
NR_IRQS:192
AT91: 160 gpio irqs in 5 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: 61932KB available (2468K code, 249K data, 116K init, 0K highmem)
Calibrating delay loop... 13.88 BogoMIPS (lpjT144)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
khelper used greatest stack depth: 6844 bytes left
net_namespace: 296 bytes
NET: Registered protocol family 16
bio: create slab at 0
SCSI subsystem initialized
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
JFFS2 version 2.2. (NAND) (SUMMARY) 2001-2006 Red Hat, Inc.
msgmni has been set to 121
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: 150KiB frame buffer at 23900000 (mapped at
ffc00000)
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00700000 (mapped at
c4866000), irq 26
atmel_usart.0: ttyS0 at MMIO 0xfeffee00 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfff8c000 (irq = 7) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
nbd: registered device at major 43
Driver 'sd' needs updating - please use bus_type methods
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffbc000 irq 21 (3a:1f:34:08:54:54)
eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addrffffff:00,
irq=-1)
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V
8-bit)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Bad eraseblock 0 at 0x000000000000
Bad eraseblock 1 at 0x000000020000
Bad eraseblock 2 at 0x000000040000
Bad eraseblock 3 at 0x000000060000
Bad eraseblock 4 at 0x000000080000
Bad eraseblock 5 at 0x0000000a0000
Bad eraseblock 6 at 0x0000000c0000
Bad eraseblock 7 at 0x0000000e0000
Bad eraseblock 8 at 0x000000100000
Bad eraseblock 9 at 0x000000120000
Bad eraseblock 10 at 0x000000140000
Bad eraseblock 11 at 0x000000160000
Bad eraseblock 12 at 0x000000180000
Bad eraseblock 13 at 0x0000001a0000
Bad eraseblock 14 at 0x0000001c0000
Bad eraseblock 15 at 0x0000001e0000
Bad eraseblock 16 at 0x000000200000
Bad eraseblock 17 at 0x000000220000
Bad eraseblock 18 at 0x000000240000
Bad eraseblock 24 at 0x000000300000
Bad eraseblock 25 at 0x000000320000
Bad eraseblock 26 at 0x000000340000
Bad eraseblock 27 at 0x000000360000
Bad eraseblock 28 at 0x000000380000
Bad eraseblock 29 at 0x0000003a0000
Bad eraseblock 30 at 0x0000003c0000
Bad eraseblock 31 at 0x0000003e0000
Bad eraseblock 32 at 0x000000400000
Bad eraseblock 33 at 0x000000420000
Bad eraseblock 34 at 0x000000440000
Bad eraseblock 35 at 0x000000460000
Bad eraseblock 36 at 0x000000480000
Bad eraseblock 37 at 0x0000004a0000
Bad eraseblock 38 at 0x0000004c0000
Bad eraseblock 39 at 0x0000004e0000
Bad eraseblock 40 at 0x000000500000
Bad eraseblock 41 at 0x000000520000
Bad eraseblock 42 at 0x000000540000
Bad eraseblock 43 at 0x000000560000
Bad eraseblock 44 at 0x000000580000
Bad eraseblock 45 at 0x0000005a0000
Bad eraseblock 46 at 0x0000005c0000
Bad eraseblock 47 at 0x0000005e0000
Bad eraseblock 48 at 0x000000600000
Bad eraseblock 49 at 0x000000620000
Bad eraseblock 50 at 0x000000640000
Bad eraseblock 51 at 0x000000660000
Bad eraseblock 52 at 0x000000680000
Bad eraseblock 53 at 0x0000006a0000
Bad eraseblock 54 at 0x0000006c0000
Bad eraseblock 55 at 0x0000006e0000
Bad eraseblock 56 at 0x000000700000
Bad eraseblock 57 at 0x000000720000
Bad eraseblock 58 at 0x000000740000
Bad eraseblock 59 at 0x000000760000
Bad eraseblock 60 at 0x000000780000
Bad eraseblock 61 at 0x0000007a0000
Bad eraseblock 62 at 0x0000007c0000
Bad eraseblock 63 at 0x0000007e0000
Bad eraseblock 64 at 0x000000800000
Bad eraseblock 65 at 0x000000820000
Bad eraseblock 66 at 0x000000840000
Bad eraseblock 67 at 0x000000860000
Bad eraseblock 68 at 0x000000880000
Bad eraseblock 69 at 0x0000008a0000
Bad eraseblock 70 at 0x0000008c0000
Bad eraseblock 71 at 0x0000008e0000
Bad eraseblock 72 at 0x000000900000
Bad eraseblock 73 at 0x000000920000
Bad eraseblock 74 at 0x000000940000
Bad eraseblock 75 at 0x000000960000
Bad eraseblock 76 at 0x000000980000
Bad eraseblock 77 at 0x0000009a0000
Bad eraseblock 78 at 0x0000009c0000
Bad eraseblock 79 at 0x0000009e0000
Bad eraseblock 80 at 0x000000a00000
Bad eraseblock 81 at 0x000000a20000
Bad eraseblock 82 at 0x000000a40000
Bad eraseblock 83 at 0x000000a60000
Bad eraseblock 84 at 0x000000a80000
Bad eraseblock 85 at 0x000000aa0000
Bad eraseblock 86 at 0x000000ac0000
Bad eraseblock 87 at 0x000000ae0000
Bad eraseblock 88 at 0x000000b00000
Bad eraseblock 89 at 0x000000b20000
Bad eraseblock 90 at 0x000000b40000
Bad eraseblock 91 at 0x000000b60000
Bad eraseblock 92 at 0x000000b80000
Bad eraseblock 93 at 0x000000ba0000
Bad eraseblock 94 at 0x000000bc0000
Bad eraseblock 95 at 0x000000be0000
Bad eraseblock 96 at 0x000000c00000
Bad eraseblock 97 at 0x000000c20000
Bad eraseblock 98 at 0x000000c40000
Bad eraseblock 99 at 0x000000c60000
Bad eraseblock 100 at 0x000000c80000
Bad eraseblock 101 at 0x000000ca0000
Bad eraseblock 102 at 0x000000cc0000
Bad eraseblock 103 at 0x000000ce0000
Bad eraseblock 104 at 0x000000d00000
Bad eraseblock 105 at 0x000000d20000
Bad eraseblock 106 at 0x000000d40000
Bad eraseblock 107 at 0x000000d60000
Bad eraseblock 108 at 0x000000d80000
Bad eraseblock 109 at 0x000000da0000
Bad eraseblock 110 at 0x000000dc0000
Bad eraseblock 111 at 0x000000de0000
Bad eraseblock 112 at 0x000000e00000
Bad eraseblock 113 at 0x000000e20000
Bad eraseblock 114 at 0x000000e40000
Bad eraseblock 115 at 0x000000e60000
Bad eraseblock 116 at 0x000000e80000
Bad eraseblock 117 at 0x000000ea0000
Bad eraseblock 118 at 0x000000ec0000
Bad eraseblock 119 at 0x000000ee0000
Bad eraseblock 120 at 0x000000f00000
Bad eraseblock 121 at 0x000000f20000
Bad eraseblock 122 at 0x000000f40000
Bad eraseblock 123 at 0x000000f60000
Bad eraseblock 124 at 0x000000f80000
Bad eraseblock 125 at 0x000000fa0000
Bad eraseblock 126 at 0x000000fc0000
Bad eraseblock 127 at 0x000000fe0000
Bad eraseblock 128 at 0x000001000000
Bad eraseblock 129 at 0x000001020000
Bad eraseblock 130 at 0x000001040000
Bad eraseblock 131 at 0x000001060000
Bad eraseblock 132 at 0x000001080000
Bad eraseblock 133 at 0x0000010a0000
Bad eraseblock 134 at 0x0000010c0000
Bad eraseblock 135 at 0x0000010e0000
Bad eraseblock 136 at 0x000001100000
Bad eraseblock 137 at 0x000001120000
Bad eraseblock 138 at 0x000001140000
Bad eraseblock 139 at 0x000001160000
Bad eraseblock 140 at 0x000001180000
Bad eraseblock 141 at 0x0000011a0000
Bad eraseblock 142 at 0x0000011c0000
Bad eraseblock 143 at 0x0000011e0000
Bad eraseblock 144 at 0x000001200000
Bad eraseblock 145 at 0x000001220000
Bad eraseblock 146 at 0x000001240000
Bad eraseblock 147 at 0x000001260000
Bad eraseblock 148 at 0x000001280000
Bad eraseblock 149 at 0x0000012a0000
Bad eraseblock 150 at 0x0000012c0000
Bad eraseblock 151 at 0x0000012e0000
Bad eraseblock 152 at 0x000001300000
Bad eraseblock 153 at 0x000001320000
Bad eraseblock 154 at 0x000001340000
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000004000000 : "Partition 1"
0x000004000000-0x000010000000 : "Partition 2"
GPIO NAND driver, 2004 Simtec Electronics
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq 14)
mtd_dataflash spi0.0: AT45DB642x (8448 KBytes) pagesize 1056 bytes (OTP)
mice: PS/2 mouse device common for all mice
ads7846 spi0.3: touchscreen, irq 31
input: ADS784x Touchscreen as /class/input/input0
i2c /dev entries driver
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
VFP support v0.3: not present
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing init memory: 116K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to
kernel.
[] (unwind_backtrace+0x0/0xdc) from []
(panic+0x40/0x110)
[] (panic+0x40/0x110) from [] (init_post+0xd0/0xf8)
[] (init_post+0xd0/0xf8) from [] (kernel_init+0xbc/0xe4)
[] (kernel_init+0xbc/0xe4) from [] (do_exit+0x0/0x614)
[] (do_exit+0x0/0x614) from [<00000001>] (0x1)
====END=====
On Fri, Nov 13, 2009 at 12:29 PM, Caglar Akyuz > wrote:

> On Friday 13 November 2009 08:33:05 suse auto wrote:
> > Hi,
> > Hi,
>
> I don't know the AT91 specific procedure, I'll just make a general comment.
>
> [...]
>
> >
> > ============== START CONSOLE MSG =================> > GPIO NAND driver, © 2004 Simtec Electronics
> > atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq 14)
> > mtd_dataflash spi0.0: AT45DB642x (8448 KBytes) pagesize 1056 bytes (OTP)
> > mice: PS/2 mouse device common for all mice
> > ads7846 spi0.3: touchscreen, irq 31
> > input: ADS784x Touchscreen as /class/input/input0
> > i2c /dev entries driver
> > TCP cubic registered
> > NET: Registered protocol family 17
> > RPC: Registered udp transport module.
> > RPC: Registered tcp transport module.
> > lib80211: common routines for IEEE802.11 drivers
> > VFP support v0.3: not present
> > drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
> > VFS: Mounted root (jffs2 filesystem) on device 31:1.
> > Freeing init memory: 116K
> > Warning: unable to open an initial console.
> > Kernel panic - not syncing: No init found. Try passing init= option to
> > kernel.
>
> Some jffs2 root file system seems to be mounted but console and init
> command
> line options are missing/wrong. Can you check kernel command line options
> in
> the u-boot?
>
> And please provide complete kernel startup log next time. For instance,
> kernel
> command line options are printed in the beginning.
>
> Regards,
> Caglar
>
>
> Yahoo! Groups Links
On Fri, 13 Nov 2009 12:03:05 +0530
suse auto wrote:
> Warning: unable to open an initial console.
> Kernel panic - not syncing: No init found. Try passing init= option
> to kernel.
> [] (unwind_backtrace+0x0/0xdc) from []
> (panic+0x40/0x110)
[snip]

So it's not finding "init" on your filesystem. Usually this is an
executable in "/sbin/init", although obviously you can change this with
compilation options, or by passing "init=/sbin/somethingelse" or
whatever to the kernel in your boot loader.

My guess is that you've managed to put an empty filesystem on the
machine. It's managing to find the filesystem, and mount the root
filesystem, but not load the init process.

When I was debugging my SAM-BA loading scripts I tried
replacing single bits with my own stuff: Load my own kernel, leave
their initial boot loader, u-boot and filesystem in place, then load my
filesystem as well, and so forth.

A little later I'll dig through the Windows machine and see if I can
find some of my TCL scripts which handled my own U-boot, which were
derived from ones that someone else in this list was kind enough to
send me.

Dan