Skip to contentSkip to conversation

package/dtc: qemu system build need libfdt.

PATCH New Guo Ren 6 participants 9 messages Nov 2, 2017 – Nov 6, 2017

lore
Share & tools
lore

Guo Ren

author
#0 lore raw

PATCH 1/1 package/dtc: qemu system build need libfdt.

The "install-bin" just install dtc's programs to host/bin without libfdt, but qemu system compile need libfdt.

see: https://gitlab.com/c-sky/buildroot/-/jobs/38654503

So we need install libfdt to satisfy qemu system compile.

Change-Id I85748479ac11e1c6452d3f79d04f02666218774a
---
 package/dtc/dtc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/dtc/dtc.mk +1 -1
index dd0f30d..1bcee29 100644
@@ -51,7 +51,7 @@ define HOST_DTC_BUILD_CMDS
 endef
 
 define HOST_DTC_INSTALL_CMDS
-	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install-bin
+	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 package/dtc: qemu system build need libfdt.

Guo Ren, All,

On 2017-11-02 20:14 +0800, Guo Ren spake thusly:

Quoted 8 lines

The "install-bin" just install dtc's programs to host/bin without libfdt, but qemu system compile need libfdt.

see: https://gitlab.com/c-sky/buildroot/-/jobs/38654503

So we need install libfdt to satisfy qemu system compile.

Change-Id: I85748479ac11e1c6452d3f79d04f02666218774a

What's this Change-Id tag? We do not want to carry per-project specific tags. If you want/need to point to some related reference, just add an URL pointing to it.

Otherwise:

Regards,
Yann E. MORIN.

Quoted 21 lines
---
 package/dtc/dtc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/dtc/dtc.mk +1 -1
index dd0f30d..1bcee29 100644
@@ -51,7 +51,7 @@ define HOST_DTC_BUILD_CMDS
 endef
 
 define HOST_DTC_INSTALL_CMDS
-	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install-bin
+	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.7.4
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
author
#2 lore raw

PATCH 1/1 package/dtc: qemu system build need libfdt.

Hi Yanni E,

Quoted 4 lines · Yann E. MORIN

What's this Change-Id tag? We do not want to carry per-project specific tags. If you want/need to point to some related reference, just add an URL pointing to it.

Change-Id is from my git-hook for my gerrit system, and I forgot to remove it, sorry.

Best Regards
Guo Ren

#3 lore raw

PATCH 1/1 package/dtc: qemu system build need libfdt.

In reply to Guo Ren

Hello,

Quoted 5 lines · Guo Ren

The "install-bin" just install dtc's programs to host/bin without libfdt, but qemu system compile need libfdt.

see: https://gitlab.com/c-sky/buildroot/-/jobs/38654503

Quoted 7 lines

So we need install libfdt to satisfy qemu system compile.

Change-Id I85748479ac11e1c6452d3f79d04f02666218774a
---
 package/dtc/dtc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, after minor commit log tweaks.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 package/dtc: qemu system build need libfdt.

In reply to Guo Ren

This change breaks U-Boot 2017.09 because now U-Boot finds a copy of libfdt installed by host-dtc. Yes, it's probably a bug in U-Boot that it includes these files via <system-path>.

Here's how U-Boot build dies for me now:

tools/fdtgrep.c:228:21: error: array type has incomplete element type
struct fdt_region region[], int count)

                     ^

Cheers,
Jan

#5 lore raw

PATCH 1/1 package/dtc: qemu system build need libfdt.

...and here's a simple patch against U-Boot which fixes the build for me. It seems that U-Boot is special in Buildroot when it comes to patch handling. I also don't know whether it's reasonable to patch it like this instead of not installing libfdt from the DTC. I also looked at U-Boot's patchwork and noticed that there's aparently an active series where someone is refactoring libfdt wrappers.

TL;DR: it's a mess. This fixes stuff for me, feel free to pick in any way you feel is appropriate.

My mail with this patch to upstream U-Boot is in a moderation queue, so I'm posting it at least here.

Cheers,
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uboot-no-system-libfdt.patch
Type: text/x-patch
Size: 1223 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171103/92a2928e/attachment.bin>

#6 lore raw

PATCH 1/1 package/dtc: qemu system build need libfdt.

Quoted 1 line · Jan Kundr?t

...and here's a simple patch against U-Boot which fixes the build for me.

Isn't the build already fixed if you only replace the ../include line? The
../lib/libfdt/fdt.h should not be problematic since that file doesn't exist in STAGING_DIR. Right? Same for libfdt_internal.h.

Quoted 2 lines

It
seems that U-Boot is special in Buildroot when it comes to patch handling.

Indeed, because the U-Boot version is configurable so it's impossible to say if
a patch can apply.

However, it would be possible to do the fixup using sed, e.g.

$(SED) 's%<../include/libfdt.h>%"../include/libfdt.h"%' $(@D)/tools/fdtgrep.c

in a post-patch hook.

Regards,
Arnout

Quoted 21 lines

I
also don't know whether it's reasonable to patch it like this instead of not installing libfdt from the DTC. I also looked at U-Boot's patchwork and noticed that there's aparently an active series where someone is refactoring libfdt wrappers.

TL;DR: it's a mess. This fixes stuff for me, feel free to pick in any way you feel is appropriate.

My mail with this patch to upstream U-Boot is in a moderation queue, so I'm posting it at least here.

Cheers,
Jan

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#7 lore raw

PATCH 1/1 package/dtc: qemu system build need libfdt.

Jan/Arnout,

Quoted 9 lines · Arnout Vandecappelle
Quoted 1 line · Jan Kundr?t

...and here's a simple patch against U-Boot which fixes the build for me.

Isn't the build already fixed if you only replace the ../include line? The
../lib/libfdt/fdt.h should not be problematic since that file doesn't exist in STAGING_DIR. Right? Same for libfdt_internal.h.

I've got a number of internal CI failures from this one. I'm testing the combined uboot-tools and uboot fix against my cases and will send a patch later today.

Matt

#8 lore raw

PATCH 1/1 package/dtc: qemu system build need libfdt.

Arnout, Jan

Quoted 9 lines · Matthew Weber

Jan/Arnout,

Quoted 5 lines · Arnout Vandecappelle
Quoted 1 line · Jan Kundr?t

...and here's a simple patch against U-Boot which fixes the build for me.

Quoted 9 lines
Quoted 4 lines

Isn't the build already fixed if you only replace the ../include line? The
../lib/libfdt/fdt.h should not be problematic since that file doesn't exist in STAGING_DIR. Right? Same for libfdt_internal.h.

I've got a number of internal CI failures from this one. I'm testing the combined uboot-tools and uboot fix against my cases and will send a patch later today.

https://patchwork.ozlabs.org/patch/834861/
https://patchwork.ozlabs.org/patch/834862/

Matt