public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bill <bsousan@techsi.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] using initrd with U-boot on the imx28evk
Date: Thu, 13 Sep 2012 09:32:26 -0500	[thread overview]
Message-ID: <5051EE7A.5050406@techsi.com> (raw)
In-Reply-To: <201209130144.28960.marex@denx.de>

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 at 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
bsousan at techsi.com
Technical Support Inc.
11253 John Galt Blvd
Omaha, NE 68137
www.techsi.com
8(a) SDB Certified, ISO 9001:2008

  reply	other threads:[~2012-09-13 14:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 21:31 [U-Boot] using initrd with U-boot on the imx28evk Bill
2012-09-12 22:29 ` Marek Vasut
2012-09-12 23:26   ` Bill
2012-09-12 23:44     ` Marek Vasut
2012-09-13 14:32       ` Bill [this message]
2012-09-17 21:31         ` Marek Vasut
2012-09-17 21:44           ` Fabio Estevam
2012-09-18 13:22             ` Bill
2012-09-18 13:36               ` Marek Vasut
2012-09-18 14:16                 ` Bill
2012-09-18 17:27               ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5051EE7A.5050406@techsi.com \
    --to=bsousan@techsi.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox