[U-Boot-Users] RE: start / load addresses for initrd
Jerry Walden
jwalden at digitalatlantic.com
Wed Apr 2 00:34:47 CEST 2003
>Where did you get this ramdisk image from?
I made the ramdisk image using the following procedure:
dd if=/dev/zero of=ramdisk bs=1k count=16384
/sbin/mke2fs -q -F -m0 ramdisk
mount -o loop ramdisk mountpoint
cd mountpoint
tar xf ../fsimage.tar
sync
sleep 1
sync
cd ..
umount mountpoint
sync
gzip -9 ramdisk
mkimage -n 'DA Ramdisk Image' -A ppc -O linux -T ramdisk -C gzip -d
ramdisk.gz initrd
>What makes you think it is working at all?
I performed the following procedure to verify it.
[root at hhl initrd]# dd if=initrd of=ramdisk.gz bs=64 skip=1
23583+1 records in
23583+1 records out
[root at hhl initrd]# gzip -d ramdisk.gz
[root at hhl initrd]# mount -o loop ramdisk mountpoint
[root at hhl initrd]# ls -al mountpoint
total 26
drwxr-xr-x 10 root root 1024 Mar 20 15:34
drwxr-xr-x 3 root root 4096 Apr 1 16:31
drwxr-xr-x 2 root root 1024 Mar 20 15:34
drwxr-xr-x 2 root root 2048 Mar 20 15:34
drwxr-xr-x 6 root root 1024 Mar 20 15:34
drwxr-xr-x 2 root root 2048 Mar 20 15:34
drwxr-xr-x 2 root root 12288 Mar 20 15:34
drwxr-xr-x 2 root root 1024 Mar 20 15:34
drwxr-xr-x 5 root root 1024 Mar 20 15:34
drwxr-xr-x 4 root root 1024 Mar 20 15:34
>
>Best regards,
>
>Wolfgang Denk
Below is a log of my BDI session (where I load the kernel and initrd) and
beneath that is a log of
my u-boot session - note: the command line is shown.
I have studied the code in rd.c, and the message is coming from a routine
called "flush_window" -
there is something I do not understand - I do not see a call to flush_window
anywhere, and the
declaration has an __init in front of it. Can anyone explain to me how the
routine gets called?
BDI>reset
BDI>- TARGET: processing user reset request
BDI>- TARGET: reseting target passed
BDI>- TARGET: processing target startup ....
BDI>- TARGET: processing target startup passed
BDI>go
- Target started with DBCR0 = 0x80000001
BDI>halt
Target state : debug mode
Debug entry cause : JTAG stop request
Current PC : 0x03fd236c
Current CR : 0x24002042
Current MSR : 0x00021000
Current LR : 0x03fd236c
BDI>load 0x100000 vmlinux.PPCBoot BIN
Loading vmlinux.PPCBoot , please wait ....
Loading program file passed
BDI>load 0x200000 initrd BIN
Loading initrd , please wait ....
Loading program file passed
BDI>go 0x03fd236c
- Target started with DBCR0 = 0x80000001
U-Boot 0.2.0 (Mar 27 2003 - 09:29:40)
CPU: IBM PowerPC 405GPr Rev. A at 266.666 MHz (PLB=133, OPB=66, EBC=26
MHz)
PCI async ext clock used, internal PCI arbiter enabled
16 kB I-Cache 16 kB D-Cache
Board: ### No HW ID - assuming WALNUT405
I2C: ready
DRAM: 64 MB
Now running in RAM - U-Boot at: 03fcf000
FLASH: 512 kB
*** Warning - bad CRC, using default environment
PCI: Bus Dev VenId DevId Class Int
PCI Autoconfig: Memory region: [20000000-27ffffff]
PCI Autoconfig: I/O region: [800000-3ffffff]
PCI Scan: Found Bus 0, Device 0, Function 0
PCI Scan: Found Bus 0, Device 7, Function 0
PCI Autoconfig: BAR 0, Mem, size=0x1000000, address=0x20000000
PCI Autoconfig: BAR 1, I/O, size=0xffffff04, No room in resource
PCI Autoconfig: BAR 2, I/O, size=0x1000000, address=0x1000000
00 07 1394 0978 0200 1c
In: serial
Out: serial
Err: serial
U-Boot relocated to 03fcf000
IDE: Bus 0: port = c
OK
H Device 0: Model: SanDisk SDCFB-32 Firm: Vdg 1.23. Ser#: 003917A2203F2620
Type: Removable Hard Disk
Capacity: 30.6 MB = 0.0 GB (62720 x 512)
=>
=> imi 0x100000
## Checking Image at 00100000 ...
Image Name: Linux-2.4.18_mvl30-walnut
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 298672 Bytes = 291.7 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
=> imi 0x200000
## Checking Image at 00200000 ...
Image Name: DA Ramdisk Image
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 1509352 Bytes = 1.4 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
=> printenv
bootargs=root=/dev/ram rw ramdisk_size=8192 console=ttyS0,9600n8
console=tty0
bootcmd=bootm ffc0000
baudrate=9600
loads_echo=1
stdin=serial
stdout=serial
stderr=serial
Environment size: 169/65532 bytes
=> bootm 0x100000 0x200000
## Booting image at 00100000 ...
Image Name: Linux-2.4.18_mvl30-walnut
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 298672 Bytes = 291.7 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Current stack ends at 0x03F9EBE8 => set upper limit to 0x00800000
## cmdline at 0x007FFF00 ... 0x007FFF44
memstart = 0x00000000
memsize = 0x04000000
flashstart = 0xFFF80000
flashsize = 0x00080000
flashoffset = 0x00031000
sramstart = 0x00000000
sramsize = 0x00000000
bootflags = 0x001E8480
procfreq = 266.666 MHz
plb_busfreq = 133.333 MHz
pci_busfreq = 33.333 MHz
ethaddr = 00:00:00:00:0:00
IP addr = 0.0.0.0
baudrate = 9600 bps
## Loading RAMDisk Image at 00200000 ...
Image Name: DA Ramdisk Image
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 1509352 Bytes = 1.4 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## initrd at 0x00200040 ... 0x00370827 (len=1509352=0x1707E8)
Loading Ramdisk to 03e2d000, end 03f9d7e8 ... OK
## Transferring control to Linux (at address 00000000) ...
Linux version 2.4.18_mvl30-walnut (root at hhl) (gcc version 3.2.1 20020930
(MontaVista)) #33 Tue Mar 25
<6>IBM Sycamore (IBM405GPr) Platform
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram rw ramdisk_size=8192 console=ttyS0,9600n8
console=tty0
serial_console_setup options = 9600n8 baud = 9600 state->baud_base = 691200
baud = 9600
quot = 72
info->io_type = SERIAL_IO_MEM info->iomem_base = ef600300
Calibrating delay loop... 266.24 BogoMIPS
Memory: 62268k available (512k kernel code, 212k data, 32k init, 0k highmem)
Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
OCP uart ver 1.2 init complete
Starting kswapd
Disabling the Out Of Memory Killer
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0x0000 (irq = 0) is a 16550A
ttyS01 at 0x0000 (irq = 1) is a 16550A
block: 128 slots per queue, batch=32
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
Tracer: Initialization complete
RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (ramdisk too small?) (-28 != 32768)
More information about the U-Boot
mailing list