[U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition

The default U-Boot environment expects the use of eMMC user partition. To ensure we are using the proper eMMC partition for boot we need to run the `mmc partconf` command.
This patch updates the README instructions to avoid users to follow misleading instructions.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br ---
Changes in v2: - fix typo
board/technexion/pico-imx6ul/README | 9 ++++++++- board/technexion/pico-imx7d/README | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/board/technexion/pico-imx6ul/README b/board/technexion/pico-imx6ul/README index bb8ee3f463..cbcb480ba1 100644 --- a/board/technexion/pico-imx6ul/README +++ b/board/technexion/pico-imx6ul/README @@ -50,7 +50,14 @@ Use the default environment variables:
2. Flashing U-Boot into the eMMC
-Run the DFU agent so we can flash the new images using dfu-util tool: +The default U-Boot environment expects the use of eMMC user +partition. To ensure we are using the proper eMMC partition for boot, +please run: + +=> mmc partconf 0 0 0 0 + +Next, run the DFU agent so we can flash the new images using dfu-util +tool:
=> dfu 0 mmc 0
diff --git a/board/technexion/pico-imx7d/README b/board/technexion/pico-imx7d/README index 24eb97e82c..5c0f212de2 100644 --- a/board/technexion/pico-imx7d/README +++ b/board/technexion/pico-imx7d/README @@ -47,7 +47,14 @@ Use the default environment variables:
2. Flashing U-Boot into the eMMC
-Run the DFU agent so we can flash the new images using dfu-util tool: +The default U-Boot environment expects the use of eMMC user +partition. To ensure we are using the proper eMMC partition for boot, +please run: + +=> mmc partconf 0 0 0 0 + +Next, run the DFU agent so we can flash the new images using dfu-util +tool:
=> dfu 0 mmc 0

On Fri, Mar 22, 2019 at 2:53 PM Otavio Salvador otavio@ossystems.com.br wrote:
The default U-Boot environment expects the use of eMMC user partition. To ensure we are using the proper eMMC partition for boot we need to run the `mmc partconf` command.
This patch updates the README instructions to avoid users to follow misleading instructions.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2:
- fix typo
No, please re-read my last response. I think you misunderstood.
If I follow the steps indicated in this patch the eMMC flashing does not work.
I tried it and U-Boot did not update.
Here is the correct procedure that works for me:
=> dfu 0 mmc 0 Flash SPL => dfu 0 mmc 0 Flash U-Boot proper => mmc partconf 0 0 0 0 => saveenv
So you need to fix the README in two points:
1. The command "=> dfu 0 mmc 0" must be issued twice: one for the SPL and one for u-boot-dtb.img - This error was there prior to your change
2. The '=> mmc partconf 0 0 0 0' command needs to be issued after the last dfu command, not before like you did in this patch.

Hello Fabio,
Adding Marek as he is one of USB gods.
On Fri, Mar 22, 2019 at 3:01 PM Fabio Estevam festevam@gmail.com wrote:
On Fri, Mar 22, 2019 at 2:53 PM Otavio Salvador otavio@ossystems.com.br wrote: So you need to fix the README in two points:
- The command "=> dfu 0 mmc 0" must be issued twice: one for the SPL
and one for u-boot-dtb.img - This error was there prior to your change
I fail to see why this would be need. Also the 'mmc partconf' does not affect where the DFU writes the blog (this is changed depending on the dfu_alt_info line).
- The '=> mmc partconf 0 0 0 0' command needs to be issued after the
last dfu command, not before like you did in this patch.
Read above.
I wonder why it works here and fails for you. Are you booting from USB or eMMC when running the DFU? What version are you using?

On Fri, Mar 22, 2019 at 3:09 PM Otavio Salvador otavio.salvador@ossystems.com.br wrote:
Hello Fabio,
Adding Marek as he is one of USB gods.
On Fri, Mar 22, 2019 at 3:01 PM Fabio Estevam festevam@gmail.com wrote:
On Fri, Mar 22, 2019 at 2:53 PM Otavio Salvador otavio@ossystems.com.br wrote: So you need to fix the README in two points:
- The command "=> dfu 0 mmc 0" must be issued twice: one for the SPL
and one for u-boot-dtb.img - This error was there prior to your change
I fail to see why this would be need. Also the 'mmc partconf' does not affect where the DFU writes the blog (this is changed depending on the dfu_alt_info line).
Ok, your are right. 'dfu 0 mmc 0' only needs to be issue once.
- The '=> mmc partconf 0 0 0 0' command needs to be issued after the
last dfu command, not before like you did in this patch.
Read above.
I wonder why it works here and fails for you. Are you booting from USB or eMMC when running the DFU? What version are you using?
The mmc partconf order does make a difference here though.
I could only flash it when I ran it after the dfu command.

On Fri, Mar 22, 2019 at 3:17 PM Fabio Estevam festevam@gmail.com wrote:
On Fri, Mar 22, 2019 at 3:09 PM Otavio Salvador otavio.salvador@ossystems.com.br wrote:
- The '=> mmc partconf 0 0 0 0' command needs to be issued after the
last dfu command, not before like you did in this patch.
Read above.
I wonder why it works here and fails for you. Are you booting from USB or eMMC when running the DFU? What version are you using?
The mmc partconf order does make a difference here though.
I could only flash it when I ran it after the dfu command.
This is a mystery to me; here we did update it several times without it failing.
Please try:
mmc partconf 0 0 0 0 reset
after boot just program it and see if it helps.

On 3/22/19 7:42 PM, Otavio Salvador wrote:
On Fri, Mar 22, 2019 at 3:17 PM Fabio Estevam festevam@gmail.com wrote:
On Fri, Mar 22, 2019 at 3:09 PM Otavio Salvador otavio.salvador@ossystems.com.br wrote:
- The '=> mmc partconf 0 0 0 0' command needs to be issued after the
last dfu command, not before like you did in this patch.
Read above.
I wonder why it works here and fails for you. Are you booting from USB or eMMC when running the DFU? What version are you using?
The mmc partconf order does make a difference here though.
I could only flash it when I ran it after the dfu command.
This is a mystery to me; here we did update it several times without it failing.
Please try:
mmc partconf 0 0 0 0 reset
after boot just program it and see if it helps.
Maybe because mmc partconf does permanent configuration change to the eMMC and selects some partitioning setup (I forgot which one, I'd have to check), The keyword here is it is a non-volatile change, it survives reset and power cycle.

Stefano,
On Fri, Mar 22, 2019 at 2:53 PM Otavio Salvador otavio@ossystems.com.br wrote:
The default U-Boot environment expects the use of eMMC user partition. To ensure we are using the proper eMMC partition for boot we need to run the `mmc partconf` command.
This patch updates the README instructions to avoid users to follow misleading instructions.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Could this to be applied?

Hi Otavio,
On Wed, Apr 3, 2019 at 3:45 PM Otavio Salvador otavio.salvador@ossystems.com.br wrote:
Stefano,
On Fri, Mar 22, 2019 at 2:53 PM Otavio Salvador otavio@ossystems.com.br wrote:
The default U-Boot environment expects the use of eMMC user partition. To ensure we are using the proper eMMC partition for boot we need to run the `mmc partconf` command.
This patch updates the README instructions to avoid users to follow misleading instructions.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Could this to be applied?
The instructions on this patch did not work for me.
It only worked if I called 'mmc partconf 0 0 0 0' after the DFU command.

Hi Otavio, Fabio,
On 04/04/19 02:22, Fabio Estevam wrote:
Hi Otavio,
On Wed, Apr 3, 2019 at 3:45 PM Otavio Salvador otavio.salvador@ossystems.com.br wrote:
Stefano,
On Fri, Mar 22, 2019 at 2:53 PM Otavio Salvador otavio@ossystems.com.br wrote:
The default U-Boot environment expects the use of eMMC user partition. To ensure we are using the proper eMMC partition for boot we need to run the `mmc partconf` command.
This patch updates the README instructions to avoid users to follow misleading instructions.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Could this to be applied?
I have seen the patch but I have not picked it up.
Fabio is reporting that these instructions are not working for him - IMHO it is better to have no instructions else not working instructions. I am really relying on your both judge, I have not the board and no way to test myself.
The instructions on this patch did not work for me.
It only worked if I called 'mmc partconf 0 0 0 0' after the DFU command.
Indeed.
Best regards, Stefano

On Wed, Apr 3, 2019 at 9:22 PM Fabio Estevam festevam@gmail.com wrote:
On Wed, Apr 3, 2019 at 3:45 PM Otavio Salvador otavio.salvador@ossystems.com.br wrote:
On Fri, Mar 22, 2019 at 2:53 PM Otavio Salvador otavio@ossystems.com.br wrote:
The default U-Boot environment expects the use of eMMC user partition. To ensure we are using the proper eMMC partition for boot we need to run the `mmc partconf` command.
This patch updates the README instructions to avoid users to follow misleading instructions.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Could this to be applied?
The instructions on this patch did not work for me.
It only worked if I called 'mmc partconf 0 0 0 0' after the DFU command.
It is really weird and it always work for us here. Vanessa and Richard, could you give it a try?

Hi Otavio,
On Thu, Apr 4, 2019 at 9:41 AM Otavio Salvador otavio.salvador@ossystems.com.br wrote:
It is really weird and it always work for us here. Vanessa and Richard, could you give it a try?
Once the board is "unlocked" your instructions work fine.
Try "locking" it first and then try your instructions again.
participants (5)
-
Fabio Estevam
-
Marek Vasut
-
Otavio Salvador
-
Otavio Salvador
-
Stefano Babic