U-Boot fails dfu on edison

Hi,
I'd like to get edison running in my lab but it has resisted two attempts so far.
My latest problem is that when I try the latest U-Boot, I get:
U-Boot 2020.10-rc3-00012-g9f04a634ef3 (Sep 03 2020 - 07:06:30 -0600)
CPU: Genuine Intel(R) CPU 4000 @ 500MHz DRAM: 980.6 MiB WDT: Started with servicing (60s timeout) MMC: mmc@ff3fc000: 0, mmc@ff3fa000: 1 Loading Environment from MMC... OK In: serial Out: serial Err: serial Net: No ethernet found. Hit any key to stop autoboot: 0 Target:blank Partitioning already done... Flashing already done... Memory layout (mmc) not supported! DFU entities configuration failed! (partition table does not match dfu_alt_info?) dfu - Device Firmware Upgrade
Usage: dfu <USB_controller> [<interface> <dev>] [<timeout>] [list] - device firmware upgrade via <USB_controller> on device <dev>, attached to interface <interface> [<timeout>] - specify inactivity timeout in seconds [list] - list available alt settings
I tried resetting the environment, but then it seems to just clear the environment.
=> env default -a ## Resetting to default environment ## Error: Can't force access to "bootdelay" ## Error: Can't force access to "baudrate"
Then I rebooted and tried the instructions in edison.rst :
run do_force_flash_os Saving Environment to MMC... Writing to MMC(0)... OK Memory layout (mmc) not supported! DFU entities configuration failed! (partition table does not match dfu_alt_info?) dfu - Device Firmware Upgrade
Usage: dfu <USB_controller> [<interface> <dev>] [<timeout>] [list] - device firmware upgrade via <USB_controller> on device <dev>, attached to interface <interface> [<timeout>] - specify inactivity timeout in seconds [list] - list available alt settings
Any ideas please?
Regards, Simon

On Thu, Sep 03, 2020 at 07:15:59AM -0600, Simon Glass wrote:
Hi,
I'd like to get edison running in my lab but it has resisted two attempts so far.
My latest problem is that when I try the latest U-Boot, I get:
U-Boot 2020.10-rc3-00012-g9f04a634ef3 (Sep 03 2020 - 07:06:30 -0600)
Do you have clean repo?
Can't reproduce neither with my personal branch nor with vanilla -rc3:
~~~~ U-Boot 2020.10-rc3 (Sep 03 2020 - 16:33:27 +0300)
CPU: Intel(R) Atom(TM) CPU U1000 @ 500MHz DRAM: 980.6 MiB WDT: Started with servicing (60s timeout) MMC: mmc@ff3fc000: 0, mmc@ff3fa000: 1 Loading Environment from MMC... OK In: serial Out: serial Err: serial Net: No ethernet found. Hit any key to stop autoboot: 0 => => run do_force_flash_os Saving Environment to MMC... Writing to redundant MMC(0)... OK
~~~~
Maybe something wrong with the environment?
...
Target:blank Partitioning already done... Flashing already done... Memory layout (mmc) not supported! DFU entities configuration failed! (partition table does not match dfu_alt_info?)
Hmm... Have you read this [1]? It may give some hints I think.
[1]: https://edison-fw.github.io/edison-wiki/u-boot-update (look into known-bugs section)
Any ideas please?
See above.

On Thu, Sep 3, 2020 at 4:40 PM Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
On Thu, Sep 03, 2020 at 07:15:59AM -0600, Simon Glass wrote:
...
Hmm... Have you read this [1]? It may give some hints I think.
Any ideas please?
See above.
Just in case my script [2] to prepare a U-Boot image file suitable for xFSTK.
[2]: https://gist.github.com/andy-shev/2c388310f2773ead647d9c1a3f1c813f

Hi Andy,
On Thu, 3 Sep 2020 at 07:51, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Thu, Sep 3, 2020 at 4:40 PM Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
On Thu, Sep 03, 2020 at 07:15:59AM -0600, Simon Glass wrote:
...
Hmm... Have you read this [1]? It may give some hints I think.
Any ideas please?
See above.
Just in case my script [2] to prepare a U-Boot image file suitable for xFSTK.
Thanks, that gets me a bit closer. Here are my steps:
1. Start with the original 2014 U-Boot from 'flashall.sh --recovery' 2. Boot it and use dfu-util to flash the latest 2020 U-Boot as per edison.rst 3. Set env vars as guessed from the link you provided:
setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7" setenv do_dfu_alt_info_ifwi 'setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2"' setenv do_dfu_alt_info_mmc 'setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7"' setenv do_flash_ifwi 'run do_dfu_alt_info_ifwi ; dfu 0 raw 3' setenv do_force_flash_os 'run do_dfu_alt_info_mmc ; sleep 1 ; setenv do_flash_os_done 1 ; saveenv ; dfu 0 raw 3'
4. Reboot and see:
U-Boot 2020.10-rc3-00012-g9f04a634ef3 (Sep 03 2020 - 07:06:30 -0600)
CPU: Genuine Intel(R) CPU 4000 @ 500MHz DRAM: 980.6 MiB WDT: Started with servicing (60s timeout) MMC: mmc@ff3fc000: 0, mmc@ff3fa000: 1 Loading Environment from MMC... OK In: serial Out: serial Err: serial Net: No ethernet found. Hit any key to stop autoboot: 0 Target:ifwi Partitioning already done... Partitioning already done... Saving Environment to MMC... Writing to redundant MMC(0)... OK dfu_fill_entity: Device raw not (yet) supported! DFU entities configuration failed! (partition table does not match dfu_alt_info?) dfu - Device Firmware Upgrade
Usage: dfu <USB_controller> [<interface> <dev>] [<timeout>] [list] - device firmware upgrade via <USB_controller> on device <dev>, attached to interface <interface> [<timeout>] - specify inactivity timeout in seconds [list] - list available alt settings
Unknown boot mode: boot ## Error: Can't force access to "bootargs_mode" Saving Environment to MMC... Writing to MMC(0)... OK Resetting to default boot mode and reboot... resetting ...
So I am still missing something?
Regards, Simon

On Thu, Sep 03, 2020 at 08:21:23AM -0600, Simon Glass wrote:
On Thu, 3 Sep 2020 at 07:51, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Thu, Sep 3, 2020 at 4:40 PM Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
On Thu, Sep 03, 2020 at 07:15:59AM -0600, Simon Glass wrote:
...
Hmm... Have you read this [1]? It may give some hints I think.
Any ideas please?
See above.
Just in case my script [2] to prepare a U-Boot image file suitable for xFSTK.
Thanks, that gets me a bit closer. Here are my steps:
- Start with the original 2014 U-Boot from 'flashall.sh --recovery'
- Boot it and use dfu-util to flash the latest 2020 U-Boot as per edison.rst
- Set env vars as guessed from the link you provided:
setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7" setenv do_dfu_alt_info_ifwi 'setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2"' setenv do_dfu_alt_info_mmc 'setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7"' setenv do_flash_ifwi 'run do_dfu_alt_info_ifwi ; dfu 0 raw 3' setenv do_force_flash_os 'run do_dfu_alt_info_mmc ; sleep 1 ; setenv do_flash_os_done 1 ; saveenv ; dfu 0 raw 3'
^^^
- Reboot and see:
U-Boot 2020.10-rc3-00012-g9f04a634ef3 (Sep 03 2020 - 07:06:30 -0600)
CPU: Genuine Intel(R) CPU 4000 @ 500MHz DRAM: 980.6 MiB WDT: Started with servicing (60s timeout) MMC: mmc@ff3fc000: 0, mmc@ff3fa000: 1 Loading Environment from MMC... OK In: serial Out: serial Err: serial Net: No ethernet found. Hit any key to stop autoboot: 0 Target:ifwi Partitioning already done... Partitioning already done... Saving Environment to MMC... Writing to redundant MMC(0)... OK dfu_fill_entity: Device raw not (yet) supported!
So I am still missing something?
Yes. You haven't read the Issue #3 [3] mentioned in the known-bug section in [1].
[3]: https://github.com/intel/edison-u-boot/issues/3

On Thu, Sep 03, 2020 at 06:05:44PM +0300, Andy Shevchenko wrote:
On Thu, Sep 03, 2020 at 08:21:23AM -0600, Simon Glass wrote:
On Thu, 3 Sep 2020 at 07:51, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Thu, Sep 3, 2020 at 4:40 PM Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
On Thu, Sep 03, 2020 at 07:15:59AM -0600, Simon Glass wrote:
...
Hmm... Have you read this [1]? It may give some hints I think.
Any ideas please?
See above.
Just in case my script [2] to prepare a U-Boot image file suitable for xFSTK.
Thanks, that gets me a bit closer. Here are my steps:
- Start with the original 2014 U-Boot from 'flashall.sh --recovery'
- Boot it and use dfu-util to flash the latest 2020 U-Boot as per edison.rst
- Set env vars as guessed from the link you provided:
setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7" setenv do_dfu_alt_info_ifwi 'setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2"' setenv do_dfu_alt_info_mmc 'setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7"' setenv do_flash_ifwi 'run do_dfu_alt_info_ifwi ; dfu 0 raw 3' setenv do_force_flash_os 'run do_dfu_alt_info_mmc ; sleep 1 ; setenv do_flash_os_done 1 ; saveenv ; dfu 0 raw 3'
^^^
- Reboot and see:
U-Boot 2020.10-rc3-00012-g9f04a634ef3 (Sep 03 2020 - 07:06:30 -0600)
CPU: Genuine Intel(R) CPU 4000 @ 500MHz DRAM: 980.6 MiB WDT: Started with servicing (60s timeout) MMC: mmc@ff3fc000: 0, mmc@ff3fa000: 1 Loading Environment from MMC... OK In: serial Out: serial Err: serial Net: No ethernet found. Hit any key to stop autoboot: 0 Target:ifwi Partitioning already done... Partitioning already done... Saving Environment to MMC... Writing to redundant MMC(0)... OK dfu_fill_entity: Device raw not (yet) supported!
So I am still missing something?
Yes. You haven't read the Issue #3 [3] mentioned in the known-bug section in [1].
For your convenience copy'n'paste of my comments from [3].
~~~ You need to change mmc word (note that mmcpart word is left untouched) to raw word in description of partitions. It's done, for example, in do_dfu_alt_info_mmc environment variable.
Command is kept the same: dfu 0 mmc 0
~~~ There is no rawpart keyword in DFU if I remember correctly. You need to use mmcpart instead. I have updated above comment to accent on this.
~~~

Op 03-09-2020 om 17:49 schreef Andy Shevchenko:
On Thu, Sep 03, 2020 at 06:05:44PM +0300, Andy Shevchenko wrote:
On Thu, Sep 03, 2020 at 08:21:23AM -0600, Simon Glass wrote:
On Thu, 3 Sep 2020 at 07:51, Andy Shevchenko andy.shevchenko@gmail.com wrote:
On Thu, Sep 3, 2020 at 4:40 PM Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
On Thu, Sep 03, 2020 at 07:15:59AM -0600, Simon Glass wrote:
...
Hmm... Have you read this [1]? It may give some hints I think.
Any ideas please?
See above.
Just in case my script [2] to prepare a U-Boot image file suitable for xFSTK.
Thanks, that gets me a bit closer. Here are my steps:
- Start with the original 2014 U-Boot from 'flashall.sh --recovery'
- Boot it and use dfu-util to flash the latest 2020 U-Boot as per edison.rst
- Set env vars as guessed from the link you provided:
setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7" setenv do_dfu_alt_info_ifwi 'setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2"' setenv do_dfu_alt_info_mmc 'setenv dfu_alt_info "ifwi${hardware_id} raw 0 8192 mmcpart 1;ifwib${hardware_id} raw 0 8192 mmcpart 2;u-boot0 part 0 1;u-boot-env0 part 0 2;u-boot1 part 0 3;u-boot-env1 part 0 4;boot part 0 7;rootfs part 0 8;update part 0 9;home part 0 10;vmlinuz fat 0 7;initrd fat 0 7"' setenv do_flash_ifwi 'run do_dfu_alt_info_ifwi ; dfu 0 raw 3' setenv do_force_flash_os 'run do_dfu_alt_info_mmc ; sleep 1 ; setenv do_flash_os_done 1 ; saveenv ; dfu 0 raw 3'
^^^
- Reboot and see:
U-Boot 2020.10-rc3-00012-g9f04a634ef3 (Sep 03 2020 - 07:06:30 -0600)
CPU: Genuine Intel(R) CPU 4000 @ 500MHz DRAM: 980.6 MiB WDT: Started with servicing (60s timeout) MMC: mmc@ff3fc000: 0, mmc@ff3fa000: 1 Loading Environment from MMC... OK In: serial Out: serial Err: serial Net: No ethernet found. Hit any key to stop autoboot: 0 Target:ifwi Partitioning already done... Partitioning already done... Saving Environment to MMC... Writing to redundant MMC(0)... OK dfu_fill_entity: Device raw not (yet) supported!
So I am still missing something?
Yes. You haven't read the Issue #3 [3] mentioned in the known-bug section in [1].
For your convenience copy'n'paste of my comments from [3].
You need to change mmc word (note that mmcpart word is left untouched) to raw word in description of partitions. It's done, for example, in do_dfu_alt_info_mmc environment variable. Command is kept the same: dfu 0 mmc 0
There is no rawpart keyword in DFU if I remember correctly. You need to use mmcpart instead. I have updated above comment to accent on this.
This Yocto recipe build U-Boot and the env variables as the original flashall.sh script expects: https://github.com/edison-fw/meta-intel-edison/tree/zeus/meta-intel-edison-b...
These are concat with this one: https://github.com/edison-fw/meta-intel-edison/blob/zeus/meta-intel-edison-b...
Scripts and U_Boot built in this way are built and tested up to U-Boot 2020.07.
participants (4)
-
Andy Shevchenko
-
Andy Shevchenko
-
Ferry Toth
-
Simon Glass