On Thu, Sep 30, 2021 at 8:03 AM Bertrand Marquis <[email protected]>
wrote:

> Hi Luca,
>
> > On 30 Sep 2021, at 15:54, Luca Fancellu <[email protected]> wrote:
> >
> > The mmc probing order has become unpredictable
> > due to recent linux kernel changes, therefore devices
> > like the raspberry pi that have two mmc interface most
> > of the time can't boot from the hard-coded root path.
> >
> > Modify the u-boot script to fetch the PARTUUID of the
> > second partition of the sd card and use it to put
> > root=PARTUUID=<xxx> in the command line passed to
> > the dom0 kernel.
>

Thanks for posting a way of handling this. I've encountered the same
unpredictable device enumeration and had been looking into whether
switching the sdhci_iproc driver to PROBE_FORCE_SYNCHRONOUS instead of
PROBE_PREFER_ASYNCHRONOUS would resolve it but I can't report that it does.
I would prefer to have a way to get stable enumeration but without it, this
is an improvement.


> >
> > Signed-off-by: Luca Fancellu <[email protected]>
>
> Reviewed-by: Diego Sueiro <[email protected]>
>
> Reviewed-by: Bertrand Marquis <[email protected]>
>

Reviewed-by: Christopher Clark <[email protected]>
Tested-by: Christopher Clark <[email protected]>

Christopher



>
> Cheers
> Bertrand
>
> > ---
> > .../xen-rpi-u-boot-scr/files/boot.cmd.xen.in          | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git
> a/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/
> boot.cmd.xen.in
> b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/
> boot.cmd.xen.in
> > index 0367e36..9874220 100644
> > --- a/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/
> boot.cmd.xen.in
> > +++ b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/
> boot.cmd.xen.in
> > @@ -13,10 +13,6 @@ fdt resize 0x1000
> > echo Add boot arguments for Xen
> > fdt set /chosen xen,xen-bootargs "console=dtuart
> dtuart=/soc/serial@7e215040 dom0_mem='@@RPI_DOM0_MEM@@'
> @@RPI_DEBUG_XEN_ARGS@@"
> >
> > -echo Add boot arguments for dom0
> > -setenv dom0_bootargs "console=hvc0 earlycon=xenboot debug
> root=/dev/mmcblk0p2 rootwait"
> > -fdt set /chosen xen,dom0-bootargs \"${dom0_bootargs}\"
> > -
> > echo Add a dom0 node to chosen to put Linux boot information in
> > fdt mknode /chosen dom0
> >
> > @@ -32,6 +28,13 @@ fdt rm /scb/pcie@7d500000/pci@1,0/usb@1,0
> > echo Delay to allow the MMC card to be ready
> > sleep 1
> >
> > +# Retrieve PARTUUID for the rootfs partition of the sdcard
> > +part uuid mmc 1:2 rootfs_partuuid
> > +
> > +echo Add boot arguments for dom0
> > +setenv dom0_bootargs "console=hvc0 earlycon=xenboot debug
> root=PARTUUID=${rootfs_partuuid} rootwait"
> > +fdt set /chosen xen,dom0-bootargs \"${dom0_bootargs}\"
> > +
> > echo Load Xen into memory
> > fatload mmc 1:1 ${xen_loadaddr} xen
> > echo Xen loaded, size: 0x$filesize
> > --
> > 2.17.1
> >
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6815): 
https://lists.yoctoproject.org/g/meta-virtualization/message/6815
Mute This Topic: https://lists.yoctoproject.org/mt/85975490/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to