From 7ef758558285dc829cd3d0ce855ef7b4fc66788f Mon Sep 17 00:00:00 2001 From: Yueyao Zhu Date: Wed, 12 Apr 2017 14:46:31 -0700 Subject: [PATCH] scripts: copy combined dtbc to arch/arm64/boot Bug: 37099957 Change-Id: Id92ca99a02dd18d0e03a48f33b4b439fe78327d4 Signed-off-by: Yueyao Zhu --- arch/arm64/Makefile | 4 ++-- arch/arm64/boot/.gitignore | 1 + scripts/Makefile.dtboaply | 2 +- scripts/dtbo_apply_overlay.sh | 7 +++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 69520b1eb97e..686bfb2f5da0 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -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)' diff --git a/arch/arm64/boot/.gitignore b/arch/arm64/boot/.gitignore index 3212d03e8c93..25fdc5aa9d4a 100644 --- a/arch/arm64/boot/.gitignore +++ b/arch/arm64/boot/.gitignore @@ -5,3 +5,4 @@ Image.gz-dtb Image.lz4 Image.lz4-dtb dtbo.img +*.dtbc diff --git a/scripts/Makefile.dtboaply b/scripts/Makefile.dtboaply index 87a5b3052a5b..20a6aeefb97a 100644 --- a/scripts/Makefile.dtboaply +++ b/scripts/Makefile.dtboaply @@ -6,4 +6,4 @@ .PHONY: all all: - $(if $(KBUILD_SRC),$(srctree)/)scripts/dtbo_apply_overlay.sh $(obj)/${KERNEL_DTB} $(obj)/${DTBO} \ No newline at end of file + $(if $(KBUILD_SRC),$(srctree)/)scripts/dtbo_apply_overlay.sh $(obj) ${KERNEL_DTB} ${DTBO} diff --git a/scripts/dtbo_apply_overlay.sh b/scripts/dtbo_apply_overlay.sh index 78501b16d18c..e8c39cb13cf9 100755 --- a/scripts/dtbo_apply_overlay.sh +++ b/scripts/dtbo_apply_overlay.sh @@ -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