All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: Add extra boot device (UART) to run Ymodem u-boot.img boot on XEA (imx28)
@ 2020-07-10  7:49 Lukasz Majewski
  2020-07-10 15:24 ` Peng Fan
  2020-07-16 17:48 ` sbabic at denx.de
  0 siblings, 2 replies; 3+ messages in thread
From: Lukasz Majewski @ 2020-07-10  7:49 UTC (permalink / raw)
  To: u-boot

This commit enables imx28 based XEA board's u-boot.sb (SPL) to download
u-boot proper (u-boot.img) via Ymodem protocol.

This is extremely useful in the recovery scenario where u-boot.sb is
downloaded via uuu utility to SDRAM [*], and then one can upload u-boot
proper via serial console to fully debrick the device.

Note - debricking procedure of imx28 devices:
- NXP's original USB based tools (like mxsldr or uuu) expect single
  u-boot.sb which is a relic of the old U-Boot (~2013) without SPL and
  U-Boot proper distinction.

[*] On Host:
------------
cat << EOF > imx28_xea.lst
uuu_version 1.3.0
SDPS: boot -f /srv/tftp/xea/u-boot.sb
SDPU: done
EOF

Please start picocom:
sudo picocom -b 115200 -s "sz -vv" /dev/ttyUSB1
sudo ./uuu/uuu -V imx28_xea.lst

On the U-boot console one shall see:
Trying to boot from UART
CCC

Then please press CTRL+A, S
and type u-boot.img


Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 board/liebherr/xea/xea.c    | 1 +
 configs/imx28_xea_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 8159f3a2d9..4062c6fb82 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -116,6 +116,7 @@ void board_boot_order(u32 *spl_boot_list)
 {
 	spl_boot_list[0] = BOOT_DEVICE_MMC1;
 	spl_boot_list[1] = BOOT_DEVICE_SPI;
+	spl_boot_list[2] = BOOT_DEVICE_UART;
 }
 
 int spl_start_uboot(void)
diff --git a/configs/imx28_xea_defconfig b/configs/imx28_xea_defconfig
index b879de5042..38f3fa6871 100644
--- a/configs/imx28_xea_defconfig
+++ b/configs/imx28_xea_defconfig
@@ -36,6 +36,7 @@ CONFIG_SPL_MMC_TINY=y
 CONFIG_SPL_DM_SPI_FLASH=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_SPI_LOAD=y
+CONFIG_SPL_YMODEM_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_SPL=y
 CONFIG_CMD_ASKENV=y
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] arm: Add extra boot device (UART) to run Ymodem u-boot.img boot on XEA (imx28)
  2020-07-10  7:49 [PATCH] arm: Add extra boot device (UART) to run Ymodem u-boot.img boot on XEA (imx28) Lukasz Majewski
@ 2020-07-10 15:24 ` Peng Fan
  2020-07-16 17:48 ` sbabic at denx.de
  1 sibling, 0 replies; 3+ messages in thread
From: Peng Fan @ 2020-07-10 15:24 UTC (permalink / raw)
  To: u-boot

> Subject: [PATCH] arm: Add extra boot device (UART) to run Ymodem
> u-boot.img boot on XEA (imx28)
> 
> This commit enables imx28 based XEA board's u-boot.sb (SPL) to download
> u-boot proper (u-boot.img) via Ymodem protocol.
> 
> This is extremely useful in the recovery scenario where u-boot.sb is
> downloaded via uuu utility to SDRAM [*], and then one can upload u-boot
> proper via serial console to fully debrick the device.
> 
> Note - debricking procedure of imx28 devices:
> - NXP's original USB based tools (like mxsldr or uuu) expect single
>   u-boot.sb which is a relic of the old U-Boot (~2013) without SPL and
>   U-Boot proper distinction.
> 
> [*] On Host:
> ------------
> cat << EOF > imx28_xea.lst
> uuu_version 1.3.0
> SDPS: boot -f /srv/tftp/xea/u-boot.sb
> SDPU: done
> EOF
> 
> Please start picocom:
> sudo picocom -b 115200 -s "sz -vv" /dev/ttyUSB1 sudo ./uuu/uuu -V
> imx28_xea.lst
> 
> On the U-boot console one shall see:
> Trying to boot from UART
> CCC
> 
> Then please press CTRL+A, S
> and type u-boot.img
> 
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>

Acked-by: Peng Fan <peng.fan@nxp.com>

> ---
> 
>  board/liebherr/xea/xea.c    | 1 +
>  configs/imx28_xea_defconfig | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c index
> 8159f3a2d9..4062c6fb82 100644
> --- a/board/liebherr/xea/xea.c
> +++ b/board/liebherr/xea/xea.c
> @@ -116,6 +116,7 @@ void board_boot_order(u32 *spl_boot_list)  {
>  	spl_boot_list[0] = BOOT_DEVICE_MMC1;
>  	spl_boot_list[1] = BOOT_DEVICE_SPI;
> +	spl_boot_list[2] = BOOT_DEVICE_UART;
>  }
> 
>  int spl_start_uboot(void)
> diff --git a/configs/imx28_xea_defconfig b/configs/imx28_xea_defconfig index
> b879de5042..38f3fa6871 100644
> --- a/configs/imx28_xea_defconfig
> +++ b/configs/imx28_xea_defconfig
> @@ -36,6 +36,7 @@ CONFIG_SPL_MMC_TINY=y
>  CONFIG_SPL_DM_SPI_FLASH=y
>  CONFIG_SPL_OS_BOOT=y
>  CONFIG_SPL_SPI_LOAD=y
> +CONFIG_SPL_YMODEM_SUPPORT=y
>  CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_SPL=y
>  CONFIG_CMD_ASKENV=y
> --
> 2.20.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] arm: Add extra boot device (UART) to run Ymodem u-boot.img boot on XEA (imx28)
  2020-07-10  7:49 [PATCH] arm: Add extra boot device (UART) to run Ymodem u-boot.img boot on XEA (imx28) Lukasz Majewski
  2020-07-10 15:24 ` Peng Fan
@ 2020-07-16 17:48 ` sbabic at denx.de
  1 sibling, 0 replies; 3+ messages in thread
From: sbabic at denx.de @ 2020-07-16 17:48 UTC (permalink / raw)
  To: u-boot

> This commit enables imx28 based XEA board's u-boot.sb (SPL) to download
> u-boot proper (u-boot.img) via Ymodem protocol.
> This is extremely useful in the recovery scenario where u-boot.sb is
> downloaded via uuu utility to SDRAM [*], and then one can upload u-boot
> proper via serial console to fully debrick the device.
> Note - debricking procedure of imx28 devices:
> - NXP's original USB based tools (like mxsldr or uuu) expect single
>   u-boot.sb which is a relic of the old U-Boot (~2013) without SPL and
>   U-Boot proper distinction.
> [*] On Host:
> ------------
> cat << EOF > imx28_xea.lst
> uuu_version 1.3.0
> SDPS: boot -f /srv/tftp/xea/u-boot.sb
> SDPU: done
> EOF
> Please start picocom:
> sudo picocom -b 115200 -s "sz -vv" /dev/ttyUSB1
> sudo ./uuu/uuu -V imx28_xea.lst
> On the U-boot console one shall see:
> Trying to boot from UART
> CCC
> Then please press CTRL+A, S
> and type u-boot.img
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> Acked-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-16 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10  7:49 [PATCH] arm: Add extra boot device (UART) to run Ymodem u-boot.img boot on XEA (imx28) Lukasz Majewski
2020-07-10 15:24 ` Peng Fan
2020-07-16 17:48 ` sbabic at denx.de

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.