Changeset 46389


Ignore:
Timestamp:
2015-07-16T13:12:52+02:00 (3 years ago)
Author:
jogo
Message:

image.mk: add a BuildDTB define

Add a Image/BuildDTB command that takes the path to an dts file and
applies the CPP using the default include directories, then uses dtc
to compile the dts as the specified output file.
Additional CPP and DTC flags can be supplied as additional arguments.

Signed-off-by: Jonas Gorski <jogo@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/image.mk

    r46361 r46389  
    125125                -A $(ARCH) -v $(LINUX_VERSION) 
    126126        PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its $(KDIR)/fit-$(1)$(7).itb 
     127endef 
     128 
     129# $(1) source dts file 
     130# $(2) target dtb file 
     131# $(3) extra CPP flags 
     132# $(4) extra DTC flags 
     133define Image/BuildDTB 
     134        $(CPP) -nostdinc -x assembler-with-cpp \ 
     135                -I$(LINUX_DIR)/arch/$(ARCH)/boot/dts \ 
     136                -I$(LINUX_DIR)/arch/$(ARCH)/boot/dts/include \ 
     137                -undef -D__DTS__ $(3) \ 
     138                -o $(2).tmp $(1) 
     139        $(LINUX_DIR)/scripts/dtc/dtc -O dtb \ 
     140                -i$(dir $(1)) $(4) \ 
     141                -o $(2) $(2).tmp 
     142        $(RM) $(2).tmp 
    127143endef 
    128144 
Note: See TracChangeset for help on using the changeset viewer.