Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
419b0641c2 | |||
6482964332 | |||
5610dfe739 | |||
1497fb00ec | |||
42b9c4d561 | |||
81315d1192 | |||
168328d88a | |||
977e6d54f7 |
@ -1,6 +1,6 @@
|
|||||||
# 使用说明
|
# 使用说明
|
||||||
|
|
||||||
> 目前安装脚本仅在Debian系统中验证可用!
|
> 目前安装脚本仅在Debian系统中验证可用!
|
||||||
|
|
||||||
请在命令行中执行如下命令以下载并执行`自动安装脚本`:
|
请在命令行中执行如下命令以下载并执行`自动安装脚本`:
|
||||||
`wget -q --show-progress https://git.whlug.cn/manxing/L2GI/raw/branch/master/install_loonggpu.sh && bash install_loonggpu.sh`
|
`wget -q --show-progress https://git.whlug.cn/manxing/L2GI/raw/branch/test/install_loonggpu.sh && bash install_loonggpu.sh`
|
||||||
|
@ -1,37 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 检查是否为root用户,若非请使用root用户重新执行脚本
|
|
||||||
if [[ $EUID -ne 0 ]]; then
|
loongnix_url="https://pkg.loongnix.cn/loongnix/25"
|
||||||
echo "请使用Root用户执行!"
|
packages_url="${loongnix_url}/dists/loongnix/main/binary-loong64/Packages.gz"
|
||||||
exit 1
|
packages_file="Packages"
|
||||||
|
|
||||||
|
if [[ ! -f ${packages_file} ]]; then
|
||||||
|
wget -O ${packages_file}.gz ${packages_url}
|
||||||
|
gzip -d ${packages_file}.gz
|
||||||
fi
|
fi
|
||||||
pwd_cp=$(pwd)
|
packages=($(
|
||||||
tmp_dir=/tmp/Loonggpu
|
cat ${packages_file} |
|
||||||
mkdir ${tmp_dir}
|
grep Filename\: |
|
||||||
cd ${tmp_dir}
|
grep 'loonggpu\|loong\-gpu\|loonggl\|ldrm\|firmware\-loongson' |
|
||||||
|
cut -f2 -d " "
|
||||||
|
))
|
||||||
|
|
||||||
_URL="https://git.whlug.cn/manxing/L2GI/releases/download"
|
names=""
|
||||||
VER="1.0.1"
|
for p in ${packages[*]}; do
|
||||||
URL=${_URL}/v${VER}
|
_name="$(echo ${p} | rev | cut -f1 -d "/" | rev)"
|
||||||
_VER="alpha"
|
echo "Downloading ${_name} ..."
|
||||||
|
wget -O ${_name} "${loongnix_url}/${p}"
|
||||||
|
names="${_name} ${names}"
|
||||||
|
done
|
||||||
|
|
||||||
loonggpu_pkgs=( \
|
echo "Installing ${names} ..."
|
||||||
./firmware-loongson-graphics_${VER}-${_VER}-lnd25.5_loong64.deb \
|
sudo dpkg -i ${names}
|
||||||
./libldrm_${VER}-${_VER}-lnd25.5_loong64.deb \
|
echo "Done!"
|
||||||
./libloong-gpucomp_${VER}-${_VER}-lnd25.5_loong64.deb \
|
# The end.
|
||||||
./loonggl_${VER}-${_VER}-lnd25.5_loong64.deb \
|
|
||||||
./loonggpu-kernel-dkms_${VER}-${_VER}-lnd25.5_loong64.deb \
|
|
||||||
./loonggpu-settings_${VER}-${_VER}-lnd25.5_loong64.deb \
|
|
||||||
./xserver-xorg-video-loonggpu_${VER}-${_VER}-lnd25.5_loong64.deb \
|
|
||||||
)
|
|
||||||
|
|
||||||
for p in ${loonggpu_pkgs[@]};
|
|
||||||
do
|
|
||||||
wget -q --show-progress ${URL}/${p}
|
|
||||||
done;
|
|
||||||
|
|
||||||
apt-get install --yes linux-headers-loong64
|
|
||||||
apt install --yes ${loonggpu_pkgs[*]}
|
|
||||||
|
|
||||||
cd ${pwd_cp}
|
|
||||||
echo "安装完成!"
|
|
||||||
# The end.
|
|
||||||
|
Reference in New Issue
Block a user