diff options
| author | Tom Rini <[email protected]> | 2024-07-18 13:51:15 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-07-18 17:03:47 -0600 |
| commit | cbfd2c28a007ae7601e5451aa2ad750b0453d518 (patch) | |
| tree | 30cdae752760b371ac5f3393bee5aacf7edb3364 /scripts | |
| parent | b79e7edff34f3e5e838f4d67a871b27424b1178b (diff) | |
| parent | e1ad98ed9b2868f0f2930738f63e4e58b0de9b04 (diff) | |
Merge patch series "finish using .dtso for overlay source files"
Rasmus Villemoes <[email protected]> says:
This is a followup to the patches that landed in 2024.01 and nearly
made sure that source files for producing .dtbo files use the .dtso
extension. In the same release, a few new .dts files snuck in, and
there was also some test code involving .dtbo -> .dtbo.S -> .dtbo.o I
didn't really know how to handle at the time. This should finish the
job, bring us in sync with linux (at least in this respect), and drop
the .dts -> .dtbo build rule.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.lib | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index f66a65d1c1f..df754d1d9f0 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -305,7 +305,7 @@ endif DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) # Generate an assembly file to wrap the output of the device tree compiler -quiet_cmd_dt_S_dtb= DTB $@ +quiet_cmd_dt_S_dtb= DTBS $@ # Modified for U-Boot cmd_dt_S_dtb= \ ( \ @@ -322,6 +322,24 @@ cmd_dt_S_dtb= \ $(obj)/%.dtb.S: $(obj)/%.dtb $(call cmd,dt_S_dtb) +# Generate an assembly file to wrap the output of the device tree compiler +quiet_cmd_dt_S_dtbo= DTBOS $@ +# Modified for U-Boot +cmd_dt_S_dtbo= \ +{ \ + echo '.section .dtb.init.rodata,"a"'; \ + echo '.balign 16'; \ + echo '.global __dtbo_$(subst -,_,$(*F))_begin'; \ + echo '__dtbo_$(subst -,_,$(*F))_begin:'; \ + echo '.incbin "$<" '; \ + echo '__dtbo_$(subst -,_,$(*F))_end:'; \ + echo '.global __dtbo_$(subst -,_,$(*F))_end'; \ + echo '.balign 16'; \ +} > $@ + +$(obj)/%.dtbo.S: $(obj)/%.dtbo + $(call cmd,dt_S_dtbo) + ifeq ($(CONFIG_OF_LIBFDT_OVERLAY),y) DTC_FLAGS += -@ endif @@ -404,9 +422,6 @@ cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE - $(call if_changed_dep,dtco) - $(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE $(call if_changed_dep,dtco) |
