;;
esac
+if [ "${BOOT_SRC}" = "" ]; then
+ BOOT_SRC="arch/${ARCH}/boot"
+fi
+
+if [ "${BOOT_DEST}" = "" ]; then
+ BOOT_DEST="boot/test"
+fi
+
+if [ "${DTS_SRC}" = "" ]; then
+ # DTS_SUBDIR is empty by default. Can be set to manufacturer subdir,
+ # for example.
+ DTS_SRC="arch/${ARCH}/boot/dts/${DTS_SUBDIR}"
+fi
+
+if [ "${IMG_SRC}" = "" ]; then
+ IMG_SRC="Image"
+fi
+
+if [ "${IMG_DEST}" = "" ]; then
+ IMG_DEST="Image"
+fi
+
# Arg1: src file
# Arg2: destination user@host
copy_exec()
${KMAKE} INSTALL_MOD_PATH=${deploydir} modules_install
fi
- mkdir -p ${deploydir}/boot
- rm -rf ${deploydir}/boot/*
+ mkdir -p ${deploydir}/${BOOT_DEST}
+ rm -rf ${deploydir}/${BOOT_DEST}/*
- cp ${BOOT_SRC}/Image ${deploydir}/boot/Image-latest
- cp ${DTB_SRC} ${deploydir}${DTB_DEST}
+ cp ${BOOT_SRC}/${IMG_SRC} ${deploydir}/${BOOT_DEST}/${IMG_DEST}
+ DTB_MAIN=""
for f in ${DTB_FILES}; do
- cp ${f}.dtb ${deploydir}/boot
+ if [ "${DTB_MAIN}" = "" ]; then
+ DTB_MAIN="${f}.dtb"
+ fi
+
+ cp ${DTS_SRC}/${f}.dtb ${deploydir}/${BOOT_DEST}/
done
+
+ # Create symbolic link to main DTB:
+ ln -s ${DTB_MAIN} ${deploydir}/${BOOT_DEST}/test.dtb
}
function rootfs_archive() {
${KMAKE} samples
if [ x"${EVK_IP}" != x"" ]; then
- scp ${DTB_SRC} root@${EVK_IP}:${DTB_DEST}
+ scp ${DTB_SRC} root@${EVK_IP}:${BOOT_DEST}/${DTB_DEST}
if [ -f samples/rtc-test/rtc-test ]; then
scp samples/rtc-test/rtc-test root@${EVK_IP}:
fi
source ${SCRIPTPATH}/hvk-common.sh
if [ x"${DTS_BOARD}" != x"" ]; then
- DTB_FILES="${DTB_FILES} ${DTS_BOARD}.dtb"
+ DTB_FILES="${DTB_FILES} ${DTS_BOARD}"
fi
-if [ x"${DTB_FILES}" != x"" ]; then
+if [ "${DTS_SUBDIR}" != "" ]; then
+ dts_subdir="${DTS_SUBDIR}/"
+fi
+
+# Add .dtb extension to all DTB files:
+dtb_files=""
+for f in ${DTB_FILES}; do
+ dtb_files="${dtb_files} ${dts_subdir}${f}.dtb"
+done
+
+if [ x"${dtb_files}" != x"" ]; then
# See https://lore.kernel.org/lkml/20221102214654.axyptitp5kpq3wcq@notapiano/T/
- ${KMAKE} CHECK_DTBS=y ${DTB_FILES}
+ ${KMAKE} CHECK_DTBS=y ${dtb_files}
fi
DT_CHECKER="${KMAKE} DT_CHECKER_FLAGS=-m dt_binding_check"