I was tring to compile a dts file and tried command with make
dtc -I dts -O dtb -@ -I /home/pi/rpisrc/linux/arch/arm64/boot/dts -o sss.dtb sss.dts
but it through out an error like
FATAL ERROR: Unknown input format: /home/pi/rpisrc/linux/arch/arm64/boot/dts.
What format does flag -I
expect? I’m sure the directory is exist. What’s the problem?
For details this is my Makefile below
#Makefile for compiling a single device tree source file
#dts name without extend
DTS_NAME = sss
#Output dir
OUTPUT_DIR = ./output
#cross compile tool chain
CROSS_COMPILE = DTC = $(CROSS_COMPILE)dtc
#Options
#generate dtb, enable symbols, overlays
DTC_FLAGS = -I dts -O dtb -@
#Linux kernel device tree include path
LINUX_KERNEL_DIR = /home/pi/rpisrc/linux
INCLUDE_PATH = -I $(LINUX_KERNEL_DIR)/arch/arm64/boot/dts
#Target file
DTB_FILE = $(OUTPUT_DIR)/$(DTS_NAME).dtb
#Default
all: $(DTB_FILE)
#Command
$(DTB_FILE): $(DTS_NAME).dts
mkdir -p $(OUTPUT_DIR)
$(DTC) $(DTC_FLAGS) $(INCLUDE_PATH) -o $@ $<
$(info DTC command: $(DTC) $(DTC_FLAGS) $(INCLUDE_PATH) -o $@ $<)
#Clean
clean: rm -rf $(OUTPUT_DIR)
.PHONY: all clean
sllizl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.