Subject: ramdisk setup?

From: Chris Blazie <[email-masked]>
Date: Wed, 10 May 2000 16:42:12 -0400 (EDT)

I've become kind of stuck in the boot process somewhere after the
ramdisk apparently gets mounted.  In fixup_sa1100 I have:

                SET_BANK( 0, 0xc0000000, 64*1024*1024 );
                SET_BANK( 1, 0xc8000000, 64*1024*1024 );        
                mi->nr_banks = 2;    

                ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
                setup_ramdisk( 1, 0, 0, 8192 );                         
                setup_initrd( __phys_to_virt(0xc0400000), 3*1024*1024 );
}

	But it stops as shown below.  I'm using Nicolas's ramdisk_img.gz.
I tried setting init->bash but it's apparently not getting that far.

	Does this setup look correct?

	Also, I want to make the ramdisk live in flash when everything
else comes up okay.  What is required to make a ramdisk in flash get
mounted properly?

Thanks,
Chris  

Linux version 2.3.99-pre3-rmk3-np2 (root@cassius) (gcc version 2.95.2
20000212 (re0
Architecture: Blazie Engineering Sherman
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
On node 1 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Calibrating delay loop... 124.52 BogoMIPS
Memory: 64MB 64MB = 128MB total
Memory: 124616KB available (596K code, 414K data, 8K init)
Buffer-cache hash table entries: 8192 (order: 3, 32768 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.3
Based upon Swansea University Computer Society NET3.039
Starting kswapd v1.6
SA1100 serial driver version 1.2
ttyS0 on SA1100 UART3 (irq 17)
ttyS1 on SA1100 UART1 (irq 15)
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
RAMDISK: Compressed image found at block 0
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 8k init

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Nicolas Pitre <[email-masked]>
Date: Wed, 10 May 2000 17:11:17 -0400 (EDT)

>                 SET_BANK( 1, 0xc8000000, 64*1024*1024 );        

Do you really have that amount of ram?
You might try with:

                SET_BANK( 0, 0xc0000000, 16*1024*1024 );
                mi->nr_banks = 1;

just to see if it makes a difference (besides the amount of ram of
course).

> I tried setting init->bash but it's apparently not getting that far.

Be sure you have /dev/console as a chrdev with major 5 minor 1, not a
symlink to /dev/ttyS0.  If for example your ttyS0 isn't the serial port on
which boot messages are sent, you might well be running a shell in the
air.

> else comes up okay.  What is required to make a ramdisk in flash get

Either you make your bootloader copy the ramdisk from flash to ram before
booting the kernel, or you modify the kernel to grab the initrd data
directly from Flash (no bootmem allocation, no page freeing at the end,
etc.)

Alternately you could use my flash block driver (if you use Intel flashes)
and boot directly on the Flash.

Nicolas

---

From: Chris Blazie <[email-masked]>
Date: Wed, 10 May 2000 21:46:53 -0400 (EDT)

> Do you really have that amount of ram?

	On this daughterboard, yes.  But it's possible that not all of it
is properly enabled; I am only cautiously optimistic that all of our SDRAM
problems are solved.

> just to see if it makes a difference (besides the amount of ram of

	Good idea, but no luck when I tried it.  Can you tell me where
(roughly) in the source I'm getting stuck?  I think I can track down the
problem if I can figure out where it's supposed to be going at that point.

Thanks,
Chris

---

From: Nicolas Pitre <[email-masked]>
Date: Wed, 10 May 2000 22:56:38 -0400 (EDT)

> is properly enabled; I am only cautiously optimistic that all of our SDRAM

Better try to be absolutely sure you solved them...  otherwise anything
can happen.

> problem if I can figure out where it's supposed to be going at that point.

Place some printk()'s through the kernel until you find something.  For a
starter, look in linux/init/main.c at the very bottom and see if execution
reaches the call to execve() and so on.

Nicolas