0004-uboot-tools-disable-pylibfdt.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. From d882c99de59316e50bfee7f5fce10fe9062dfa32 Mon Sep 17 00:00:00 2001
  2. From: Matt Weber <matthew.weber@rockwellcollins.com>
  3. Date: Wed, 1 Nov 2017 10:57:31 -0500
  4. Subject: [PATCH] uboot-tools: disable pylibfdt
  5. The current U-Boot build system assumes that if swig is installed on
  6. the host system, it should build pylibfdt, without checking if other
  7. dependencies are available. This causes a number of build failures.
  8. This patch fixes that by using concepts from the future upstream fix
  9. (post 2017.11), which sets up a kconfig variable for pylibfdt and
  10. conditionally enables the swig wrapper creation (default=n).
  11. Relevant upstream patches under review:
  12. - https://patchwork.ozlabs.org/patch/826742/
  13. - https://patchwork.ozlabs.org/patch/826752/
  14. Fixes (one of many):
  15. http://autobuild.buildroot.net/results/f9e13caae9b31c9dcde7d24caecc036324f269cc
  16. Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
  17. ---
  18. Kconfig | 5 +++++
  19. tools/Makefile | 6 +++---
  20. 2 files changed, 8 insertions(+), 3 deletions(-)
  21. diff --git a/Kconfig b/Kconfig
  22. index bb80ada..99b0258 100644
  23. --- a/Kconfig
  24. +++ b/Kconfig
  25. @@ -358,6 +358,11 @@ source "disk/Kconfig"
  26. source "dts/Kconfig"
  27. +config PYLIBFDT
  28. + bool
  29. + help
  30. + Enables the generation of the pylibfdt swig wrapper.
  31. +
  32. source "net/Kconfig"
  33. source "drivers/Kconfig"
  34. diff --git a/tools/Makefile b/tools/Makefile
  35. index 77706a9..cb6cb7a 100644
  36. --- a/tools/Makefile
  37. +++ b/tools/Makefile
  38. @@ -226,9 +226,9 @@ clean-dirs := lib common
  39. always := $(hostprogs-y)
  40. -# Build a libfdt Python module if swig is available
  41. -# Use 'sudo apt-get install swig libpython-dev' to enable this
  42. -always += $(if $(shell which swig 2> /dev/null),_libfdt.so)
  43. +ifneq ($(CONFIG_PYLIBFDT),)
  44. +always += _libfdt.so
  45. +endif
  46. # Generated LCD/video logo
  47. LOGO_H = $(objtree)/include/bmp_logo.h
  48. --
  49. 1.8.3.1