How do you enable Fastboot in u-boot for i.MX6Q boards

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do you enable Fastboot in u-boot for i.MX6Q boards

18,016 Views
michaelworster
Contributor IV

I've read on a few different sites, ex: Factory flashing with U-Boot and fastboot on Freescale i.MX6 , that's it's possible to enable Fastboot in the u-boot bootloader for i.MX6 products. I attempted to add the correct configuration options into the include/configs/mx6sabresd.h header file, but for some reason the built u-boot.imx still doesn't have the fastboot tool enabled.

Is there any information, wikis, or places where it's listed out what needs to be done to enable fastboot in the bootloader for the SABRE i.MX6Q board?

include/configs/mx6sabresd.h |   26 +++++++++++++++++++++++++-

1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h

index d9a699d..1588d3f 100644

--- a/include/configs/mx6sabresd.h

+++ b/include/configs/mx6sabresd.h

@@ -93,7 +93,7 @@

#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_MXC_EPDC)

     /*

      * Framebuffer and LCD

-     */

+     */0001-quick-test.patch

     #define CONFIG_CMD_BMP

     #define CONFIG_LCD

     #define CONFIG_SYS_CONSOLE_IS_IN_ENV

@@ -105,4 +105,28 @@

     #define CONFIG_WAVEFORM_BUF_SIZE        0x200000

#endif /* CONFIG_SPLASH_SCREEN && CONFIG_MXC_EPDC */

+#define CONFIG_USB_EHCI

+#define CONFIG_USB_EHCI_MX6

+#define CONFIG_MXC_USB_PORTSC    (PORT_PTS_UTMI | PORT_PTS_PTW)

+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET

+

+#define CONFIG_CMD_FASTBOOT

+#define CONFIG_USB_FASTBOOT_BUF_ADDR    CONFIG_SYS_LOAD_ADDR

+#define CONFIG_USB_FASTBOOT_BUF_SIZE    0x10000000

+#define CONFIG_FASTBOOT_FLASH

+#define CONFIG_FASTBOOT_FLASH_MMC_DEV    0

+

+#define CONFIG_USB_GADGET

+#define CONFIG_USB_GADGET_VBUS_DRAW    2

+#define CONFIG_USB_GADGET_DUALSPEED

+#define CONFIG_G_DNL_MANUFACTURER    "Freescale"

+#define CONFIG_G_DNL_VENDOR_NUM        0x18d1

+#define CONFIG_G_DNL_PRODUCT_NUM    0x0d02

+#define CONFIG_CI_UDC

+#define CONFIG_USBDOWNLOAD_GADGET

+

+#define CONFIG_EFI_PARTITION

+#define CONFIG_PARTITION_UUIDS

+#define CONFIG_CMD_GPT

+

#endif                         /* __MX6QSABRESD_CONFIG_H */

--

1.7.9.5

Labels (4)
7 Replies

10,430 Views
yash
Contributor I

Hi all,

I'm facing the same issue of fastboot not identifying the deviceUSB_controller when flashing Yocto based Linux image.

Tool to flash : https://github.com/NXPmicro/mfgtools (UUU)

In u-boot I added the fastboot support, by using details at : https://bootlin.com/blog/factory-flashing-with-u-boot-and-fastboot-on-freescale-i-mx6/

But now the u-boot command fastboot is giving the error :

Run bootcmd_mfg: run mfgtool_args; if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else bootz ${loadaddr} ${initrd_addr} ${fdt_addr}; fi;
Hit any key to stop autoboot: 0
Bad Linux ARM zImage magic! 
=> fastboot
fastboot - use USB Fastboot protocol

Usage:
fastboot <USB_controller>
- run as a fastboot usb device
=> fastboot 0
g_dnl_register: failed!, error: -12
exit not allowed from main input shell.
=> fastboot 1
g_dnl_register: failed!, error: -12
exit not allowed from main input shell.

I'm new to the NXP IMX6 environment, kindly help with your inputs on :

1. emmc_burn_all.lst file to flash : u-boot.imx   ->     zImage  ->   imx6qd-nano.dtb    ->     fsl-image-gui-imx6qdnano.sdcard

2. How to use uuu -s to enter FB: ucmd  commands to flash IMX6 ?

0 Kudos
Reply

11,080 Views
prasannakulkarni
Contributor IV

Hi,

Very easiest way to remove fastboot LOCK from u-boot is comment out one line from "include/configs/mx6sabreandroid_common.h"

/*
* Copyright (C) 2013-2016 Freescale Semiconductor, Inc. All Rights Reserved.
* Copyright 2017 NXP
*
* SPDX-License-Identifier: GPL-2.0+
*/

#ifndef MX6_SABRE_ANDROID_COMMON_H
#define MX6_SABRE_ANDROID_COMMON_H
#include "mx_android_common.h"
/* For NAND we don't support lock/unlock */
#ifndef CONFIG_NAND_BOOT
/* #define CONFIG_FASTBOOT_LOCK */            <<------------------ Only change required.

 

build the u-boot.imx thats it. Fastboot is enabled.

0 Kudos
Reply

11,080 Views
radikedalpatadu
Contributor II

Hi Michael,

Are you going to use fastboot command like flash/erase on an MMC, NAND or NOR flash? Have you tried the following settings given in this thread?

Enable fastboot for MX50 RD3 board -blog archive

Hope this will be helpful.

/* Android fastboot configs */

#define CONFIG_USB_DEVICE

#define CONFIG_IMX_UDC                 1

#define CONFIG_FASTBOOT                1

#define CONFIG_FASTBOOT_STORAGE_EMMC_SATA

#define CONFIG_FASTBOOT_VENDOR_ID      0xbb4

#define CONFIG_FASTBOOT_PRODUCT_ID     0xc01

#define CONFIG_FASTBOOT_BCD_DEVICE     0x311

#define CONFIG_FASTBOOT_MANUFACTURER_STR  "Freescale"

#define CONFIG_FASTBOOT_PRODUCT_NAME_STR "i.mx50 rdp"

#define CONFIG_FASTBOOT_CONFIGURATION_STR  "Android fastboot"

#define CONFIG_FASTBOOT_INTERFACE_STR    "Android fastboot"

#define CONFIG_FASTBOOT_SERIAL_NUM      "12345"

#define CONFIG_FASTBOOT_SATA_NO          0

#define CONFIG_FASTBOOT_TRANSFER_BUF    0x80000000

#define CONFIG_FASTBOOT_TRANSFER_BUF_SIZE 0x8000000 /* 128M byte */

Best Regards,

-Radike

11,080 Views
michaelworster
Contributor IV

Radike,

    Thanks for your reply, I attempted to use the patch as you suggested but after applying it there were a number of additional build failures. Finally I took a "simple" route and simply included the mx6sabreandroid_common header file which resided within include/configs as can be seen from the below patch file:

diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h

index d9a699d..f327928 100644

--- a/include/configs/mx6sabresd.h

+++ b/include/configs/mx6sabresd.h

@@ -34,6 +34,7 @@

#endif

#include "mx6sabre_common.h"

+#include "mx6sabreandroid_common.h"

After doing this, the build finished successfully and I was able to access the "fastboot" command from the u-boot prompt. Windows also detected the device to be an "Android ADB Interface" when it booted via RAM.

I'm thinking this isn't a full solution due to the following messages:

unsupported boot devices
check_and_clean: reg 0, flag_set 0
Fastboot: Normal
SATA isn't buildin
Net:   FEC [PRIME]
Boot from USB for mfgtools
Use default environment for                              mfgtools
Run bootcmd_mfg: <NULL>
=>

and the fact the device didn't boot to Linux. But a step forward at least...

0 Kudos
Reply

11,080 Views
carlosoliva
Contributor I

Hi,

Did you ever manage to get this to work?

Best,

11,080 Views
igorpadykov
NXP Employee
NXP Employee

Hi Michael

please check attached document sect.8.2 How do I use Android fastboot?

Also it is recommended to look at i.MX6DQ Reference Manual

Chapter 8 System Boot

http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf

and

imx6q, eMMC fast boot

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

11,080 Views
michaelworster
Contributor IV

Thanks for your reply Igor, unfortunately I'm not talking about this "eMMC Fast Boot" feature which is noted in the documents and on the other thread, but rather "fastboot" the utility for flashing a device, which has nothing to do with boot time.

See thread here: Factory flashing with U-Boot and fastboot on Freescale i.MX6

The patch on that site doesn't work directly, but that's the idea I'm trying to accomplish. I've read on a few similar pages that it does work on i.MX6 devices, but no concrete examples and I haven't gotten the u-boot to recognize the "fastboot" command yet.

-Mike

0 Kudos
Reply