Skip to contentSkip to conversation

board/ci20: Fix U-Boot build failure

PATCH New Thomas Petazzoni 2 participants 4 messages Apr 1, 2018 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 board/ci20: Fix U-Boot build failure

Hello,

Quoted 6 lines · Ezequiel Garcia

Given there is no upstream U-Boot for CI20, the defconfig sets an ancient version, with old libfdt headers.

Enable DTC, so U-Boot can pick Buildroot's libfdt headers instead of those installed by the host.

Quoted 8 lines

Fixes multiple errors looking like this:

In file included from ../include/libfdt.h:54:0,

                 from fdt_host.h:11,
                 from mkimage.h:22,
                 from aisimage.c:8:

/usr/include/libfdt_env.h:70:30: error: conflicting types for ?fdt64_t?
typedef uint64_t FDT_BITWISE fdt64_t;

Which Buildroot version are you using ? We fixed errors like that recently, and I built ci20_defconfig yesterday, and it worked fine for me.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

PATCH 1/1 board/ci20: Fix U-Boot build failure

Hello,

Quoted 7 lines · Ezequiel Garcia

I was testing on top of a recent master:

commit 53e1b222533fd110ab9472480ded126a4762db5e (origin/master, origin/HEAD)

Author: Thomas Petazzoni <[email protected]>
Date:   Sat Mar 31 15:27:36 2018 +0200
Quoted 6 lines

package/docker-proxy: convert to golang infrastructure

... just tested on top of current master, same error is thrown if there
are no output/host/include/libfdt* files.

Can you point me at the recent fixes?

I was thinking about:

f437bf547ca44849db4578c31707afdd96b85018 uboot: fix build for older uboot source trees bf733342324b414a1142b57781504111f81c97ea uboot: fix build when libfdt-devel is installed system-wide 0bf80e4bcd5277e3ad935e03c632deba4c7316f2 uboot: ensure host includes are searched before system default includes b15a7a62d3f992af3fa8eca1e358735c47b64390 uboot: revert "uboot: use local libfdt.h" baae5156ce37e8b2775f04710f7d1c8e97e4114c uboot: use local fdt headers

But you have all of these. So we have another issue, it seems.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 board/ci20: Fix U-Boot build failure

Quoted 31 lines · Thomas Petazzoni

Hello,

Quoted 7 lines · Ezequiel Garcia

I was testing on top of a recent master:

commit 53e1b222533fd110ab9472480ded126a4762db5e (origin/master, origin/HEAD)

Author: Thomas Petazzoni <[email protected]>
Date:   Sat Mar 31 15:27:36 2018 +0200
Quoted 7 lines

package/docker-proxy: convert to golang infrastructure

... just tested on top of current master, same error is thrown if there
are no output/host/include/libfdt* files.

Can you point me at the recent fixes?

I was thinking about:

f437bf547ca44849db4578c31707afdd96b85018 uboot: fix build for older uboot source trees bf733342324b414a1142b57781504111f81c97ea uboot: fix build when libfdt-devel is installed system-wide 0bf80e4bcd5277e3ad935e03c632deba4c7316f2 uboot: ensure host includes are searched before system default includes b15a7a62d3f992af3fa8eca1e358735c47b64390 uboot: revert "uboot: use local libfdt.h"
baae5156ce37e8b2775f04710f7d1c8e97e4114c uboot: use local fdt headers

Quoted 2 lines

But you have all of these. So we have another issue, it seems.

I don't fully understand the issue I'm seeing. The gcc command and the error is:

/usr/bin/gcc -O2 -isystem /home/zeta/repos/buildroot/ci20/output/host/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include /home/zeta/repos/buildroot/ci20/output/build/uboot-dd3c1b95dac7d10b2ca5806f65e5c1050d7dd0fa/include/libfdt_env.h -idirafter /home/zeta/repos/buildroot/ci20/output/build/uboot-dd3c1b95dac7d10b2ca5806f65e5c1050d7dd0fa/include -idirafter /home/zeta/repos/buildroot/ci20/output/build/uboot-dd3c1b95dac7d10b2ca5806f65e5c1050d7dd0fa/include2 -idirafter /home/zeta/repos/buildroot/ci20/output/build/uboot-dd3c1b95dac7d10b2ca5806f65e5c1050d7dd0fa/include -I /home/zeta/repos/buildroot/ci20/output/build/uboot-dd3c1b95dac7d10b2ca5806f65e5c1050d7dd0fa/lib/libfdt -I /home/zeta/repos/buildroot/ci20/output/build/uboot-dd3c1b95dac7d10b2ca5806f65e5c1050d7dd0fa/tools -DCONFIG_SYS_TEXT_BASE=0x80000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -o fit_image.o fit_image.c -c
In file included from ../include/libfdt.h:54:0,

                 from fdt_host.h:11,
                 from mkimage.h:22,
                 from aisimage.c:8:

/usr/include/libfdt_env.h:70:30: error: conflicting types for ?fdt64_t?
typedef uint64_t FDT_BITWISE fdt64_t;

As you can see, U-Boot is passing "-include /home/zeta/repos/buildroot/ci20/output/build/uboot- dd3c1b95dac7d10b2ca5806f65e5c1050d7dd0fa/include/libfdt_env.h", so I don't understand why system libfdt_env.h is being used.

My gcc is 7.3.0.

Thanks,
Eze

#5 lore raw

PATCH 1/1 board/ci20: Fix U-Boot build failure

In reply to a message not in the archive
Quoted 33 lines · Ezequiel Garcia
Quoted 19 lines · Thomas Petazzoni

Hello,

Quoted 8 lines · Ezequiel Garcia

Given there is no upstream U-Boot for CI20, the defconfig sets an ancient version, with old libfdt headers.

Enable DTC, so U-Boot can pick Buildroot's libfdt headers instead of those installed by the host.

Fixes multiple errors looking like this:

Quoted 7 lines

In file included from ../include/libfdt.h:54:0,

                 from fdt_host.h:11,
                 from mkimage.h:22,
                 from aisimage.c:8:

/usr/include/libfdt_env.h:70:30: error: conflicting types for ?fdt64_t?
typedef uint64_t FDT_BITWISE fdt64_t;

Quoted 5 lines

Which Buildroot version are you using ? We fixed errors like that recently, and I built ci20_defconfig yesterday, and it worked fine for
me.

I was testing on top of a recent master:

commit 53e1b222533fd110ab9472480ded126a4762db5e (origin/master, origin/HEAD)

Author: Thomas Petazzoni <[email protected]>
Date:   Sat Mar 31 15:27:36 2018 +0200
Quoted 8 lines

package/docker-proxy: convert to golang infrastructure

... just tested on top of current master, same error is thrown if there
are no output/host/include/libfdt* files.

Can you point me at the recent fixes?

I guess you mean bf733342324b414a1142b57781504111f81c97ea. Let me take a look at it.