mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
core: semantic change, KERNELSOURCE must be explicitly 'none' to avoid kernel compilation (not unset)
This commit is contained in:
@@ -15,7 +15,7 @@ declare -g DISTRO_GENERIC_KERNEL=no
|
||||
case "${BRANCH}" in
|
||||
|
||||
ddk)
|
||||
# This will force `unset KERNELSOURCE` later; no kernel will be built.
|
||||
# This will force `KERNELSOURCE='none'` later; no kernel will be built.
|
||||
# Instead, the distro's default linux-generic kernel will be installed.
|
||||
# rpardini: For some regrettable reason, most of this logic is in the grub extension.
|
||||
declare -g DISTRO_GENERIC_KERNEL=yes
|
||||
|
||||
@@ -63,7 +63,7 @@ function extension_prepare_config__prepare_grub_standard() {
|
||||
|
||||
if [[ "${DISTRO_GENERIC_KERNEL}" == "yes" ]]; then
|
||||
declare -g IMAGE_INSTALLED_KERNEL_VERSION="${DISTRO_KERNEL_VER}"
|
||||
unset KERNELSOURCE # This should make Armbian skip most stuff. At least, I hacked it to.
|
||||
declare -g KERNELSOURCE='none' # We need to be explicit we don't want a kernel built.
|
||||
declare -g INSTALL_ARMBIAN_FIRMWARE=no # Should skip build and install of Armbian-firmware.
|
||||
else
|
||||
declare -g KERNELDIR="linux-uefi-${LINUXFAMILY}" # Avoid sharing a source tree with others, until we know it's safe.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# https://github.com/armbian/build/
|
||||
|
||||
function kernel_prepare_git() {
|
||||
[[ -z $KERNELSOURCE ]] && return 0 # do nothing if no kernel source... but again, why were we called then?
|
||||
[[ "${KERNELSOURCE}" == 'none' ]] && return 0 # do nothing if no kernel source... but again, why were we called then?
|
||||
|
||||
# validate kernel_git_bare_tree is set
|
||||
if [[ -z "${kernel_git_bare_tree}" ]]; then
|
||||
|
||||
@@ -86,7 +86,7 @@ function create_image_from_sdcard_rootfs() {
|
||||
PRE_UPDATE_INITRAMFS
|
||||
|
||||
# stage: create final initramfs
|
||||
[[ -n $KERNELSOURCE ]] && {
|
||||
[[ "${KERNELSOURCE}" != 'none' ]] && {
|
||||
update_initramfs "$MOUNT"
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ function determine_artifacts_to_build_for_image() {
|
||||
if [[ "${BOOTCONFIG}" != "none" ]]; then
|
||||
artifacts_to_build+=("uboot")
|
||||
fi
|
||||
if [[ -n $KERNELSOURCE ]]; then
|
||||
if [[ "${KERNELSOURCE}" != 'none' ]]; then
|
||||
artifacts_to_build+=("kernel")
|
||||
fi
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ function config_post_main() {
|
||||
# So we gotta explictly know the major.minor to be able to do that scheme.
|
||||
# If we don't know, we could use BRANCH as reference, but that changes over time, and leads to wastage.
|
||||
if [[ "${skip_kernel:-"no"}" != "yes" ]]; then
|
||||
if [[ -n "${KERNELSOURCE}" ]]; then
|
||||
if [[ "${KERNELSOURCE}" != 'none' ]]; then
|
||||
if [[ "x${KERNEL_MAJOR_MINOR}x" == "xx" ]]; then
|
||||
display_alert "Problem: after configuration, there's not enough kernel info" "Might happen if you used the wrong BRANCH. Make sure 'BRANCH=${BRANCH}' is valid." "err"
|
||||
# if we have KERNEL_TARGET set.
|
||||
|
||||
@@ -274,14 +274,14 @@ function install_distribution_agnostic() {
|
||||
|
||||
call_extension_method "pre_install_kernel_debs" <<- 'PRE_INSTALL_KERNEL_DEBS'
|
||||
*called before installing the Armbian-built kernel deb packages*
|
||||
It is not too late to `unset KERNELSOURCE` here and avoid kernel install.
|
||||
It is not too late to `KERNELSOURCE='none'` here and avoid kernel install.
|
||||
PRE_INSTALL_KERNEL_DEBS
|
||||
|
||||
# default IMAGE_INSTALLED_KERNEL_VERSION, will be parsed from Kernel version in the installed deb package.
|
||||
IMAGE_INSTALLED_KERNEL_VERSION="generic"
|
||||
|
||||
# install kernel: image/dtb/headers
|
||||
if [[ -n $KERNELSOURCE ]]; then
|
||||
if [[ "${KERNELSOURCE}" != "none" ]]; then
|
||||
install_artifact_deb_chroot "linux-image"
|
||||
|
||||
if [[ "${KERNEL_BUILD_DTBS:-"yes"}" == "yes" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user