All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
@ 2019-03-22 17:53 Otavio Salvador
  2019-03-22 18:01 ` Fabio Estevam
  2019-04-03 18:44 ` Otavio Salvador
  0 siblings, 2 replies; 11+ messages in thread
From: Otavio Salvador @ 2019-03-22 17:53 UTC (permalink / raw)
  To: u-boot

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
 
-- 
2.21.0

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

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-03-22 17:53 [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition Otavio Salvador
@ 2019-03-22 18:01 ` Fabio Estevam
  2019-03-22 18:09   ` Otavio Salvador
  2019-04-03 18:44 ` Otavio Salvador
  1 sibling, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2019-03-22 18:01 UTC (permalink / raw)
  To: u-boot

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.

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

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-03-22 18:01 ` Fabio Estevam
@ 2019-03-22 18:09   ` Otavio Salvador
  2019-03-22 18:17     ` Fabio Estevam
  0 siblings, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2019-03-22 18:09 UTC (permalink / raw)
  To: u-boot

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:
>
> 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

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).

> 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.

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?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

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

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-03-22 18:09   ` Otavio Salvador
@ 2019-03-22 18:17     ` Fabio Estevam
  2019-03-22 18:42       ` Otavio Salvador
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2019-03-22 18:17 UTC (permalink / raw)
  To: u-boot

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:
> >
> > 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
>
> 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.

> > 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.
>
> 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.

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

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-03-22 18:17     ` Fabio Estevam
@ 2019-03-22 18:42       ` Otavio Salvador
  2019-03-22 21:06         ` Marek Vasut
  0 siblings, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2019-03-22 18:42 UTC (permalink / raw)
  To: u-boot

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:
> > > 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.
> >
> > 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.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

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

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-03-22 18:42       ` Otavio Salvador
@ 2019-03-22 21:06         ` Marek Vasut
  0 siblings, 0 replies; 11+ messages in thread
From: Marek Vasut @ 2019-03-22 21:06 UTC (permalink / raw)
  To: u-boot

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:
>>>> 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.
>>>
>>> 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.

-- 
Best regards,
Marek Vasut

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

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-03-22 17:53 [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition Otavio Salvador
  2019-03-22 18:01 ` Fabio Estevam
@ 2019-04-03 18:44 ` Otavio Salvador
  2019-04-04  0:22   ` Fabio Estevam
  1 sibling, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2019-04-03 18:44 UTC (permalink / raw)
  To: u-boot

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?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

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

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-04-03 18:44 ` Otavio Salvador
@ 2019-04-04  0:22   ` Fabio Estevam
  2019-04-04  8:07     ` Stefano Babic
  2019-04-04 12:41     ` Otavio Salvador
  0 siblings, 2 replies; 11+ messages in thread
From: Fabio Estevam @ 2019-04-04  0:22 UTC (permalink / raw)
  To: u-boot

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.

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

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-04-04  0:22   ` Fabio Estevam
@ 2019-04-04  8:07     ` Stefano Babic
  2019-04-04 12:41     ` Otavio Salvador
  1 sibling, 0 replies; 11+ messages in thread
From: Stefano Babic @ 2019-04-04  8:07 UTC (permalink / raw)
  To: u-boot

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

-- 
=====================================================================
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] 11+ messages in thread

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-04-04  0:22   ` Fabio Estevam
  2019-04-04  8:07     ` Stefano Babic
@ 2019-04-04 12:41     ` Otavio Salvador
  2019-04-04 12:46       ` Fabio Estevam
  1 sibling, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2019-04-04 12:41 UTC (permalink / raw)
  To: u-boot

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?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

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

* [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
  2019-04-04 12:41     ` Otavio Salvador
@ 2019-04-04 12:46       ` Fabio Estevam
  0 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2019-04-04 12:46 UTC (permalink / raw)
  To: u-boot

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.

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

end of thread, other threads:[~2019-04-04 12:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 17:53 [U-Boot] [PATCH v2] pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition Otavio Salvador
2019-03-22 18:01 ` Fabio Estevam
2019-03-22 18:09   ` Otavio Salvador
2019-03-22 18:17     ` Fabio Estevam
2019-03-22 18:42       ` Otavio Salvador
2019-03-22 21:06         ` Marek Vasut
2019-04-03 18:44 ` Otavio Salvador
2019-04-04  0:22   ` Fabio Estevam
2019-04-04  8:07     ` Stefano Babic
2019-04-04 12:41     ` Otavio Salvador
2019-04-04 12:46       ` Fabio Estevam

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.