0180-BCM270X_DT-Add-a-.dtbo-target-use-for-overlays.patch 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. From 4bc79db3fb0734cc6de0ddfc4b95c2db0f3f8607 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Fri, 13 Mar 2015 20:00:21 +0000
  4. Subject: [PATCH 180/381] BCM270X_DT: Add a .dtbo target, use for overlays
  5. Change the filenames and extensions to keep the pre-DDT style of
  6. overlay (<name>-overlay.dtb) distinct from new ones that use a
  7. different style of local fixups (<name>.dtbo), and to match other
  8. platforms.
  9. The RPi firmware uses the DDTK trailer atom to choose which type of
  10. overlay to use for each kernel.
  11. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  12. ---
  13. arch/arm/boot/.gitignore | 2 +-
  14. arch/arm/boot/dts/overlays/Makefile | 135 +++++++++++++++++-------------------
  15. scripts/Makefile.lib | 10 +++
  16. 3 files changed, 76 insertions(+), 71 deletions(-)
  17. --- a/arch/arm/boot/.gitignore
  18. +++ b/arch/arm/boot/.gitignore
  19. @@ -3,4 +3,4 @@ zImage
  20. xipImage
  21. bootpImage
  22. uImage
  23. -*.dtb
  24. +*.dtb*
  25. --- a/arch/arm/boot/dts/overlays/Makefile
  26. +++ b/arch/arm/boot/dts/overlays/Makefile
  27. @@ -12,78 +12,73 @@ ifeq ($(CONFIG_ARCH_BCM2835),y)
  28. RPI_DT_OVERLAYS=y
  29. endif
  30. -dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb
  31. -dtb-$(RPI_DT_OVERLAYS) += at86rf233-overlay.dtb
  32. -dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb
  33. -dtb-$(RPI_DT_OVERLAYS) += dwc2-overlay.dtb
  34. -dtb-$(RPI_DT_OVERLAYS) += dwc-otg-overlay.dtb
  35. -dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb
  36. -dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb
  37. -dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb
  38. -dtb-$(RPI_DT_OVERLAYS) += gpio-poweroff-overlay.dtb
  39. -dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb
  40. -dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb
  41. -dtb-$(RPI_DT_OVERLAYS) += hifiberry-dacplus-overlay.dtb
  42. -dtb-$(RPI_DT_OVERLAYS) += hifiberry-digi-overlay.dtb
  43. -dtb-$(RPI_DT_OVERLAYS) += hy28a-overlay.dtb
  44. -dtb-$(RPI_DT_OVERLAYS) += hy28b-overlay.dtb
  45. -dtb-$(RPI_DT_OVERLAYS) += i2c-rtc-overlay.dtb
  46. -dtb-$(RPI_DT_OVERLAYS) += i2c-gpio-overlay.dtb
  47. -dtb-$(RPI_DT_OVERLAYS) += i2c0-bcm2708-overlay.dtb
  48. -dtb-$(RPI_DT_OVERLAYS) += i2c1-bcm2708-overlay.dtb
  49. -dtb-$(RPI_DT_OVERLAYS) += i2s-mmap-overlay.dtb
  50. -dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb
  51. -dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb
  52. -dtb-$(RPI_DT_OVERLAYS) += lirc-rpi-overlay.dtb
  53. -dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb
  54. -dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb
  55. -dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
  56. -dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
  57. -dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb
  58. -dtb-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt-overlay.dtb
  59. -dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
  60. -dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
  61. -dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb
  62. -dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
  63. -dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
  64. -dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb
  65. -dtb-$(RPI_DT_OVERLAYS) += pwm-2chan-overlay.dtb
  66. -dtb-$(RPI_DT_OVERLAYS) += raspidac3-overlay.dtb
  67. -dtb-$(RPI_DT_OVERLAYS) += rpi-backlight-overlay.dtb
  68. -dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb
  69. -dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb
  70. -dtb-$(RPI_DT_OVERLAYS) += rpi-ft5406-overlay.dtb
  71. -dtb-$(RPI_DT_OVERLAYS) += rpi-proto-overlay.dtb
  72. -dtb-$(RPI_DT_OVERLAYS) += rpi-sense-overlay.dtb
  73. -dtb-$(RPI_DT_OVERLAYS) += sdhost-overlay.dtb
  74. -dtb-$(RPI_DT_OVERLAYS) += sdio-overlay.dtb
  75. -dtb-$(RPI_DT_OVERLAYS) += sdtweak-overlay.dtb
  76. -dtb-$(RPI_DT_OVERLAYS) += smi-dev-overlay.dtb
  77. -dtb-$(RPI_DT_OVERLAYS) += smi-nand-overlay.dtb
  78. -dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb
  79. -dtb-$(RPI_DT_OVERLAYS) += spi1-1cs-overlay.dtb
  80. -dtb-$(RPI_DT_OVERLAYS) += spi1-2cs-overlay.dtb
  81. -dtb-$(RPI_DT_OVERLAYS) += spi1-3cs-overlay.dtb
  82. -dtb-$(RPI_DT_OVERLAYS) += spi2-1cs-overlay.dtb
  83. -dtb-$(RPI_DT_OVERLAYS) += spi2-2cs-overlay.dtb
  84. -dtb-$(RPI_DT_OVERLAYS) += spi2-3cs-overlay.dtb
  85. -dtb-$(RPI_DT_OVERLAYS) += spi-gpio35-39-overlay.dtb
  86. -dtb-$(RPI_DT_OVERLAYS) += tinylcd35-overlay.dtb
  87. -dtb-$(RPI_DT_OVERLAYS) += uart1-overlay.dtb
  88. -dtb-$(RPI_DT_OVERLAYS) += vc4-kms-v3d-overlay.dtb
  89. -dtb-$(RPI_DT_OVERLAYS) += vga666-overlay.dtb
  90. -dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb
  91. -dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb
  92. +dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo
  93. +dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo
  94. +dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo
  95. +dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo
  96. +dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo
  97. +dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo
  98. +dtbo-$(RPI_DT_OVERLAYS) += enc28j60.dtbo
  99. +dtbo-$(RPI_DT_OVERLAYS) += gpio-ir.dtbo
  100. +dtbo-$(RPI_DT_OVERLAYS) += gpio-poweroff.dtbo
  101. +dtbo-$(RPI_DT_OVERLAYS) += hifiberry-amp.dtbo
  102. +dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dac.dtbo
  103. +dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dacplus.dtbo
  104. +dtbo-$(RPI_DT_OVERLAYS) += hifiberry-digi.dtbo
  105. +dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo
  106. +dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo
  107. +dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo
  108. +dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo
  109. +dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo
  110. +dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo
  111. +dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo
  112. +dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dac.dtbo
  113. +dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo
  114. +dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo
  115. +dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo
  116. +dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo
  117. +dtbo-$(RPI_DT_OVERLAYS) += mmc.dtbo
  118. +dtbo-$(RPI_DT_OVERLAYS) += mz61581.dtbo
  119. +dtbo-$(RPI_DT_OVERLAYS) += pi3-disable-bt.dtbo
  120. +dtbo-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt.dtbo
  121. +dtbo-$(RPI_DT_OVERLAYS) += piscreen.dtbo
  122. +dtbo-$(RPI_DT_OVERLAYS) += piscreen2r.dtbo
  123. +dtbo-$(RPI_DT_OVERLAYS) += pitft28-capacitive.dtbo
  124. +dtbo-$(RPI_DT_OVERLAYS) += pitft28-resistive.dtbo
  125. +dtbo-$(RPI_DT_OVERLAYS) += pps-gpio.dtbo
  126. +dtbo-$(RPI_DT_OVERLAYS) += pwm.dtbo
  127. +dtbo-$(RPI_DT_OVERLAYS) += pwm-2chan.dtbo
  128. +dtbo-$(RPI_DT_OVERLAYS) += raspidac3.dtbo
  129. +dtbo-$(RPI_DT_OVERLAYS) += rpi-backlight.dtbo
  130. +dtbo-$(RPI_DT_OVERLAYS) += rpi-dac.dtbo
  131. +dtbo-$(RPI_DT_OVERLAYS) += rpi-display.dtbo
  132. +dtbo-$(RPI_DT_OVERLAYS) += rpi-ft5406.dtbo
  133. +dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo
  134. +dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo
  135. +dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo
  136. +dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo
  137. +dtbo-$(RPI_DT_OVERLAYS) += sdtweak.dtbo
  138. +dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo
  139. +dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo
  140. +dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo
  141. +dtbo-$(RPI_DT_OVERLAYS) += spi1-1cs.dtbo
  142. +dtbo-$(RPI_DT_OVERLAYS) += spi1-2cs.dtbo
  143. +dtbo-$(RPI_DT_OVERLAYS) += spi1-3cs.dtbo
  144. +dtbo-$(RPI_DT_OVERLAYS) += spi2-1cs.dtbo
  145. +dtbo-$(RPI_DT_OVERLAYS) += spi2-2cs.dtbo
  146. +dtbo-$(RPI_DT_OVERLAYS) += spi2-3cs.dtbo
  147. +dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo
  148. +dtbo-$(RPI_DT_OVERLAYS) += tinylcd35.dtbo
  149. +dtbo-$(RPI_DT_OVERLAYS) += uart1.dtbo
  150. +dtbo-$(RPI_DT_OVERLAYS) += vc4-kms-v3d.dtbo
  151. +dtbo-$(RPI_DT_OVERLAYS) += vga666.dtbo
  152. +dtbo-$(RPI_DT_OVERLAYS) += w1-gpio.dtbo
  153. +dtbo-$(RPI_DT_OVERLAYS) += w1-gpio-pullup.dtbo
  154. targets += dtbs dtbs_install
  155. -targets += $(dtb-y)
  156. +targets += $(dtbo-y)
  157. endif
  158. -always := $(dtb-y)
  159. -clean-files := *.dtb
  160. -
  161. -# Enable fixups to support overlays on BCM2708 platforms
  162. -ifeq ($(RPI_DT_OVERLAYS),y)
  163. - DTC_FLAGS ?= -@
  164. -endif
  165. +always := $(dtbo-y)
  166. +clean-files := *.dtbo
  167. --- a/scripts/Makefile.lib
  168. +++ b/scripts/Makefile.lib
  169. @@ -292,6 +292,16 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
  170. $(obj)/%.dtb: $(src)/%.dts FORCE
  171. $(call if_changed_dep,dtc)
  172. +quiet_cmd_dtco = DTCO $@
  173. +cmd_dtco = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
  174. + $(objtree)/scripts/dtc/dtc -@ -O dtb -o $@ -b 0 \
  175. + -i $(dir $<) $(DTC_FLAGS) \
  176. + -d $(depfile).dtc.tmp $(dtc-tmp) ; \
  177. + cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
  178. +
  179. +$(obj)/%.dtbo: $(src)/%-overlay.dts FORCE
  180. + $(call if_changed_dep,dtco)
  181. +
  182. dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
  183. # Bzip2