disable DEBUG_INFO to speedup build and reduce space cost.
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -6,14 +6,6 @@ jobs:
|
|||||||
name: Build kernel
|
name: Build kernel
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Maximize build space
|
|
||||||
uses: easimon/maximize-build-space@master
|
|
||||||
with:
|
|
||||||
root-reserve-mb: 4096
|
|
||||||
swap-size-mb: 512
|
|
||||||
remove-dotnet: 'true'
|
|
||||||
remove-android: 'true'
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ cd linux-"$VERSION" || exit
|
|||||||
# copy config file
|
# copy config file
|
||||||
cp ../config .config
|
cp ../config .config
|
||||||
|
|
||||||
|
# disable DEBUG_INFO to speedup build
|
||||||
|
scripts/config --disable DEBUG_INFO
|
||||||
|
|
||||||
# apply patches
|
# apply patches
|
||||||
# shellcheck source=src/util.sh
|
# shellcheck source=src/util.sh
|
||||||
source ../patch.d/*.sh
|
source ../patch.d/*.sh
|
||||||
@@ -32,5 +35,4 @@ make deb-pkg -j"$CPU_CORES"
|
|||||||
# move deb packages to artifact dir
|
# move deb packages to artifact dir
|
||||||
cd ..
|
cd ..
|
||||||
mkdir "artifact"
|
mkdir "artifact"
|
||||||
rm ./*dbg*.deb
|
|
||||||
mv ./*.deb artifact/
|
mv ./*.deb artifact/
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
VERSION=$(grep 'Kernel Configuration' < /boot/config-"$(uname -r)" | awk '{print $3}')
|
||||||
|
|
||||||
# add deb-src to sources.list
|
# add deb-src to sources.list
|
||||||
echo "deb-src https://home-packages.chinauos.com/home plum main contrib non-free" >> /etc/apt/sources.list
|
echo "deb-src https://home-packages.chinauos.com/home plum main contrib non-free" >> /etc/apt/sources.list
|
||||||
|
|
||||||
@@ -9,12 +11,12 @@ sudo apt install -y wget
|
|||||||
sudo apt build-dep -y linux
|
sudo apt build-dep -y linux
|
||||||
|
|
||||||
# download kernel source
|
# download kernel source
|
||||||
wget http://www.kernel.org/pub/linux/kernel/v5.x/linux-5.10.41.tar.xz
|
wget http://www.kernel.org/pub/linux/kernel/v5.x/linux-"$VERSION".tar.xz
|
||||||
tar -xf linux-5.10.41.tar.xz
|
tar -xf linux-"$VERSION".tar.xz
|
||||||
cd linux-5.10.41 || exit
|
cd linux-"$VERSION" || exit
|
||||||
|
|
||||||
# copy config file
|
# copy config file
|
||||||
cp /boot/config-5.10.41-amd64-desktop .config
|
cp /boot/config-"$(uname -r)" .config
|
||||||
|
|
||||||
# change version string
|
# change version string
|
||||||
sed -i "s/-desktop/-debuggerx/g" .config
|
sed -i "s/-desktop/-debuggerx/g" .config
|
||||||
@@ -22,5 +24,8 @@ sed -i "s/-desktop/-debuggerx/g" .config
|
|||||||
# reduce ACPI_MAX_LOOP_TIMEOUT value
|
# reduce ACPI_MAX_LOOP_TIMEOUT value
|
||||||
sed -i "/ACPI_MAX_LOOP_TIMEOUT/s/30/3/g" include/acpi/acconfig.h
|
sed -i "/ACPI_MAX_LOOP_TIMEOUT/s/30/3/g" include/acpi/acconfig.h
|
||||||
|
|
||||||
|
# disable DEBUG_INFO to speedup build
|
||||||
|
scripts/config --disable DEBUG_INFO
|
||||||
|
|
||||||
CPU_CORES=$(grep -c processor < /proc/cpuinfo)
|
CPU_CORES=$(grep -c processor < /proc/cpuinfo)
|
||||||
make deb-pkg -j"$CPU_CORES"
|
make deb-pkg -j"$CPU_CORES"
|
||||||
Reference in New Issue
Block a user