On Fri, 14 Feb 2014 01:54:25 -0800 (PST)
dudo <
dgor...@gmail.com> wrote:
> Hi there.
> After compiling latest version of 3.4.79 linux-sunxi kernel, branch
> sunxi-3.4, and using it with initramfs (initrd) image, my A13-OLinuXino
> board can't boot SD card any more. As if kernel doesn't "recognise" MMC/SD
> card device. If I remove loading of initrd from boot.scr and tell u-boot to
> load and boot kernel without initramfs, kernel recognizes MMC/SD card
> device and continues booting normally. The same procedure was ok with
> kernel 3.4.67 which booted rootfs normally. Here are some details of my
> configuration:
>
> - A13-OLinuXino
> -
> - kernel 3.4.67 + initramfs boots rootfs ok
> - kernel 3.4.79 + initramfs doesn't "recognize" MMC/SD card device, so
> it doesn't boot rootfs from SD card; when initrd removed from boot.scr,
> kernel boots rootfs ok
> - kernel branch sunxi-3.4
> - custom kernel configuration or configuration taken from a13_defconfig,
> neither boots rootfs; support for MMC and initramfs is included
> - u-boot version 2013.10-rc2
> - boot.scr built from boot.cmd:
> - setenv bootargs console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p2
> rootwait panic=10 ${extra}
> fatload mmc 0 0x46000000 initrd.img
> fatload mmc 0 0x43000000 script.bin
> fatload mmc 0 0x48000000 uImage
> bootm 0x48000000 0x46000000
> - kernel messages regarding MMC:
> - [ 1.359357] [mmc-msg] sw_mci_init
> [ 1.362752] [mmc-msg] MMC host used card: 0x1, boot card: 0x0,
> io_card 0
> [ 1.369554] [mmc-err] alloc dma des failed
> [ 1.373667] [mmc-err] sunxi-mmc.0: Failed to get resouce.
> [ 1.379098] [mmc_pm]: no sdio card used in configuration
>
>
> I also started sh inside initrd and interactively tried to list
> /dev/mmcblk0 device with sfdisk -l, but as if there wasn't device at all
> (but device file was present):
> ls /dev/mmcblk0
> brw-rw---T 1 0 25 179,0 /dev/mmcblk0
> sfdisk -l /dev/mmcblk0
> /dev/mmcblk0: No such device or address
> sfdisk: cannot open /dev/mmcblk0 for reading
> After starting udev, also no MMC device or partitions detected.
> All this worked fine with kernel 3.4.67.
There is a universal recipe for this kind of problems - git bisect.
If something used to work before, but does not work any longer, then
it is likely that some commit has caused this. Either by introducing
a bug or by exposing some other latent bug. Identifying this particular
problematic commit can provide a lot of valuable information.
Bisecting is a mechanical work which takes a bit of time, but does not
require any special skills other than being able to compile the kernel
from sources. One can find many guides on the Internet or just read
about it in "man git-bisect".
--
Best regards,
Siarhei Siamashka