diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2020-01-11 21:23:23 +0000 |
---|---|---|
committer | Bertrand Jacquin <bertrand@jacquin.bzh> | 2020-01-12 03:28:34 +0000 |
commit | aadb55d8c1a9ada2c076a20833f0452f647d0897 (patch) | |
tree | 945eeafb887ad9b04e882982724507abcea240ce /eclass | |
parent | linux-build: split firmware install (diff) | |
download | portage-aadb55d8c1a9ada2c076a20833f0452f647d0897.tar.xz |
linux-build: install device tree
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/linux-build.eclass | 34 |
1 files changed, 33 insertions, 1 deletions
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/." |