U-Boot fails dfu on edison

Ferry Toth fntoth at gmail.com
Tue Sep 15 00:03:48 CEST 2020


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 at gmail.com> wrote:
>>>> On Thu, Sep 3, 2020 at 4:40 PM Andy Shevchenko
>>>> <andriy.shevchenko at 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.
>>>>>
>>>>> [1]: https://edison-fw.github.io/edison-wiki/u-boot-update (look into known-bugs section)
>>>>>
>>>>>> 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
>>>
>>> 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 at ff3fc000: 0, mmc at 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
> 
> 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-bsp/recipes-bsp/u-boot/files/target_env

These are concat with this one:
https://github.com/edison-fw/meta-intel-edison/blob/zeus/meta-intel-edison-bsp/recipes-bsp/u-boot/files/edison.env

Scripts and U_Boot built in this way are built and tested up to U-Boot 
2020.07.

> 




More information about the U-Boot mailing list