Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/functions/compilation/kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ function compile_kernel() {
kernel_base_revision_date="$(LC_ALL=C date -d "@${kernel_base_revision_ts}")"
display_alert "Using Kernel git revision" "${kernel_git_revision} at '${kernel_base_revision_date}'"

# Possibly 'make clean'.
LOG_SECTION="kernel_maybe_clean" do_with_logging do_with_hooks kernel_maybe_clean

# Call extension method to prepare extra sources
call_extension_method "kernel_copy_extra_sources" <<- 'ARMBIAN_KERNEL_SOURCES_EXTRA'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Move extra-source hook past patch cleanup

When this hook copies untracked source trees (for example kernel_copy_extra_sources__khadas_common_drivers creates common_drivers under the kernel tree), the next step still calls kernel_main_patching, whose Python patcher resets to kernel_git_revision and removes untracked files before configuration. So with CLEAN_LEVEL=make-kernel the hook now survives kernel_maybe_clean only to have its files deleted by the patching cleanup, leaving the later kernel config/build without the copied sources; the hook needs to run after that cleanup if its output must be present for the build.

Useful? React with 👍 / 👎.

*Hook to copy extra kernel sources to the kernel under compilation*
ARMBIAN_KERNEL_SOURCES_EXTRA

# Possibly 'make clean'.
LOG_SECTION="kernel_maybe_clean" do_with_logging do_with_hooks kernel_maybe_clean

# Patching.
declare hash pre_patch_version
kernel_main_patching # has it's own logging sections inside
Expand Down
Loading