mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Let linux-image depends linux-dtb
For bootable/workable kernel, dtb is necessary.
This commit is contained in:
@@ -241,6 +241,11 @@ function kernel_package_callback_linux_image() {
|
|||||||
run_host_command_logged cp -rp "${tmp_kernel_install_dirs[INSTALL_DTBS_PATH]}" "${package_directory}/usr/lib/linux-image-${kernel_version_family}"
|
run_host_command_logged cp -rp "${tmp_kernel_install_dirs[INSTALL_DTBS_PATH]}" "${package_directory}/usr/lib/linux-image-${kernel_version_family}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
declare -a package_depends=()
|
||||||
|
if [[ "${KERNEL_BUILD_DTBS:-yes}" == "yes" ]]; then
|
||||||
|
package_depends+=( "linux-dtb-${BRANCH}-${LINUXFAMILY} (=${artifact_version})" )
|
||||||
|
fi
|
||||||
|
|
||||||
# Generate a control file
|
# Generate a control file
|
||||||
cat <<- CONTROL_FILE > "${package_DEBIAN_dir}/control"
|
cat <<- CONTROL_FILE > "${package_DEBIAN_dir}/control"
|
||||||
Package: ${package_name}
|
Package: ${package_name}
|
||||||
@@ -251,6 +256,7 @@ function kernel_package_callback_linux_image() {
|
|||||||
Section: kernel
|
Section: kernel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Provides: linux-image, linux-image-armbian, armbian-$BRANCH
|
Provides: linux-image, linux-image-armbian, armbian-$BRANCH
|
||||||
|
Depends: $(IFS=','; echo "${package_depends[*]}")
|
||||||
Description: Armbian Linux $BRANCH kernel image ${artifact_version_reason:-"${kernel_version_family}"}
|
Description: Armbian Linux $BRANCH kernel image ${artifact_version_reason:-"${kernel_version_family}"}
|
||||||
This package contains the Linux kernel, modules and corresponding other
|
This package contains the Linux kernel, modules and corresponding other
|
||||||
files, kernel_version_family: $kernel_version_family.
|
files, kernel_version_family: $kernel_version_family.
|
||||||
|
|||||||
@@ -330,12 +330,16 @@ function install_distribution_agnostic() {
|
|||||||
|
|
||||||
# install kernel: image/dtb/headers
|
# install kernel: image/dtb/headers
|
||||||
if [[ -n $KERNELSOURCE ]]; then
|
if [[ -n $KERNELSOURCE ]]; then
|
||||||
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["linux-image"]}"
|
|
||||||
|
|
||||||
if [[ "${KERNEL_BUILD_DTBS:-"yes"}" == "yes" ]]; then
|
if [[ "${KERNEL_BUILD_DTBS:-"yes"}" == "yes" ]]; then
|
||||||
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["linux-dtb"]}"
|
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["linux-dtb"]}"
|
||||||
|
# @TODO: Use `aptly` to create a local apt repo and install from it.
|
||||||
|
# So we don't need to install these packages manually and then
|
||||||
|
# mark them as automatically installed.
|
||||||
|
chroot_sdcard apt-mark auto "${image_artifacts_packages["linux-dtb"]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["linux-image"]}"
|
||||||
|
|
||||||
if [[ "${KERNEL_HAS_WORKING_HEADERS:-"no"}" == "yes" ]]; then
|
if [[ "${KERNEL_HAS_WORKING_HEADERS:-"no"}" == "yes" ]]; then
|
||||||
if [[ $INSTALL_HEADERS == yes ]]; then # @TODO remove? might be a good idea to always install headers.
|
if [[ $INSTALL_HEADERS == yes ]]; then # @TODO remove? might be a good idea to always install headers.
|
||||||
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["linux-headers"]}"
|
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["linux-headers"]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user