* [PATCH v2] config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm
@ 2024-08-05 8:42 Lukasz Majewski
2024-08-05 23:24 ` Fabio Estevam
0 siblings, 1 reply; 3+ messages in thread
From: Lukasz Majewski @ 2024-08-05 8:42 UTC (permalink / raw)
To: Teresa Remmet, u-boot
Cc: Tom Rini, Benjamin Hahn, Cem Tenruh, Martyn Welch, Simon Glass,
Fabio Estevam, Lukasz Majewski
This command allows easy update on SD card or eMMC of the flash.bin
generated (with binman) during u-boot build.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
Changes for v2:
- Remove 'update_mmc_part' variable
- Change path for hostname
- Use full version of dhcp command (${loadaddr} added)
---
include/configs/phycore_imx8mm.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/configs/phycore_imx8mm.h b/include/configs/phycore_imx8mm.h
index ce6dc87c69..361e665676 100644
--- a/include/configs/phycore_imx8mm.h
+++ b/include/configs/phycore_imx8mm.h
@@ -29,6 +29,16 @@
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
"mmcpart=1\0" \
"mmcroot=2\0" \
+ "update_offset=0x42\0" \
+ "update_filename=flash.bin\0" \
+ "hostname=/srv/tftp/\0" \
+ "update_bootimg=" \
+ "mmc dev ${mmcdev} ; " \
+ "if dhcp ${loadaddr} ${hostname}/${update_filename} ; then " \
+ "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
+ "setexpr fw_sz ${fw_sz} + 1 ; " \
+ "mmc write ${loadaddr} ${update_offset} ${fw_sz} ; " \
+ "fi\0" \
"mmcautodetect=yes\0" \
"mmcargs=setenv bootargs console=${console} " \
"root=/dev/mmcblk${mmcdev}p${mmcroot} rootwait rw\0" \
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm
2024-08-05 8:42 [PATCH v2] config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm Lukasz Majewski
@ 2024-08-05 23:24 ` Fabio Estevam
2024-08-06 8:08 ` Lukasz Majewski
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2024-08-05 23:24 UTC (permalink / raw)
To: Lukasz Majewski
Cc: Teresa Remmet, u-boot, Tom Rini, Benjamin Hahn, Cem Tenruh,
Martyn Welch, Simon Glass
Hi Lukasz,
On Mon, Aug 5, 2024 at 5:42 AM Lukasz Majewski <lukma@denx.de> wrote:
> + "update_offset=0x42\0" \
> + "update_filename=flash.bin\0" \
> + "hostname=/srv/tftp/\0" \
> + "update_bootimg=" \
> + "mmc dev ${mmcdev} ; " \
> + "if dhcp ${loadaddr} ${hostname}/${update_filename} ; then " \
> + "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
> + "setexpr fw_sz ${fw_sz} + 1 ; "
As Benjamin pointed out earlier this increment by one is not necessary.
All other i.MX8M docs don't have this increment.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm
2024-08-05 23:24 ` Fabio Estevam
@ 2024-08-06 8:08 ` Lukasz Majewski
0 siblings, 0 replies; 3+ messages in thread
From: Lukasz Majewski @ 2024-08-06 8:08 UTC (permalink / raw)
To: Fabio Estevam
Cc: Teresa Remmet, u-boot, Tom Rini, Benjamin Hahn, Cem Tenruh,
Martyn Welch, Simon Glass
[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]
Hi Fabio,
> Hi Lukasz,
>
> On Mon, Aug 5, 2024 at 5:42 AM Lukasz Majewski <lukma@denx.de> wrote:
>
> > + "update_offset=0x42\0" \
> > + "update_filename=flash.bin\0" \
> > + "hostname=/srv/tftp/\0" \
> > + "update_bootimg="
> > \
> > + "mmc dev ${mmcdev} ; " \
> > + "if dhcp ${loadaddr} ${hostname}/${update_filename}
> > ; then " \
> > + "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block
> > size */ \
> > + "setexpr fw_sz ${fw_sz} + 1 ; "
>
> As Benjamin pointed out earlier this increment by one is not
> necessary.
>
> All other i.MX8M docs don't have this increment.
So apparently the BSP build scripts in OE/Yocto take always care to
have 0x200 aligned binaries (imx-boot and flash.bin).
OK, I will remove it.
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-06 8:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-05 8:42 [PATCH v2] config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm Lukasz Majewski
2024-08-05 23:24 ` Fabio Estevam
2024-08-06 8:08 ` Lukasz Majewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox