Browse Source

make dtbxx use Targetxx dts for dtb.

Change-Id: I9b39a387037c14a74c2d43042914c2cf4e94252d
Signed-off-by: Chong Qiao <qiaochong@loongson.cn>
master
Chong Qiao 3 years ago
parent
commit
4c9b724953
  1. 2
      Makefile.inc
  2. 11
      zloader/Makefile.inc

2
Makefile.inc

@ -219,7 +219,7 @@ ${START}: ${TARGET}/${SUBTARGET}/${START:.o=.S} Makefile
${NORMAL_S}
dtb:
${CC} ${AFLAGS} ${CPPFLAGS} -E -D__ASSEMBLY__ -D__DTS__ -Ulinux -x assembler-with-cpp -o $(DTB_O) $(DTB_I)
${CC} ${AFLAGS} ${CPPFLAGS} -nostdinc -E -D__ASSEMBLY__ -D__DTS__ -Ulinux -x assembler-with-cpp -o $(DTB_O) $(DTB_I)
zpmon: startz.o
rm start.o && cp -f startz.o start.o

11
zloader/Makefile.inc

@ -150,11 +150,18 @@ ifndef gencode
gencode=./genram
endif
dtb:
make -C ../Targets/${TARGET}/compile/${TARGETEL}/ DTB_O=`pwd`/${TARGET}.dtb.i DTB_I=`pwd`/../Targets/${TARGET}/conf/${TARGET}.dts dtb
define dtb_rules
make -C ../Targets/${TARGET}/compile/${TARGETEL}/ DTB_O=`pwd`/${TARGET}.dtb.i DTB_I=`pwd`/../Targets/${TARGET}/conf/${TARGET}$(@:dtb%=%).dts dtb
./dtc -I dts -O dtb -o ${TARGET}.dtb ${TARGET}.dtb.i
( echo "#include <include/load_dtb.h>";echo NVRAM_OFFS; echo DTB_OFFS; )| make -C ../Targets/${TARGET}/compile/${TARGETEL}/ DTB_O=`pwd`/dtbinfo.txt DTB_I=- dtb
[ -f gzrom.bin ] && cp gzrom.bin gzrom-dtb.bin && python ../tools/pmonenv.py -O $$((`tail -n 1 dtbinfo.txt`)) -o $$((`tail -n 2 dtbinfo.txt|head -n 1`)) -f gzrom-dtb.bin -d ${TARGET}.dtb -w al=\(usb0,0\)/boot/vmlinuz al1=\(wd0,0\)/boot/vmlinuz append="'console=ttyS0,115200 console=tty initcall_debug=1 loglevel=20'" FR=1
endef
dtb:
$(dtb_rules)
dtb%:
$(dtb_rules)
cleanall: clean
make -C ../Targets/${TARGET}/compile/${TARGETEL}/ clean
clean:

Loading…
Cancel
Save