Re: [meta-rockchip][PATCH] use uuid instead of hard-coding root device


Trevor Woerner
 

On Wed 2021-09-22 @ 08:49:43 PM, Markus Volk wrote:
Hi,
Hi Markus, thanks for your report. I appreciate the feedback!

with this change my rock-pi-4 doesnt boot up and falls to emergency shell
because wic includes wrong devices into fstab. For some reason it assumes
/dev/sda1.
The next thing, literally, on my TODO list was to investigate why this is
happening (and fix it). I had noticed it a while back and have been wondering
what is injecting those incorrect lines at the end of our fstab. Thanks for
the patch!

I was able to fix this for my machine by using uuid for all
partitions.
Curious. I boot tested my patch on multiple boards and I've built and booted
numerous images on my rock-pi-4b and rock64 boards in the last day or so since
I applied the patch. I'll try some "clean" builds and see if that makes a
difference. I don't doubt your report (especially since Khem confirmed it),
I'd just like to know for myself what's different.

I wonder if just applying your 2nd patch would be enough (i.e. the one that
removes the /dev/sda* lines from /etc/fstab)? It's odd that the first 6
entries in the wic file would need UUIDs since it's the SoC's ROM firmware
that uses them, and I'm pretty sure the Rockchip firmware isn't using UUIDs
(my guess is it's just blindly grabbing whatever it finds at specific
offsets). The things stored in those partitions are u-boot related bits (atf,
spl, the u-boot binary itself) so by the time Linux starts, those things are
already "behind" us. I can't see how adding UUIDs to the partitions holding
u-boot would affect how the kernel finds the root partition (?).

Are you using poky or a distro other than "nodistro"? Perhaps other
layers/distros are affecting the build?

Thanks and best regards,
Trevor

Join yocto@lists.yoctoproject.org to automatically receive all group messages.