kernel: We don't like dirty (#46)
This commit is contained in:
43
.github/patches/5.10/0001-setlocalversion-don-t-check-for-uncommitted-changes.patch
vendored
Normal file
43
.github/patches/5.10/0001-setlocalversion-don-t-check-for-uncommitted-changes.patch
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
From dbdd2906c0b3a967ca28c6b870b46f905c170661 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Park Ju Hyung <qkrwngud825@gmail.com>
|
||||||
|
Date: Wed, 13 Mar 2019 13:36:37 +0900
|
||||||
|
Subject: [PATCH] setlocalversion: don't check for uncommitted changes
|
||||||
|
|
||||||
|
I ofter push after the build is done and I hate seeing "-dirty"
|
||||||
|
|
||||||
|
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
|
||||||
|
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
|
||||||
|
Signed-off-by: Divyanshu-Modi <divyan.m05@gmail.com>
|
||||||
|
Change-Id: I240c516520879da680794fd144b1f273f9e21e13
|
||||||
|
Signed-off-by: Divyanshu-Modi <divyan.m05@gmail.com>
|
||||||
|
---
|
||||||
|
scripts/setlocalversion | 13 -------------
|
||||||
|
1 file changed, 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
|
||||||
|
index 842936656b84..ef27a273ebf5 100755
|
||||||
|
--- a/scripts/setlocalversion
|
||||||
|
+++ b/scripts/setlocalversion
|
||||||
|
@@ -107,19 +107,6 @@ scm_version()
|
||||||
|
printf -- '-svn%s' "$(git svn find-rev $head)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- # Check for uncommitted changes.
|
||||||
|
- # First, with git-status, but --no-optional-locks is only
|
||||||
|
- # supported in git >= 2.14, so fall back to git-diff-index if
|
||||||
|
- # it fails. Note that git-diff-index does not refresh the
|
||||||
|
- # index, so it may give misleading results. See
|
||||||
|
- # git-update-index(1), git-diff-index(1), and git-status(1).
|
||||||
|
- if {
|
||||||
|
- git --no-optional-locks status -uno --porcelain 2>/dev/null ||
|
||||||
|
- git diff-index --name-only HEAD
|
||||||
|
- } | grep -qvE '^(.. )?scripts/package'; then
|
||||||
|
- printf '%s' -dirty
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
# All done with git
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
--
|
||||||
|
2.37.2
|
||||||
|
|
||||||
46
.github/patches/5.15/0001-setlocalversion-don-t-check-for-uncommitted-changes-5.15.patch
vendored
Normal file
46
.github/patches/5.15/0001-setlocalversion-don-t-check-for-uncommitted-changes-5.15.patch
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
From bbb9e7fb1ccadac47b58ba615e6874ddeaa9e628 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Park Ju Hyung <qkrwngud825@gmail.com>
|
||||||
|
Date: Wed, 13 Mar 2019 13:36:37 +0900
|
||||||
|
Subject: [PATCH] setlocalversion: don't check for uncommitted changes
|
||||||
|
|
||||||
|
I ofter push after the build is done and I hate seeing "-dirty"
|
||||||
|
|
||||||
|
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
|
||||||
|
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
|
||||||
|
Signed-off-by: Divyanshu-Modi <divyan.m05@gmail.com>
|
||||||
|
Change-Id: I240c516520879da680794fd144b1f273f9e21e13
|
||||||
|
Signed-off-by: Divyanshu-Modi <divyan.m05@gmail.com>
|
||||||
|
---
|
||||||
|
scripts/setlocalversion | 16 ----------------
|
||||||
|
1 file changed, 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
|
||||||
|
index 1b733ae4c..2a3ea7684 100755
|
||||||
|
--- a/scripts/setlocalversion
|
||||||
|
+++ b/scripts/setlocalversion
|
||||||
|
@@ -90,22 +90,6 @@ scm_version()
|
||||||
|
printf '%s%s' -g "$(echo $head | cut -c1-12)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- # Check for uncommitted changes.
|
||||||
|
- # This script must avoid any write attempt to the source tree,
|
||||||
|
- # which might be read-only.
|
||||||
|
- # You cannot use 'git describe --dirty' because it tries to
|
||||||
|
- # create .git/index.lock .
|
||||||
|
- # First, with git-status, but --no-optional-locks is only
|
||||||
|
- # supported in git >= 2.14, so fall back to git-diff-index if
|
||||||
|
- # it fails. Note that git-diff-index does not refresh the
|
||||||
|
- # index, so it may give misleading results. See
|
||||||
|
- # git-update-index(1), git-diff-index(1), and git-status(1).
|
||||||
|
- if {
|
||||||
|
- git --no-optional-locks status -uno --porcelain 2>/dev/null ||
|
||||||
|
- git diff-index --name-only HEAD
|
||||||
|
- } | read dummy; then
|
||||||
|
- printf '%s' -dirty
|
||||||
|
- fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.2
|
||||||
|
|
||||||
@@ -104,6 +104,9 @@ jobs:
|
|||||||
echo "[+] 添加 kernel su driver 到文件:$DRIVER_MAKEFILE"
|
echo "[+] 添加 kernel su driver 到文件:$DRIVER_MAKEFILE"
|
||||||
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
|
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
|
||||||
echo "[+] KernelSU 导入完成"
|
echo "[+] KernelSU 导入完成"
|
||||||
|
cd $KERNEL_ROOT && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/5.10/*.patch
|
||||||
|
cd -
|
||||||
|
|
||||||
|
|
||||||
- name: Build Kernel
|
- name: Build Kernel
|
||||||
working-directory: WSA-Linux-Kernel
|
working-directory: WSA-Linux-Kernel
|
||||||
|
|||||||
2
.github/workflows/build-kernel-5.10.yml
vendored
2
.github/workflows/build-kernel-5.10.yml
vendored
@@ -57,6 +57,8 @@ jobs:
|
|||||||
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
|
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
|
||||||
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
|
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
|
||||||
echo "[+] KernelSU setup Done."
|
echo "[+] KernelSU setup Done."
|
||||||
|
cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/5.10/*.patch
|
||||||
|
cd -
|
||||||
curl -Lo gki-kernel.zip https://dl.google.com/android/gki/gki-certified-boot-${{ matrix.tag }}_r1.zip
|
curl -Lo gki-kernel.zip https://dl.google.com/android/gki/gki-certified-boot-${{ matrix.tag }}_r1.zip
|
||||||
unzip gki-kernel.zip
|
unzip gki-kernel.zip
|
||||||
tools/mkbootimg/unpack_bootimg.py --boot_img=$(find . -maxdepth 1 -name "*.img")
|
tools/mkbootimg/unpack_bootimg.py --boot_img=$(find . -maxdepth 1 -name "*.img")
|
||||||
|
|||||||
2
.github/workflows/build-kernel-5.15.yml
vendored
2
.github/workflows/build-kernel-5.15.yml
vendored
@@ -45,6 +45,8 @@ jobs:
|
|||||||
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
|
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
|
||||||
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
|
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
|
||||||
echo "[+] KernelSU setup Done."
|
echo "[+] KernelSU setup Done."
|
||||||
|
cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/5.15/*.patch
|
||||||
|
cd -
|
||||||
|
|
||||||
- name: Build boot.img
|
- name: Build boot.img
|
||||||
working-directory: android-kernel
|
working-directory: android-kernel
|
||||||
|
|||||||
Reference in New Issue
Block a user