Improve Debian support

This commit is contained in:
Aditya Garg
2024-07-06 06:28:45 +00:00
parent e0c07b6fe6
commit 20fa07694c
4 changed files with 11214 additions and 39 deletions
+26 -32
View File
@@ -28,9 +28,31 @@ jobs:
run: |
yamllint -c ${{ github.workspace }}/.github/workflows/.ymllint .
shellcheck ./*.sh
Build-Jammy:
Create-tag:
needs: [Lint]
runs-on: ubuntu-22.04
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v4
- name: Build script
id: build
run: |
mkdir /tmp/artifacts
VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2)
REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2)
#REL=$( git tag |grep -F $VERSION|sort -r|head -n1|tr -d v)
echo Building $VERSION-$REL
echo "tag=${VERSION}-${REL}" >> $GITHUB_OUTPUT
- name: Create tag
if: github.ref == 'refs/heads/Mainline'
uses: rickstaa/action-create-tag@v1
with:
tag: "v${{ steps.build.outputs.tag }}"
Build-Jammy:
needs: [Create-tag]
runs-on: ubuntu-22.04
steps:
- name: Free up disk space for the CI
uses: AdityaGarg8/remove-unwanted-software@v3
@@ -65,13 +87,6 @@ jobs:
name: linux-T2-${{ steps.build.outputs.tag }}-jammy
path: /tmp/artifacts/*
- name: Create tag
if: github.ref == 'refs/heads/Mainline'
uses: rickstaa/action-create-tag@v1
with:
tag_exists_error: false
tag: "v${{ steps.build.outputs.tag }}"
- name: Release
if: github.ref == 'refs/heads/Mainline'
uses: softprops/action-gh-release@v2
@@ -86,7 +101,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Build-Mantic:
needs: [Lint]
needs: [Create-tag]
runs-on: ubuntu-22.04
steps:
- name: Free up disk space for the CI
@@ -135,13 +150,6 @@ jobs:
name: linux-T2-${{ steps.build.outputs.tag }}-mantic
path: /tmp/artifacts/*
- name: Create tag
if: github.ref == 'refs/heads/Mainline'
uses: rickstaa/action-create-tag@v1
with:
tag_exists_error: false
tag: "v${{ steps.build.outputs.tag }}"
- name: Release
if: github.ref == 'refs/heads/Mainline'
uses: softprops/action-gh-release@v2
@@ -156,7 +164,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Build-Noble:
needs: [Lint]
needs: [Create-tag]
runs-on: ubuntu-22.04
steps:
- name: Free up disk space for the CI
@@ -205,13 +213,6 @@ jobs:
name: linux-T2-${{ steps.build.outputs.tag }}-noble
path: /tmp/artifacts/*
- name: Create tag
if: github.ref == 'refs/heads/Mainline'
uses: rickstaa/action-create-tag@v1
with:
tag_exists_error: false
tag: "v${{ steps.build.outputs.tag }}"
- name: Release
if: github.ref == 'refs/heads/Mainline'
uses: softprops/action-gh-release@v2
@@ -226,7 +227,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Build-Bookworm:
needs: [Lint]
needs: [Create-tag]
runs-on: ubuntu-22.04
steps:
- name: Free up disk space for the CI
@@ -275,13 +276,6 @@ jobs:
name: linux-T2-${{ steps.build.outputs.tag }}-bookworm
path: /tmp/artifacts/*
- name: Create tag
if: github.ref == 'refs/heads/Mainline'
uses: rickstaa/action-create-tag@v1
with:
tag_exists_error: false
tag: "v${{ steps.build.outputs.tag }}"
- name: Release
if: github.ref == 'refs/heads/Mainline'
uses: softprops/action-gh-release@v2
+16 -7
View File
@@ -11,8 +11,16 @@ apt-get install -y lsb-release
KERNEL_VERSION=6.9.8
PKGREL=2
DISTRO=$(lsb_release -i | cut -d ":" -f 2 | xargs)
CODENAME=$(lsb_release -c | cut -d ":" -f 2 | xargs)
if [[ ${DISTRO} = Debian ]]
then
CONFIG=debian
else
CONFIG=ubuntu
fi
#KERNEL_REPOSITORY=git://kernel.ubuntu.com/virgin/linux-stable.git
KERNEL_REPOSITORY=https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
@@ -22,6 +30,7 @@ KERNEL_PATH="${WORKING_PATH}/linux-kernel"
### Debug commands
echo "Kernel version: ${KERNEL_VERSION}"
echo "Config distro: ${CONFIG}"
echo "Working path: ${WORKING_PATH}"
echo "Kernel repository: ${KERNEL_REPOSITORY}"
echo "Current path: ${REPO_PATH}"
@@ -79,17 +88,17 @@ cd "${KERNEL_PATH}"
make clean
# Make config friendly with vanilla kernel
sed -i 's/CONFIG_VERSION_SIGNATURE=.*/CONFIG_VERSION_SIGNATURE=""/g' "${WORKING_PATH}/templates/default-config"
sed -i 's/CONFIG_SYSTEM_TRUSTED_KEYS=.*/CONFIG_SYSTEM_TRUSTED_KEYS=""/g' "${WORKING_PATH}/templates/default-config"
sed -i 's/CONFIG_SYSTEM_REVOCATION_KEYS=.*/CONFIG_SYSTEM_REVOCATION_KEYS=""/g' "${WORKING_PATH}/templates/default-config"
sed -i 's/CONFIG_VERSION_SIGNATURE=.*/CONFIG_VERSION_SIGNATURE=""/g' "${WORKING_PATH}/templates/default-config-${CONFIG}"
sed -i 's/CONFIG_SYSTEM_TRUSTED_KEYS=.*/CONFIG_SYSTEM_TRUSTED_KEYS=""/g' "${WORKING_PATH}/templates/default-config-${CONFIG}"
sed -i 's/CONFIG_SYSTEM_REVOCATION_KEYS=.*/CONFIG_SYSTEM_REVOCATION_KEYS=""/g' "${WORKING_PATH}/templates/default-config-${CONFIG}"
# I want silent boot
sed -i 's/CONFIG_CONSOLE_LOGLEVEL_DEFAULT=.*/CONFIG_CONSOLE_LOGLEVEL_DEFAULT=4/g' "${WORKING_PATH}/templates/default-config"
sed -i 's/CONFIG_CONSOLE_LOGLEVEL_QUIET=.*/CONFIG_CONSOLE_LOGLEVEL_QUIET=1/g' "${WORKING_PATH}/templates/default-config"
sed -i 's/CONFIG_MESSAGE_LOGLEVEL_DEFAULT=.*/CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4/g' "${WORKING_PATH}/templates/default-config"
sed -i 's/CONFIG_CONSOLE_LOGLEVEL_DEFAULT=.*/CONFIG_CONSOLE_LOGLEVEL_DEFAULT=4/g' "${WORKING_PATH}/templates/default-config-${CONFIG}"
sed -i 's/CONFIG_CONSOLE_LOGLEVEL_QUIET=.*/CONFIG_CONSOLE_LOGLEVEL_QUIET=1/g' "${WORKING_PATH}/templates/default-config-${CONFIG}"
sed -i 's/CONFIG_MESSAGE_LOGLEVEL_DEFAULT=.*/CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4/g' "${WORKING_PATH}/templates/default-config-${CONFIG}"
# Copy the modified config
cp "${WORKING_PATH}/templates/default-config" "${KERNEL_PATH}/.config"
cp -v "${WORKING_PATH}/templates/default-config-${CONFIG}" "${KERNEL_PATH}/.config"
# Disable debug info
./scripts/config --undefine GDB_SCRIPTS
File diff suppressed because it is too large Load Diff