mips初步
This commit is contained in:
parent
25333c085a
commit
314bd4b6ff
@ -26,4 +26,4 @@ jobs:
|
|||||||
PASSWORD: ${{ secrets.PASSWORD }}
|
PASSWORD: ${{ secrets.PASSWORD }}
|
||||||
KEYPASSWORD: ${{ secrets.KEYPASSWORD }}
|
KEYPASSWORD: ${{ secrets.KEYPASSWORD }}
|
||||||
KEY: ${{ secrets.KEY }}
|
KEY: ${{ secrets.KEY }}
|
||||||
run: bash build_action-aarch64.sh 0
|
run: bash build_action-mips64el.sh 0
|
221
build_action-mips64el.sh
Normal file
221
build_action-mips64el.sh
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
sed -i "/deb-src/s/# //g" /etc/apt/sources.list
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install gpg python3-pyquery -y
|
||||||
|
aria2c $KEY
|
||||||
|
gpg --import --pinentry-mode loopback --batch --passphrase "$KEYPASSWORD" private-file.key
|
||||||
|
python3 get-newest-version.py $1
|
||||||
|
#VERSION=$(grep 'Kernel Configuration' < config | awk '{print $3}')
|
||||||
|
# add deb-src to sources.list
|
||||||
|
VERSION=`cat /tmp/kernelversion.txt`
|
||||||
|
URL=`cat /tmp/kernelurl.txt`
|
||||||
|
MAINVERSION=`expr substr $VERSION 1 1`
|
||||||
|
SHOWVERSION=$VERSION
|
||||||
|
# 使用 deepin hwe config编译
|
||||||
|
if [[ $2 == 1 ]]; then
|
||||||
|
SHOWVERSION=$VERSION-hwe
|
||||||
|
fi
|
||||||
|
if [[ $2 == 1 ]]; then
|
||||||
|
curl https://github.com/gfdgd-xi/gxde-linux-kernel/raw/main/l/linux-kernel-gxde-gfdgdxi-$1-hwe/linux-kernel-gxde-gfdgdxi-$1-hwe_${VERSION}_mips64el.deb | grep 404
|
||||||
|
result=$?
|
||||||
|
else
|
||||||
|
curl https://github.com/gfdgd-xi/gxde-linux-kernel/raw/main/l/linux-kernel-gxde-gfdgdxi-$1/linux-kernel-gxde-gfdgdxi-${1}_${VERSION}_mips64el.deb | grep 404
|
||||||
|
result=$?
|
||||||
|
fi
|
||||||
|
if [[ $result != 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 install -y gcc-mips64el-linux-gnuabi64
|
||||||
|
sudo apt build-dep -y linux
|
||||||
|
|
||||||
|
# change dir to workplace
|
||||||
|
cd "${GITHUB_WORKSPACE}" || exit
|
||||||
|
|
||||||
|
# download kernel source
|
||||||
|
wget $URL
|
||||||
|
if [[ -f linux-"$VERSION".tar.xz ]]; then
|
||||||
|
tar -xf linux-"$VERSION".tar.xz
|
||||||
|
fi
|
||||||
|
if [[ -f linux-"$VERSION".tar.gz ]]; then
|
||||||
|
tar -xf linux-"$VERSION".tar.gz
|
||||||
|
fi
|
||||||
|
if [[ -f linux-"$VERSION".tar ]]; then
|
||||||
|
tar -xf linux-"$VERSION".tar
|
||||||
|
fi
|
||||||
|
if [[ -f linux-"$VERSION".bz2 ]]; then
|
||||||
|
tar -xf linux-"$VERSION".tar.bz2
|
||||||
|
fi
|
||||||
|
cd linux-"$VERSION" || exit
|
||||||
|
|
||||||
|
# copy config file
|
||||||
|
# 使用 deepin hwe config编译
|
||||||
|
if [[ $2 == 1 ]]; then
|
||||||
|
cp ../config-6.1.11-mips64el-desktop-hwe .config
|
||||||
|
else
|
||||||
|
cp ../config-mips64el .config
|
||||||
|
fi
|
||||||
|
echo $VERSION | grep 4.14
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
|
cp ../config-4.19.0-10-mips64el .config
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
# disable DEBUG_INFO to speedup build
|
||||||
|
# scripts/config --disable DEBUG_INFO
|
||||||
|
scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
|
||||||
|
scripts/config --set-str SYSTEM_REVOCATION_KEYS ""
|
||||||
|
scripts/config --undefine DEBUG_INFO
|
||||||
|
scripts/config --undefine DEBUG_INFO_COMPRESSED
|
||||||
|
scripts/config --undefine DEBUG_INFO_REDUCED
|
||||||
|
scripts/config --undefine DEBUG_INFO_SPLIT
|
||||||
|
scripts/config --undefine GDB_SCRIPTS
|
||||||
|
scripts/config --disable DEBUG_INFO
|
||||||
|
scripts/config --set-val DEBUG_INFO_DWARF5 n
|
||||||
|
scripts/config --set-val DEBUG_INFO_NONE y
|
||||||
|
|
||||||
|
# build deb packages
|
||||||
|
CPU_CORES=$(($(grep -c processor < /proc/cpuinfo)*2))
|
||||||
|
sudo env DEBEMAIL="gfdgd xi <3025613752@qq.com>" make ARCH=mips CROSS_COMPILE=mips64el-linux-gnuabi64- bindeb-pkg -j"$CPU_CORES"
|
||||||
|
# 移动 deb
|
||||||
|
mkdir /tmp/deb-result
|
||||||
|
cp ../*.deb /tmp/deb-result
|
||||||
|
rm /tmp/deb-result/linux-libc-dev*.deb
|
||||||
|
rm /tmp/deb-result/*dbg*.deb
|
||||||
|
|
||||||
|
if [[ $2 == 1 ]]; then
|
||||||
|
# move deb packages to artifact dir
|
||||||
|
cd ..
|
||||||
|
mkdir "artifact"
|
||||||
|
#cp ./*.deb artifact/
|
||||||
|
rm -rfv "${GITHUB_WORKSPACE}/linux-$VERSION*"
|
||||||
|
git clone https://gfdgd-xi:$PASSWORD@github.com/gfdgd-xi/gxde-linux-kernel --depth=1
|
||||||
|
mkdir dclc-kernel
|
||||||
|
mkdir dclc-kernel/$SHOWVERSION
|
||||||
|
mkdir dclc-kernel/head
|
||||||
|
rm -rfv *dbg*.deb
|
||||||
|
mv ./*.deb dclc-kernel/$SHOWVERSION
|
||||||
|
cd dclc-kernel/$SHOWVERSION
|
||||||
|
cd ..
|
||||||
|
cd head
|
||||||
|
mkdir deb/DEBIAN -vp
|
||||||
|
cat > deb/DEBIAN/control <<EOF
|
||||||
|
Package: linux-kernel-gxde-gfdgdxi-hwe
|
||||||
|
Version: $VERSION
|
||||||
|
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||||
|
Homepage: https://github.com/gfdgd-xi/dclc-kernel
|
||||||
|
Architecture: mips64el
|
||||||
|
Severity: serious
|
||||||
|
Certainty: possible
|
||||||
|
Check: binaries
|
||||||
|
Type: binary, udeb
|
||||||
|
Priority: optional
|
||||||
|
Depends: linux-headers-$VERSION-mips64el-loongson3-gfdgdxi-desktop-hwe, linux-image-$VERSION-mips64el-loongson3-gfdgdxi-desktop-hwe
|
||||||
|
Section: utils
|
||||||
|
Installed-Size: 0
|
||||||
|
Description: 内核 $VERSION
|
||||||
|
EOF
|
||||||
|
if [[ ! -d deb-$MAINVERSION ]]; then
|
||||||
|
mkdir -pv deb-$MAINVERSION/DEBIAN
|
||||||
|
fi
|
||||||
|
cat > deb-$MAINVERSION/DEBIAN/control <<EOF
|
||||||
|
Package: linux-kernel-gxde-gfdgdxi-$1-hwe
|
||||||
|
Version: $VERSION
|
||||||
|
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||||
|
Homepage: https://github.com/gfdgd-xi/dclc-kernel
|
||||||
|
Architecture: mips64el
|
||||||
|
Severity: serious
|
||||||
|
Certainty: possible
|
||||||
|
Check: binaries
|
||||||
|
Type: binary, udeb
|
||||||
|
Priority: optional
|
||||||
|
Depends: linux-headers-$VERSION-mips64el-loongson3-gfdgdxi-desktop-hwe, linux-image-$VERSION-mips64el-loongson3-gfdgdxi-desktop-hwe
|
||||||
|
Section: utils
|
||||||
|
Installed-Size: 0
|
||||||
|
Description: 内核 HWE $VERSION
|
||||||
|
EOF
|
||||||
|
dpkg-deb -Z xz -b deb linux-kernel-gxde-gfdgdxi-hwe_${VERSION}_mips64el.deb
|
||||||
|
dpkg-deb -Z xz -b deb-$MAINVERSION linux-kernel-gxde-gfdgdxi-$1-hwe_${VERSION}_mips64el.deb
|
||||||
|
cd ../../gxde-linux-kernel
|
||||||
|
#bash ./repack-zstd --scan .
|
||||||
|
#./build.py
|
||||||
|
./move-letter-path.py ../dclc-kernel/$SHOWVERSION/*.deb
|
||||||
|
./move-letter-path.py ../dclc-kernel/head/*.deb
|
||||||
|
./move-letter-path.py /tmp/deb-result/*.deb
|
||||||
|
touch l/linux-headers-$VERSION-mips64el-gfdgdxi-desktop-hwe/lock
|
||||||
|
rm -rfv l/linux-libc-dev/
|
||||||
|
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
|
||||||
|
else
|
||||||
|
# move deb packages to artifact dir
|
||||||
|
cd ..
|
||||||
|
mkdir "artifact"
|
||||||
|
#cp ./*.deb artifact/
|
||||||
|
rm -rfv "${GITHUB_WORKSPACE}/linux-$VERSION*"
|
||||||
|
git clone https://gfdgd-xi:$PASSWORD@github.com/gfdgd-xi/gxde-linux-kernel --depth=1
|
||||||
|
#cd dclc-kernel
|
||||||
|
mkdir dclc-kernel
|
||||||
|
mkdir dclc-kernel/$VERSION
|
||||||
|
mkdir dclc-kernel/head
|
||||||
|
rm -rfv *dbg*.deb
|
||||||
|
mv ./*.deb dclc-kernel/$VERSION
|
||||||
|
cd dclc-kernel/$VERSION
|
||||||
|
cd ..
|
||||||
|
cd head
|
||||||
|
mkdir deb/DEBIAN -vp
|
||||||
|
cat > deb/DEBIAN/control <<EOF
|
||||||
|
Package: linux-kernel-gxde-gfdgdxi
|
||||||
|
Version: $VERSION
|
||||||
|
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||||
|
Homepage: https://github.com/gfdgd-xi/dclc-kernel
|
||||||
|
Architecture: mips64el
|
||||||
|
Severity: serious
|
||||||
|
Certainty: possible
|
||||||
|
Check: binaries
|
||||||
|
Type: binary, udeb
|
||||||
|
Priority: optional
|
||||||
|
Depends: linux-headers-$VERSION-mips64el-loongson3-gfdgdxi-desktop, linux-image-$VERSION-mips64el-loongson3-gfdgdxi-desktop
|
||||||
|
Section: utils
|
||||||
|
Installed-Size: 0
|
||||||
|
Description: 内核(虚包)
|
||||||
|
EOF
|
||||||
|
if [[ ! -d deb-$MAINVERSION ]]; then
|
||||||
|
mkdir -pv deb-$MAINVERSION/DEBIAN
|
||||||
|
fi
|
||||||
|
cat > deb-$MAINVERSION/DEBIAN/control <<EOF
|
||||||
|
Package: linux-kernel-gxde-gfdgdxi-$1
|
||||||
|
Version: $VERSION
|
||||||
|
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||||
|
Homepage: https://github.com/gfdgd-xi/dclc-kernel
|
||||||
|
Architecture: mips64el
|
||||||
|
Severity: serious
|
||||||
|
Certainty: possible
|
||||||
|
Check: binaries
|
||||||
|
Type: binary, udeb
|
||||||
|
Priority: optional
|
||||||
|
Depends: linux-headers-$VERSION-mips64el-loongson3-gfdgdxi-desktop, linux-image-$VERSION-mips64el-loongson3-gfdgdxi-desktop
|
||||||
|
Section: utils
|
||||||
|
Installed-Size: 0
|
||||||
|
Description: 内核(虚包)
|
||||||
|
EOF
|
||||||
|
dpkg-deb -Z xz -b deb linux-kernel-gxde-gfdgdxi_${VERSION}_mips64el.deb
|
||||||
|
dpkg-deb -Z xz -b deb-$MAINVERSION linux-kernel-gxde-gfdgdxi-${1}_${VERSION}_mips64el.deb
|
||||||
|
cd ../../gxde-linux-kernel
|
||||||
|
#bash ./repack-zstd --scan .
|
||||||
|
#./build.py
|
||||||
|
./move-letter-path.py ../dclc-kernel/$VERSION/*.deb
|
||||||
|
./move-letter-path.py ../dclc-kernel/head/*.deb
|
||||||
|
./move-letter-path.py /tmp/deb-result/*.deb
|
||||||
|
rm -rfv l/linux-libc-dev/
|
||||||
|
touch l/linux-headers-$VERSION-mips64el-gfdgdxi-desktop/lock
|
||||||
|
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
|
||||||
|
fi
|
9705
config-4.19.0-10-arm64
Normal file
9705
config-4.19.0-10-arm64
Normal file
File diff suppressed because it is too large
Load Diff
5877
config-4.19.0-10-mips64el
Normal file
5877
config-4.19.0-10-mips64el
Normal file
File diff suppressed because it is too large
Load Diff
5877
config-mips64el
Normal file
5877
config-mips64el
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user