July 09, 2020, 03:11:59 am

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Waiting for root device /dev/mmcblk0p1

Started by CountZ, February 07, 2014, 08:49:46 am

Previous topic - Next topic

CountZ

Hi!
I got my cubietruck a week ago. It is booting Fedora 20 from nand, root fs is on the SATA drive. There is only one thing bugging me: I tried to boot from several different sdcard-images which I copied to my 4 GB Sandisk card using win32diskimager. One of them was the debian wheezy image from Igor Pecovnik. The cubie starts booting fine but hangs with the line Waiting for root device /dev/mmcblk0p1. Waiting for half an hour won't change a thing. After booting from nand, I can mount the root partition on the sd card using a usb card reader and the file system looks fine. Does anyone have an idea what's wrong with my system? The system starts booting, so the sdcard reader should be fine. Any idea what's wrong here?
Thanks for reading,
Alex

patwood

I've seen something like this in the past. You might want to check the script.bin that's being used and swap it out for one that is known to work with the CT's SD card reader.  u-boot doesn't use this to set up its SD driver, but the kernel does.

You can also insert the SD card directly into the board after booting from nand to make sure the system can read from it there (instead of in a USB reader).

CountZ

Hey!
Thank you for the fast reply! I tried a different sd card, but the result is the same. System starts to boot but there is no root filesystem to be found.
When I put the sdcard in the slot while the system runs, nothing happens. There is no /dev/mmc... to be seen and fdisk -l only shows the three nand partitions and /dev/sda with the primary partition sda1. Do I have to modprobe a certain kernel module first? The running system is a fedora 20.
Kind regards,
Alex

patwood

February 08, 2014, 12:22:24 am #3 Last Edit: February 08, 2014, 12:29:19 am by patwood
When you insert the uSD card, do you get anything in dmesg (dmesg | tail)?  Do you see any mmcblk0 entries in /proc/partitions?  If not, then you've got something going on with your SD slot.  Since u-boot can load files from it, it's probably not a HW problem.  The mmc driver is built into the kernel; there's nothing to modprobe. EDIT: the mmc driver *should* be built into the kernel, but never having used this distro or kernel, I can't say for sure, and I wouldn't know what the module would be named if there was one, as I've never seen an allwinner kernel without it built in.

Are you sure you used a CT image and not a CB2 image?

CountZ

Hi!
The content of /proc/partitions is
major minor  #blocks  name

  93        0    7520256 nand
  93        1      65536 nanda
  93        2    6291456 nandb
  93        3    1146880 nandc
   8        0  976762584 sda
   8        1  976761560 sda1


The whole dmesg -T output starts with
[Fri Feb  7 18:23:26 2014] scan_handler : Couldn't find P2PIE in probe response/beacon

after that, this line is repeated till the end:
[Fri Feb  7 18:23:26 2014] CFG80211-ERROR) wl_escan_handler : Couldn't find P2PIE in probe response/beacon

Without the -T, it says
[    0.000000] CFG80211-ERROR) wl_escan_handler : Couldn't find P2PIE in probe response/beacon

By the way: The whole /var/log/messages log is flooded with CFG80211-ERROR messages

This is wlan-related, right?

The image I am using at the moment is http://dl.cubieboard.org/software/a20-cubietruck/fedora/ct-fedora20-lxde/

Should work I guess?

Cheers!
Alex




CountZ

February 08, 2014, 03:50:36 am #5 Last Edit: February 08, 2014, 03:56:30 am by CountZ
One more info: The sd card image I am trying to boot from is  the one from this thread:
http://www.cubieforums.com/index.php/topic,1275.0.html

My mmc-related settings in script.bin should be default:

[mmc0_para]
sdc_used = 1
sdc_detmode = 1
sdc_buswidth = 4
sdc_clk = port:PF02<2><1><2><default>
sdc_cmd = port:PF03<2><1><2><default>
sdc_d0 = port:PF01<2><1><2><default>
sdc_d1 = port:PF00<2><1><2><default>
sdc_d2 = port:PF05<2><1><2><default>
sdc_d3 = port:PF04<2><1><2><default>
sdc_det = port:PH01<0><1><default><default>
sdc_use_wp = 0
sdc_wp =
sdc_isio = 0
sdc_regulator = "none"

[mmc1_para]
sdc_used = 0
sdc_detmode = 4
sdc_buswidth = 4
sdc_clk = port:PG00<2><1><2><default>
sdc_cmd = port:PG01<2><1><2><default>
sdc_d0 = port:PG02<2><1><2><default>
sdc_d1 = port:PG03<2><1><2><default>
sdc_d2 = port:PG04<2><1><2><default>
sdc_d3 = port:PG05<2><1><2><default>
sdc_det =
sdc_use_wp = 0
sdc_wp =
sdc_isio = 0
sdc_regulator = "none"

[mmc2_para]
sdc_used = 0
sdc_detmode = 3
sdc_buswidth = 4
sdc_cmd = port:PC06<3><1><2><default>
sdc_clk = port:PC07<3><1><2><default>
sdc_d0 = port:PC08<3><1><2><default>
sdc_d1 = port:PC09<3><1><2><default>
sdc_d2 = port:PC10<3><1><2><default>
sdc_d3 = port:PC11<3><1><2><default>
sdc_det =
sdc_use_wp = 0
sdc_wp =
sdc_isio = 0
sdc_regulator = "none"

[mmc3_para]
sdc_used = 1
sdc_detmode = 4
sdc_buswidth = 4
sdc_cmd = port:PI04<2><1><2><default>
sdc_clk = port:PI05<2><1><2><default>
sdc_d0 = port:PI06<2><1><2><default>
sdc_d1 = port:PI07<2><1><2><default>
sdc_d2 = port:PI08<2><1><2><default>
sdc_d3 = port:PI09<2><1><2><default>
sdc_det =
sdc_use_wp = 0
sdc_wp =
sdc_isio = 1
sdc_regulator = "none"


Cheers!

patwood

Quote from: CountZ on February 08, 2014, 03:44:18 am
Hi!
The content of /proc/partitions is
major minor  #blocks  name

  93        0    7520256 nand
  93        1      65536 nanda
  93        2    6291456 nandb
  93        3    1146880 nandc
   8        0  976762584 sda
   8        1  976761560 sda1


Ouch.  No mmc devices at all.  The kernel's driver might be having problems with that specific card or brand.  If you have any other cards, try inserting them in the reader and see if they're recognized.

Quote
The whole dmesg -T output starts with
[Fri Feb  7 18:23:26 2014] scan_handler : Couldn't find P2PIE in probe response/beacon

after that, this line is repeated till the end:
[Fri Feb  7 18:23:26 2014] CFG80211-ERROR) wl_escan_handler : Couldn't find P2PIE in probe response/beacon

Without the -T, it says
[    0.000000] CFG80211-ERROR) wl_escan_handler : Couldn't find P2PIE in probe response/beacon

By the way: The whole /var/log/messages log is flooded with CFG80211-ERROR messages

This is wlan-related, right?

Yeah, I think Cubietech stuck some debugging code in the driver that never got removed or at least disabled at lower log levels.

Quote
The image I am using at the moment is http://dl.cubieboard.org/software/a20-cubietruck/fedora/ct-fedora20-lxde/

Should work I guess?

Cheers!
Alex

It should, but obviously doesn't.  I'd try other cards, since the HW seems to be just fine.  The other thing I've noticed is that there are interactions between other (non-mmc) parts of the script.bin file and the card reader; since u-boot isn't using any of these settings to access the sd card to load the kernel, I'd suggest trying some other script.bin files for the CT, just to rule that out.