Browse Source

dtb: make dtb compile dtb according config file.

Change-Id: Ida9529551bca09d39cdef49fdb98cb19bf4281eb
Signed-off-by: QiaoChong <qiaochong@loongson.cn>
master
QiaoChong 6 years ago
parent
commit
c1aca713f6
  1. 3
      Makefile.inc
  2. 4
      zloader/Makefile.inc

3
Makefile.inc

@ -218,6 +218,9 @@ uipc_proto.o vfs_conf.o: Makefile
${START}: ${TARGET}/${SUBTARGET}/${START:.o=.S} Makefile ${START}: ${TARGET}/${SUBTARGET}/${START:.o=.S} Makefile
${NORMAL_S} ${NORMAL_S}
dtb:
${CC} ${AFLAGS} ${CPPFLAGS} -E -D__ASSEMBLY__ -D__DTS__ -x assembler-with-cpp -o $(DTB_O) $(DTB_I)
zpmon: startz.o zpmon: startz.o
rm start.o && cp -f startz.o start.o rm start.o && cp -f startz.o start.o
make pmon make pmon

4
zloader/Makefile.inc

@ -1,5 +1,5 @@
ifndef PMONCC ifndef PMONCC
CC=$(CROSS_COMPILE)gcc CC=$(CROSS_COMPILE)gcc -mabi=32
CROSS_COMPILE ?= mipsel-linux- CROSS_COMPILE ?= mipsel-linux-
else else
CC=${PMONCC} CC=${PMONCC}
@ -143,7 +143,7 @@ gencode=./genram
endif endif
dtb: dtb:
gcc -E -nostdinc -D__ASSEMBLY__ -undef -D__DTS__ -x assembler-with-cpp -o ${TARGET}.dtb.i ../Targets/${TARGET}/conf/${TARGET}.dts make -C ../Targets/${TARGET}/compile/${TARGETEL}/ DTB_O=`pwd`/${TARGET}.dtb.i DTB_I=`pwd`/../Targets/${TARGET}/conf/${TARGET}.dts dtb
./dtc -I dts -O dtb -o ${TARGET}.dtb ${TARGET}.dtb.i ./dtc -I dts -O dtb -o ${TARGET}.dtb ${TARGET}.dtb.i
[ -f gzrom.bin ] && cp gzrom.bin gzrom-dtb.bin && python ../tools/pmonenv.py -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 [ -f gzrom.bin ] && cp gzrom.bin gzrom-dtb.bin && python ../tools/pmonenv.py -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
cleanall: clean cleanall: clean

Loading…
Cancel
Save