diff options
author | luca fancellu <luca.fancellu@arm.com> | 2021-09-30 15:54:23 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-10-08 07:30:44 -0400 |
commit | f939b5bdbd3e19120c78cfa123007d99e53c5f2c (patch) | |
tree | afb7bf5be2f60de7bdbf6b9a1c386ce39ef74692 /dynamic-layers/raspberrypi | |
parent | cc33e3a253bdea86106cbcd8556cc5098e4b9540 (diff) | |
download | meta-virtualization-f939b5bdbd3e19120c78cfa123007d99e53c5f2c.tar.gz |
xen, rpi4: Use PARTUUID for rootfs discovery
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.
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reviewed-by: Christopher Clark <christopher.w.clark@gmail.com>
Tested-by: Christopher Clark <christopher.w.clark@gmail.com>
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'dynamic-layers/raspberrypi')
-rw-r--r-- | dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/boot.cmd.xen.in | 11 |
1 files 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 0367e36c..98742200 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 | |||
13 | echo Add boot arguments for Xen | 13 | echo Add boot arguments for Xen |
14 | fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=/soc/serial@7e215040 dom0_mem='@@RPI_DOM0_MEM@@' @@RPI_DEBUG_XEN_ARGS@@" | 14 | fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=/soc/serial@7e215040 dom0_mem='@@RPI_DOM0_MEM@@' @@RPI_DEBUG_XEN_ARGS@@" |
15 | 15 | ||
16 | echo Add boot arguments for dom0 | ||
17 | setenv dom0_bootargs "console=hvc0 earlycon=xenboot debug root=/dev/mmcblk0p2 rootwait" | ||
18 | fdt set /chosen xen,dom0-bootargs \"${dom0_bootargs}\" | ||
19 | |||
20 | echo Add a dom0 node to chosen to put Linux boot information in | 16 | echo Add a dom0 node to chosen to put Linux boot information in |
21 | fdt mknode /chosen dom0 | 17 | fdt mknode /chosen dom0 |
22 | 18 | ||
@@ -32,6 +28,13 @@ fdt rm /scb/pcie@7d500000/pci@1,0/usb@1,0 | |||
32 | echo Delay to allow the MMC card to be ready | 28 | echo Delay to allow the MMC card to be ready |
33 | sleep 1 | 29 | sleep 1 |
34 | 30 | ||
31 | # Retrieve PARTUUID for the rootfs partition of the sdcard | ||
32 | part uuid mmc 1:2 rootfs_partuuid | ||
33 | |||
34 | echo Add boot arguments for dom0 | ||
35 | setenv dom0_bootargs "console=hvc0 earlycon=xenboot debug root=PARTUUID=${rootfs_partuuid} rootwait" | ||
36 | fdt set /chosen xen,dom0-bootargs \"${dom0_bootargs}\" | ||
37 | |||
35 | echo Load Xen into memory | 38 | echo Load Xen into memory |
36 | fatload mmc 1:1 ${xen_loadaddr} xen | 39 | fatload mmc 1:1 ${xen_loadaddr} xen |
37 | echo Xen loaded, size: 0x$filesize | 40 | echo Xen loaded, size: 0x$filesize |