From 90ec145585b65164f8da271c3d81112f1319d1cb Mon Sep 17 00:00:00 2001 From: Christopher Canel Date: Thu, 23 May 2024 16:23:21 +0000 Subject: [PATCH] Debugging linux build --- linux/build_linux.sh | 34 --------------------- {ratemon/scripts => linux}/install_linux.sh | 11 ++++--- 2 files changed, 7 insertions(+), 38 deletions(-) delete mode 100755 linux/build_linux.sh rename {ratemon/scripts => linux}/install_linux.sh (78%) diff --git a/linux/build_linux.sh b/linux/build_linux.sh deleted file mode 100755 index efc92d4..0000000 --- a/linux/build_linux.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env bash - -set -eoux pipefail - -if [ "$#" -ne 1 ]; then - echo "ERROR: Illegal number of parameters." - echo "Usage: ./build_linux.sh " - exit 255 -fi -linux_dir="$1" - -sudo apt-get update -DEBIAN_FRONTEND="noninteractive" sudo apt-get -y --no-install-recommends install \ - git \ - fakeroot \ - build-essential \ - ncurses-dev \ - xz-utils \ - libssl-dev \ - bc \ - flex \ - libelf-dev \ - bison \ - pahole - -pushd "$linux_dir" -cp -fv /boot/config-$(uname -r) .config -scripts/config --disable SYSTEM_TRUSTED_KEYS -scripts/config --disable SYSTEM_REVOCATION_KEYS -make -j"$(nproc)" menuconfig -make -j"$(nproc)" -sudo make -j "$(nproc)" modules_install -sudo make -j "$(nproc)" install -popd diff --git a/ratemon/scripts/install_linux.sh b/linux/install_linux.sh similarity index 78% rename from ratemon/scripts/install_linux.sh rename to linux/install_linux.sh index 9bd3720..69f836f 100755 --- a/ratemon/scripts/install_linux.sh +++ b/linux/install_linux.sh @@ -9,6 +9,8 @@ if [ "$#" -ne 1 ]; then fi main_dir="$1" +version="5.15.107" + DEBIAN_FRONTEND="noninteractive" sudo apt-get -y --no-install-recommends install \ git \ fakeroot \ @@ -24,11 +26,12 @@ git \ # Download Linux 5.15.156 and apply get_info() patch. Do not build it yet. pushd "$main_dir" -wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.15.156.tar.gz -tar xf linux-5.15.156.tar.gz -rm -f linux-5.15.156.tar.gz -pushd linux-5.15.156 +wget "https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-$version.tar.gz" +tar xf "linux-$version.tar.gz" +rm -f "linux-$version.tar.gz" +pushd "linux-$version" git apply "$main_dir/ratemon/linux/get_info.patch" +cp -fv "/boot/config-$(uname -r)" .config scripts/config --disable SYSTEM_TRUSTED_KEYS scripts/config --disable SYSTEM_REVOCATION_KEYS make -j "$(nproc)" menuconfig