armbian-next: kernel-debs: squash some warnings; add KERNEL_SRC_ARCH to arch configs; don't warn about NAME_KERNEL

This commit is contained in:
Ricardo Pardini
2023-01-23 13:50:30 +01:00
parent d4f70008b5
commit ed3416dc7d
5 changed files with 9 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
export ARCH='amd64' # Debian name $(dpkg-architecture -qDEB_HOST_ARCH) export ARCH='amd64' # Debian name $(dpkg-architecture -qDEB_HOST_ARCH)
export ARCHITECTURE='x86_64' # "kernel" arch export ARCHITECTURE='x86_64' # "kernel" arch
export KERNEL_SRC_ARCH='x86' # kernel SRC_ARCH; there's two for x86_64
export QEMU_BINARY='qemu-x86_64-static' # Hopefully you have this installed. export QEMU_BINARY='qemu-x86_64-static' # Hopefully you have this installed.
export MAIN_CMDLINE='' # we set it in common, it was not set before export MAIN_CMDLINE='' # we set it in common, it was not set before
export KERNEL_COMPILER=' ' # hack: use single space for host gcc. won't work on arm64 hosts export KERNEL_COMPILER=' ' # hack: use single space for host gcc. won't work on arm64 hosts

View File

@@ -2,6 +2,7 @@
export ARCH='arm64' export ARCH='arm64'
export ARCHITECTURE='arm64' export ARCHITECTURE='arm64'
export KERNEL_SRC_ARCH='arm64'
export QEMU_BINARY='qemu-aarch64-static' export QEMU_BINARY='qemu-aarch64-static'
export NAME_KERNEL='Image' export NAME_KERNEL='Image'
export NAME_INITRD='uInitrd' export NAME_INITRD='uInitrd'

View File

@@ -2,6 +2,7 @@
export ARCH='armhf' export ARCH='armhf'
export ARCHITECTURE='arm' export ARCHITECTURE='arm'
export KERNEL_SRC_ARCH='arm'
export QEMU_BINARY='qemu-arm-static' export QEMU_BINARY='qemu-arm-static'
export NAME_KERNEL='zImage' export NAME_KERNEL='zImage'
export NAME_INITRD='uInitrd' export NAME_INITRD='uInitrd'

View File

@@ -2,6 +2,7 @@
export ARCH='riscv64' export ARCH='riscv64'
export ARCHITECTURE='riscv' export ARCHITECTURE='riscv'
export KERNEL_SRC_ARCH='riscv'
export QEMU_BINARY='qemu-riscv64-static' export QEMU_BINARY='qemu-riscv64-static'
export NAME_KERNEL='Image' export NAME_KERNEL='Image'
export NAME_INITRD='uInitrd' export NAME_INITRD='uInitrd'

View File

@@ -175,10 +175,10 @@ function kernel_package_callback_linux_image() {
declare image_name="Image" # "Image" for arm64. or, "zImage" for arm, or "vmlinuz" for others. declare image_name="Image" # "Image" for arm64. or, "zImage" for arm, or "vmlinuz" for others.
# If NAME_KERNEL is set (usually in arch config file), warn and use that instead. # If NAME_KERNEL is set (usually in arch config file), warn and use that instead.
if [[ -n "${NAME_KERNEL}" ]]; then if [[ -n "${NAME_KERNEL}" ]]; then
display_alert "NAME_KERNEL is set" "using '${NAME_KERNEL}' instead of '${image_name}'" "warn" display_alert "NAME_KERNEL is set" "using '${NAME_KERNEL}' instead of '${image_name}'" "debug"
image_name="${NAME_KERNEL}" image_name="${NAME_KERNEL}"
else else
display_alert "NAME_KERNEL is not set" "using default '${image_name}'" "warn" display_alert "NAME_KERNEL is not set" "using default '${image_name}'" "debug"
fi fi
display_alert "Showing contents of Kbuild produced /boot" "linux-image" "debug" display_alert "Showing contents of Kbuild produced /boot" "linux-image" "debug"
@@ -301,10 +301,10 @@ function kernel_package_callback_linux_headers() {
[[ "${SRC_ARCH}" == "amd64" ]] && SRC_ARCH="x86" [[ "${SRC_ARCH}" == "amd64" ]] && SRC_ARCH="x86"
[[ "${SRC_ARCH}" == "armhf" ]] && SRC_ARCH="arm" [[ "${SRC_ARCH}" == "armhf" ]] && SRC_ARCH="arm"
[[ "${SRC_ARCH}" == "riscv64" ]] && SRC_ARCH="riscv" [[ "${SRC_ARCH}" == "riscv64" ]] && SRC_ARCH="riscv"
# @TODO: ok so this actually a duplicate from ARCH/ARCHITECTURE in config/sources/*.conf. We should use that instead. # @TODO: added KERNEL_SRC_ARCH to each arch'es .config file; let's make sure they're sane. Just use KERNEL_SRC_ARCH after confirmed.
# Lets check and warn if it isn't. If warns don't popup over time we remove and just use ARCHITECTURE later. # Lets check and warn if it isn't. If warns don't popup over time we remove and just use ARCHITECTURE later.
if [[ "${SRC_ARCH}" != "${ARCHITECTURE}" ]]; then if [[ "${SRC_ARCH}" != "${KERNEL_SRC_ARCH}" ]]; then
display_alert "WARNING: ARCHITECTURE and SRC_ARCH don't match during kernel build." "ARCHITECTURE=${ARCHITECTURE} SRC_ARCH=${SRC_ARCH}" "wrn" display_alert "WARNING: KERNEL_SRC_ARCH and SRC_ARCH don't match during kernel build." "KERNEL_SRC_ARCH=${ARCHITECTURE} SRC_ARCH=${SRC_ARCH}" "wrn"
fi fi
# Create a list of files to include, path-relative to the kernel tree # Create a list of files to include, path-relative to the kernel tree