kernel 6.8
This commit is contained in:
parent
6cc2f73ac6
commit
8fae847587
17
README.md
17
README.md
@ -22,15 +22,15 @@ sudo bash kernel.sh [branch] [version] [compile]
|
|||||||
Exemple :
|
Exemple :
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo bash kernel.sh 6.x 6.6.10
|
sudo bash kernel.sh 6.x 6.8
|
||||||
```
|
```
|
||||||
|
|
||||||
## Résultats
|
## Résultats
|
||||||
|
|
||||||
- linux-headers-6.6.10-zogg-amd64_6.6.10-1_amd64.deb : 8.4 Mo
|
- linux-headers-6.8.0-zogg-amd64_6.8.0-1_amd64.deb : 8.6 Mo
|
||||||
- linux-image-6.6.10-zogg-amd64_6.6.10-1_amd64.deb : 20 Mo
|
- linux-image-6.8.0-zogg-amd64-dbg_6.8.0-1_amd64.deb : 181 Mo
|
||||||
- linux-image-6.6.10-zogg-amd64-dbg_6.6.10-1_amd64.deb : 151 Mo
|
- linux-image-6.8.0-zogg-amd64_6.8.0-1_amd64.deb : 21 Mo
|
||||||
- linux-libc-dev_6.6.10-1_amd64.deb : 1.3 Mo
|
- linux-libc-dev_6.8.0-1_amd64.deb : 1.3 Mo
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
@ -40,11 +40,16 @@ sudo bash kernel.sh 6.x 6.6.10
|
|||||||
|
|
||||||
## CHANGELOG
|
## CHANGELOG
|
||||||
|
|
||||||
|
### 2024-03-11
|
||||||
|
|
||||||
|
- Mise à jour Kernel 6.8
|
||||||
|
- Mise à jour de la configuration du patch 'more uarch' (6.8-rc4+)
|
||||||
|
|
||||||
### 2024-03-02
|
### 2024-03-02
|
||||||
|
|
||||||
- Modularisation des options par variable de conditionnement
|
- Modularisation des options par variable de conditionnement
|
||||||
- Ajout du 'Fast Kernel Headers' (désactivé pour le moment)
|
- Ajout du 'Fast Kernel Headers' (désactivé pour le moment)
|
||||||
- Ajustment des options permettant l'instalaltion de pilote Nvidia
|
- Ajustment des options permettant l'installation de pilote Nvidia
|
||||||
- IPv6 remis (sinon certains conteneurs déconnent)
|
- IPv6 remis (sinon certains conteneurs déconnent)
|
||||||
|
|
||||||
### 2024-02-23
|
### 2024-02-23
|
||||||
|
65
kernel.sh
65
kernel.sh
@ -1,19 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
UPDATED="2024-03-02"
|
UPDATED="2024-03-11"
|
||||||
|
|
||||||
DISABLE=1 # disable some options
|
DISABLE=1 # disable some options
|
||||||
ENABLE=1 # enable some options
|
ENABLE=1 # enable some options
|
||||||
MITIGATIONS=0 # enable/disable all mitigations
|
MITIGATIONS=0 # enable/disable all mitigations
|
||||||
UARCH=1 # apply more uarch patch
|
UARCH=1 # apply more uarch patch
|
||||||
FKH=0 # apply fast kernel headers patch
|
FKH=0 # apply fast kernel headers patch
|
||||||
TESTING=0 # add testing options
|
|
||||||
UNCOMPRESS=1 # perform uncompress if already exist
|
|
||||||
CLEANUP=1 # perform folder cleanup
|
|
||||||
CLANG=0 # use Clang compiler (if not, use GCC)
|
CLANG=0 # use Clang compiler (if not, use GCC)
|
||||||
|
O3=1 # use -O3 vs -O2 (optimisation)
|
||||||
ARCH="x86-64-v4" # target architecture (uarch patch)
|
ARCH="x86-64-v4" # target architecture (uarch patch)
|
||||||
CONFIGCLOUD=1 # enable cloud 'from' config
|
CONFIGCLOUD=1 # enable cloud 'from' config
|
||||||
CONFIGOLD=1 # enable old def config
|
CONFIGOLD=1 # enable old def config
|
||||||
CONFIGMOD=0 # enable all mod config
|
CONFIGMOD=0 # enable all mod config
|
||||||
|
SCRATCH=0 # perform from scratch (remove preexisting content)
|
||||||
|
UNCOMPRESS=1 # perform uncompress if already exist
|
||||||
|
CLEANUP=1 # perform folder cleanup
|
||||||
|
TESTING=0 # add testing options
|
||||||
|
|
||||||
#
|
#
|
||||||
# Sources:
|
# Sources:
|
||||||
@ -30,7 +32,7 @@ CONFIGMOD=0 # enable all mod config
|
|||||||
|
|
||||||
# more-uarches-for-kernel.patch:
|
# more-uarches-for-kernel.patch:
|
||||||
# https://github.com/graysky2/kernel_compiler_patch
|
# https://github.com/graysky2/kernel_compiler_patch
|
||||||
# more-uarches-for-kernel.patch : more-uarches-for-kernel-6.1.79-6.8-rc3.patch
|
# more-uarches-for-kernel.patch : more-uarches-for-kernel-6.8-rc4+.patch
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -138,17 +140,29 @@ doEchoStep() {
|
|||||||
echo "### $NOW - $1"
|
echo "### $NOW - $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Scratch
|
||||||
|
doScratch() {
|
||||||
|
if [ $SCRATCH == 1 ]; then
|
||||||
|
if [ -d $WORKDIR ]; then
|
||||||
|
doEchoStep "Scratch: remove existing content"
|
||||||
|
rm -rf $WORKDIR
|
||||||
|
else
|
||||||
|
doEchoStep "Scratch: existing previous content not found"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
doDownload() {
|
doDownload() {
|
||||||
if [ -d $WORKDIR ]; then
|
if [[ -d $WORKDIR && -f $WORKDIR/linux-$VERSION.tar.xz ]]; then
|
||||||
doEchoStep "$BRANCH/$VERSION already present (don't download)"
|
doEchoStep "$BRANCH/$VERSION already present (don't download)"
|
||||||
else
|
else
|
||||||
mkdir -p $WORKDIR
|
mkdir -p $WORKDIR
|
||||||
cd $WORKDIR
|
cd $WORKDIR
|
||||||
|
|
||||||
doEchoStep "Download branch '$BRANCH' version '$VERSION'"
|
doEchoStep "Download branch '$BRANCH' version '$VERSION'"
|
||||||
wget --inet4-only https://cdn.kernel.org/pub/linux/kernel/v$BRANCH/linux-$VERSION.tar.sign
|
wget --compression=auto --show-progress --no-verbose --inet4-only https://cdn.kernel.org/pub/linux/kernel/v$BRANCH/linux-$VERSION.tar.sign
|
||||||
wget --inet4-only https://cdn.kernel.org/pub/linux/kernel/v$BRANCH/linux-$VERSION.tar.xz
|
wget --compression=auto --show-progress --no-verbose --inet4-only https://cdn.kernel.org/pub/linux/kernel/v$BRANCH/linux-$VERSION.tar.xz
|
||||||
doSync
|
doSync
|
||||||
|
|
||||||
result=$?
|
result=$?
|
||||||
@ -367,6 +381,7 @@ doDefaultsDisable() {
|
|||||||
if [ -f .config ]; then
|
if [ -f .config ]; then
|
||||||
cp .config .config.disable.before
|
cp .config .config.disable.before
|
||||||
fi
|
fi
|
||||||
|
./scripts/config --disable CONFIG_WERROR
|
||||||
./scripts/config --disable CONFIG_ACCESSIBILITY
|
./scripts/config --disable CONFIG_ACCESSIBILITY
|
||||||
./scripts/config --disable CONFIG_ACORN_PARTITION
|
./scripts/config --disable CONFIG_ACORN_PARTITION
|
||||||
./scripts/config --disable CONFIG_ACPI_DEBUG
|
./scripts/config --disable CONFIG_ACPI_DEBUG
|
||||||
@ -680,6 +695,8 @@ doDefaultsDisable() {
|
|||||||
./scripts/config --disable CONFIG_X86_UMIP
|
./scripts/config --disable CONFIG_X86_UMIP
|
||||||
./scripts/config --disable CONFIG_X86_USER_SHADOW_STACK
|
./scripts/config --disable CONFIG_X86_USER_SHADOW_STACK
|
||||||
./scripts/config --disable CONFIG_X86_SGX_KVM
|
./scripts/config --disable CONFIG_X86_SGX_KVM
|
||||||
|
./scripts/config --disable CONFIG_PRINTK
|
||||||
|
./scripts/config --disable CONFIG_BUG
|
||||||
|
|
||||||
cp .config .config.disable.after
|
cp .config .config.disable.after
|
||||||
fi
|
fi
|
||||||
@ -875,7 +892,6 @@ doDefaultsEnable() {
|
|||||||
./scripts/config --enable FAIR_GROUP_SCHED
|
./scripts/config --enable FAIR_GROUP_SCHED
|
||||||
./scripts/config --enable VIRTIO_MENU
|
./scripts/config --enable VIRTIO_MENU
|
||||||
./scripts/config --enable ZRAM_DEF_COMP_ZSTD
|
./scripts/config --enable ZRAM_DEF_COMP_ZSTD
|
||||||
./scripts/config --enable CONFIG_WERROR
|
|
||||||
./scripts/config --enable CONFIG_ATA
|
./scripts/config --enable CONFIG_ATA
|
||||||
./scripts/config --enable CONFIG_ATA_SFF
|
./scripts/config --enable CONFIG_ATA_SFF
|
||||||
./scripts/config --enable CONFIG_ATA_BMDMA
|
./scripts/config --enable CONFIG_ATA_BMDMA
|
||||||
@ -1076,6 +1092,7 @@ doDefaultsEnable() {
|
|||||||
./scripts/config --enable CONFIG_STRICT_DEVMEM
|
./scripts/config --enable CONFIG_STRICT_DEVMEM
|
||||||
./scripts/config --enable CONFIG_IO_STRICT_DEVMEM
|
./scripts/config --enable CONFIG_IO_STRICT_DEVMEM
|
||||||
./scripts/config --enable CONFIG_IPV6
|
./scripts/config --enable CONFIG_IPV6
|
||||||
|
./scripts/config --enable CONFIG_KSM
|
||||||
./scripts/config --enable CONFIG_COMPILE_TEST
|
./scripts/config --enable CONFIG_COMPILE_TEST
|
||||||
|
|
||||||
case ${ARCH} in
|
case ${ARCH} in
|
||||||
@ -1245,15 +1262,28 @@ doCompile() {
|
|||||||
doStripSig
|
doStripSig
|
||||||
doStripDebug
|
doStripDebug
|
||||||
|
|
||||||
|
if [ $O3 == 1 ]; then
|
||||||
|
GCCO="3"
|
||||||
|
else
|
||||||
|
GCCO="2"
|
||||||
|
fi
|
||||||
|
|
||||||
doEchoStep "Compilation time... Be patient!"
|
doEchoStep "Compilation time... Be patient!"
|
||||||
export MAKEFLAGS="-j$((NPROC + 1)) -l${NPROC} -Werror=maybe-uninitialized -Werror=nonnull -Wno-maybe-uninitialized -Wno-uninitialized -Wno-free-nonheap-object -Wno-nonnull"
|
# export MAKEFLAGS="-j$((NPROC + 1)) -l${NPROC} -Werror=maybe-uninitialized -Werror=nonnull -Wno-maybe-uninitialized -Wno-uninitialized -Wno-free-nonheap-object -Wno-nonnull"
|
||||||
export CFLAGS="-march=${ARCH} -O2 -flto -pipe"
|
export MAKEFLAGS="-j$((NPROC + 1)) -l${NPROC} -Wno-error"
|
||||||
export CXXFLAGS="-march=${ARCH} -O2 -flto -pipe"
|
export CFLAGS="-march=${ARCH} -O${GCCO} -flto -pipe -msse -msse2 -msse3 -mmmx"
|
||||||
export KCFLAGS=" -march=${ARCH} -O2"
|
export CXXFLAGS="${CFLAGS}"
|
||||||
export KCPPFLAGS=" -march=${ARCH} -O2"
|
export KCFLAGS="-march=${ARCH} -O${GCCO}"
|
||||||
|
export KCPPFLAGS="${KCFLAGS}"
|
||||||
set CONFIG_SITE=/etc/dpkg-cross/cross-config.amd64
|
set CONFIG_SITE=/etc/dpkg-cross/cross-config.amd64
|
||||||
set DEB_BUILD_OPTIONS=nocheck
|
set DEB_BUILD_OPTIONS=nocheck
|
||||||
|
|
||||||
|
doEchoStep "MAKEFLAGS: $MAKEFLAGS"
|
||||||
|
doEchoStep "CFLAGS: $CFLAGS"
|
||||||
|
doEchoStep "CXXFLAGS: $CXXFLAGS"
|
||||||
|
doEchoStep "KCFLAGS: $KCFLAGS"
|
||||||
|
doEchoStep "KCPPFLAGS: $KCPPFLAGS"
|
||||||
|
|
||||||
doEchoStep "make bindeb-pkg"
|
doEchoStep "make bindeb-pkg"
|
||||||
if [ "$CLANG" == "1" ]; then
|
if [ "$CLANG" == "1" ]; then
|
||||||
make \
|
make \
|
||||||
@ -1289,8 +1319,15 @@ doCompile() {
|
|||||||
doKernel() {
|
doKernel() {
|
||||||
WORKDIR=$CURRENT/$BRANCH/$VERSION
|
WORKDIR=$CURRENT/$BRANCH/$VERSION
|
||||||
|
|
||||||
|
doScratch
|
||||||
|
if [ ! -d $WORKDIR ]; then
|
||||||
|
mkdir -p $WORKDIR
|
||||||
|
fi
|
||||||
|
|
||||||
LOGFILE=$WORKDIR/$LOGNAME.$LOGEXT
|
LOGFILE=$WORKDIR/$LOGNAME.$LOGEXT
|
||||||
|
if [ -f $LOGFILE ]; then
|
||||||
rm -rf $LOGFILE
|
rm -rf $LOGFILE
|
||||||
|
fi
|
||||||
touch $LOGFILE
|
touch $LOGFILE
|
||||||
|
|
||||||
if [ "$STEPS" != "compile" ]; then
|
if [ "$STEPS" != "compile" ]; then
|
||||||
|
@ -101,13 +101,13 @@ REFERENCES
|
|||||||
4. https://github.com/graysky2/kernel_gcc_patch/issues/15
|
4. https://github.com/graysky2/kernel_gcc_patch/issues/15
|
||||||
5. http://www.linuxforge.net/docs/linux/linux-gcc.php
|
5. http://www.linuxforge.net/docs/linux/linux-gcc.php
|
||||||
---
|
---
|
||||||
arch/x86/Kconfig.cpu | 427 ++++++++++++++++++++++++++++++--
|
arch/x86/Kconfig.cpu | 424 ++++++++++++++++++++++++++++++--
|
||||||
arch/x86/Makefile | 44 +++-
|
arch/x86/Makefile | 44 +++-
|
||||||
arch/x86/include/asm/vermagic.h | 74 ++++++
|
arch/x86/include/asm/vermagic.h | 74 ++++++
|
||||||
3 files changed, 528 insertions(+), 17 deletions(-)
|
3 files changed, 526 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
|
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
|
||||||
index 87396575c..5ac6e8463 100644
|
index 2a7279d80460a..6924a0f5f1c26 100644
|
||||||
--- a/arch/x86/Kconfig.cpu
|
--- a/arch/x86/Kconfig.cpu
|
||||||
+++ b/arch/x86/Kconfig.cpu
|
+++ b/arch/x86/Kconfig.cpu
|
||||||
@@ -157,7 +157,7 @@ config MPENTIUM4
|
@@ -157,7 +157,7 @@ config MPENTIUM4
|
||||||
@ -569,7 +569,7 @@ index 87396575c..5ac6e8463 100644
|
|||||||
|
|
||||||
#
|
#
|
||||||
# P6_NOPs are a relatively minor optimization that require a family >=
|
# P6_NOPs are a relatively minor optimization that require a family >=
|
||||||
@@ -356,32 +722,63 @@ config X86_USE_PPRO_CHECKSUM
|
@@ -356,11 +722,22 @@ config X86_USE_PPRO_CHECKSUM
|
||||||
config X86_P6_NOP
|
config X86_P6_NOP
|
||||||
def_bool y
|
def_bool y
|
||||||
depends on X86_64
|
depends on X86_64
|
||||||
@ -592,9 +592,13 @@ index 87396575c..5ac6e8463 100644
|
|||||||
+ || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MRAPTORLAKE || MMETEORLAKE || MEMERALDRAPIDS \
|
+ || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MRAPTORLAKE || MMETEORLAKE || MEMERALDRAPIDS \
|
||||||
+ || MNATIVE_INTEL || MNATIVE_AMD) || X86_64
|
+ || MNATIVE_INTEL || MNATIVE_AMD) || X86_64
|
||||||
|
|
||||||
|
config X86_HAVE_PAE
|
||||||
|
def_bool y
|
||||||
|
@@ -368,18 +745,37 @@ config X86_HAVE_PAE
|
||||||
|
|
||||||
config X86_CMPXCHG64
|
config X86_CMPXCHG64
|
||||||
def_bool y
|
def_bool y
|
||||||
- depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8
|
- depends on X86_HAVE_PAE || M586TSC || M586MMX || MK6 || MK7
|
||||||
+ depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 \
|
+ depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 \
|
||||||
+ || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 || MK8SSE3 || MK10 \
|
+ || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 || MK8SSE3 || MK10 \
|
||||||
+ || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN \
|
+ || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN \
|
||||||
@ -631,16 +635,8 @@ index 87396575c..5ac6e8463 100644
|
|||||||
default "5" if X86_32 && X86_CMPXCHG64
|
default "5" if X86_32 && X86_CMPXCHG64
|
||||||
default "4"
|
default "4"
|
||||||
|
|
||||||
config X86_DEBUGCTLMSR
|
|
||||||
def_bool y
|
|
||||||
- depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486SX || M486) && !UML
|
|
||||||
+ depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 \
|
|
||||||
+ || M486SX || M486) && !UML
|
|
||||||
|
|
||||||
config IA32_FEAT_CTL
|
|
||||||
def_bool y
|
|
||||||
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
|
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
|
||||||
index 1a068de12..23b2ec69d 100644
|
index da8f3caf27815..c873d10df15d0 100644
|
||||||
--- a/arch/x86/Makefile
|
--- a/arch/x86/Makefile
|
||||||
+++ b/arch/x86/Makefile
|
+++ b/arch/x86/Makefile
|
||||||
@@ -152,8 +152,48 @@ else
|
@@ -152,8 +152,48 @@ else
|
||||||
@ -695,7 +691,7 @@ index 1a068de12..23b2ec69d 100644
|
|||||||
KBUILD_CFLAGS += $(cflags-y)
|
KBUILD_CFLAGS += $(cflags-y)
|
||||||
|
|
||||||
diff --git a/arch/x86/include/asm/vermagic.h b/arch/x86/include/asm/vermagic.h
|
diff --git a/arch/x86/include/asm/vermagic.h b/arch/x86/include/asm/vermagic.h
|
||||||
index 75884d2cd..02c1386eb 100644
|
index 75884d2cdec37..02c1386eb653e 100644
|
||||||
--- a/arch/x86/include/asm/vermagic.h
|
--- a/arch/x86/include/asm/vermagic.h
|
||||||
+++ b/arch/x86/include/asm/vermagic.h
|
+++ b/arch/x86/include/asm/vermagic.h
|
||||||
@@ -17,6 +17,54 @@
|
@@ -17,6 +17,54 @@
|
||||||
@ -787,4 +783,5 @@ index 75884d2cd..02c1386eb 100644
|
|||||||
#define MODULE_PROC_FAMILY "ELAN "
|
#define MODULE_PROC_FAMILY "ELAN "
|
||||||
#elif defined CONFIG_MCRUSOE
|
#elif defined CONFIG_MCRUSOE
|
||||||
--
|
--
|
||||||
2.43.0.232.ge79552d197
|
2.43.2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user