I'm getting deeper and deeper. I don't suppose I could just do cpp myfile.dts? Kidding mostly. This makefile is one I changed slightly from the linked example. I suspect it's trying to bring in stuff I don't need/want.
When I run make it looks like it wants most of a kernel source tree. Which one? Should I just try to build a whole kernel while I'm at it?
I've built kernels before, mostly for the BSDs. A couple Linux ones. Not in 10-20 years. Or can I just get this dt-bindings subdir and that's all I need? Actually I may have parts of it in different places if I use locate to find the files mentioned. I have a u-boot source dir a couple months old, some is in there, looks like most of it.
Code:
SRCARCH = arm
DTC = dtc
DTCFLAGS = -b 0
dtc_cpp_flags = -x assembler-with-cpp -nostdinc \
-I $(srctree)/arch/$(SRCARCH)/boot/dts \
-I $(srctree)/arch/$(SRCARCH)/boot/dts/include \
-undef -D__DTS__
DTCINCLUDES = -i $(srctree)/arch/$(SRCARCH)/boot/dts -i $(srctree)/arch/$(SRCARCH)/boot/dts/include
%.dtb: %.dts
cpp $(dtc_cpp_flags) < $< | $(DTC) $(DTCINCLUDES) -I dts -O dtb $(DTCFLAGS) -o $@ -
#all: isocfpga_cyclone5_DE1-SoC.dtb
all: rk3399-pinebook-pro.dtb
When I run make it looks like it wants most of a kernel source tree. Which one? Should I just try to build a whole kernel while I'm at it?
Code:
cpp -x assembler-with-cpp -nostdinc -I /arch/arm/boot/dts -I /arch/arm/boot/dts/include -undef -D__DTS__ < rk3399-pinebook-pro.dts | dtc -i /arch/arm/boot/dts -i /arch/arm/boot/dts/include -I dts -O dtb -b 0 -o rk3399-pinebook-pro.dtb -
<stdin>:9:41: error: no include path in which to search for dt-bindings/input/gpio-keys.h
<stdin>:10:49: error: no include path in which to search for dt-bindings/input/linux-event-codes.h
<stdin>:11:33: error: no include path in which to search for dt-bindings/pwm/pwm.h
<stdin>:12:32: error: no include path in which to search for dt-bindings/usb/pd.h
<stdin>:13:37: error: no include path in which to search for dt-bindings/leds/common.h
<stdin>:14:10: fatal error: rk3399.dtsi: No such file or directory
compilation terminated.
Error: <stdin>:8.9-10 syntax error
FATAL ERROR: Unable to parse input tree
make: *** [Makefile:13: rk3399-pinebook-pro.dtb] Error 1
I've built kernels before, mostly for the BSDs. A couple Linux ones. Not in 10-20 years. Or can I just get this dt-bindings subdir and that's all I need? Actually I may have parts of it in different places if I use locate to find the files mentioned. I have a u-boot source dir a couple months old, some is in there, looks like most of it.