Skip to contentSkip to conversation

arm, imx: fix spl compile for mxs boards

PATCH New Heiko Schocher 3 participants 4 messages Mar 17, 2015 – Jun 19, 2015 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm, imx: fix spl compile for mxs boards

files in arch/arm/imx-common/ get not yet compiled for SPL case as "mxs" is missing in filter rule.

---

Fixes build error on for example the mx28evk_auart_console board:

Building mx28evk_auart_console board...
text data bss dec hex filename
442689 36826 327648 807163 c50fb ./u-boot
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2
drivers/serial/built-in.o: In function `mxs_auart_init':
/home/hs/zug/u-boot/drivers/serial/mxs_auart.c:84: undefined reference to `mxs_reset_block' make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2
make: *** Warte auf noch nicht beendete Prozesse...

 arch/arm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/Makefile +1 -1
index 08946de..55fe509 100644
@@ -37,7 +37,7 @@ libs-y += arch/arm/cpu/
 libs-y += arch/arm/lib/
 
 ifeq ($(CONFIG_SPL_BUILD),y)
-ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35))
+ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs))
 libs-y += arch/arm/imx-common/
 endif
 else
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 arm, imx: fix spl compile for mxs boards

Hi Heiko, Daniel,

Quoted 3 lines · Heiko Schocher

files in arch/arm/imx-common/ get not yet compiled for SPL case as "mxs" is missing in filter rule.

This is possible, but...

Quoted 9 lines

---

Fixes build error on for example the mx28evk_auart_console board:

Building mx28evk_auart_console board...
text data bss dec hex filename
442689 36826 327648 807163 c50fb ./u-boot

...I do not understand why I can compile clean (u-boot-imx):

./tools/buildman/buildman mx28evk
boards.cfg is up to date. Nothing to do.
Building current source for 4 boards (4 threads, 2 jobs per thread)

    4    0    0 /4      0:00:48  : mx28evk_auart_console

And all mxb boards are compiled clean, too.

Quoted 16 lines

make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2
drivers/serial/built-in.o: In function `mxs_auart_init':
/home/hs/zug/u-boot/drivers/serial/mxs_auart.c:84: undefined reference to `mxs_reset_block' make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2
make: *** Warte auf noch nicht beendete Prozesse...

 arch/arm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/Makefile +0 -0
index 08946de..55fe509 100644

arch/arm/Makefile libs-y += arch/arm/cpu/ · line 43

Quoted 8 lines
arch/arm/Makefile +1 -1
@@ -37,7 +37,7 @@ libs-y += arch/arm/cpu/
 libs-y += arch/arm/lib/
 
 ifeq ($(CONFIG_SPL_BUILD),y)
-ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35))
+ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs))
 libs-y += arch/arm/imx-common/
 endif
 else

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
=====================================================================
#2 lore raw

PATCH 1/1 arm, imx: fix spl compile for mxs boards

Hello Stefano,

Am 17.03.2015 09:27, schrieb Stefano Babic:

Quoted 9 lines

Hi Heiko, Daniel,

Quoted 3 lines · Heiko Schocher

files in arch/arm/imx-common/ get not yet compiled for SPL case as "mxs" is missing in filter rule.

This is possible, but...

Yes .. I thought so too ...

Quoted 11 lines
Quoted 9 lines

---

Fixes build error on for example the mx28evk_auart_console board:

Building mx28evk_auart_console board...
text data bss dec hex filename
442689 36826 327648 807163 c50fb ./u-boot

Quoted 8 lines

...I do not understand why I can compile clean (u-boot-imx):

./tools/buildman/buildman mx28evk
boards.cfg is up to date. Nothing to do.
Building current source for 4 boards (4 threads, 2 jobs per thread)

     4    0    0 /4      0:00:48  : mx28evk_auart_console

And all mxb boards are compiled clean, too.

Hmm... I just did a "make mrproper" and now I see them without this patch compiling again ... but it seems bogus to me not to add "mxs" also to the SPL build, as it is in the "else" ... did this boards use puts, printf in SPL ?

spl/drivers/serial/mxs_auart.o is not compiled in the SPL case ...

Hmm... no idea, why I got this error ...

bye,
Heiko

Quoted 30 lines
Quoted 17 lines

make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2
drivers/serial/built-in.o: In function `mxs_auart_init':
/home/hs/zug/u-boot/drivers/serial/mxs_auart.c:84: undefined reference to `mxs_reset_block' make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2
make: *** Warte auf noch nicht beendete Prozesse...

  arch/arm/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/Makefile +0 -0
index 08946de..55fe509 100644

arch/arm/Makefile libs-y += arch/arm/cpu/ · line 43

Quoted 8 lines
arch/arm/Makefile +1 -1
@@ -37,7 +37,7 @@ libs-y += arch/arm/cpu/
  libs-y += arch/arm/lib/
 
  ifeq ($(CONFIG_SPL_BUILD),y)
-ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35))
+ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs))
  libs-y += arch/arm/imx-common/
  endif
  else

Best regards,
Stefano Babic

Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#3 lore raw

PATCH 1/1 arm, imx: fix spl compile for mxs boards

In reply to Stefano Babic
Quoted 10 lines

...I do not understand why I can compile clean (u-boot-imx):

./tools/buildman/buildman mx28evk
boards.cfg is up to date. Nothing to do.
Building current source for 4 boards (4 threads, 2 jobs per thread)

    4    0    0 /4      0:00:48  : mx28evk_auart_console

And all mxb boards are compiled clean, too.

It appears you can compile clean because that defconfig (mx28evk_auart_console) doesnt fully enable the serial output.

You still need to define CONFIG_SPL_SERIAL_SUPPORT somewhere or else mxs_spl_console_init() just optimises away.

When I define this in configs/mxs.h I get the build error.

Can you re-consider applying this patch given the above?