diff mbox series

configs: am335x_evm: Enable DFU over TFTP support

Message ID 20200226174301.8259-1-joe.skb7@gmail.com
State Accepted
Commit 3d9433e70c26d1b4e849522a3aa40be44c7a9ac1
Headers show
Series configs: am335x_evm: Enable DFU over TFTP support | expand

Commit Message

Sam Protsenko Feb. 26, 2020, 5:43 p.m. UTC
DFU over TFTP flashing method might be helpful in order to speed-up the
flashing process of big images (as DFU works over USB EP0, which is
quite slow). Also, it's a good backup option in the case when USB got
broken (either in software or hardware), to avoid resorting to SD card
boot.

This config option was present in am335x_boneblack_defconfig, but we
have to use generic am335x_evm_defconfig now, as BBB defconfig was
removed in commit 8fa7f65dd02c ("configs: Remove
am335x_boneblack_defconfig"). So this patch merely brings that option
back.

Tested on BeagleBone Black:

    => setenv dfu_alt_info $dfu_alt_info_emmc
    => setenv ipaddr 192.168.0.100
    => setenv serverip 192.168.0.1
    => setenv updatefile update_uboot.itb
    => dfu tftp mmc 1

Where 'update_uboot.its' file looks like this:

    /dts-v1/;

    / {
        description = "Automatic U-Boot update";
        #address-cells = <1>;

        images {
            u-boot.img.raw-1 {
                description = "U-Boot binary";
                data = /incbin/("u-boot.img");
                compression = "none";
                type = "firmware";
                load = <0x60000>;
                hash-1 {
                    algo = "sha1";
                };
            };
        };
    };

And 'update_uboot.itb' is generated as follows:

    $ mkimage -f update_uboot.its update_uboot.itb

Newly flashed U-Boot works fine.

Fixes: 8fa7f65dd02c ("configs: Remove am335x_boneblack_defconfig")
Signed-off-by: Sam Protsenko <joe.skb7 at gmail.com>
---
 configs/am335x_evm_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Lokesh Vutla March 3, 2020, 7:43 a.m. UTC | #1
On 26/02/20 11:13 PM, Sam Protsenko wrote:
> DFU over TFTP flashing method might be helpful in order to speed-up the
> flashing process of big images (as DFU works over USB EP0, which is
> quite slow). Also, it's a good backup option in the case when USB got
> broken (either in software or hardware), to avoid resorting to SD card
> boot.
> 
> This config option was present in am335x_boneblack_defconfig, but we
> have to use generic am335x_evm_defconfig now, as BBB defconfig was
> removed in commit 8fa7f65dd02c ("configs: Remove
> am335x_boneblack_defconfig"). So this patch merely brings that option
> back.
> 
> Tested on BeagleBone Black:
> 
>     => setenv dfu_alt_info $dfu_alt_info_emmc
>     => setenv ipaddr 192.168.0.100
>     => setenv serverip 192.168.0.1
>     => setenv updatefile update_uboot.itb
>     => dfu tftp mmc 1
> 
> Where 'update_uboot.its' file looks like this:
> 
>     /dts-v1/;
> 
>     / {
>         description = "Automatic U-Boot update";
>         #address-cells = <1>;
> 
>         images {
>             u-boot.img.raw-1 {
>                 description = "U-Boot binary";
>                 data = /incbin/("u-boot.img");
>                 compression = "none";
>                 type = "firmware";
>                 load = <0x60000>;
>                 hash-1 {
>                     algo = "sha1";
>                 };
>             };
>         };
>     };
> 
> And 'update_uboot.itb' is generated as follows:
> 
>     $ mkimage -f update_uboot.its update_uboot.itb
> 
> Newly flashed U-Boot works fine.
> 
> Fixes: 8fa7f65dd02c ("configs: Remove am335x_boneblack_defconfig")
> Signed-off-by: Sam Protsenko <joe.skb7 at gmail.com>

Applied to u-boot-ti next.

Thanks and regards,
Lokesh
diff mbox series

Patch

diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 8fd90a6f37..2fe9f86f1a 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -39,6 +39,7 @@  CONFIG_SPL_ENV_IS_NOWHERE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_CLK=y
 CONFIG_CLK_CDCE9XX=y
+CONFIG_DFU_TFTP=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_NAND=y
 CONFIG_DFU_RAM=y