@numbqq, do you think kernel 5.3 is able to boot and mount rootfs partition (the one resulting from flashing fenix 0.6 bionic) from emmc ? maybe some khadas patch are still needed for that !?
we can see that this a SD/USB image according to the file name, but the question was about booting directly from emmc with a rootfs (and all the distro) on the emmc itself : i will ask again my question differently :
“how to build a kernel 5.3 which is able to start ubuntu (or other linux) from the emmc of the vim1 ?”. thank you.
@umiddelb : is there a chance to understand emmc partitionning on vim1 and how to change it to something that can help us w/ our current issues before, and using the RadixLinux forum info below, that you mentionned back in 2017 in eMMC Flash Layout ?
It seems that the only git repo containing something related to amlogic emmc (and khadas partitions in it) support by a mainline kernel is back in this 4.12.RC6 branch here : linux/drivers at 4.12-rc6 · numbqq/linux · GitHub
So let’s try to reapply the few customization needed back then and described in this old post of mine…
The partitioning scheme is mainly determined by the firmware (u-boot, etc.) you are using. Android has its own scheme and doesn’t make use of mbr or gpt tables. IMHO there is a configuration switch to make the linux kernel aware of the Android partitioning scheme.
If you don’t run Android on your SBC, you usually want to use a mbr or gpt scheme instead. On the VIM1 and VIM2 I figured out what areas are occupied by the Android firmware and created the Linux rootfs partitions with the right offsets (696320 sectors on the VIM1 and 1302528 on the VIM2). Other SBCs with mainline u-boot firmware use an offset of 2048 or 3072 sectors.
I think I zapped my EMMC before burning my current official ubuntu image on it (using the amlogic windoze burning tool and remove bootloader & erase flash options, iirc), so I do not want, need, have or use anything android on my board.
I do not know what kind of partition scheme the amlogic burning tools writes to the EMMC, but the mainline linux kernel (at least yours and chewitt’s) cannot make use of it, thus probably the rootfs not being found despite it is really in there (and vendor ubuntu is ok with it).
Yes, this offset thing you mention could be the key here; did you test anything to confirm it works ?