Skip to contentSkip to conversation

Revert "uboot: fix build when libfdt-devel is installed system-wide"

PATCH New Peter Korsgaard 1 participant 2 messages Mar 12, 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 Revert "uboot: fix build when libfdt-devel is installed system-wide"

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Stefan" == Stefan Becker <[email protected]> writes:

From: Stefan Becker <[email protected]>
This reverts commit bf733342324b414a1142b57781504111f81c97ea.

There is no scripts/dtc directory in our u-boot source tree, hence modifying the uboot makefile to search scripts/dtc/libfdt instead of lib/libfdt leads to build errors.

just reverting it would bring back the issue this commit tries to solve. Perhaps we should just extend the logic to only do the sed invocation if scripts/dtc/libfdt exists?

E.G. something like:

define UBOOT_FIXUP_LIBFDT_INCLUDE

       if [ -d $(@D)/scripts/dtc/libfdt ]; then \
          $(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile; \
       fi

endef

Quoted 26 lines
---
 boot/uboot/uboot.mk | 8 --------
 1 file changed, 8 deletions(-)
boot/uboot/uboot.mk +0 -8
index 58dd906a27..5da339850d 100644
@@ -188,14 +188,6 @@ define UBOOT_APPLY_LOCAL_PATCHES
 endef
 UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES
 
-# This is equivalent to upstream commit
-# http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a. It
-# fixes a build failure when libfdt-devel is installed system-wide.
-define UBOOT_FIXUP_LIBFDT_INCLUDE
-	$(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile
-endef
-UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE
-
 ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
 define UBOOT_CONFIGURE_CMDS
 	$(TARGET_CONFIGURE_OPTS) 	\
Signature · 1 line
2.14.3
Signature · 1 line
Bye, Peter Korsgaard

A message that is not in the archive (sent off-list or not yet received): CAOJ2eMe32YexFnqS6wnUyGn3eJ1UVwbin3=QnEN1bhzRC7HGBA@mail.gmail.com

#3 lore raw

PATCH 1/1 Revert "uboot: fix build when libfdt-devel is installed system-wide"

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Stefan" == Stefan Becker <[email protected]> writes:

Agreed.
I made the suggested change and verified it in my build. Please see attached patch.

Committed, thanks.

From our discussion on IRC I understood that these older u-boot versions are also affected by the build error when libfdt-dev is installed on the host, so it would be great if we could find a simple way to fix the build if libfdt-dev is installed for these older versions as well.

But I agree, completely breaking the build for older u-boot versions is obviously not good - So lets apply this workaround for now at least.

Quoted 58 lines
Quoted 55 lines · Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Stefan" == Stefan Becker <[email protected]> writes:

From: Stefan Becker <[email protected]>
This reverts commit bf733342324b414a1142b57781504111f81c97ea.

There is no scripts/dtc directory in our u-boot source tree, hence modifying the uboot makefile to search scripts/dtc/libfdt instead of lib/libfdt leads to build errors.

just reverting it would bring back the issue this commit tries to solve. Perhaps we should just extend the logic to only do the sed invocation if scripts/dtc/libfdt exists?

E.G. something like:

define UBOOT_FIXUP_LIBFDT_INCLUDE
if [ -d $(@D)/scripts/dtc/libfdt ]; then \
$(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile; \
fi
endef

Quoted 10 lines
---
 boot/uboot/uboot.mk | 8 --------
 1 file changed, 8 deletions(-)
boot/uboot/uboot.mk +0 -0
index 58dd906a27..5da339850d 100644

boot/uboot/uboot.mk define UBOOT_APPLY_LOCAL_PATCHES · line 192

Quoted 5 lines
boot/uboot/uboot.mk +0 -2
@@ -188,14 +188,6 @@ define UBOOT_APPLY_LOCAL_PATCHES
 endef
 UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES
 
-# This is equivalent to upstream commit
-# http://git.denx.de/?p=u-boot.git;a=commitdiff;h=

e0d20dc1521e74b82dbd69be53a048847798a90a. It

boot/uboot/uboot.mk define UBOOT_APPLY_LOCAL_PATCHES · line 195

Quoted 3 lines
boot/uboot/uboot.mk +0 -3
-# fixes a build failure when libfdt-devel is installed system-wide.
-define UBOOT_FIXUP_LIBFDT_INCLUDE
-    $(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%'

$(@D)/tools/Makefile

Quoted 8 lines
boot/uboot/uboot.mk +0 -4
-endef
-UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE
-
 ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
 define UBOOT_CONFIGURE_CMDS
     $(TARGET_CONFIGURE_OPTS)        \
--

2.14.3

--
Bye, Peter Korsgaard

Signature · 1 line
Bye, Peter Korsgaard