summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2019-05-25 16:08:30 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2019-05-25 16:08:30 -0700
commitd9b751a55b1b0d2b048d4387c80ce78fada867db (patch)
tree2f3d0f80900b25e26c364c0dae39bbfeeca1e1a9
parentUpdated to 5.0.17.a (diff)
downloadlinux-hardened-ck-d9b751a55b1b0d2b048d4387c80ce78fada867db.tar.xz
Updated to 5.0.18.a
Reorganized patches
-rw-r--r--PKGBUILD40
-rw-r--r--bdver2-fix-for-graysky.patch11
-rw-r--r--ck_modify-for-hardened.patch (renamed from modify-ck-for-hardened.patch)0
-rw-r--r--ck_remove-excess-extraversion.patch18
-rw-r--r--config.x86_642
-rw-r--r--graysky_bdver2-hotfix.patch11
-rw-r--r--remove-excess-ck-extraversion.patch24
7 files changed, 52 insertions, 54 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8406055..4f19a3d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,8 @@
# # I maintain this because:
# Arch version patch script does not apply consistently
-# Arch version lacks ath9k, bdver2, greysky2, and raid6 patches
+# Arch version lacks graysky gcc patch with bdver2 fix
+# Arch version lacks ath9k regdom and raid6 algo patches
# Arch version lacks ck patches
# Arch version allows SEED, SM3, SM4, and Streebog
# Arch version is 300 Hz
@@ -17,7 +18,7 @@
pkgbase=linux-hardened-ck
_majver=5.0
-_minver=17
+_minver=18
if [ "$_minver" == "0" ]; then
_pkgver=${_majver}
else
@@ -25,7 +26,7 @@ _minver=17
fi
_hardenedver=a
_ckpatchversion=1
-_ckpatch="patch-5.0-ck${_ckpatchversion}"
+_ckpatch="patch-${_majver}-ck${_ckpatchversion}"
_gcc_more_v='20180509'
_srcname=linux-${_pkgver}
pkgver=${_pkgver}.${_hardenedver}
@@ -40,11 +41,11 @@ options=('!strip')
source=(
https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_pkgver.tar.{xz,sign}
https://github.com/anthraxx/linux-hardened/releases/download/${pkgver}/linux-hardened-${pkgver}.patch{,.sig}
- remove-excess-ck-extraversion.patch
- modify-ck-for-hardened.patch
+ ck_remove-excess-extraversion.patch
+ ck_modify-for-hardened.patch
http://ck.kolivas.org/patches/5.0/${_majver}/${_majver}-ck${_ckpatchversion}/${_ckpatch}.xz
+ graysky_bdver2-hotfix.patch
enable_additional_cpu_optimizations-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/$_gcc_more_v.tar.gz
- bdver2-fix-for-graysky.patch
ath9k-regdom-hack.patch
raid6-default-algo.patch
config.x86_64 # the main kernel config files
@@ -52,18 +53,18 @@ source=(
90-linux.hook # pacman hook for initramfs regeneration
linux.preset # standard config files for mkinitcpio ramdisk
)
-sha256sums=('ab37029bdc9a4e3fc5dc2cc6f6e8f506a62fa42f68e50897c24fc9dbba789629'
+sha256sums=('7fbd0b3d90a7a28a013f1e3f006c02235c12b41fd020460722a0b7c9936db0d8'
'SKIP'
- '12a6c606905b4b425fc1e883e67cf5a0f28730fa4ae72637740ac98176b8aae6'
+ 'e9c0b0d389c166ea6f2c0e5d526d294a5fa39ddc04a6733c2aa2fd5c60962269'
'SKIP'
- '2a551169f8cbb424900372fe698ae9003fbcad3614a46ca3f56b103f9c1ea763'
+ 'a2db6672b2d35f3006c7151e8fa90f5187dcdac9fcc46e88e78d45c7d8226d1f'
'b6defd1ef672b73631ecfa79fc204d6219175f333b53d86af668c1e1a9b6288e'
'661f64bbd8bf49afcc7c760c4148b2e2108511a1eadcae917cfe6056a83d8476'
+ '229e063a578db0a278108f37b24da20c2a2a18d825e98a67e426cb0f4b492e4a'
'226e30068ea0fecdb22f337391385701996bfbdba37cdcf0f1dbf55f1080542d'
- 'd35338c92d0dbf27ffedaf100bd852dd13fd9b5d49b12a10b91194a2ae654447'
'e7ebf050c22bcec0028c0b3c79fd6d3913b0370ecc6a23dfe78ce475630cf503'
'0f81d6e4158b7beeb0eb514f1b9401f7e23699cb0f7b0d513e25dae1815daaeb'
- 'a0e2af5becc3b629d8be2bd917a8cac8449ec5c629707855b39f99b4774ae571'
+ '6e94ea91bb1e249bbe2485c6ebed420ddd844e6a1bf919b2486797dd8e656cc3'
'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
@@ -92,23 +93,26 @@ prepare() {
msg2 "Applying hardened patch"
patch -Np1 < ../linux-hardened-${pkgver}.patch
+
# ck hotfixes
msg2 "Applying ck patch hotfixes"
- patch -p1 -i ../remove-excess-ck-extraversion.patch "$srcdir/${_ckpatch}"
- patch -p1 -i ../modify-ck-for-hardened.patch "$srcdir/${_ckpatch}"
+ patch -p1 -i ../ck_remove-excess-extraversion.patch "$srcdir/${_ckpatch}"
+ patch -p1 -i ../ck_modify-for-hardened.patch "$srcdir/${_ckpatch}"
sed -i '/-CFLAGS/ s/$/ \$(LIBELF_FLAGS)/' "$srcdir/${_ckpatch}"
# ck patch
msg2 "Applying ck patch"
patch -F 3 -Np1 -i ../${_ckpatch}
- # graysky2 gcc patch
- msg2 "Applying graysky2 cpu patch"
+
+ # graysky gcc hotfixes
+ msg2 "Applying graysky gcc patch hotfixes"
+ patch -p1 -i ../graysky_bdver2-hotfix.patch "$srcdir/kernel_gcc_patch-${_gcc_more_v}/enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch"
+
+ # graysky gcc patch
+ msg2 "Applying graysky cpu patch"
patch -p1 -i ../kernel_gcc_patch-${_gcc_more_v}/enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch
- # Fix stack warnings and ldconfig segfaults on bdver2 with graysky2 gcc patch
- msg2 "Applying bdver2 fix for graysky2 cpu patch"
- patch -p1 -i ../bdver2-fix-for-graysky.patch
# Ignore ath9k eeprom patch
msg2 "Applying ath9k patch"
diff --git a/bdver2-fix-for-graysky.patch b/bdver2-fix-for-graysky.patch
deleted file mode 100644
index b7e5402..0000000
--- a/bdver2-fix-for-graysky.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/arch/x86/Makefile
-+++ b/arch/x86/Makefile
-@@ -492,7 +492,7 @@
- cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1)
- cflags-$(CONFIG_MJAGUAR) += $(call cc-option,-march=btver2)
- cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1)
-- cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2)
-+ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2) $(call cc-option,-mno-tbm)
- cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-march=bdver3)
- cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-march=bdver4)
- cflags-$(CONFIG_MZEN) += $(call cc-option,-march=znver1)
diff --git a/modify-ck-for-hardened.patch b/ck_modify-for-hardened.patch
index c54860a..c54860a 100644
--- a/modify-ck-for-hardened.patch
+++ b/ck_modify-for-hardened.patch
diff --git a/ck_remove-excess-extraversion.patch b/ck_remove-excess-extraversion.patch
new file mode 100644
index 0000000..9182f31
--- /dev/null
+++ b/ck_remove-excess-extraversion.patch
@@ -0,0 +1,18 @@
+--- a/patch-5.1-ck1
++++ b/patch-5.1-ck1
+@@ -833,15 +833,0 @@
+-diff --git a/Makefile b/Makefile
+-index 26c92f892d24..e3325aecd55c 100644
+---- a/Makefile
+-+++ b/Makefile
+-@@ -15,6 +15,10 @@ NAME = Shy Crocodile
+- PHONY := _all
+- _all:
+-
+-+CKVERSION = -ck1
+-+CKNAME = MuQSS Powered
+-+EXTRAVERSION := $(EXTRAVERSION)$(CKVERSION)
+-+
+- # We are using a recursive build, so we need to do a little thinking
+- # to get the ordering right.
+- #
diff --git a/config.x86_64 b/config.x86_64
index 3f9b06c..3c2203a 100644
--- a/config.x86_64
+++ b/config.x86_64
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 5.0.17 Kernel Configuration
+# Linux/x86 5.0.18 Kernel Configuration
#
#
diff --git a/graysky_bdver2-hotfix.patch b/graysky_bdver2-hotfix.patch
new file mode 100644
index 0000000..5cd9dbc
--- /dev/null
+++ b/graysky_bdver2-hotfix.patch
@@ -0,0 +1,11 @@
+--- a/kernel_gcc_patch-20180509/enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch
++++ b/kernel_gcc_patch-20180509/enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch
+@@ -492,7 +492,7 @@ + cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona)
+ + cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1)
+ + cflags-$(CONFIG_MJAGUAR) += $(call cc-option,-march=btver2)
+ + cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1)
+-+ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2)
+++ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2) $(call cc-option,-mno-tbm)
+ + cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-march=bdver3)
+ + cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-march=bdver4)
+ + cflags-$(CONFIG_MZEN) += $(call cc-option,-march=znver1)
diff --git a/remove-excess-ck-extraversion.patch b/remove-excess-ck-extraversion.patch
deleted file mode 100644
index 4e751e5..0000000
--- a/remove-excess-ck-extraversion.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/patch-5.0-ck1
-+++ b/patch-5.0-ck1
-@@ -833,21 +833,6 @@
- + 2: Expire timeslice and recalculate deadline.
- +
- +==============================================================
--diff --git a/Makefile b/Makefile
--index d5713e7b1e50..3ee4f3805466 100644
----- a/Makefile
--+++ b/Makefile
--@@ -15,6 +15,10 @@ NAME = Shy Crocodile
-- PHONY := _all
-- _all:
--
--+CKVERSION = -ck1
--+CKNAME = MuQSS Powered
--+EXTRAVERSION := $(EXTRAVERSION)$(CKVERSION)
--+
-- # Do not use make's built-in rules and variables
-- # (this increases performance and avoids hard-to-debug behaviour)
-- MAKEFLAGS += -rR
- diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
- index 584a6e114853..2d497c3710f2 100644
- --- a/arch/alpha/Kconfig