From aadb55d8c1a9ada2c076a20833f0452f647d0897 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sat, 11 Jan 2020 21:23:23 +0000 Subject: linux-build: install device tree --- eclass/linux-build.eclass | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'eclass/linux-build.eclass') diff --git a/eclass/linux-build.eclass b/eclass/linux-build.eclass index db7e9cd9..8a466342 100644 --- a/eclass/linux-build.eclass +++ b/eclass/linux-build.eclass @@ -413,13 +413,21 @@ _linux-build_src_install_build() { emake install "${myopt[@]}" \ INSTALL_PATH="${WORKDIR}/boot" - insinto "/boot/${KV_FULL}" + if _linux-build_configval ARM || + _linux-build_configval ARM64 || + _linux-build_configval MIPS ; then + + emake dtbs_install "${myopt[@]}" \ + INSTALL_DTBS_PATH="${WORKDIR}/dts" + fi + insinto "/boot/${KV_FULL}" newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg newins "${WORKDIR}/boot/vmlinuz-${KV_FULL}" kernel.img newins "${WORKDIR}/boot/System.map-${KV_FULL}" System.map if _linux-build_configval CMDLINE_BOOL && _linux-build_configval CMDLINE ; then + insinto "/boot/${KV_FULL}" doins "${WORKDIR}/boot/kernel.arg" fi @@ -447,6 +455,30 @@ _linux-build_src_install_build() { doins -r "${WORKDIR}/lib/firmware" fi + if [[ -d "${WORKDIR}/dts" ]] ; then + einfo "Installing device tree" + + while read ; do + case "${REPLY}" in + overlays) + insinto /boot + doins -r "${WORKDIR}/dts/${REPLY}" + ;; + broadcom) + insinto /boot + doins -r "${WORKDIR}/dts/${REPLY}/." + ;; + *) + ewarn "device tree ${REPLY} is not known, installing in default location" + insinto /boot + doins -r "${WORKDIR}/dts/${REPLY}" + ;; + esac + done < <( + find "${WORKDIR}/dts" -mindepth 1 -maxdepth 1 -type d -printf '%P\n' + ) + fi + if [[ -d "${WORKDIR}/bootloader/boot" ]] ; then insinto /boot doins -r "${WORKDIR}/bootloader/boot/." -- cgit v1.2.3