[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Problem booting uClinux



Hi,

I am trying to boot uClinux on my custom Spartan IIe board for the first
time.  It fails towards the end of the boot process - probably when it
is trying to access the romfs.  I am using edk 6.3 and Microblaze 3.0. 
The board has been used in a microblaze stand-alone (no OS) project for
months, so the hardware is all fully debugged.

I took the uclinux-auto project as a starting point and modified it in
xps to fit my board (changed Xilinx IC, changed BRAM, removed ethernet,
changed from ddram to my sdram, etc.).  I also disabled the caches.  I
created and ran a small stand-alone MB program to exercise the SDRAM and
serial uart.  I do have flash on board, but did not want to complicate
things by trying to use it yet in uClinux.

I did not create a new uClinux platform - I copied my auto-config.in to
the arch/microblaze/platform/uclinux-auto directory.  
In the "make menuconfig" process I selected Xilinx, uclinux-auto and
customize kernel settings. I replied <ENTER> to all configuration
questions.  
In the kernel config I set:
  processor/type/features->unselected ethernet driver
  general setup-> unselected networking support
  MTD->Mapping Drivers->selected Generic RAM/ROM Filesystem support

Did make dep and make - got no errors.

Downloaded to board:
First loaded download.bit via impact - this just has the Xilinx bootloop
app in bram.
XMD% xload mhs system.mhs
XMD% connect mb mdm
XMD% dow -data /tftpboot/image.bin 0x80000000
XMD% con 0x80000000

At the Linux console I saw:
Linux version 2.4.29-uc1 (rodc@stacker) (gcc version 2.95.3-4 Xilinx EDK
6.3 Bu5On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Kernel command line: .
Console: xmbserial on UARTLite
Calibrating delay loop... 1.37 BogoMIPS
Memory: 16MB = 16MB total
Memory: 14600KB available (672K code, 923K data, 36K init)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 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: 4096 (order: 2, 16384 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Microblaze UARTlite serial driver version 1.00
ttyS0 at 0xffff2000 (irq = 1) is a Microblaze UARTlite
Starting kswapd
xgpio #0 at 0xFFFF5000 mapped to 0xFFFF5000
Xilinx GPIO registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
uclinux[mtd]: RAM probe address=0x800d88fc size=0xb7000
uclinux[mtd]: root filesystem index=0 VFS: Mounted root (romfs
filesystem) readonly.
Freeing init memory: 36K

At xmd I then saw:
XMD%
ERROR:EDK - MicroBlaze Pipeline Stalled executing Instruction at >> PC:
   0x800b5e68
   Try Resetting the Processor to Continue..

There was nothing further at the Linux console.

I guess there is something wrong with the romfs - but it looks like the
contents of uClinux-dist/romfs/bin is OK when I browse through it
(though I don't have a known good one to compare it with).  To check
integrity I ran "mb-flthdr -p init":
init
    Magic:        bFLT
    Rev:          4
    Build Date:   Thu Jun 30 09:47:00 2005
    Entry:        0x50
    Data Start:   0x82e0
    Data End:     0x8df0
    BSS End:      0x1c610
    Stack Size:   0x1000
    Reloc Start:  0x8df0
    Reloc Count:  0x146
    Flags:        0x5 ( Load-to-Ram Gzip-Compressed )

Other things I tried:
I saw that there is a menuconfig option:
  Processor type and features->Kernel cmd line support
I tried turning this off and got this at linux bootup: 
"Kernel panic: No init found.  Try passing init= option to kernel" 

I saw some list discussion of problems with the Microblaze parms
USE_BARREL, USE_DIV and USE_MSR so I turned these all off in xps and
re-did the whole process, but this did not help.

I ran "mb-objdump -hf image.elf" and got:
 
image.elf:     file format elf32-microblaze
architecture: MicroBlaze, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x80000000
 
Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000a81b0  80000000  80000000  00000094  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .intv         00000038  800a81b0  800a81b0  000a8244  2**0
                  CONTENTS, ALLOC, LOAD, CODE
  2 .sdata2       00001128  800a81e8  800a81e8  000a827c  2**3
                  CONTENTS, ALLOC, LOAD, DATA
  3 .data         00006d10  800a9310  800a9310  000a93a4  2**13
                  CONTENTS, ALLOC, LOAD, DATA
  4 .sdata        00000000  800b0020  800b0020  000b90b4  2**0
                  CONTENTS
  5 .sbss         00000000  800b0020  800b0020  000b90b4  2**0
                  CONTENTS
  6 .init         00009000  800b1000  800b1000  000b00b4  2**2
                  CONTENTS, ALLOC, LOAD, CODE
  7 .bss          0001e8fc  800ba000  800ba000  000b90b4  2**2
                  ALLOC
  8 .stab         0026b3a4  00000000  00000000  000b90b4  2**2
                  CONTENTS, READONLY, DEBUGGING
  9 .stabstr      002c4967  00000000  00000000  00324458  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .romfs        000b6c00  800ba000  800ba000  005e8dbf  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  
Is it correct that .bss and .romfs both start at the same address in
RAM?  Is there anything else I can look at to verify the integrity of
the romfs in the image.bin?   Has anyone gotten microblaze uClinux to
run in a RAM-only system?  Any insights would be appreciated.  Thanks.

Rod Campbell 


 

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/