Skip to contentSkip to conversation

mx6sabre_common: Allow building CONFIG_USB_FUNCTION_MASS_STORAGE

PATCH New Fabio Estevam 3 participants 5 messages Jan 28, 2018 – Feb 4, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mx6sabre_common: Allow building CONFIG_USB_FUNCTION_MASS_STORAGE

From: Fabio Estevam <[email protected]>

Selecting CONFIG_USB_FUNCTION_MASS_STORAGE=y in the defconfig leads to the following error:

cmd/built-in.o: In function `do_usb_mass_storage':
cmd/usb_mass_storage.c:217: undefined reference to fsg_main_thread' cmd/usb_mass_storage.c:170: undefined reference to fsg_init'

CONFIG_USB_FUNCTION_MASS_STORAGE option is built only for the non-SPL case as per the logic in drivers/usb/gadget/Makefile, so remove the incorrect CONFIG_SPL ifdefery to fix the build failure.

---
 include/configs/mx6sabre_common.h | 2 --
 1 file changed, 2 deletions(-)
include/configs/mx6sabre_common.h +0 -2
index f083dc8..42e650a 100644
@@ -208,10 +208,8 @@
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
 
-#ifndef CONFIG_SPL
 #define CONFIG_USBD_HS
 
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
-#endif
 
 #endif                         /* __MX6QSABRE_COMMON_CONFIG_H */
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 mx6sabresd: Select CONFIG_CMD_USB_MASS_STORAGE

From: Fabio Estevam <[email protected]>

Select CONFIG_CMD_USB_MASS_STORAGE so that the 'ums' can be used.

---
 configs/mx6sabresd_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/mx6sabresd_defconfig +1 -0
index 3e4c13c..f6a53d6 100644
@@ -32,6 +32,7 @@ CONFIG_CMD_PCI=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_SDP=y
+CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 mx6sabresd: Select CONFIG_CMD_USB_MASS_STORAGE

Quoted 15 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Select CONFIG_CMD_USB_MASS_STORAGE so that the 'ums' can be used.

---
 configs/mx6sabresd_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/mx6sabresd_defconfig +0 -0
index 3e4c13c..f6a53d6 100644

configs/mx6sabresd_defconfig CONFIG_CMD_PCI=y · line 38

Quoted 7 lines
configs/mx6sabresd_defconfig +1 -0
@@ -32,6 +32,7 @@ CONFIG_CMD_PCI=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_SDP=y
+CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 1/2 mx6sabre_common: Allow building CONFIG_USB_FUNCTION_MASS_STORAGE

In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Selecting CONFIG_USB_FUNCTION_MASS_STORAGE=y in the defconfig leads to the following error:

cmd/built-in.o: In function `do_usb_mass_storage':
cmd/usb_mass_storage.c:217: undefined reference to fsg_main_thread' cmd/usb_mass_storage.c:170: undefined reference to fsg_init'

Quoted 6 lines

CONFIG_USB_FUNCTION_MASS_STORAGE option is built only for the non-SPL case as per the logic in drivers/usb/gadget/Makefile, so remove the incorrect CONFIG_SPL ifdefery to fix the build failure.

For both patches on imx6q-sabresd board,

#4 lore raw

PATCH 1/2 mx6sabre_common: Allow building CONFIG_USB_FUNCTION_MASS_STORAGE

In reply to Fabio Estevam
Quoted 25 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Selecting CONFIG_USB_FUNCTION_MASS_STORAGE=y in the defconfig leads to the following error:

cmd/built-in.o: In function `do_usb_mass_storage':
cmd/usb_mass_storage.c:217: undefined reference to fsg_main_thread' cmd/usb_mass_storage.c:170: undefined reference to fsg_init'

CONFIG_USB_FUNCTION_MASS_STORAGE option is built only for the non-SPL case as per the logic in drivers/usb/gadget/Makefile, so remove the incorrect CONFIG_SPL ifdefery to fix the build failure.

---
 include/configs/mx6sabre_common.h | 2 --
 1 file changed, 2 deletions(-)
include/configs/mx6sabre_common.h +0 -0
index f083dc8..42e650a 100644

include/configs/mx6sabre_common.h line 215

Quoted 10 lines
include/configs/mx6sabre_common.h +0 -2
@@ -208,10 +208,8 @@
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
 
-#ifndef CONFIG_SPL
 #define CONFIG_USBD_HS
 
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
-#endif
 
 #endif                         /* __MX6QSABRE_COMMON_CONFIG_H */

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================