Marek,
Yes, I checked the kernel and it is enabled for ramdisk support in
Linux, gzip compression, and loop back block driver. I did find some
other posts where some folks added the address of the ram drive. So I
changed the kernel arguments from:
setenv bootargs console=ttyAM0,115200n8 debug root=/dev/ram rw ip=dhcp
fec_mac=
TO:
setenv bootargs console=ttyAM0,115200n8 debug root=/dev/ram rw
initrd=0x43000000,40K ip=dhcp fec_mac=
And now the kernel output generates a additional error line from RAMDISK:
...
...
...
RAMDISK: Couldn't find valid RAM disk image starting at 0. <<<<<<<< This
line now appears on the console
List of all partitions:
b300 3872256 mmcblk0 driver: mmcblk
b301 1024 mmcblk0p1
0800 503808 sda driver: sd
0801 503792 sda1
No filesystem could mount root, tried: ext3 ext2 vfat msdos iso9660
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(1,0)
...
...
...
Is it something with the RAM disk format or the uboot tool mkimage
parameters?
Thanks,
Bill
On 9/12/2012 6:44 PM, Marek Vasut wrote:
Dear Bill,
I'm using U-boot version: U-Boot 2012.07
Through googling, I've come across several variations of using a
ramdisk. So I selected some things that looked good. So basically, I
am building a rootfs as a ramdisk by:
dd if=/dev/zero of=./myinitrd.img bs=1M count=35
mke2fs -m 1 ./myinitrd.img
mkdir ./myinitrd
mount -t ext2 ./myinitrd.img ./myinitrd -o loop
cp -r rootfs/* ./myinitrd/.
umount ./myinitrd/
gzip ./myinitrd.img
rm -rf myinitrd
Then I use the u-boot tool to prepare it for use with u-boot by:
u-boot-imx/tools/mkimage -n 'MyRamDisk' -A arm -O linux -T
ramdisk -C none -d ./myinitrd.img.gz rootfs-initrd
I place both both my uImage and rootfs-initrd on a USB stick and insert
it into the imx28evk and enter u-boot command line. I then do:
usb start
fatload usb 0 0x42000000 uimage
fatload usb 0 0x43000000 rootfs-initrd
setenv bootargs console=ttyAM0,115200n8 debug root=/dev/ram rw
ip=dhcp fec_mac=
bootm 0x42000000 0x43000000
u-boot then starts booting with:
## Booting kernel from Legacy Image at 42000000 ...
Image Name: Linux-2.6.35.3-571-gcca29a0-g45b
Created: 2012-09-08 22:31:46 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2582304 Bytes = 2.5 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 43000000 ...
Image Name: MyRamDisk
Created: 2012-09-12 20:51:35 UTC
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 37774 Bytes = 36.9 KiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.35.3-571-gcca29a0-g45b53d0-dirty (blsousan@ubuntu)
(gcc version 4.4.4 (4.4.4_09.06.2010) ) #13 PREEMPT Sat Sep 8 14:06:34
PDT 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Freescale MX28EVK board
....
....
....
The kernel starts to boot, I get all the kernel output, and at the end
it does not find the rootfs. I get:
...
...
...
List of all partitions:
b300 3872256 mmcblk0 driver: mmcblk
b301 1024 mmcblk0p1
0800 503808 sda driver: sd
0801 503792 sda1
No filesystem could mount root, tried: ext3 ext2 vfat msdos iso9660
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(1,0)
Backtrace:
I not sure how the kernel knows where the ramdisk lives in memory (
0x43000000) where the the uboot put it ?
Thanks,
Bill
On 9/12/2012 5:29 PM, Marek Vasut wrote:
Dear Bill,
Has anyone used U-boot on the imx28evk with initrd to setup a small
rootfs in RAM? I need the ability to do have a small temp rootfs to
assist in mounting a full rootfs from a USB for field upgrade purposes.
Yes, it's a linux thingie though. What's the problem? What version of
uboot do you use?
Some ancient kernel you have ... did you enable ramdisk support in Linux? And
gzip compression for it ? And loop back block driver ?
Thanks,
Bill
Best regards,
Marek Vasut
Best regards,
Marek Vasut
--
William (Bill) L. Sousan, Ph.D.
(w) 402.331.4977 ext. 4002
[email protected]
Technical Support Inc.
11253 John Galt Blvd
Omaha, NE 68137
www.techsi.com
8(a) SDB Certified, ISO 9001:2008
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot