Welcome! Log In Create A New Profile

Advanced

SD Card problem loading rootfs too slow?

Posted by Sc30 
Re: SD Card problem loading rootfs too slow?
December 08, 2023 09:04PM
Sc30,

> Thank you, it works.

Cool!

It's still a puzzle to me that why both my Pogo V4 and Mobile are OK booting with SD card in previous kernel, but yours did not. My card is a Sandisk microSD in a Sandisk fullsize SD case.

However, we'll take the victory with the new kernel and not worrying about it anymore!

> I bought some new SD cards
> and unfortunately they are giving kernel CRC error
> when trying to boot, doesn't matter which kernel.

The SD cards are slow to sync. I usually do a few sync commands after upgrading new kernel. You'd have thought the umount/pumount command would automaticall sync (commit) all the data before it'll let you unmount. But sometime it is not enough.

Probably a few syncs and shutdown and power up will help (instead of reboot).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: SD Card problem loading rootfs too slow?
December 08, 2023 10:34PM
New cards are not cooperating at all due to read failures. No problems when using laptop to format and copy rootfs. Googling for "ext4fs_devread read error - block" shows other similar issues, possibly something with uboot mmc driver. I guess I will try different cards.

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:34:01 -0700)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   MVEBU_MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot: 10  9  8  7  6  5  4  3  2  1  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: ide_preinit failed

MMC rescan: current device # 0 initialized OK
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

no IDE devices available

Partition Map for MMC device 0  --   Partition Type: DOS

PartStart SectorNum SectorsUUIDType
  12048      61067264  b83634e8-0183
loading envs from mmc 0 ...
** File not found /boot/uEnv.txt **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: ide_preinit failed
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc

MMC rescan: current device # 0 initialized OK
device mmc 0:1
1 bytes read in 12 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
 ** ext4fs_devread read error - block
loading uInitrd ...
** Can't read partition table on 0:0 **
** Invalid partition 1 **
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
** Can't read partition table on 0:0 **
** Invalid partition 1 **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-6.6.3-kirkwood-tld-1
   Created:      2023-12-09   1:39:52 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6337792 Bytes = 6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
Re: SD Card problem loading rootfs too slow?
December 08, 2023 11:06PM
> New cards are not cooperating at all due to read
> failures. No problems when using laptop to format
> and copy rootfs. Googling for "ext4fs_devread
> read error - block" shows other similar issues,
> possibly something with uboot mmc driver. I guess
> I will try different cards.

Did you format it as Ext3 or Ext4?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: SD Card problem loading rootfs too slow?
December 09, 2023 12:46PM
Ext3, everything same as working card. Obviously it is able to read something as it gets the correct image header information, but fails to read the whole image.

Pogov4> mmc info
Device: MVEBU_MMC
Manufacturer ID: 9f
OEM: 5449
Name: 032GB
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.1 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes



Edited 1 time(s). Last edit at 12/09/2023 01:04PM by Sc30.
Re: SD Card problem loading rootfs too slow?
December 09, 2023 02:35PM
Was the rootfs partition on the new card created on the same OS that you created the working card? were they both created on this Pogo Mobile using fdisk+mkfs.ext3 ?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: SD Card problem loading rootfs too slow?
December 09, 2023 04:06PM
Yes the process was identical. They were created on a laptop booted into linux lite live usb.
Re: SD Card problem loading rootfs too slow?
December 09, 2023 05:16PM
OK so in case the old MCC driver had problem with some SD cards, try the new u-boot.

https://forum.doozan.com/read.php?3,12381

Quote

Update 26 May 2023
Update 20 May 2023
Updated 07 May 2023

I've released 2023.04 u-boot for Kirkwood boards listed below. For normal installation, the 2017.07 u-boot will be good enough in most cases.

2023.04 U-Boot Kirkwood - Pogo V4. This version adds the capability of booting with the rootfs attached to one of the USB 3.0 ports in the back, among other capabilities.

But before you flash, please run kwboot with uboot.2023.04-tld-1.pogo_v4.kwb to make sure you can initiialize the SD card and boot automatically into Debian.

There is no need to reflash the u-boot envs image (Step 6). This 2023.04 u-boot is backward compatible. Once you can boot with kwboot, login to Debian and flash the u-boot image uboot.2023.04-tld-1.pogo_v4.kwb.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 12/09/2023 05:18PM by bodhi.
Re: SD Card problem loading rootfs too slow?
December 09, 2023 06:10PM
Unfortunately not quite working with the newer uboot.

U-Boot 2023.04-tld-1 (Jun 11 2023 - 16:24:44 -0700)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
Model: Cloud Engines PogoPlug Series 4
DRAM:  128 MiB
Core:  20 devices, 16 uclasses, devicetree: separate
NAND:  128 MiB
MMC:   mvsdio@90000: 0
Loading Environment from NAND... OK
Resetting console stdin/stdout/stderr to serial...
In:    serial
Out:   serial
Err:   serial
pcie0.0: Link down
Net:   eth0: ethernet-controller@72000
Hit any key to stop autoboot:  0
starting USB...
Bus ehci@50000: USB EHCI 1.00
scanning bus ehci@50000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Unknown command 'ide' - try 'help'

no usb partition table available
loading envs from usb 0 ...
** Bad device specification usb 0 **
Couldn't find partition usb 0:1
Can't set block device
Unknown command 'ide' - try 'help'

Partition Map for MMC device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            61067264        b83634e8-01     83
loading envs from mmc 0 ...
Failed to load '/boot/uEnv.txt'
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device specification usb 0 **
Couldn't find partition usb 0:1
Can't set block device
device usb 1:1
** Bad device specification usb 1 **
Couldn't find partition usb 1:1
Can't set block device
device usb 2:1
** Bad device specification usb 2 **
Couldn't find partition usb 2:1
Can't set block device
device usb 3:1
** Bad device specification usb 3 **
Couldn't find partition usb 3:1
Can't set block device
Scan device ide
Unknown command 'ide' - try 'help'
device ide 0:1
** Bad device specification ide 0 **
Couldn't find partition ide 0:1
Can't set block device
device ide 1:1
** Bad device specification ide 1 **
Couldn't find partition ide 1:1
Can't set block device
device ide 2:1
** Bad device specification ide 2 **
Couldn't find partition ide 2:1
Can't set block device
device ide 3:1
** Bad device specification ide 3 **
Couldn't find partition ide 3:1
Can't set block device
Scan device mmc
device mmc 0:1
1 bytes read in 10 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
6337856 bytes read in 43 ms (140.6 MiB/s)
loading uInitrd ...
5775985 bytes read in 40 ms (137.7 MiB/s)
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
10178 bytes read in 16 ms (621.1 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-6.6.3-kirkwood-tld-1
   Created:      2023-12-09   1:39:52 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6337792 Bytes = 6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
Pogo_V4> mmcinfo
Device: mvsdio@90000
Manufacturer ID: 9f
OEM: 5449
Name: 032GB
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.1 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes



Edited 1 time(s). Last edit at 12/09/2023 06:11PM by Sc30.
Re: SD Card problem loading rootfs too slow?
December 10, 2023 02:43PM
> Pogo_V4> mmcinfo
> Device: mvsdio@90000
> Manufacturer ID: 9f
> OEM: 5449
> Name: 032GB
> Bus Speed: 50000000
> Mode: SD High Speed (50MHz)
> Rd Block Len: 512
> SD version 3.0
> High Capacity: Yes
> Capacity: 29.1 GiB
> Bus Width: 4-bit
> Erase Group Size: 512 Bytes
>

What is the brand name, model, and size of this SD card? if it is microSD then what brand is the full size case?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: SD Card problem loading rootfs too slow?
December 10, 2023 04:30PM
They are Micro Center branded cards and unbranded adapters. I don't know who the OEM is. I have also tried a Samsung adapter.
Re: SD Card problem loading rootfs too slow?
December 10, 2023 04:55PM
Well I got it to boot by manually setting the mode. So far it is the only mode I tried that works.

Pogo_V4> mmc dev 0 0 UHS_SDR25
switch to partitions #0, OK
mmc0 is current device
Pogo_V4> run bootcmd
starting USB...
Bus ehci@50000: USB EHCI 1.00
scanning bus ehci@50000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Unknown command 'ide' - try 'help'

no usb partition table available
loading envs from usb 0 ...
** Bad device specification usb 0 **
Couldn't find partition usb 0:1
Can't set block device
Unknown command 'ide' - try 'help'

Partition Map for MMC device 0  --   Partition Type: DOS

PartStart SectorNum SectorsUUIDType
  12048      61067264  b83634e8-0183
loading envs from mmc 0 ...
Failed to load '/boot/uEnv.txt'
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device specification usb 0 **
Couldn't find partition usb 0:1
Can't set block device
device usb 1:1
** Bad device specification usb 1 **
Couldn't find partition usb 1:1
Can't set block device
device usb 2:1
** Bad device specification usb 2 **
Couldn't find partition usb 2:1
Can't set block device
device usb 3:1
** Bad device specification usb 3 **
Couldn't find partition usb 3:1
Can't set block device
Scan device ide
Unknown command 'ide' - try 'help'
device ide 0:1
** Bad device specification ide 0 **
Couldn't find partition ide 0:1
Can't set block device
device ide 1:1
** Bad device specification ide 1 **
Couldn't find partition ide 1:1
Can't set block device
device ide 2:1
** Bad device specification ide 2 **
Couldn't find partition ide 2:1
Can't set block device
device ide 3:1
** Bad device specification ide 3 **
Couldn't find partition ide 3:1
Can't set block device
Scan device mmc
device mmc 0:1
1 bytes read in 11 ms (0 Bytes/s)
Found bootable drive on mmc 0
loading uImage ...
6337856 bytes read in 171 ms (35.3 MiB/s)
loading uInitrd ...
5775985 bytes read in 157 ms (35.1 MiB/s)
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
10178 bytes read in 16 ms (621.1 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-6.6.3-kirkwood-tld-1
   Created:      2023-12-09   1:39:52 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6337792 Bytes = 6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-6.6.3-kirkwood-tld-1
   Created:      2023-12-09   1:40:03 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5775921 Bytes = 5.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
Working FDT set to 1c00000


Starting kernel ...
Re: SD Card problem loading rootfs too slow?
December 10, 2023 06:29PM
That makes sense. UHS_SDR25 is 50Mhz.

> Well I got it to boot by manually setting the
> mode. So far it is the only mode I tried that
> works.
> Pogo_V4> mmc dev 0 0 UHS_SDR25

Either the card ID is wrong in hardware (generic cards manufacturer might not care to populate a real ID, or it just pick one that is compatible based on specs).

Or U-Boot driver is not configured (or could not be configured) to deal with UHS, and it must have chosen the wrong default bus speed.

I suspect that this card (i.e. this mode UHS_SDR25) is not common, so it has never been tested here in this forum.

Good job get it working!

When I have some time, I'll look to see if I can build a new u-boot version for testing.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: SD Card problem loading rootfs too slow?
December 10, 2023 08:36PM
The card will boot in various uhs modes up to ddr50, but only when it wants to. It is not reliable. It will only boot in the Samsung adapter. It is very picky. Never had a problem on the laptop so may be a uboot issue, but I am going to get different cards.
Re: SD Card problem loading rootfs too slow?
December 10, 2023 11:05PM
> The card will boot in various uhs modes up to
> ddr50, but only when it wants to. It is not
> reliable. It will only boot in the Samsung
> adapter. It is very picky. Never had a problem
> on the laptop so may be a uboot issue, but I am
> going to get different cards.

You really can't go wrong with a Sandisk card or USB thumb drive. I'd wish Sandisk pays me every time I say that :) Using lesser name brand would be satisified but sometime you will need to work on it.

On laptop/desktop one would never notice the difference, but with bootloader it's a different story.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: SD Card problem loading rootfs too slow?
December 13, 2023 09:11PM
I know Sandisk is good, but I need a bunch and price starts to add up. Actually I tried some of those tiny Sandisk USB drives that were not working well at all, lots of kernel panics. I got some PNY microSD that are working well so far.



Edited 1 time(s). Last edit at 12/13/2023 09:13PM by Sc30.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: