فهرست منبع

Copy config file immediately before build

Donald Carr 7 سال پیش
والد
کامیت
6e6e70ac6f
1فایلهای تغییر یافته به همراه4 افزوده شده و 3 حذف شده
  1. 4 3
      PKGBUILD

+ 4 - 3
PKGBUILD

@@ -7,7 +7,7 @@ provides=("linux")
 # The firmware the kernel produces blows: don't falsify this lightly
 # "linux-firmware=20170309.695f2d6-1"
 pkgrel=1
-pkgver=4.17.rc0
+pkgver=4.17.rc0.r1.g734976ba80b7
 pkgdesc="Kernel build from head"
 arch=("x86_64" "aarch64")
 license=("GPL2.1")
@@ -26,6 +26,7 @@ pkgver() {
 
 build() {
   cd $_kernel_src_dir && git clean -xdf
+  cp ${_config_file} ${_kernel_src_dir}/.config
   ${_make_cmd}
 
   if [ -n "${LOCAL_PI_VER}" ]; then
@@ -67,7 +68,7 @@ if [ -n "${LOCAL_PI_VER}" ]; then
     case ${LOCAL_PI_VER} in
     3)
         echo "Compiling for the RPi 3 aarch64"
-        cp ${_kernel_src_dir}/configs/rpi3 ${_kernel_src_dir}/.config
+        _config_file="${_kernel_src_dir}/configs/rpi3"
         _xcompile_args="ARCH=arm64 CROSS_COMPILE=/opt/x-tools/aarch64-rpi3-linux-gnu/bin/aarch64-rpi3-linux-gnu-"
     ;;
     *)
@@ -77,7 +78,7 @@ if [ -n "${LOCAL_PI_VER}" ]; then
     esac
 else
     echo "Compiling for desktop"
-    cp ${_kernel_src_dir}/configs/desktop ${_kernel_src_dir}/.config
+    _config_file="${_kernel_src_dir}/configs/desktop"
 fi
 
 _make_cmd="make ${_xcompile_args}"