scripts: copy combined dtbc to arch/arm64/boot

Bug: 37099957
Change-Id: Id92ca99a02dd18d0e03a48f33b4b439fe78327d4
Signed-off-by: Yueyao Zhu <yueyao@google.com>
This commit is contained in:
Yueyao Zhu
2017-04-12 14:46:31 -07:00
parent ad5f449f96
commit 7ef7585582
4 changed files with 9 additions and 5 deletions

View File

@@ -160,8 +160,8 @@ archclean:
$(Q)$(MAKE) $(clean)=$(boot)
$(Q)$(MAKE) $(clean)=$(boot)/dts
CLEAN_FILES += $(boot)/Image $(boot)/Image-dtb $(boot)/Image.* $(boot)/dtbo.img
MRPROPER_FILES += $(boot)/Image $(boot)/Image-dtb $(boot)/Image.* $(boot)/dtbo.img
CLEAN_FILES += $(boot)/Image $(boot)/Image-dtb $(boot)/Image.* $(boot)/dtbo.img $(boot)/*.dtbc
MRPROPER_FILES += $(boot)/Image $(boot)/Image-dtb $(boot)/Image.* $(boot)/dtbo.img $(boot)/*.dtbc
define archhelp
echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'

View File

@@ -5,3 +5,4 @@ Image.gz-dtb
Image.lz4
Image.lz4-dtb
dtbo.img
*.dtbc

View File

@@ -6,4 +6,4 @@
.PHONY: all
all:
$(if $(KBUILD_SRC),$(srctree)/)scripts/dtbo_apply_overlay.sh $(obj)/${KERNEL_DTB} $(obj)/${DTBO}
$(if $(KBUILD_SRC),$(srctree)/)scripts/dtbo_apply_overlay.sh $(obj) ${KERNEL_DTB} ${DTBO}

View File

@@ -10,8 +10,10 @@ set -x
# prepare overlay workspace
overlay_dir=`mktemp -d -t overlay.XXXXXXXXXX`
TOP=${PWD}
KERNEL_DTB=${TOP}/$1
DTBO=${TOP}/$2
OBJ=$1
KERNEL_DTB=${TOP}/${OBJ}/$2
DTBO=${TOP}/${OBJ}/$3
DTBC_DIR=${TOP}/${OBJ}
trap "rm -rf ${overlay_dir}; set +x; exit" 1 SIGINT
@@ -43,6 +45,7 @@ for idx in ${!id_arr[*]}; do
echo "/{qcom,board-id=<0x${id_arr[$idx]} 0x${rev_arr[$idx]}>;};" >> \
combined-${idx}.dts
dtc -q -O dtb -o combined-${idx}.dtb combined-${idx}.dts
cp combined-${idx}.dtb ${DTBC_DIR}/combined-${idx}.dtbc
done
# ls -v is used to make sure dtb is combined as the order specified in