xanmod
This commit is contained in:
parent
544707a406
commit
1703f55532
29
.github/workflows/build-xanmod-0.yml
vendored
Normal file
29
.github/workflows/build-xanmod-0.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: Build Xanmod kernel deb packages(0)
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 1 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build kernel
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# 由于默认的 Ubuntu 环境只有 17G 左右的剩余空间,所以我们需要先利用如下 action 对编译环境进行扩容
|
||||||
|
- 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
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
PASSWORD: ${{ secrets.PASSWORD }}
|
||||||
|
run: bash build_action_xanmod.sh 0
|
29
.github/workflows/build-xanmod-1.yml
vendored
Normal file
29
.github/workflows/build-xanmod-1.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: Build Xanmod kernel deb packages(1)
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 4 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build kernel
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# 由于默认的 Ubuntu 环境只有 17G 左右的剩余空间,所以我们需要先利用如下 action 对编译环境进行扩容
|
||||||
|
- 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
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
PASSWORD: ${{ secrets.PASSWORD }}
|
||||||
|
run: bash build_action_xanmod.sh 1
|
29
.github/workflows/build-xanmod-2.yml
vendored
Normal file
29
.github/workflows/build-xanmod-2.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: Build Xanmod kernel deb packages(0)
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 7 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build kernel
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# 由于默认的 Ubuntu 环境只有 17G 左右的剩余空间,所以我们需要先利用如下 action 对编译环境进行扩容
|
||||||
|
- 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
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
PASSWORD: ${{ secrets.PASSWORD }}
|
||||||
|
run: bash build_action_xanmod.sh 2
|
29
.github/workflows/build-xanmod-3.yml
vendored
Normal file
29
.github/workflows/build-xanmod-3.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: Build Xanmod kernel deb packages(0)
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 9 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build kernel
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# 由于默认的 Ubuntu 环境只有 17G 左右的剩余空间,所以我们需要先利用如下 action 对编译环境进行扩容
|
||||||
|
- 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
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
PASSWORD: ${{ secrets.PASSWORD }}
|
||||||
|
run: bash build_action_xanmod.sh 3
|
@ -5,9 +5,10 @@ sudo apt install python3-pyquery -y
|
|||||||
python3 get-newest-version.py $1
|
python3 get-newest-version.py $1
|
||||||
#VERSION=$(grep 'Kernel Configuration' < config | awk '{print $3}')
|
#VERSION=$(grep 'Kernel Configuration' < config | awk '{print $3}')
|
||||||
# add deb-src to sources.list
|
# add deb-src to sources.list
|
||||||
MAINVERSION=$1
|
|
||||||
VERSION=`cat /tmp/kernelversion.txt`
|
VERSION=`cat /tmp/kernelversion.txt`
|
||||||
URL=`cat /tmp/kernelurl.txt`
|
URL=`cat /tmp/kernelurl.txt`
|
||||||
|
MAINVERSION=`expr substr $VERSION 1 1`
|
||||||
curl https://github.com/gfdgd-xi/dclc-kernel/raw/main/$VERSION/index.html | grep 404
|
curl https://github.com/gfdgd-xi/dclc-kernel/raw/main/$VERSION/index.html | grep 404
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
exit
|
exit
|
||||||
@ -21,7 +22,7 @@ cd "${GITHUB_WORKSPACE}" || exit
|
|||||||
|
|
||||||
# download kernel source
|
# download kernel source
|
||||||
wget $URL
|
wget $URL
|
||||||
tar -xf linux-"$VERSION".tar.xz
|
tar -xvf linux-"$VERSION".tar.xz
|
||||||
cd linux-"$VERSION" || exit
|
cd linux-"$VERSION" || exit
|
||||||
|
|
||||||
# copy config file
|
# copy config file
|
||||||
@ -50,7 +51,7 @@ mv ./*.deb dclc-kernel/$VERSION
|
|||||||
cd dclc-kernel/$VERSION
|
cd dclc-kernel/$VERSION
|
||||||
cd ..
|
cd ..
|
||||||
cd head
|
cd head
|
||||||
cat > deb-/DEBIAN/control <<EOF
|
cat > deb/DEBIAN/control <<EOF
|
||||||
Package: linux-kernel-dclc-gfdgdxi
|
Package: linux-kernel-dclc-gfdgdxi
|
||||||
Version: $VERSION
|
Version: $VERSION
|
||||||
Maintainer: gfdgd xi <3025613752@qq.com>
|
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||||
@ -66,6 +67,9 @@ Section: utils
|
|||||||
Installed-Size: 0
|
Installed-Size: 0
|
||||||
Description: 内核(虚包)
|
Description: 内核(虚包)
|
||||||
EOF
|
EOF
|
||||||
|
if [[ ! -d deb-$MAINVERSION ]]; then
|
||||||
|
mkdir -pv deb-$MAINVERSION/DEBIAN
|
||||||
|
fi
|
||||||
cat > deb-$MAINVERSION/DEBIAN/control <<EOF
|
cat > deb-$MAINVERSION/DEBIAN/control <<EOF
|
||||||
Package: linux-kernel-dclc-gfdgdxi-$MAINVERSION
|
Package: linux-kernel-dclc-gfdgdxi-$MAINVERSION
|
||||||
Version: $VERSION
|
Version: $VERSION
|
||||||
@ -88,7 +92,8 @@ cd ..
|
|||||||
bash ./repack-zstd --scan .
|
bash ./repack-zstd --scan .
|
||||||
./build.py
|
./build.py
|
||||||
git add .
|
git add .
|
||||||
|
git pull
|
||||||
git config --global user.email 3025613752@qq.com
|
git config --global user.email 3025613752@qq.com
|
||||||
git config --global user.name gfdgd-xi
|
git config --global user.name gfdgd-xi
|
||||||
git commit -m 提交$VERSION
|
git commit -m 提交$VERSION
|
||||||
git push
|
git push
|
||||||
|
99
build_action_xanmod.sh
Normal file
99
build_action_xanmod.sh
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
sed -i "/deb-src/s/# //g" /etc/apt/sources.list
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install python3-pyquery -y
|
||||||
|
python3 get-newest-version-xanmod.py $1
|
||||||
|
#VERSION=$(grep 'Kernel Configuration' < config | awk '{print $3}')
|
||||||
|
# add deb-src to sources.list
|
||||||
|
#$1
|
||||||
|
VERSION=`cat /tmp/kernelversion.txt`
|
||||||
|
URL=`cat /tmp/kernelurl.txt`
|
||||||
|
MAINVERSION=`expr substr $VERSION 1 1`
|
||||||
|
curl https://github.com/gfdgd-xi/dclc-kernel/raw/main/$VERSION/index.html | grep 404
|
||||||
|
if [[ $? != 0 ]]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
# install dep
|
||||||
|
sudo apt install -y wget xz-utils make gcc flex bison dpkg-dev bc rsync kmod cpio libssl-dev git lsb vim libelf-dev
|
||||||
|
sudo apt build-dep -y linux
|
||||||
|
|
||||||
|
# change dir to workplace
|
||||||
|
cd "${GITHUB_WORKSPACE}" || exit
|
||||||
|
|
||||||
|
# download kernel source
|
||||||
|
wget $URL
|
||||||
|
tar -xvf "$VERSION".tar.bz2
|
||||||
|
cd "$VERSION" || exit
|
||||||
|
|
||||||
|
# copy config file
|
||||||
|
cp ../config .config
|
||||||
|
#
|
||||||
|
# disable DEBUG_INFO to speedup build
|
||||||
|
scripts/config --disable DEBUG_INFO
|
||||||
|
scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
|
||||||
|
# apply patches
|
||||||
|
# shellcheck source=src/util.sh
|
||||||
|
# source ../patch.d/*.sh
|
||||||
|
|
||||||
|
# build deb packages
|
||||||
|
CPU_CORES=$(($(grep -c processor < /proc/cpuinfo)*2))
|
||||||
|
sudo make bindeb-pkg -j"$CPU_CORES"
|
||||||
|
|
||||||
|
# move deb packages to artifact dir
|
||||||
|
cd ..
|
||||||
|
mkdir "artifact"
|
||||||
|
#cp ./*.deb artifact/
|
||||||
|
git clone https://gfdgd-xi:$PASSWORD@github.com/gfdgd-xi/dclc-kernel
|
||||||
|
#cd dclc-kernel
|
||||||
|
mkdir dclc-kernel/$VERSION
|
||||||
|
rm -rfv *dbg*.deb
|
||||||
|
mv ./*.deb dclc-kernel/$VERSION
|
||||||
|
cd dclc-kernel/$VERSION
|
||||||
|
cd ..
|
||||||
|
cd head
|
||||||
|
cat > deb/DEBIAN/control <<EOF
|
||||||
|
Package: linux-kernel-dclc-gfdgdxi-xanmod
|
||||||
|
Version: $VERSION
|
||||||
|
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||||
|
Homepage: https://github.com/gfdgd-xi/dclc-kernel
|
||||||
|
Architecture: amd64
|
||||||
|
Severity: serious
|
||||||
|
Certainty: possible
|
||||||
|
Check: binaries
|
||||||
|
Type: binary, udeb
|
||||||
|
Priority: optional
|
||||||
|
Depends: linux-headers-$VERSION-amd64-desktop, linux-image-$VERSION-amd64-desktop
|
||||||
|
Section: utils
|
||||||
|
Installed-Size: 0
|
||||||
|
Description: 内核(虚包)
|
||||||
|
EOF
|
||||||
|
if [[ ! -d deb-$MAINVERSION-xanmod ]]; then
|
||||||
|
mkdir -pv deb-$MAINVERSION-xanmod/DEBIAN
|
||||||
|
fi
|
||||||
|
cat > deb-$MAINVERSION-xanmod/DEBIAN/control <<EOF
|
||||||
|
Package: linux-kernel-dclc-gfdgdxi-$MAINVERSION-xanmod
|
||||||
|
Version: $VERSION
|
||||||
|
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||||
|
Homepage: https://github.com/gfdgd-xi/dclc-kernel
|
||||||
|
Architecture: amd64
|
||||||
|
Severity: serious
|
||||||
|
Certainty: possible
|
||||||
|
Check: binaries
|
||||||
|
Type: binary, udeb
|
||||||
|
Priority: optional
|
||||||
|
Depends: linux-headers-$VERSION-amd64-desktop, linux-image-$VERSION-amd64-desktop
|
||||||
|
Section: utils
|
||||||
|
Installed-Size: 0
|
||||||
|
Description: 内核(虚包)
|
||||||
|
EOF
|
||||||
|
dpkg -b deb linux-kernel-dclc-gfdgdxi-xanmod_${VERSION}_amd64.deb
|
||||||
|
dpkg -b deb-$MAINVERSION-xanmod linux-kernel-dclc-gfdgdxi-xanmod-$MAINVERSION_${VERSION}_amd64.deb
|
||||||
|
cd ..
|
||||||
|
bash ./repack-zstd --scan .
|
||||||
|
./build.py
|
||||||
|
git add .
|
||||||
|
git pull
|
||||||
|
git config --global user.email 3025613752@qq.com
|
||||||
|
git config --global user.name gfdgd-xi
|
||||||
|
git commit -m 提交$VERSION
|
||||||
|
git push
|
11041
config-xanmod
Normal file
11041
config-xanmod
Normal file
File diff suppressed because it is too large
Load Diff
42
get-newest-version-xanmod.py
Normal file
42
get-newest-version-xanmod.py
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import pyquery
|
||||||
|
mainVersion = int(sys.argv[1])
|
||||||
|
programVersionList = pyquery.PyQuery(url=f"https://www.xanmod.org/")
|
||||||
|
#release = pyquery.PyQuery()
|
||||||
|
temp = 0
|
||||||
|
newestVersion = "0.0.0"
|
||||||
|
newestUrl = ""
|
||||||
|
for i in programVersionList(f"#content div.page div.level3 :first-child td a").items():
|
||||||
|
if ".tar" in i.attr.href:
|
||||||
|
if temp == mainVersion:
|
||||||
|
newestVersion = os.path.splitext(os.path.splitext(os.path.basename(i.attr.href))[0])[0]
|
||||||
|
newestUrl = i.attr.href
|
||||||
|
break
|
||||||
|
#print(i)
|
||||||
|
for i in programVersionList(f"#content div.page div.level3 table a").items():
|
||||||
|
break
|
||||||
|
print(i)
|
||||||
|
continue
|
||||||
|
version = i("td strong").text()
|
||||||
|
if temp == mainVersion:
|
||||||
|
#print(version)
|
||||||
|
newestVersion = version
|
||||||
|
break
|
||||||
|
temp += 1
|
||||||
|
|
||||||
|
temp = 0
|
||||||
|
for i in programVersionList(f"#releases tr :nth-child(4)").items():
|
||||||
|
url = i("td a").attr.href
|
||||||
|
if temp == mainVersion:
|
||||||
|
newestUrl = url
|
||||||
|
break
|
||||||
|
temp += 1
|
||||||
|
print(newestVersion)
|
||||||
|
|
||||||
|
print(newestUrl)
|
||||||
|
with open("/tmp/kernelversion.txt", "w") as file:
|
||||||
|
file.write(newestVersion)
|
||||||
|
with open("/tmp/kernelurl.txt", "w") as file:
|
||||||
|
file.write(newestUrl)
|
Loading…
x
Reference in New Issue
Block a user