On 9/30/26 7:51 AM, Carlo Caione wrote:
> From: Julien Masson <[email protected]>
> 
> Genio 510 and 700 need a way to provision blank eMMC and recover from
> unusable boot firmware without relying on the installed bootloader. Add
> a BootROM-loaded fastboot agent that also prepares the eMMC boot
> settings so newly flashed firmware can boot.
> 

...

> diff --git a/arch/arm/dts/mtk-genio-da-binman-u-boot.dtsi 
> b/arch/arm/dts/mtk-genio-da-binman-u-boot.dtsi
> new file mode 100644
> index 00000000000..fb6fadb492f
> --- /dev/null
> +++ b/arch/arm/dts/mtk-genio-da-binman-u-boot.dtsi
> @@ -0,0 +1,16 @@
> +// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
> +/*
> + * Copyright (c) 2026 BayLibre, SAS.
> + * Author: Carlo Caione <[email protected]>
> + */
> +
> +&binman {
> +     da: da {
> +             filename = "da.bin";
> +             pad-byte = <0>;
> +
> +/* DA authentication is handled by the BootROM download tooling. */
> +#define MTK_GENIO_SPL_NO_FIT_KEYS
> +#include "mtk-genio-loader-spl-binman-u-boot.dtsi"
> +     };
> +};

Since the download agent and MTK_GENIO_BOOT_IMAGES are mutually exclusive,
could the loader dtsi just check !defined(CONFIG_MTK_BROM_DOWNLOAD_AGENT)
instead of a private MTK_GENIO_SPL_NO_FIT_KEYS define?


> diff --git a/arch/arm/mach-mediatek/download_agent.c 
> b/arch/arm/mach-mediatek/download_agent.c
> new file mode 100644
> index 00000000000..e73b6a6b161
> --- /dev/null
> +++ b/arch/arm/mach-mediatek/download_agent.c
> @@ -0,0 +1,69 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2026 BayLibre, SAS.
> + * Author: Julien Masson <[email protected]>
> + */
> +
> +#include <dm/uclass.h>
> +#include <fastboot.h>
> +#include <mmc.h>
> +#include <stdio.h>
> +#include <linux/errno.h>

Also spl.h for spl_board_init() and init.h for board_late_init().

Reply via email to