|
本帖最后由 cqzhangjunhua 于 2022-10-28 15:17 编辑
数码视讯Q5机顶盒介绍:
数码视讯Q5
CPU:晶晨S905M 4核1.5G
内存:1g
存储:8G
显卡:Mali-450
接口:HDMI
USB2.0(两个)
AV
TF卡槽
RJ45(100M)
带2.4g无线
电源:DC12V 1A
目前闲鱼的售价在:50-70元。
购买数码视讯Q5时,最好是购买江苏移动和浙江移动的,必须问清楚,是否可以插tf卡打游戏,可以插tf卡打游戏才买,可以插tf卡打游戏才买,可以插tf卡打游戏才买。
所需软件等工具下载地址;
链接:https://pan.baidu.com/s/1q2n-Tc-5JCwvHitMHXswpQ
提取码:cqzz
教程目录:
1.刷Armbian系统
2.备份EMMC内的安卓系统
3.Armbian系统写进EMMC
4.Armbian系统Debian stretch升级到buster
5.备份EMMC内的Armbian系统
6.安装DietPi系统
7.DietPi系统备份
8.配置squeezelite
9.安装dietpi-software里的其它软件的方法
一.安装armbian系统
1. Armbian_5.44_S9xxx_Debian_stretch_3.14.29_icewm_20180601.img
2.将系统文件写入TF卡
2.1.用DiskGenius软件将TF卡分成一个FAT32的区(分区类型:MBR)并格式化。
注:TF卡容量必须大于8g(备份安卓系统需要空间)
2.2.Win32DiskImager或者UltraISO将img文件写入TF卡。
3.配置dtb文件
这是这个固件非常智能的地方:不用配置dtb文件,不知道n1需不需要配置dtb文件(我没有n1,无法验证)。
4.进入系统并简单设置
4.1.将TF卡插进卡槽,接上电源、网线、HDMI线;
4.2.按开关键,通电,然后耐心等候。
4.3.打开电脑的浏览器,输入路由器地址,进入路由器设置,查看局域网内的设备及地址,当看到设备名:amlogic,则记下地址。
4.4.打开PuTTY软件,并在地址栏输入aml的地址,点击打开
4.5.在login as:输入:root
4.6.在root@192.168.X.X's password:输入:1234(默认密码)
显示:
login as: root
root@192.168.2.43's password:
You are required to change your password immediately (root enforced)
____ ___
/ ___| / _ \__ ____ ____ __
\___ \ (_) \ \/ /\ \/ /\ \/ /
___) \__, |> < > < > <
| ____/ /_ //_/\ _\/_/\_ \/_ /\ _\
Welcome to ARMBIAN 5.44 user-built Debian GNU/Linux 9 (stretch) 3.14.29
System load: 1.24 0.72 0.29 Up time: 3 min
Memory usage: 8 % of 766MB IP: 192.168.2.43
Usage of /: 13% of 15G
[ General system configuration (beta): armbian-config ]
New to Armbian? Check the documentation first: https://docs.armbian.com
Changing password for root.
(current) UNIX password:
输入root的旧密码:1234
显示
Enter new UNIX password:
输入root的新密码:67773240
显示:
Retype new UNIX password:
再次输入root的新密码:67773240
显示:
Thank you for choosing Armbian! Support: www.armbian.com
Creating a new user account. Press <Ctrl-C> to abort
Desktop environment will not be enabled if you abort the new user creation
Please provide a username (eg. your forename):
输入新用户名:cqzhangjunhua
显示:
Creating home directory `/home/cqzhangjunhua' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
输入cqzhangjunhua的密码:67773240
显示:
Retype new UNIX password:
再次输入cqzhangjunhua的密码:677732340
显示:
passwd: password updated successfully
Changing the user information for cqzhangjunhua
Enter the new value, or press ENTER for the default
Full Name []:
按回车
显示
Room Number []:
按回车
显示
Work Phone []:
按回车
显示
Home Phone []:
按回车
显示
Other []:
按回车
显示
Is the information correct? [Y/n]
输入:y
显示
Sucesfuul setup. Reboot system.
系统重启,表示安装完成。
重新以root身份和新设置密码登录系统
二.备份EMMC内的安卓系统
输入ddbr命令
ddbr
显示:
DO YOU WANT TO BACKUP OR RESTORE ?
BACKUP=(b) RESTORE=(r)
输入:b
显示:
AVAILABLE DEVICES: mmcblk0 mmcblk1
YOU ARE RUNNING stretch FROM mmcblk0
INTERNAL EMMC IS: mmcblk1 SIZE: 7634944
ROOT (mmcblk0) FREE SPACE IS: 12959076
DO YOU WANT COMPRESSION ?
YES=(y) NO=(n)
输入:y
显示:
SAVING AND COMPRESSING mmcblk1 TO /ddbr/Amlogic-emmc.img.gz...
45MiB 0:00:07 [2.58MiB/s] [> ] 0% ETA 0:19:13
等待几分钟,
显示:
7.28GiB 0:06:07 [20.3MiB/s] [================================>] 100%
7818182656 bytes (7.8 GB, 7.3 GiB) copied, 367.154 s, 21.3 MB/s
JOB FINISHED!
表示完备份成,备份文件名:Amlogic-emmc.img.gz, 备份文件大小7.28g,备份文件在目录/ddbr下。
用WinSCP将备份文件拷贝到电脑里保存。
三.Armbian系统写进EMMC
1.改写install.sh文件
nano install.sh
将倒数第10行中的:bs=262144
改为:bs=524288
保存退出:Ctrl+O、Enter、Ctrl+X
这样一来,就保证在从stretch升级到buster、安装DietPi时不会出现:
E: You don't have enough free space in /tmp/apt/archives/.
archives空间不足的错误提示。
2.写进EMMC
输入以下命令:
./install.sh
等待几分钟:
显示:
**************************************************
Complete copy OS to eMMC parted DATA
**************************************************
Armbian写进EMMC完成。
输入:poweroff
取出TF卡或U盘,接通电源
打开电脑的浏览器,输入路由器地址,进入路由器设置,查看局域网内的设备及地址,当看到设备名:amlogic,则记下地址。
打开PuTTY软件,并在地址栏输入amlogic的地址,点击打开,
在login as:输入:root
在root@192.168.X.X's password:输入:67773240
显示:
login as: root
root@192.168.2.214's password:
____ ___
/ ___| / _ \__ ____ ____ __
\___ \ (_) \ \/ /\ \/ /\ \/ /
___) \__, |> < > < > <
| ____/ /_ //_/\ _\/_/\_ \/_ /\ _\
Welcome to ARMBIAN 5.44 user-built Debian GNU/Linux 9 (stretch) 3.14.29
System load: 1.08 0.61 0.25 Up time: 2 min
Memory usage: 13 % of 766MB IP: 192.168.2.214
Usage of /: 47% of 4.8G
[ 0 security updates available, 232 updates total: apt upgrade ]
Last check: 2022-10-23 00:21
Last login: Sun Oct 23 03:01:42 2022 from 192.168.2.110
root@amlogic:~#
四.Armbian系统Debian stretch升级到buster
由于固件Armbian_5.44_S9xxx_Debian_stretch_3.14.29_icewm_20180601.img的版本太低,在安装DietPi时,报错,不能安装,因此将Armbian系统由Debian stretch升级到buster。
在升级前,用以下命令查看当前版本:
lsb_release -a
显示:
root@amlogic:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.4 (stretch)
Release: 9.4
Codename: stretch
1.换源:
nano /etc/apt/sources.list
将原内容全部用#注释掉,将以下内容复制到文件尾部:
#中科大
#debian10
deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
保存退出:Ctrl+O、Enter、Ctrl+X
apt update
显示:
Err:2 https://mirrors.ustc.edu.cn/debian buster InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY DCC9EFBF77E11517
Err:3 https://mirrors.ustc.edu.cn/debian buster-updates InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
Err:4 https://mirrors.ustc.edu.cn/debian buster-backports InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
Err:5 https://mirrors.ustc.edu.cn/debian-security buster/updates InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 112695A0E562B32A NO_PUBKEY 54404762BBB6E853
解决方法:输入以下命令
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DCC9EFBF77E11517
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 112695A0E562B32A
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 54404762BBB6E853
apt update
apt dist-upgrade -y
验证升级
一旦升级过程完成,重启你的机器,并输入下面的命令检测版本:
lsb_release -a
显示:
root@amlogic:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
表示升级完成。
输入:poweroff
五.备份EMMC内的Armbian系统
将刷有Armbian_5.44_S9xxx_Debian_stretch_3.14.29_icewm_20180601.img的TF卡,插入Q5的TF卡槽,开机,进入TF卡的系统
输入:ddbr
输入:b
输入:y
等待几分钟,等显示以下表示备份完成。
7818182656 bytes (7.8 GB, 7.3 GiB) copied, 1170.63 s, 6.7 MB/s
JOB FINISHED!
输入:poweroff,拔出TF卡,打开电源,进入EMMC内的系统。
六.安装DietPi
1.准备工作
nano /etc/apt/sources.list
全部换成一下:
#中科大
#debian10
deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
保存退出:Ctrl+O、Enter、Ctrl+X
nano /etc/hosts
在文件后面加入以下内容:
199.232.174.132 deb.debian.org
199.232.142.132 deb.debian.org
146.75.114.132 deb.debian.org
151.101.78.132 deb.debian.org
151.101.110.132 deb.debian.org
185.199.111.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.108.133 raw.githubusercontent.com
185.199.108.133 user-images.githubusercontent.com
185.199.108.133 avatars2.githubusercontent.com
185.199.108.133 avatars1.githubusercontent.com
151.101.110.132 httpredir.debian.org
151.101.194.132 security.debian.org
保存退出:Ctrl+O、Enter、Ctrl+X
2.复制安装文件
在浏览器中打开网页:
https://github.com/MichaIng/DietPi/blob/master/.build/images/dietpi-installer
wget https://github.com/MichaIng/DietPi/blob/master/.build/images/dietpi-installer
将网页中的内容复制到Notepad++,保存为dietpi-installer.sh
nano /home/dietpi-installer.sh
Notepad++中的dietpi-installer.sh的内容,全部复制到/home/dietpi-installer.sh
保存退出:Ctrl+O、Enter、Ctrl+X
3.安装
chmod +x /home/dietpi-installer.sh
cd /home
./dietpi-installer.sh
提示一:
Please select the Git branch the installer should use:
master : Stable release branch (recommended)
beta : Public beta testing branch
dev : Unstable development branch
选择:master : Stable release branch (recommended)
按Ok
提示二:
Please enter your name. This will be used to identify the image creator within credits banner.
You can add your contact information as well for end users.
NB: An entry is required.
输入:用户名(cqzhangjunhua),按Ok。
提示三:
Please enter the name or URL of the pre-image you installed on this system, prior to running this script. This will
be used to identify the pre-image credits.
EG: Debian, Raspberry Pi OS Lite, Armbian or "forum.odroid.com/viewtopic.php?t=123456" etc.
NB: An entry is required.
输入:Debian, 按Ok。
提示四:
Please select the current device this is being installed on:
- NB: Select "Generic device" if not listed.
- "Core devices": Fully supported by DietPi, offering full GPU acceleration + Kodi support.
- "Limited support devices": No GPU acceleration guaranteed.
在ARM的下拉列表中选:28 : Generic Amlogic S905,按Ok。
提示五:
Please select an option:
0 : I do not require WiFi functionality, skip related package install.
1 : I require WiFi functionality, install related packages.
选择:0 : I do not require WiFi functionality, skip related package install。按Ok。
提示六:
Please select a Debian version to install on this system.
Currently installed: buster (ID: 5)
6 : Bullseye (current stable release, recommended)
7 : Bookworm (testing, if you want to live on bleeding edge)
选择:6 : Bullseye (current stable release, recommended)。按Ok。
在接下来的安装过程中会多次出现类似以下的提示:
Downloading source code │
- Command: curl -sSfLO https://github.com/MichaIng/DietPi/archive/master.tar.gz
- Exit code: 52
- DietPi version: v8.9.2 (MichaIng/master) | HW_MODEL: 28 | HW_ARCH: 3 | DISTRO: 5
- Error log:
curl: (52) Empty reply from server
Retry : Re-run the last command that failed
DietPi-Config : Edit network, APT/NTP mirror settings etc
Open subshell : Open a subshell to investigate or solve the issue
Send report : Uploads bugreport containing system info to DietPi
●─ Devs only ──────────────────●
Change command : Adjust and rerun the command
通常都选择:Retry : Re-run the last command that failed ,按Ok。
当出现以下提示,表示安装完成。
/lib/modules:
total 4.0K
drwxr-xr-x 3 root root 4.0K Jun 1 2018 3.14.29
[ OK ] DietPi-PREP | Completed, disk can now be saved to .img for later use, or, reboot system to start first run of DietPi.
[ OK ] DietPi-PREP | To create an .img file, you can "poweroff" and run the following command from the host/external DietPi system:
- bash -c "$(curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/master/.build/images/dietpi-imager)"
root@amlogic:/home#
4.重新启动前的准备工作
nano /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
保存退出
nano /etc/hosts
增加以下内容
199.232.174.132 deb.debian.org
199.232.142.132 deb.debian.org
146.75.114.132 deb.debian.org
151.101.78.132 deb.debian.org
151.101.110.132 deb.debian.org
185.199.111.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.108.133 raw.githubusercontent.com
185.199.108.133 user-images.githubusercontent.com
185.199.108.133 avatars2.githubusercontent.com
185.199.108.133 avatars1.githubusercontent.com
151.101.110.132 httpredir.debian.org
151.101.194.132 security.debian.org
130.185.239.78 apt.armbian.com
注:上面内容中199.232.68.133是raw.githubusercontent.com所在的服务器IP(通过 https://www.ipaddress.com/ 获知)
保存退出
reboot
重新启动
打开电脑的浏览器,输入路由器地址,进入路由器设置,查看局域网内的设备及地址,当看到设备名:DietPi,则记下地址。
打开PuTTY软件,并在地址栏输入DietPi的地址,点击打开
注意:
第一次登录DietPi,用户名:root 登录密码:dietpi
提示:
DietPi-Set_software
Do you want to adjust the default global software password for
DietPi-Software installations? We especially recommend to change the default
password "dietpi". This does not affect any existing software passwords.
NB: This password will be saved and encrypted within
"/var/lib/dietpi/dietpi-software/.GLOBAL_PW.bin" to be useable by DietPi
scripts for e.g. web application and database logins. We highly recommend to
apply individual passwords for each software title after first login.
选择: <Cancel>
显示:
DietPi-Set_software
Change existing unix user passwords?
DietPi has two accounts by default "root" and "dietpi". On first boot, both
share the global password "dietpi", respectively the one set in
"dietpi.txt".
It is highly recommended to change this password, ideally, it should be
different than the global software password.
Would you like to change the login passwords for "root" and "dietpi"?
选择:Ok
输入以root身份登录的密码:67773240 选择:Ok
再次:输入以root身份登录的密码:67773240 选择:Ok
对之后的提示,可以选择:No
显示:
DietPi-Software
Help! : Links to online guides, docs and information
DietPi-Config : Feature-rich configuration tool for your device
●─ Select Software ─────────────────────────────●
Search Software : Find software to install via search box
Browse Software : Select software from the full list
SSH Server : [Dropbear]
Log System : [DietPi-RAMlog #1]
User Data Location : [SD/eMMC | /mnt/dietpi_userdata]
●─ Install or Remove Software ──────────────────●
Uninstall : Select installed software for removal
Install : Go >> Start installation for selected software
选择:DietPi-Config: Feature-rich configuration tool for your device 按Ok
显示:
DietPi-Config
Hardware : Generic Amlogic S905 (aarch64)
1 : Display Options
2 : Audio Options
3 : Performance Options
4 : Advanced Options
5 : Language/Regional Options
6 : Security Options
7 : Network Options: Adapters
8 : Network Options: Misc
9 : AutoStart Options
10 : Tools
选择:5 : Language/Regional Options 按Ok
显示:
DietPi-Config
Please select an option:
Locale : [C.UTF-8]
Timezone : [Europe/London]
Keyboard : [gb]
选择:Timezone : [Europe/London] 按Ok
显示省略,选择:Asia 按Ok
显示省略,选择:Shanghai 按Ok
显示省略,选择:Back
显示省略,选择:Exit
显示省略,选择:Ok
显示省略,选择:Browse Software: Select software from the full list 按Ok
显示省略,
光标放到:[ ] 36 Squeezelite: audio player for lms & squeezebox,按 空格键,在方框中加上*
光标放到:[ ] 96 Samba Server: Feature-rich SMB/CIFS server,按 空格键,在方框中加上*
还可以选:[ ] 35 Logitech Media Server: aka. LMS, fka. SlimServer, SqueezeCenter, SqueezeboxServer, SliMP3
还可以选:[ ] 124 NAA daemon: signalyst network audio adaptor (naa)
还可以选:[ ] 128 MPD: music player daemon
还可以选:[ ] 86 Roon Extension Manager: manage extensions from within Roon
在Media Systems下面共有29个软件,可以根据自己需要选择安装。
选好要安装的软件后,按Ok
显示
DietPi-Software
[ INFO ] Mount NFS/Samba shares via DietPi-Drive_Manager
DietPi-Drive_Manager is a powerful tool which vastly simplifies the mounting of NFS and Samba shares.
Once DietPi-Software has finished installation, simply run 'dietpi-drive_manager' to setup required network mounts
按Ok
显示省略,选择:Install: Go >> Start installation for selected software 按Ok
显示省略,按Ok
显示:
Show : Show me the upload file content
1 : Opt IN and upload data
0 : Opt OUT and purge uploaded data
选择:0 按Ok
显示:
─────────────────────────────────────────────────────
DietPi v8.10.2 : 21:05 - Wed 10/26/22
─────────────────────────────────────────────────────
- Device model : Generic Amlogic S905 (aarch64)
- CPU temp : N/A
- LAN IP : 192.168.2.214 (eth0)
curl: (28) Resolving timed out after 3016 milliseconds
─────────────────────────────────────────────────────
DietPi Team : https://github.com/MichaIng/DietPi#the-dietpi-project-team
Image by : cqzhangjunhua (pre-image: Debian)
Patreon Legends : Camry2731, Chris Gelatt
Website : https://dietpi.com/ | https://twitter.com/DietPi_
Contribute : https://dietpi.com/contribute.html
Web Hosting by : https://myvirtualserver.com
dietpi-launcher : All the DietPi programs in one place
dietpi-config : Feature rich configuration tool for your device
dietpi-software : Select optimised software for installation
htop : Resource monitor
cpu : Shows CPU information and stats
root@DietPi:~#
表示DietPi终于安装好。
七.DietPi系统备份
输入:poweroff
将刷有Armbian_5.44_S9xxx_Debian_stretch_3.14.29_icewm_20180601.img的TF卡,插入Q5的TF卡槽,开机,进入TF卡的系统
输入:ddbr
输入:b
输入:y
等待几分钟,等显示以下表示备份完成。
7818182656 bytes (7.8 GB, 7.3 GiB) copied, 1165.63 s, 6.7 MB/s
JOB FINISHED!
用WinSCP将备份文件拷贝到电脑里保存。切记,切记,切记。
因从Armbian到安装DietPi完成,顺利的话,1个半小时,不顺利可能要几个小时。
输入:poweroff,将TF卡拔出,打开电源,等待启动,
打开电脑的浏览器,输入路由器地址,进入路由器设置,查看局域网内的设备及地址,当看到设备名:DietPi,则记下地址。
打开PuTTY软件,并在地址栏输入DietPi的地址,点击打开,输入用户名:root 密码:67773240,
八.配置squeezelite
1.将USB解码器的电源打开,转换到USB输入模式,用USB线将解码器同数码视讯Q5连接在一起
输入以下命令:
dietpi-config
选择:2 : Audio Options 、选择 :Sound card : [default] ,按OK、选择: hw:1,0 : H20 USB Audio,按OK,然后退出dietpi-config。
建立squeezelite.service文档
输入以下命令:
find / -name squeezelite.service
显示:
root@DietPi:~# find / -name squeezelite.service
/lib/systemd/system/squeezelite.service
输入以下命令:
nano /lib/systemd/system/squeezelite.service
对文件中的以下内容:
[Service]
User=squeezelite
EnvironmentFile=/etc/default/squeezelite
ExecStart=/usr/bin/squeezelite $ARGS
将以上修改成:
[Service]
User=squeezelite
EnvironmentFile=/etc/default/squeezelite
#ExecStart=/usr/bin/squeezelite $ARGS
ExecStart=taskset -c 3 /usr/bin/squeezelite -o hw:1,0 -D dop -p 99 -b 4096:6892
保存退出。
重启系统,设置完成。
这样,数码视讯Q5就变成了DAPHILE的网络播放终端
九.安装dietpi-software里的其它软件的方法
输入:
dietpi-software
显示省略,选择:Browse Software : Select software from the full list,按Ok
显示省略,用↑、↓键选择你要安装的软件,选择好后按“空格键”表上*,按Ok
显示省略,选择:Install : Go >> Start installation for selected software,按Ok
显示省略,按Ok,开始安装选中的软件。
|
|