diff --git a/lib/compilation.sh b/lib/compilation.sh index 41f54bbac..cfde80f02 100644 --- a/lib/compilation.sh +++ b/lib/compilation.sh @@ -286,6 +286,12 @@ compile_kernel() advanced_patch "kernel" "$KERNELPATCHDIR" "$BOARD" "" "$BRANCH" "$LINUXFAMILY-$BRANCH" + # create patch for manual source changes in debug mode + [[ $CREATE_PATCHES == yes ]] && userpatch_create "kernel" + + # re-read kernel version after patching + local version=$(grab_version "$kerneldir") + # create linux-source package - with already patched sources local sources_pkg_dir=$SRC/.tmp/${CHOSEN_KSRC}_${REVISION}_all rm -rf ${sources_pkg_dir} @@ -299,12 +305,6 @@ compile_kernel() cp COPYING $sources_pkg_dir/usr/share/doc/linux-source-${version}-${LINUXFAMILY}/LICENSE fi - # re-read kernel version after patching - local version=$(grab_version "$kerneldir") - - # create patch for manual source changes in debug mode - [[ $CREATE_PATCHES == yes ]] && userpatch_create "kernel" - display_alert "Compiling $BRANCH kernel" "$version" "info" local toolchain=$(find_toolchain "$KERNEL_COMPILER" "$KERNEL_USE_GCC")