]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
imx: kontron-sl-mx6ul: Autostart fastboot if booted from USB
authorAnnette Kobou <annette.kobou@kontron.de>
Mon, 25 Aug 2025 13:54:31 +0000 (15:54 +0200)
committerFabio Estevam <festevam@gmail.com>
Fri, 5 Sep 2025 12:03:28 +0000 (09:03 -0300)
For booting via USB we want to automatically start the fastboot
command in order to access the board via uuu or other tools.

This allows for easier bringup of new boards during development
and manufacturing.

Signed-off-by: Annette Kobou <annette.kobou@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
board/kontron/sl-mx6ul/sl-mx6ul.c

index 16d89c64d61f272d1c6342611b184d8fd735e4b8..e33907ee1241cd1c2411127bfc3d9774b6a7bedf 100644 (file)
@@ -5,7 +5,9 @@
 
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/arch-mx6/imx-regs.h>
 #include <asm/global_data.h>
+#include <env.h>
 #include <env_internal.h>
 #include <fdt_support.h>
 #include <phy.h>
@@ -87,6 +89,16 @@ int board_init(void)
        return 0;
 }
 
+int board_late_init(void)
+{
+       if (is_boot_from_usb()) {
+               env_set("bootdelay", "0");
+               env_set("bootcmd", "fastboot 0");
+       }
+
+       return 0;
+}
+
 enum env_location env_get_location(enum env_operation op, int prio)
 {
        if (prio)