Compare commits

...

1 Commits

Author SHA1 Message Date
hzy
b2ed798e7a Let linux-image depends linux-dtb
For bootable/workable kernel, dtb is necessary.
2023-05-28 23:34:48 +08:00
2 changed files with 12 additions and 2 deletions

View File

@@ -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}"
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
cat <<- CONTROL_FILE > "${package_DEBIAN_dir}/control"
Package: ${package_name}
@@ -251,6 +256,7 @@ function kernel_package_callback_linux_image() {
Section: kernel
Priority: optional
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}"}
This package contains the Linux kernel, modules and corresponding other
files, kernel_version_family: $kernel_version_family.

View File

@@ -330,12 +330,16 @@ function install_distribution_agnostic() {
# install kernel: image/dtb/headers
if [[ -n $KERNELSOURCE ]]; then
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["linux-image"]}"
if [[ "${KERNEL_BUILD_DTBS:-"yes"}" == "yes" ]]; then
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
install_deb_chroot "${DEB_STORAGE}/${image_artifacts_debs["linux-image"]}"
if [[ "${KERNEL_HAS_WORKING_HEADERS:-"no"}" == "yes" ]]; then
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"]}"