diff mbox series

[U-Boot,v1,22/22] colibri_vf: fix sdboot for vybrid modules

Message ID 20190215222039.10005-23-marcel@ziswiler.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series colibri vybrid fixes, device tree enablement and driver model conversion | expand

Commit Message

Marcel Ziswiler Feb. 15, 2019, 10:20 p.m. UTC
From: Gerard Salvatella <gerard.salvatella@toradex.com>

Currently, Vybrid's sdboot variable tries to load the kernel from /boot
of the root partition (typically second partition when using the sdcard
image). However, since we moved to flash the kernel in a separate UBI
volume, we no longer deploy the kernel/device tree to /boot, hence
sdboot does not work in its current state.

Load the kernel and device tree from the first (typically FAT) partition
as customary on all Toradex modules.

While at it also change from rw to ro as e.g. systemd will re-mount the
root file system rw anyway after checking it.

Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

 include/configs/colibri_vf.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Igor Opaniuk March 6, 2019, 3:30 p.m. UTC | #1
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>

On Sat, 16 Feb 2019 at 00:33, Marcel Ziswiler <marcel@ziswiler.com> wrote:
>
> From: Gerard Salvatella <gerard.salvatella@toradex.com>
>
> Currently, Vybrid's sdboot variable tries to load the kernel from /boot
> of the root partition (typically second partition when using the sdcard
> image). However, since we moved to flash the kernel in a separate UBI
> volume, we no longer deploy the kernel/device tree to /boot, hence
> sdboot does not work in its current state.
>
> Load the kernel and device tree from the first (typically FAT) partition
> as customary on all Toradex modules.
>
> While at it also change from rw to ro as e.g. systemd will re-mount the
> root file system rw anyway after checking it.
>
> Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
> Acked-by: Stefan Agner <stefan.agner@toradex.com>
> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> ---
>
>  include/configs/colibri_vf.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
> index b2f27c1977..0d57e303a1 100644
> --- a/include/configs/colibri_vf.h
> +++ b/include/configs/colibri_vf.h
> @@ -68,11 +68,11 @@
>         "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
>
>  #define SD_BOOTCMD \
> -       "sdargs=root=/dev/mmcblk0p2 rw rootwait\0"      \
> +       "sdargs=root=/dev/mmcblk0p2 ro rootwait\0"      \
>         "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \
>         "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
> -       "load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \
> -       "load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \
> +       "load mmc 0:1 ${kernel_addr_r} ${kernel_file} && " \
> +       "load mmc 0:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \
>         "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
>
>  #define UBI_BOOTCMD \
> --
> 2.20.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
diff mbox series

Patch

diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index b2f27c1977..0d57e303a1 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -68,11 +68,11 @@ 
 	"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
 
 #define SD_BOOTCMD \
-	"sdargs=root=/dev/mmcblk0p2 rw rootwait\0"	\
+	"sdargs=root=/dev/mmcblk0p2 ro rootwait\0"	\
 	"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \
 	"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
-	"load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \
-	"load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \
+	"load mmc 0:1 ${kernel_addr_r} ${kernel_file} && " \
+	"load mmc 0:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \
 	"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
 
 #define UBI_BOOTCMD \