Bug #1865

compatibility issues of SD cards

Added by Leonid Protasov almost 6 years ago. Updated almost 6 years ago.

Status:NewStart date:01/19/2014
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Found in version:1.6

Description

History

#2 Updated by Leonid Protasov almost 6 years ago

I'm using Apacer 2Gb 60X SD card. Looks like it is not compatible with RPI/STOS. But I checked it with OpenELEC 3.2 on the same RPI and it boots ok. Full formatting under Windows 7 found no bad blocks. Strange...

#3 Updated by Leonid Protasov almost 6 years ago

I'm using Apacer 2Gb 60X SD card. Looks like it is not compatible with RPI/STOS. But I checked it with OpenELEC 3.2 on the same RPI and it boots ok. Full formatting under Windows 7 found no bad blocks. Strange... http://deshevshe.net.ua/securedigital-apacer/apacer_sd_2gb_60x.html

#4 Updated by Leonid Protasov almost 6 years ago

I tried one more 1Gbyte Sandisk MicroSD card connected via SD adapter. The same issue as with Apacer 2Gb. But if you leave it - it will be formatted in 10 minutes. Don't know why it is so slow...

#5 Updated by Leonid Protasov almost 6 years ago

And it is not hanging but formatting (discarding) slowly. Also when screen goes black - it is not hanged but screensaver is on. So just wait...

#6 Updated by Leonid Protasov almost 6 years ago

To bypassing discard I will try to edit cmdline.txt on the FAT partition of the SD card:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 elevator=deadline STOS_mkfs_ext4_args="-E nodiscard,stride=2,stripe-width=1024 -b 4096 -O ^has_journal" 

#7 Updated by Andreas Smas almost 6 years ago

  • Subject changed from sd-0.1.6-gb8c5a065.img hangs on creating partitions to compatibility issues of SD cards

#8 Updated by Leonid Protasov almost 6 years ago

The string above does magic. STOS boots instantly on those problematic SD cards. So I suppose you can set that as default on new STOS images...

# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.11.10 ([email protected]) (gcc version 4.6.3 (crosstool-NG 1.15.2) ) #1 Sun Jan 19 14:25:06 CET 2014
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 81920
[    0.000000] free_area_init_node: node 0, pgdat c06353a4, node_mem_map c0703000
[    0.000000]   Normal zone: 640 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 81920 pages, LIFO batch:15
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 81280
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708.boardrev=0xe bcm2708.serial=0xe65b1da3 smsc95xx.macaddr=B8:27:EB:5B:1D:A3 sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 elevator=deadline STOS_mkfs_ext4_args="-E nodiscard,stride=2,stripe-width=1024 -b 4096 -O ^has_journal" 
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 317484K/327680K available (4012K kernel code, 232K rwdata, 1256K rodata, 824K init, 809K bss, 10196K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xd4800000 - 0xff000000   ( 680 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd4000000   ( 320 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc052d1c8   (5269 kB)
[    0.000000]       .init : 0xc052e000 - 0xc05fc0f4   ( 825 kB)
[    0.000000]       .data : 0xc05fe000 - 0xc0638268   ( 233 kB)
[    0.000000]        .bss : 0xc0638268 - 0xc0702820   ( 810 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:330
[    0.000000] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
[    0.000000] Switching to timer-based delay loop
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [tty1] enabled
[    0.001205] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
[    0.001264] pid_max: default: 32768 minimum: 301
[    0.001775] Mount-cache hash table entries: 512
[    0.002625] Initializing cgroup subsys devices
[    0.002690] Initializing cgroup subsys freezer
[    0.002726] Initializing cgroup subsys blkio
[    0.002882] CPU: Testing write buffer coherency: ok
[    0.002977] ftrace: allocating 13653 entries in 41 pages
[    0.076217] Setting up static identity map for 0xc039e9e0 - 0xc039ea18
[    0.078112] devtmpfs: initialized
[    0.091011] kworker/u2:0 (11) used greatest stack depth: 6932 bytes left
[    0.092199] NET: Registered protocol family 16
[    0.097074] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.102028] bcm2708.uart_clock = 0
[    0.112554] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.112621] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.112655] mailbox: Broadcom VideoCore Mailbox driver
[    0.112765] bcm2708_vcio: mailbox at f200b880
[    0.113299] bcm_power: Broadcom power driver
[    0.113359] bcm_power_open() -> 0
[    0.113386] bcm_power_request(0, 8)
[    0.614070] bcm_mailbox_read -> 00000080, 0
[    0.614108] bcm_power_request -> 0
[    0.614133] Serial: AMBA PL011 UART driver
[    0.614297] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3
[    0.952562] console [ttyAMA0] enabled
[    1.022928] kworker/u2:0 (174) used greatest stack depth: 6836 bytes left
[    1.054653] bio: create slab <bio-0> at 0
[    1.063180] usbcore: registered new interface driver usbfs
[    1.069253] usbcore: registered new interface driver hub
[    1.075325] usbcore: registered new device driver usb
[    1.084994] Switched to clocksource stc
[    1.117715] kworker/u2:0 (269) used greatest stack depth: 6380 bytes left
[    1.156061] NET: Registered protocol family 2
[    1.161271] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    1.168548] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    1.175107] TCP: Hash tables configured (established 4096 bind 4096)
[    1.181558] TCP: reno registered
[    1.184811] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.190722] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.197444] NET: Registered protocol family 1
[    1.206944] bcm2708_dma: DMA manager at f2007000
[    1.212189] bcm2708_gpio: bcm2708_gpio_probe c060bc20
[    1.218662] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    1.231626] audit: initializing netlink socket (disabled)
[    1.237203] type=2000 audit(1.040:1): initialized
[    1.411410] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.418703] msgmni has been set to 620
[    1.425955] io scheduler noop registered
[    1.429928] io scheduler deadline registered (default)
[    1.435997] io scheduler cfq registered
[    1.440656] BCM2708FB: allocated DMA memory 53a00000
[    1.445738] BCM2708FB: allocated DMA channel 0 @ f2007000
[    1.484111] Console: switching to colour frame buffer device 228x61
[    1.504342] kgdb: Registered I/O driver kgdboc.
[    1.535252] brd: module loaded
[    1.552453] loop: module loaded
[    1.556998] vchiq: vchiq_init_state: slot_zero = 0xd4804000, is_master = 0
[    1.565123] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.771389] Core Release: 2.80a
[    1.774634] Setting default values for core params
[    1.779610] Finished setting default values for core params
[    1.985441] Using Buffer DMA mode
[    1.988849] Periodic Transfer Interrupt Enhancement - disabled
[    1.994779] Multiprocessor Interrupt Enhancement - disabled
[    2.000487] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.004933] Dedicated Tx FIFOs mode
[    2.008715] dwc_otg: Microframe scheduler enabled
[    2.008777] dwc_otg bcm2708_usb: DWC OTG Controller
[    2.013805] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    2.021252] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    2.026906] Init: Port Power? op_state=1
[    2.030907] Init: Power Port (0)
[    2.034312] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.041275] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.048665] usb usb1: Product: DWC OTG Controller
[    2.053465] usb usb1: Manufacturer: Linux 3.11.10 dwc_otg_hcd
[    2.059345] usb usb1: SerialNumber: bcm2708_usb
[    2.065910] hub 1-0:1.0: USB hub found
[    2.069818] hub 1-0:1.0: 1 port detected
[    2.074741] dwc_otg: FIQ enabled
[    2.074771] dwc_otg: NAK holdoff enabled
[    2.074784] dwc_otg: FIQ split fix enabled
[    2.074817] Module dwc_common_port init
[    2.076019] mousedev: PS/2 mouse device common for all mice
[    2.087747] bcm2835-cpufreq: min=700000 max=700000 cur=700000
[    2.097982] bcm2835-cpufreq: switching to governor powersave
[    2.107877] bcm2835-cpufreq: switching to governor powersave
[    2.117722] cpuidle: using governor ladder
[    2.125868] cpuidle: using governor menu
[    2.134553] sdhci: Secure Digital Host Controller Interface driver
[    2.144956] sdhci: Copyright(c) Pierre Ossman
[    2.153590] sdhci: Enable low-latency mode
[    2.205066] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
[    2.217224] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[    2.233203] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.255365] usbcore: registered new interface driver usbhid
[    2.265312] usbhid: USB HID core driver
[    2.273752] TCP: cubic registered
[    2.281244] Initializing XFRM netlink socket
[    2.289647] NET: Registered protocol family 17
[    2.298551] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    2.310835] Indeed it is in host mode hprt0 = 00021501
[    2.384300] registered taskstats version 1
[    2.393106] console [netcon0] enabled
[    2.401019] netconsole: network logging started
[    2.409799] Warning: unable to open an initial console.
[    2.421556] Freeing unused kernel memory: 824K (c052e000 - c05fc000)
[    2.461259] mmc0: SD Status: Invalid Allocation Unit size.
[    2.475579] mmc0: new high speed SD card at address b368
[    2.486339] mmcblk0: mmc0:b368 SD    1.90 GiB
[    2.495280] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.506191] Indeed it is in host mode hprt0 = 00001101
[    2.584165]  mmcblk0: p1
[    2.715871] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    2.726849] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.740587] hub 1-1:1.0: USB hub found
[    2.749017] hub 1-1:1.0: 3 ports detected
[    3.094299] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.246060] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.257384] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.627911] mount (506) used greatest stack depth: 5444 bytes left
[    3.663152] usb 1-1.2: new low-speed USB device number 4 using dwc_otg
[    3.787459] usb 1-1.2: New USB device found, idVendor=0c45, idProduct=7000
[    3.798665] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.810185] usb 1-1.2: Product: iPazzPort
[    3.818403] usb 1-1.2: Manufacturer: RCMCU
[    3.990323] input: RCMCU iPazzPort as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input0
[    4.004669] hid-generic 0003:0C45:7000.0001: input: USB HID v1.11 Keyboard [RCMCU iPazzPort] on usb-bcm2708_usb-1.2/input0
[    4.054752] input: RCMCU iPazzPort as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.1/input/input1
[    4.094538] hid-generic 0003:0C45:7000.0002: input: USB HID v1.11 Mouse [RCMCU iPazzPort] on usb-bcm2708_usb-1.2/input1
[    4.327580] udevd (522) used greatest stack depth: 5324 bytes left
[    4.342663] udevd[523]: starting version 182
[    4.727595] bcm2708_i2c_init_pinmode(0,0)
[    4.736612] bcm2708_i2c_init_pinmode(0,1)
[    4.745736] bcm2708_i2c bcm2708_i2c.0: BSC0 Controller at 0x20205000 (irq 79) (baudrate 100k)
[    4.759359] bcm2708_i2c_init_pinmode(1,2)
[    4.768248] bcm2708_i2c_init_pinmode(1,3)
[    4.777178] bcm2708_i2c bcm2708_i2c.1: BSC1 Controller at 0x20804000 (irq 79) (baudrate 100k)
[    5.105698] dbus-uuidgen (536) used greatest stack depth: 5140 bytes left
[    5.405224] bcm2708_spi bcm2708_spi.0: master is unqueued, this is deprecated
[    5.417465] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80)
[    5.499419] dbus-daemon (542) used greatest stack depth: 4948 bytes left
[    5.984792] smsc95xx v1.0.4
[    6.197890] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:5b:1d:a3
[    6.214567] usbcore: registered new interface driver smsc95xx
[   11.729675] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts:
[   12.026620] EXT4-fs (mmcblk0p3): mounted filesystem without journal. Opts:
[   14.563328] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   16.006876] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1

#9 Updated by Leonid Protasov almost 6 years ago

Found interesting info on discard option https://patrick-nagel.net/blog/archives/337
So looks like nodiscard good to be the default for SD cards...

Also available in: Atom PDF