|
本帖最后由 cqzhangjunhua 于 2024-10-20 15:29 编辑
AM40(RK3399)介绍:
规格参数
AM40整机为 主机和OPS扩展两部分
AM40(包括主机和OPS扩展两部分)的宽度230mm、长度240mm、高度58mm。
整机接口: 双USB3.0+千兆有线网口 + HDMI1.4 + TF卡口 + OPS接口
OPS扩展:四个USB2.0 + HDMI2.0 + 6个COM口
部件名称 芯片型号 备注说明
CPU RK3399 Dual-core A72+Quad-core A53, 64 bits, 2GHz;Mali-T864 GPU
RAM 4 GB DDR3L SDRAM
Flash 32G eMMC 5.1
Ethernet RTL8211F RJ45 Gigabit Ethernet
WIFI+BT M2-EKEY-PCIE RTL8822BE 802.11AC/ABGN PCIE WLAN WITH BLUETOOTH 4.2 SINGLE-CHIP CONTROLLER
芯片型号: AP6536S(注:自己在网上查的)
USB 2.0 USB 2.0[ops] * 4
USB 3.0 USB 3.0 [on board] * 2
HDMI HDMI 1.4[(1920 × 1080) on board,由DP转的] + HDMI 2.0[ops 4k@60Hz]
power 12–19V DC at 2.5–1.6A PORT size: 5.5 * 2.5 [ops; main];3.0 * 1.1 [on board; hided]
电源测试5V2A、12V1A也能启动,已有5521接口电源的,可以购买5521母转5525 DC转接头。
AM40整机(主机和OPS扩展两部分)在闲鱼上售价在120-160元之间。
安装所需软件分享如下
https://pan.baidu.com/s/1Ux1py39IpaCW9hCkiTDf4g
密码:1234
一.安装armbian系统
1.1.镜像文件:
Armbian_24.11.0_rockchip_smart-am40_bookworm_6.1.112_server_2024.10.02.img 烧录到tf卡,
注:本固件下载地址:https://github.com/ophub/amlogic-s9xxx-armbian/releases
1.2.将镜像文件写入TF卡(TF卡最好大于8g)
在windows上用DiskGenius将TF卡分区格式化
首先在DiskGenius左方框中选择要分区的TF卡,要选正确、要选正确、要选正确(重要的事提醒三次),
右键点击,弹出菜单,选择“快速分区”,在弹出的快速分区框,选择分区类型:MBR;选择分区数目:自定义1个分区;
在右上方的高级设置选FAT32,然后点击“确定”按钮。等到完成后,关闭DiskGenius。
打开Win32DiskImager,这时头上方的“设备”栏里有TF卡的盘符(如果只有一个TF卡插在电脑上,只要显示盘符就可以不管,
否则要选正确的盘符)。点击“映像文件”栏右边的文件夹符号,选择要写进tf卡的img文件,文件选好后,
“任务进度”条下面的“写入”按钮可见,点击“写入”按钮,开始写入,等到写完时会弹出“写入完成”框,点击“OK”按钮,退出Win32DiskImager。
1.3.启动armbian
将TF卡插入AM40前面面板右下角的的TF卡槽里,插上网线、电源线,按下电源开关。
打开浏览器,登录路由器的管理页面,查看新增的设备名称:armbian及其IP地址。
打开PuTTY软件,并在地址栏输入armbian的IP地址,点击打开
在login as:输入:root
输入密码:1234
显示:
Create root password:
输入: 67773240
显示
Retype new password:
输入:67773240
显示
1) bash
2) zsh
输入:1
显示
Please provide a username (eg. your first name):
输入:cqzhangjunhua
显示
Create user (cqzhangjunhua) password:
输入:67773240
显示
Retype new password:
输入:67773240
显示
Detected timezone: Asia/Shanghai
Set user language based on your location? [Y/n]
输入:y
显示
At your location, more locales are possible:
1) bo_CN 3) zh_CN.UTF-8
2) ug_CN 4) Skip generating locales
输入:3
显示
_ _ _ ___ ___
/_\ _ _ _ __ | |__(_)__ _ _ _ / _ \/ __|
/ _ \| '_| ' \| '_ \ / _` | ' \ | (_) \__ \
/_/ \_\_| |_|_|_|_.__/_\__,_|_||_| \___/|___/
v24.11.0 for RK.Smart-Am40 running Armbian Linux 6.1.112-ophub
Packages: Debian stable (bookworm)
IP addresses: (LAN) 192.168.5.74
Performance:
Load: 13% Up time: 4 min
Memory usage: 5% of 3.77G
CPU temp: 28°C Usage of /: 12% of 15G
Commands:
System config : sudo armbian-config
System monitor : htop
root@armbian:~#
完成
armbian-apt
输入:3
apt update
apt upgrade
1.4. 连接无线网络、设置有线网卡和无线网卡的IP地址为静态IP
输入
armbian-config
选择:Network
选择:WiFi
在显示的wifi列表中选择一个wifi
输入登录此wifi的密码:
点击<OK>
在wifi列表框里,被选中的wifi名字前有 * ,则表示连接wifi成功,然后退出。
选择:IP
选择:eth0
选择:<Static>
在弹出的设置框里按照以下输入
Address: 192.168.5.160
Netmask: 255.255.255.0
Gateway: 192.168.5.1
DNS:192.168.5.1
点击<OK>
当看到路由器里armbian的有线地址变成192.168.5.160
关闭PuTTY,用IP192.168.5.160重新登录PuTTY
用同样方法,将无线网卡wlan0的IP地址,设置为静态IP: 192.168.5.88
二. 安装moOde
2.1 修改系统源
nano /etc/apt/sources.list
将原来的内容用#注释掉,把以下内容添加到文件尾部
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
保存退出
nano编辑软件保存方法:ctl+o, enter, ctl+x
nano /etc/hosts
把以下内容添加到文件尾部
20.205.243.166 github.com
140.82.116.4 github.com
140.82.116.3 github.com
保存退出
2.2. 添加 armbian 源
wget https://apt.armbian.com/armbian.key -O key
gpg --dearmor < key | tee /usr/share/keyrings/armbian.gpg > /dev/null
chmod go+r /usr/share/keyrings/armbian.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/armbian.gpg] http://apt.armbian.com $(lsb_release -cs) main $(lsb_release -cs)-utils $(lsb_release -cs)-desktop" | tee /etc/apt/sources.list.d/armbian.list
2.3.添加moOde-player源
wget https://dl.cloudsmith.io/public/moodeaudio/m8y/setup.deb.sh
chmod +x setup.deb.sh
./setup.deb.sh
如果显示
Executing the setup script for the 'moodeaudio/m8y' repository ...
OK: Checking for required executable 'curl' ...
OK: Checking for required executable 'apt-get' ...
OK: Detecting your OS distribution and release using system methods ...
^^^^: ... Detected/provided for your OS/distribution, version and architecture:
>>>>:
>>>>: ... distro=debian version=12 codename=bookworm arch=aarch64
>>>>:
NOPE: Checking for apt dependency 'apt-transport-https' ...
NOPE: Updating apt repository metadata cache ...
Failed to update via apt-get update
E: Type '$deb' is not known on line 1 in source list /etc/apt/sources.list
E: The list of sources could not be read.
^^^^: ... Failed to update via apt-get update - Context above (maybe no packages?).
!!!!: Oh no, your setup failed! :-( ... But we might be able to help. :-)
!!!!:
!!!!: You can contact moodeaudio for further assistance.
!!!!:
!!!!: URL: https://github.com/moode-player
!!!!:
则表示无法连接到 https://github.com
只好在其他时间在试
必须要等到显示以下内容
root@armbian:~# ./setup.deb.sh
Executing the setup script for the 'moodeaudio/m8y' repository ...
OK: Checking for required executable 'curl' ...
OK: Checking for required executable 'apt-get' ...
OK: Detecting your OS distribution and release using system methods ...
^^^^: ... Detected/provided for your OS/distribution, version and architecture:
>>>>:
>>>>: ... distro=debian version=12 codename=bookworm arch=aarch64
>>>>:
NOPE: Checking for apt dependency 'apt-transport-https' ...
OK: Updating apt repository metadata cache ...
OK: Attempting to install 'apt-transport-https' ...
OK: Checking for apt dependency 'ca-certificates' ...
OK: Checking for apt dependency 'gnupg' ...
OK: Checking for apt signed-by key support ...
OK: Importing 'moodeaudio/m8y' repository GPG keys ...
OK: Checking if upstream install config is OK ...
OK: Installing 'moodeaudio/m8y' repository via apt ...
OK: Updating apt repository metadata cache ...
OK: The repository has been installed successfully - You're ready to rock!
下面继续
nano /etc/apt/sources.list.d/moodeaudio-m8y.list
将原有内容用#注释掉
添加以下内容
deb [signed-by=/usr/share/keyrings/moodeaudio-m8y-archive-keyring.gpg] https://dl.cloudsmith.io/public/moodeaudio/m8y/deb/raspbian bookworm main
deb-src [signed-by=/usr/share/keyrings/moodeaudio-m8y-archive-keyring.gpg] https://dl.cloudsmith.io/public/moodeaudio/m8y/deb/raspbian bookworm main
保存退出
2.4. 添加upmpdcli源
2.4.1. 添加秘钥
cd /usr/share/keyrings
wget https://www.lesbonscomptes.com/pages/lesbonscomptes.gpg
2.4.2. 添加源列表
cd /etc/apt/sources.list.d
wget https://www.lesbonscomptes.com/upmpdcli/pages/upmpdcli-rbookworm.list
2.5. 添加raspberrypi源
cd /usr/share/keyrings
wget https://archive.raspberrypi.org/debian/raspberrypi.gpg.key
cd /etc/apt/sources.list.d
nano /etc/apt/sources.list.d/raspi.list
添加以下内容
deb [signed-by=/usr/share/keyrings/raspberrypi.gpg.key] https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bookworm main untested
保存退出
apt update
上传moode-player_9.0.0-1moode1~pre1_all.deb文件到/home
cd /home
apt install -y ./moode-player_9.0.0-1moode1_pre1_all.deb
apt install -y ./moode-player_9.0.0-1moode1_pre6_all.deb
注:moode-player_9.0.0-1moode1_pre1_all.deb的
下载地址:https://cloudsmith.io/~moodeaudio/repos/m8y/packages/
如果出现bluez-firmware安装错误,执行下面命令
dpkg -i --force-overwrite /var/cache/apt/archives/bluez-firmware_1.2-4+rpt10_all.deb
注意根据实际情况填写文件的-4+rpt10_all.deb部分
继续安装
apt install -f
最后显示
Setting up moode-player (9.0.0-1moode1~pre1) ...
** Basic optimizations
/var/lib/dpkg/info/moode-player.postinst: line 57: dphys-swapfile: command not found
/var/lib/dpkg/info/moode-player.postinst: line 58: dphys-swapfile: command not found
** Systemd enable/disable
** Create MPD runtime environment
** Set permissions for D-Bus (for bluez-alsa)
** Set permissions for triggerhappy (to execute ALSA commands)
** Create symlinks
** Create logfiles
** Set permissions
** Create database
GnuTLS: The TLS connection was non-properly terminated.
Unable to establish SSL connection.
Traceback (most recent call last):
File "/var/www/util/station_manager.py", line 749, in <module>
check_result = mgnr.check_env(args.do_import or args.do_diff, args.logopath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/www/util/station_manager.py", line 129, in check_env
return_code = self.check_backup(return_code)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/www/util/station_manager.py", line 144, in check_backup
with ZipFile(self.backup_file, 'r') as backup:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/zipfile.py", line 1302, in __init__
self._RealGetContents()
File "/usr/lib/python3.11/zipfile.py", line 1369, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
** Initial permissions for certain files. These also get set during moOde Worker startup
** Establish permissions
** Generate alsaequal binary
** Misc deletes
** Set permissions for pam and sudoers drop files
** Setup config files
sed: can't read /etc/X11/Xwrapper.config: No such file or directory
moode-player install finished, please reboot
Setting up chromium-browser (1:129.0.6668.100-1~deb12u1+rpt1) ...
Processing triggers for php8.2-cli (8.2.24-1~deb12u1) ...
Processing triggers for dictionaries-common (1.29.5) ...
Processing triggers for php8.2-fpm (8.2.24-1~deb12u1) ...
Processing triggers for libc-bin (2.36-9+deb12u8) ...
root@armbian:/home#
这表示安装完成,需要重启系统
reboot
重新登录
在电脑端的浏览器地址栏输入:192.168.5.160
当弹出Armbian Player网页时,点击右上角的m菜单,选择Configure,
弹出 Configuration Setting 网页,点击 Audio
弹出 Audio 网页
这才表示moOde安装完成。
|
|