Hi Folks,
I'm trying to boot uclinux on the Memec 3SMB1500 board. I'm using the microblaze reference design as downloaded from the website and using the auto-config mechanism to build uclinux. I download the resultant image.bin to RAM and attempt to continue. However the uclinux initialisation bombs out pretty early..
Linux version 2.4.31-uc0 (vinc@shn-linux1) (gcc version 2.95.3-4 Xilinx EDK 6.3 Build EDK_Gm
m.12.2) #25 Thu Jul 28 11:32:01 IST 2005
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Kernel command line: ¸
Console: xmbserial on UARTLite
Calibrating delay loop... 36.96 BogoMIPS
So I decided to step through the mach_early_init code to do some sanity checks. I do this by downloading the image.bin to RAM and then hooking into XMD using mb-gdb..
$ mb-gdb -nw images/image.elf
GNU gdb 5.3Xilinx EDK 6.3 Build EDK_Gmm.10
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=microblaze"...
(gdb) target remote 172.21.3.31:1234
Remote debugging using 172.21.3.31:1234
0x00000000 in ?? ()
(gdb) set $pc=0x86000000
(gdb) b machine.c:166
Breakpoint 1 at 0x860bdb34: file machine.c, line 166.
(gdb) c
Continuing.
Breakpoint 1, mach_early_init () at machine.c:166
166 _ramstart = (unsigned long)__bss_stop + len;
(gdb) print /x len
$1 = 0xb3d80
(gdb) print /x &__bss_stop
$2 = 0x860e3c74
(gdb) p /x _ramstart
$3 = 0x861979f4
Looking at the elf header information (see below) I would have expected 'len' to be equal to 0xb4000. get_romfs_len() takes the length from the romfs image header. Should this length equal the length as per the elf header. Why the difference?
This 'len' value is used in the subsequent memmove command to move the ROMFS past the bss section.
Here's the ELF header information..
images/image.elf: file format elf32-microblaze
architecture: MicroBlaze, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x86000000
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 000b02c8 86000000 86000000 00000094 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .intv 00000038 860b02c8 860b02c8 000b035c 2**0
CONTENTS, ALLOC, LOAD, CODE
2 .sdata2 000015b0 860b0300 860b0300 000b0394 2**3
CONTENTS, ALLOC, LOAD, DATA
3 .data 00008770 860b18b0 860b18b0 000b1944 2**13
CONTENTS, ALLOC, LOAD, DATA
4 .sdata 00000000 860ba020 860ba020 000c40b4 2**0
CONTENTS
5 .sbss 00000000 860ba020 860ba020 000c40b4 2**0
CONTENTS
6 .init 0000a000 860bb000 860bb000 000ba0b4 2**2
CONTENTS, ALLOC, LOAD, CODE
7 .bss 0001ec74 860c5000 860c5000 000c40b4 2**2
ALLOC
8 .stab 002d696c 00000000 00000000 000c40b4 2**2
CONTENTS, READONLY, DEBUGGING
9 .stabstr 003c3c17 00000000 00000000 0039aa20 2**0
CONTENTS, READONLY, DEBUGGING
10 .romfs 000b4000 860c5000 860c5000 0075e637 2**0
CONTENTS, ALLOC, LOAD, DATA
Also, if I download the image.elf file via AMD to RAM and continue the initialisation goes much further...
Linux version 2.4.31-uc0 (vinc@shn-linux1) (gcc version 2.95.3-4 Xilinx EDK 6.3 Build EDK_Gm
m.12.2) #25 Thu Jul 28 11:32:01 IST 2005
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Kernel command line: ¸
Console: xmbserial on UARTLite
Calibrating delay loop... 36.96 BogoMIPS
_ramstart=0x860E3C74<6>Memory: 32MB = 32MB total
Memory: 31496KB available (704K code, 206K data, 40K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Microblaze UARTlite serial driver version 1.00
ttyS0 at 0x84040000 (irq = 2) is a Microblaze UARTlite
ttyS1 at 0x84030000 (irq = 3) is a Microblaze UARTlite
Starting kswapd
xgpio #0 at 0x84060000 mapped to 0x84060000
xgpio #1 at 0x84080000 mapped to 0x84080000
xgpio #2 at 0x84070000 mapped to 0x84070000
xgpio #3 at 0x84050000 mapped to 0x84050000
xgpio #4 at 0x840C0000 mapped to 0x840C0000
xgpio #5 at 0x84090000 mapped to 0x84090000
Xilinx GPIO registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
eth0: using fifo mode.
eth0: Xilinx EMAC #0 at 0x840B0000 mapped to 0x840B0000, irq=1
eth0: id 2.0h; block id 7, type 1
uclinux[mtd]: RAM probe address=0x860e3c74 size=0xb8101000
uclinux[mtd]: root filesystem index=0
MicroBlaze auto-config flash probe(0x84400000,4194304,4): 400000 at 84400000
CFI: Found no Flash device at location zero
Search for id:(8001 fffd) interleave(2) type(2)
Search for id:(8001 fffd) interleave(2) type(2)
Search for id:(8001 fffd) interleave(2) type(2)
Search for id:(01 01) interleave(2) type(1)
Search for id:(01 01) interleave(2) type(1)
Search for id:(01 01) interleave(2) type(1)
Search for id:(8001 c001) interleave(4) type(2)
Search for id:(8001 c001) interleave(4) type(2)
Search for id:(8001 c001) interleave(4) type(2)
Search for id:(01 fd) interleave(4) type(1)
Search for id:(01 fd) interleave(4) type(1)
Search for id:(01 fd) interleave(4) type(1)
JEDEC: Found no Flash device at location zero
MicroBlaze auto-config ram probe(0x860e3c74,-1206906880,4): b8101000 at 860e3c74
Creating 1 MTD partitions on "RAM":
0x00000000-0xb8101000 : "Romfs"
Kernel panic: VFS: Unable to mount root fs on 1f:01
Can anyone explain why uclinux appear to boot further using the elf format?
I've attached the autoconfig.in and .config files.
Thanks in advance for any pointers,
Vincent
Attachment:
config
Description: config
Attachment:
auto-config.in
Description: auto-config.in