Use ubuntu @VIM1 to build mainline kernel and install and boot it

here it is (under kernel 4.9.179)

/dev/rootfs: LABEL=“ROOTFS” UUID=“eb0ce16e-cb91-4523-9ed4-987eb7055203” TYPE=“ext4”
/dev/zram1: UUID=“27786eb1-1549-4da9-a1e0-0ca58a931257” TYPE=“swap”
/dev/zram2: UUID=“31d34c88-70f8-4aa6-ade8-313595a0bee7” TYPE=“swap”
/dev/zram3: UUID=“5b87ee4d-a8c5-420b-a4d3-4389aaf053ff” TYPE=“swap”
/dev/zram4: UUID=“4947a9b5-a871-432e-b1f8-46ea696252b2” TYPE=“swap”

I’m not too familiar w/ busybox, maybe some diagnostics could be done there ?

It seems that the 5.3 kernel is unable to read the partition information from /dev/mmcblk1 .
How did you create the partition?

i used the windows amlogic v2.1.7 burning tools to erase the emmc and to burn the fenix 0.6 ubuntu bionic image in it

@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 !?

Hello @ravelo

Here is an image with linux 5.3-rc4, you can have a try.

https://dl.khadas.com/test/VIM1_Ubuntu-server-bionic_Linux-5.3-rc4_arm64_SD-USB_V20190817.img.7z

2 Likes

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 ?

https://translate.google.com/translate?hl=de&sl=ru&tl=en&u=https%3A%2F%2Fradix.pro%2Fdevices%2Fkhadas-vim%2F%23emmc_flash

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 : https://github.com/numbqq/linux/tree/4.12-rc6/drivers

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 ?