Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] How to get the kernel to mount a rootfs without an initramfs ?? (2)
@ 2014-02-13  8:40 Frank Ihle
  2014-02-13  9:14 ` Sagaert Johan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Frank Ihle @ 2014-02-13  8:40 UTC (permalink / raw)
  To: buildroot

Hi everyone,

I already encountered you with this problem and is yet not solved, but it was split up so here is some kind of a summary of what had happened, I hope someone knows the solution:



I'm using an embedded board ARM9 SAM9G25 which I want to boot from SD 
Card. When I build a linux kernel with a built-in rootfs (initramfs) 
then it's working as it should. Now I want to separate kernel from 
rootfs and I generated an rootfs.squashfs.



The kernel command line is now

console=ttyAT0,115200 root=/dev/mmcblk0 ro rootfstype=squashfs



When I then boot my system the following kernel panic occurs:



VFS: Cannot open root device "mmcblk0" or unknown-block(0,0)

Please append a correct "root=" boot option; here are the available partitions:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)



I believe that partitioning doesn't lead to the solution, since booting 
with the same settings but with an initramfs is possible.



I found out that when booting with the initramfs image, when I do an ls /dev neither mmcblk nor sdb is listed.



After hitting dmesg following interesting lines appear:



mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0

atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots

mmc_host mmc0: card is not present

mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0

atmel_mci atmel_mci.1: Atmel MCI controller at 0xf000c000 irq 26, 1 slots

mmc_host mmc1: card is not present



(Yes the card is in the slot ;)



So what I think happens now is, that U-Boot can read the SD device but 
the kernel don't ( since an initramfs is bootable, a single kernel can
 be loaded too but the rootfs, opened from kernel, cannot be found). In 
make linux menuconfig I already enabled



Device Drivers

 <*> MMC/SD/SDIO card support

+ + <*> MMC block device driver

+ + <*> MMC host test driver

+ + <*> Atmel SD/MMC Driver (Atmel Multimedia Card Interface support)

+ + [ * ] Atmel MCI DMA support (Exp.)

+ + <M> Secure Digital Host Controller Interface support



but still with this setting it seems that the kernel is not able to use the SD 
device. I'm a bit clueless at this point, can someone give me a hint?



Kind regards



Frank

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140213/ee21ecf4/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] How to get the kernel to mount a rootfs without an initramfs ?? (2)
  2014-02-13  8:40 [Buildroot] How to get the kernel to mount a rootfs without an initramfs ?? (2) Frank Ihle
@ 2014-02-13  9:14 ` Sagaert Johan
  2014-02-13 13:09 ` Mike Zick
  2014-02-16 23:10 ` Arnout Vandecappelle
  2 siblings, 0 replies; 5+ messages in thread
From: Sagaert Johan @ 2014-02-13  9:14 UTC (permalink / raw)
  To: buildroot

Hi
 
Try adding rootwait on the kernel cmd line, not sure if it is needed in case of bootining from sd
but I had to add this before when booting from an USB device.
rootwait gives the kernel time to finisch the USB initialisation.
Why not simply make an ext2 filesystem and partition on your sd card?

Regards Johan


________________________________

Van: buildroot-bounces at busybox.net [mailto:buildroot-bounces at busybox.net] Namens Frank Ihle
Verzonden: donderdag 13 februari 2014 9:41
Aan: buildroot at busybox.net
Onderwerp: [Buildroot] How to get the kernel to mount a rootfs without an initramfs ?? (2)


Hi everyone,

I already encountered you with this problem and is yet not solved, but it was split up so here is some kind of a summary of what had
happened, I hope someone knows the solution:



I'm using an embedded board ARM9 SAM9G25 which I want to boot from SD Card. When I build a linux kernel with a built-in rootfs
(initramfs) then it's working as it should. Now I want to separate kernel from rootfs and I generated an rootfs.squashfs.

The kernel command line is now
console=ttyAT0,115200 root=/dev/mmcblk0 ro rootfstype=squashfs

When I then boot my system the following kernel panic occurs:

VFS: Cannot open root device "mmcblk0" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I believe that partitioning doesn't lead to the solution, since booting with the same settings but with an initramfs is possible.

I found out that when booting with the initramfs image, when I do an ls /dev neither mmcblk nor sdb is listed.

After hitting dmesg following interesting lines appear:

mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots
mmc_host mmc0: card is not present
mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
atmel_mci atmel_mci.1: Atmel MCI controller at 0xf000c000 irq 26, 1 slots
mmc_host mmc1: card is not present

(Yes the card is in the slot ;)

So what I think happens now is, that U-Boot can read the SD device but the kernel don't ( since an initramfs is bootable, a single
kernel can be loaded too but the rootfs, opened from kernel, cannot be found). In make linux menuconfig I already enabled

Device Drivers
<*> MMC/SD/SDIO card support
+ + <*> MMC block device driver
+ + <*> MMC host test driver
+ + <*> Atmel SD/MMC Driver (Atmel Multimedia Card Interface support)
+ + [ * ] Atmel MCI DMA support (Exp.)
+ + <M> Secure Digital Host Controller Interface support

but still with this setting it seems that the kernel is not able to use the SD device. I'm a bit clueless at this point, can someone
give me a hint?

Kind regards

Frank

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] How to get the kernel to mount a rootfs without an initramfs ?? (2)
  2014-02-13  8:40 [Buildroot] How to get the kernel to mount a rootfs without an initramfs ?? (2) Frank Ihle
  2014-02-13  9:14 ` Sagaert Johan
@ 2014-02-13 13:09 ` Mike Zick
  2014-02-16 23:10 ` Arnout Vandecappelle
  2 siblings, 0 replies; 5+ messages in thread
From: Mike Zick @ 2014-02-13 13:09 UTC (permalink / raw)
  To: buildroot

On Thu, 13 Feb 2014 09:40:57 +0100
"Frank Ihle" <frank.ihle@hs-offenburg.de> wrote:

> console=ttyAT0,115200 root=/dev/mmcblk0 ro rootfstype=squashfs
> 

/dev/mmcblk0 is the ***root of the (raw) device***.
/dev/mmcblk0p0 is the first partition
/dev/mmcblk0p1 is the second partition
etc.

> 
> 
> When I then boot my system the following kernel panic occurs:
> VFS: Cannot open ***root device*** "mmcblk0" or unknown-block(0,0)
>

Which is correct and specific - the ***root of the (raw) device*** is
not intended to be opened with VFS.

Put **at least** one partition on the storage device, use it for your
file system root (not device root).

Mike

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] How to get the kernel to mount a rootfs without an initramfs ?? (2)
  2014-02-13  8:40 [Buildroot] How to get the kernel to mount a rootfs without an initramfs ?? (2) Frank Ihle
  2014-02-13  9:14 ` Sagaert Johan
  2014-02-13 13:09 ` Mike Zick
@ 2014-02-16 23:10 ` Arnout Vandecappelle
  2014-02-17  8:23   ` [Buildroot] Antw: " Frank Ihle
  2 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2014-02-16 23:10 UTC (permalink / raw)
  To: buildroot

On 13/02/14 09:40, Frank Ihle wrote:
> VFS: Cannot open root device "mmcblk0" or unknown-block(0,0)
> Please append a correct "root=" boot option; here are the available
> partitions:
> Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(0,0)
> 
> I believe that partitioning doesn't lead to the solution, since booting
> with the same settings but with an initramfs is possible.
> 
> I found out that when booting with the initramfs image, when I do an ls
> /dev neither mmcblk nor sdb is listed.
> 
> After hitting dmesg following interesting lines appear:
> 
> mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0

 I'm not familiar with the Atmel MCI controller, but my gut feeling says
that all these zeroes are a bad sign.

 As I said before: you should check the BSP for your board, there is
probably something wrong there.

 For sure, this issue is not buildroot-related. It's purely kernel-related.


 Regards,
 Arnout

> atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots
> mmc_host mmc0: card is not present
> mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
> atmel_mci atmel_mci.1: Atmel MCI controller at 0xf000c000 irq 26, 1 slots
> mmc_host mmc1: card is not present
> 
> (Yes the card is in the slot ;)
[snip]

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] Antw: Re: How to get the kernel to mount a rootfs without an initramfs ?? (2)
  2014-02-16 23:10 ` Arnout Vandecappelle
@ 2014-02-17  8:23   ` Frank Ihle
  0 siblings, 0 replies; 5+ messages in thread
From: Frank Ihle @ 2014-02-17  8:23 UTC (permalink / raw)
  To: buildroot

I was thinking the same when I read those lines. But a bad sign may be 
not the right word, when u-boot is able to handle the SD device. So the 
kernel just isn't able to find what he actually should. Sadly my time is
 running short and I can't figure out right now what's the problem. 
Thanks for the help so far.

Kind Regards,

Frank

> I'm not familiar with the Atmel MCI controller, but my gut feeling says
> that all these zeroes are a bad sign.
>
 > As I said before: you should check the BSP for your board, there is
> probably something wrong there.
> 
 > For sure, this issue is not buildroot-related. It's purely kernel-related.
>
>
 > Regards,
 > Arnout
> 
> atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots
> mmc_host mmc0: card is not present
> mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
> atmel_mci atmel_mci.1: Atmel MCI controller at 0xf000c000 irq 26, 1 slots
> mmc_host mmc1: card is not present
> 
> (Yes the card is in the slot ;)
> [snip]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140217/08a57dbe/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-17  8:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13  8:40 [Buildroot] How to get the kernel to mount a rootfs without an initramfs ?? (2) Frank Ihle
2014-02-13  9:14 ` Sagaert Johan
2014-02-13 13:09 ` Mike Zick
2014-02-16 23:10 ` Arnout Vandecappelle
2014-02-17  8:23   ` [Buildroot] Antw: " Frank Ihle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox