hansemro / kc1-linux

Documentation of mainline Linux on First Generation Kindle Fire
GNU General Public License v2.0
4 stars 0 forks source link

MMC order inconsistency #27

Closed hansemro closed 3 years ago

hansemro commented 3 years ago

Problem: eMMC starts up sometimes as mmcblk0, mmclbk1, or even mmcblk2. Because the kernel boot images assume a target location, the kernel can sometimes fail to find root.

The issue is made worse or caused by enabling MMC5 for WLAN.

I have recently read a patch and the discussion of this inconsistent behavior on OMAP mailing list: https://www.spinics.net/lists/linux-omap/msg159229.html

Patch TLDR: set aliases for each mmc device in the device tree to fix their order.

mj-sakellaropoulos commented 3 years ago

Seems like aliases are already present in omap4.dtsi :

...
/ {
    compatible = "ti,omap4430", "ti,omap4";
    interrupt-parent = <&wakeupgen>;
    #address-cells = <1>;
    #size-cells = <1>;
    chosen { };

    aliases {
        i2c0 = &i2c1;
        i2c1 = &i2c2;
        i2c2 = &i2c3;
        i2c3 = &i2c4;
        mmc0 = &mmc1;
        mmc1 = &mmc2;
        mmc2 = &mmc3;
        mmc3 = &mmc4;
        mmc4 = &mmc5;
        serial0 = &uart1;
        serial1 = &uart2;
        serial2 = &uart3;
        serial3 = &uart4;
        rproc0 = &dsp;
        rproc1 = &ipu;
    };
        ...
hansemro commented 3 years ago

They were not present in <5.11.x, but it is good to know that it has been added to omap4

mj-sakellaropoulos commented 3 years ago

I should clarify I experienced the issue with those aliases

hansemro commented 3 years ago

Well, the issue is that &mmc2 should be aliased to mmc0 for it to be consistent with how things were. So with the new defaults, you would have to adjust root parameter to point to dev/mmcblk1p9 instead of /dev/mmcblk0p9

mj-sakellaropoulos commented 3 years ago

Oh, ok that makes sense.

hansemro commented 3 years ago

The aliases seem to fix the mapping of mmc block devices. Closing the issue.