[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] Booting uClinux
Just for kicks, try the following instead:
Xmd> dow –data image.bin 0x81800000
Xmd> con 0x81800000
David Banas
Field Applications Engineer
Nu Horizons Electronics Corp.
2070 Ringwood Avenue
San Jose, CA 95131
(408)434-0800 - office
(415)846-5837 - cell
http://www.nuhorizons.com
________________________________________
From: owner-microblaze-uclinux@itee.uq.edu.au
[mailto:owner-microblaze-uclinux@itee.uq.edu.au] On Behalf Of John McGrath
Sent: Thursday, April 14, 2005 5:41 AM
To: microblaze-uclinux@itee.uq.edu.au
Subject: Re: [microblaze-uclinux] Booting uClinux
Hi John,
I'm still using uclinux-auto (it's definatly the way to go...)
Ok, here's what I did. Commented out all the cache related lins in the
microblaze in the MHS.
XPS: make clean all
XPS: make init_bram.
This should have updated my autoconfig.in (I checked the date stamp on it
and it was right).
Then ran:
make distclean (might as well be sure...)
make menuconfig:
where I selected:
Vendor/Produce selection -> Xilinx, uclinux-auto
Kernel/library/defaults -> customise kernel settings
make asks the questions:
CFI Flash device mapped on Microblaze/ML401 (uClinux) (CONFIG_MTD_ML401)
[N/y/m/?] (NEW)
I select default of N
Conexant flash MTD support hack (CONFIG_MTD_MTDCNXT) [N/y/m/?] (NEW)
Again, I select default of N
(I do not have a flash device!)
In the menu, I select:
processor/type/features -> UNselect ethernet driver (dont have ethernet!)
general setup -> UNselect Networking support (see above!)
everything else left as defualt
run make dep
Attached is the autoconf.h and .config file, and the modifed init/main.c
(plenty of printk's!!)
And after all that, here is my terminal output.
-> download bitsream with impact:
Terminal:
-- Entering main() --
Starting MemoryTest for SDRAM_8Mx32:
Running 32-bit test...PASSED!
Running 16-bit test...PASSED!
Running 8-bit test...PASSED!
-- Exiting main() --
XMD:
connect mb mdm;
stop;
force;
dow images/image.elf
con
-> section, .text: 0x81800000-0x81894ce8
section, .intv: 0x81894ce8-0x81894d20
section, .init: 0x8189f000-0x818a7000
section, .sdata2: 0x81894d20-0x81895e48
section, .data: 0x81895e48-0x8189e020
section, .bss: 0x818a7000-0x818c58fc
section, .romfs: 0x818a7000-0x81958c00
Downloaded Program images/image.elf
Setting PC with program start addr = 0x81800000
Terminal:
Linux version 2.4.29-uc0 (jmcgrath@xcklinux3) (gcc version 2.95.3-4 Xilinx
EDK 6
.3 Build EDK_Gmm.12.2) #1 Thu Apr 14 12:40:38 IST 2005
On node 0 totalpages: 2048
zone(0): 2048 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Console: xmbserial on UARTLite
Kernel command line: °
Calibrating delay loop... 1.93 BogoMIPS
Memory: 8MB = 8MB total
Memory: 7304KB available (595K code, 195K data, 32K init)
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 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: 2048 (order: 1, 8192 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 0xa0000000 (irq = 1) is a Microblaze UARTlite
Starting kswapd
xgpio #0 at 0x81020000 mapped to 0x81020000
Xilinx GPIO registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
MBVanilla flash probe(0xff000000,8388608,4): 800000 at ff000000
CFI: Found no Flash device at location zero
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(1)
Search for id:(00 00) interleave(4) type(1)
Search for id:(00 00) interleave(4) type(1)
JEDEC: Found no Flash device at location zero
MBVanilla ram probe(0x818c58fc,729088,4): b2000 at 818c58fc
Creating 1 MTD partitions on "RAM":
0x00000000-0x000b2000 : "Romfs"
VFS: Mounted root (romfs filesystem) readonly.
jFreeing init memory: 32K
j0j1j2j3j4j5j6j7j8<0>Kernel panic: No init found. Try passing init= option
to k
ernel.
Try agian with image.bin
re-downlaod bitsream
Terminal:
-- Entering main() --
Starting MemoryTest for SDRAM_8Mx32:
Running 32-bit test...PASSED!
Running 16-bit test...PASSED!
Running 8-bit test...PASSED!
-- Exiting main() --
XMD:
connect mb mdm;
stop;
force;
dow -data images/image.bin 0x81800000
con 0x81800000
Terminal:
Linux version 2.4.29-uc0 (jmcgrath@xcklinux3) (gcc version 2.95.3-4 Xilinx
EDK 6
.3 Build EDK_Gmm.12.2) #1 Thu Apr 14 12:40:38 IST 2005
On node 0 totalpages: 2048
zone(0): 2048 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Console: xmbserial on UARTLite
Kernel command line: °
Calibrating delay loop... 1.93 BogoMIPS
Memory: 8MB = 8MB total
Memory: 6592KB available (595K code, 905K data, 32K init)
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 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: 2048 (order: 1, 8192 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 0xa0000000 (irq = 1) is a Microblaze UARTlite
Starting kswapd
xgpio #0 at 0x81020000 mapped to 0x81020000
Xilinx GPIO registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
MBVanilla flash probe(0xff000000,8388608,4): 800000 at ff000000
CFI: Found no Flash device at location zero
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(1)
Search for id:(00 00) interleave(4) type(1)
Search for id:(00 00) interleave(4) type(1)
JEDEC: Found no Flash device at location zero
MBVanilla ram probe(0x818c58fc,729088,4): b2000 at 818c58fc
Creating 1 MTD partitions on "RAM":
0x00000000-0x000b2000 : "Romfs"
VFS: Mounted root (romfs filesystem) readonly.
jFreeing init memory: 32K
j0j1j2j3j4
As we can see, the image.bin has more success. Howver, according to the ptin
it gets stalled right before it tries to execute a file off of the romfs.
This is as far as I have gotten. totally stumped!
Cheers,
John
John Williams wrote:
Hi John,
John McGrath wrote:
They are attached.
Hmm, there is at least one inconsistency I see:
From your bootlog:
> Calibrating delay loop... 1.93 BogoMIPS
Yet from your MHS file:
> PARAMETER C_USE_ICACHE = 1
> PARAMETER C_USE_DCACHE = 1
At 50MHz, there's no way you should be getting only 1.9 bogomips with I and
Dcaches enabled.
This suggests to me that your kernel config (as defined by auto-config.in)
and your hardware config (as defined my MHS/MSS) are still mismatched.
Although looking further, I see this:
PARAMETER C_USE_ICACHE = 1
PARAMETER C_ICACHE_BASEADDR = 0x10000000
PARAMETER C_ICACHE_HIGHADDR = 0x13FFFFFF
PARAMETER C_CACHE_BYTE_SIZE = 16384
PARAMETER C_ADDR_TAG_BITS = 11
PARAMETER C_USE_DCACHE = 1
PARAMETER C_DCACHE_BASEADDR = 0x10000000
PARAMETER C_DCACHE_HIGHADDR = 0x13FFFFFF
PARAMETER C_DCACHE_BYTE_SIZE = 16384
PARAMETER C_DCACHE_ADDR_TAG = 11
Your icache and dcache ranges are totally mismatched from where your
physical memory resides in the address map (0x81800000). I'm not certain
this is actually broken, but it's definitely unusual and probably not
intended. I've never tried a uclinux system where the cacheable raneg is
disjoint from the main memory range, so no guarantees there. If you don't
want caches yet, best to just turn them off.
Are you still using the "uclinux-auto" platform or did you create your own
as per the instructions in my "adding platforms HOWTO" in
linux-2.4.x/Documentation/microblaze? There are a couple of subtle steps in
those instructions that must eb followed to the letter, else you will get
inconsistencies like you are seeing here.
To double check, you should examine the file
linux-2.4.x/include/linux/autoconf.h - this is the resulting header file
produced after the auto-config.in file is parsed by the kernel config
tools. It too should be consistent with your MHS, MSS and auto-config.in
file.
This is the purpose of running the make oldconfig, after auto-config.in is
updated by libgen. My experience is that this (make oldconfig) is enough to
collect the changes, although at least one person on the list has asserted
that you need to do a full "make distclean" then start again... I'm pretty
sure this is not the case, but am ready to be proven wrong with enough
evidence :)
Post your file linux-2.4.x/.config, that should also reflect the settings
for your platform.
Ive done the steps youve asked.
I think the real problem is that the romfs seems to want to map to memory
space 0x00000000-0x000b2000, when my ram is located at 0x81800000. perhaps
it cannot find any files in my fs , and that is why it hangs?
It may be related to the romfs, but the 0-0xb2000 is not the problem. Those
addresses are relative to the MTD partition in which the romfs is located
Is there a way to test the romfs readability, some code I can enter into the
inti sequence perhaps??
In linux-2.4.x/init/main.c, around like 650, is the very tail end of the
kernel boot process, and where it tries to load the "init" application,
which kickstarts the userspace.
You could throw some printk()'s in there to get some visibility, or even
better just use mb-gdb and xmd to debug the kernel like any microblaze
program - there are some notes on how to do this on the website, under
Documentation.
Regards,
John
___________________________
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/
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
___________________________
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/