Commit 7a8aeda5 authored by Ophélie Gagnard's avatar Ophélie Gagnard

generation: Fix 20compile-kernel.sh

parent af3ddbf5
...@@ -8,19 +8,19 @@ cd "$GIT_ROOT" ...@@ -8,19 +8,19 @@ cd "$GIT_ROOT"
source generation/00env.sh source generation/00env.sh
KERNEL_COMPILATION_DIR=kernel-compilation
nproc=32 nproc=32
apt -y build-dep linux apt -y build-dep linux
mkdir -p "$KERNEL_COMPILATION_DIR" && cd "$KERNEL_COMPILATION_DIR" mkdir -p "$KERNEL_COMPILATION_DIR" && cd "$KERNEL_COMPILATION_DIR"
if [ ! -f linux-"$KERNEL_VERSION".tar.xz ]; then if [ ! -f linux-"$KERNEL_VERSION".tar.xz ]; then
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-"$KERNEL_VERSION".tar.xz wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-"$KERNEL_VERSION".tar.xz
fi
if [ ! -d linux-"$KERNEL_VERSION" ]; then
tar -xaf linux-"$KERNEL_VERSION".tar.xz tar -xaf linux-"$KERNEL_VERSION".tar.xz
fi fi
cd linux-"$KERNEL_VERSION" cd linux-"$KERNEL_VERSION"
make olddefconfig make olddefconfig
make menuconfig
./scripts/config \ ./scripts/config \
-d CONFIG_MODULE_SIG_ALL \ -d CONFIG_MODULE_SIG_ALL \
...@@ -29,10 +29,10 @@ make menuconfig ...@@ -29,10 +29,10 @@ make menuconfig
-d CONFIG_DEBUG_INFO \ -d CONFIG_DEBUG_INFO \
-e CONFIG_EFI_STUB -e CONFIG_EFI_STUB
# include every modules in the kernel # embed every modules in the kernel
cp .config .config.backup cp .config .config.backup
sed -i 's/=m$/=y/g' .config sed -i 's/=m$/=y/g' .config
make deb-pkg -j"$(nproc)" LOCALVERSION=-"$(dpkg --print-architecture)" KDEB_PKGVERSION="$(make $KERNEL_VERSION)-1" make deb-pkg -j"$(nproc)" LOCALVERSION=-"$(dpkg --print-architecture)" KDEB_PKGVERSION="$(make kernelversion)-1"
cd .. cd ..
dpkg -x linux-image-"$KERNEL_VERSION"-amd64_"$KERNEL_VERSION"-1_amd64.deb "$KERNEL_DIR" dpkg -x linux-image-"$KERNEL_VERSION"-amd64_"$KERNEL_VERSION"-1_amd64.deb "$KERNEL_DIR"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment