Difference between revisions of "APITestPage"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[NanoPC-T6 Armbian Installation Guide|English]]
 
==介绍==
 
这是一份简单指南,指引如何在NanoPC-T6上安装Armbian,通过SPI Nor Flash和NVME SSD引导,包含如下内容:
 
* 擦除SPI Nor Flash和eMMC
 
* 烧录BootLoader到SPI Nor Flash
 
* 从NVME引导Armbian系统
 
  
==前提条件==
+
{{RockchipUnbrick|NanoPC-T4}}
在开始之前,请确保你具备以下条件:
+
* 一块有SPI Nor Flash的NanoPC T6开发板
+
* 一条USB-C数据线
+
* 一块NVMe SSD固态硬盘
+
* 一台运行Windows的PC
+
 
+
==下载所需文件==
+
* 获取所需工具:访问[https://dl.friendlyelec.com/nanopct6 这里],在 "05_Tools" 目录中找到"RKDevTool_v3.19_for_window.zip"和"win32diskimager.rar"
+
* 获取Armbian固件: 访问[https://www.armbian.com/nanopct6/ 这里],下载Armbian的固件文件,本文使用的固件解压后的文件名为 "Armbian_community_24.8.0-trunk.36_Nanopct6_noble_vendor_6.1.43_gnome-oibaf_desktop.img"
+
* 获取RK3588 loader与SPI Images: 访问[http://112.124.9.243/dvdfiles/RK3588/tools/ 这里],下载 "MiniLoaderAll.bin" 和 "rkspi_loader.img.zip"
+
所有步骤目前仅适用于 Windows 系统,下载下来的文件是压缩包的,均需要解压缩。
+
 
+
==烧写步骤==
+
===设置NanoPC-T6为Maskrom模式===
+
* 通电状态下,按住mask键,再短按reset键
+
* 使用USB Type-C线将NanoPC-T6与电脑相连接
+
* 在电脑上启动RKDevTool,界面上应显示“Found One MASKROM Device”,如下图所示:
+
[[File:Rkdevtool_found_one_maskrom_device.png|frameless|600px]]
+
===擦除SPI Nor Flash和eMMC===
+
拨出开发板上的SD卡(如果有的话),为了避免存储内有残余的引导数据干扰引导,我们对SPI Nor Flash和eMMC作一次擦除动作 (可选),方法如下:
+
* 在RKDevTool界面上点击 "Advanced Function" 选项
+
* 先在 "Boot" 编辑框中选择 "MiniLoaderAll.bin",然后点击 "Download" 按钮
+
* 选中 "EMMC",点 "Switch Storage",再点击 "ErashAll" 按钮擦除 eMMC
+
[[File:Rkdevtool_erase_emmc.png|frameless|600px]]
+
* 选中 "SPINOR", 点 "Switch Storage",再点击 "ErashAll" 按钮擦除 SPI Nor Flash
+
[[File:Rkdevtool_erase_spinorflash.png|frameless|600px]]
+
 
+
===烧写bootloader到SPI Nor Flash===
+
参考如下示范图片,在RKDevTool界面上设置烧写的内容:<br/>
+
[[File:Rkdevtool_flash_spinor.png|frameless|600px]]<br/>
+
可以在界面上右击,选择"Load Config",选择"friendlyelec-spinor-config.cfg"加载预设的设置,然后钩选"Write by Address", 最后点击"Run"按钮。
+
 
+
===烧写bootloader到SPI Nor Flash===
+
在继续之前,让我们使用 BalenaEtcher 将 Armbian 刷写到 SD 卡上。请按照以下步骤操作:
+
# 打开 BalenaEtcher。
+
# 选择你之前下载的 Armbian 镜像。
+
[[File:balenaetcher-screen.png|thumb|center|801x507px]]
+
刷写后,请记住将 SD 卡从你的 PC 上断开,然后插入 NanoPC T6。
+
 
+
以下是默认的登录凭据:
+
 
+
{| class="wikitable"
+
! 用户名 !! 密码
+
|-
+
| root || 1234
+
|}
+
 
+
=== 从 NanoPC 刷写 NvME 驱动器 ===
+
现在你已经进入了你的 NanoPC,你需要直接在 NanoPC 上下载操作系统。你可以从互联网下载,也可以使用 SFTP 传输之前下载的文件。记住,一旦你将操作系统加载到 NvME 驱动器上,你需要重置之前更改的密码。
+
 
+
要继续加载镜像,请执行以下命令:
+
<syntaxhighlight lang="bash">
+
xz -dc Armbian_community_24.5.0-trunk.433_Nanopct6_bookworm_edge_6.8.7_minimal.img.xz | dd of=/dev/nvme0n1 bs=4k status=progress && sync
+
</syntaxhighlight>
+
完成后,执行命令
+
<syntaxhighlight lang="bash">
+
shutdown -h now
+
</syntaxhighlight>
+
等待 LED 停止闪烁,然后继续移除 SD 卡。
+
 
+
== 安装 Proxmox ==
+
要安装 Proxmox,你需要配置一个静态 IP。建议仅安装“标准”软件包选择,因为 Proxmox VE 包含自己的 qemu 和 lxc 包。不需要桌面环境。
+
 
+
=== 配置主机名和 IP ===
+
在 /etc/hosts 中为你的 IP 地址添加一个条目,确保你的机器的主机名是可解析的。移除默认条目 127.0.1.1。
+
 
+
示例 /etc/hosts 配置:
+
<syntaxhighlight lang="text">
+
127.0.0.1      localhost.localdomain localhost
+
192.168.15.77  prox4m1.proxmox.com prox4m1
+
 
+
# IPv6 行(可选)
+
::1            localhost ip6-localhost ip6-loopback
+
ff02::1        ip6-allnodes
+
ff02::2        ip6-allrouters
+
</syntaxhighlight>
+
使用以下命令验证设置:
+
<syntaxhighlight lang="bash">
+
hostname --ip-address
+
</syntaxhighlight>
+
应返回你的 IP 地址。
+
 
+
=== 安装 Proxmox VE ===
+
添加 Proxmox VE 仓库:
+
<syntaxhighlight lang="bash">
+
echo 'deb [arch=arm64] https://mirrors.apqa.cn/proxmox/debian/pve bookworm port' > /etc/apt/sources.list.d/pveport.list
+
</syntaxhighlight>
+
 
+
添加仓库密钥:
+
<syntaxhighlight lang="bash">
+
curl -L https://mirrors.apqa.cn/proxmox/debian/pveport.gpg -o /etc/apt/trusted.gpg.d/pveport.gpg
+
</syntaxhighlight>
+
 
+
更新仓库和系统:
+
<syntaxhighlight lang="bash">
+
apt update && apt full-upgrade
+
</syntaxhighlight>
+
 
+
安装 Proxmox VE 包和依赖项:
+
<syntaxhighlight lang="bash">
+
apt install ifupdown2 proxmox-ve postfix open-iscsi
+
</syntaxhighlight>
+
 
+
在安装过程中根据你的偏好配置软件包,特别是用于邮件路由的 postfix。如果不确定,请选择 postfix 配置的 local only。
+
 
+
安装后,通过 https://youripaddress:8006 访问管理 Web 界面。如果遇到 ifupdown2 错误,运行以下命令:
+
<syntaxhighlight lang="bash">
+
systemctl enable --now networking.service
+
</syntaxhighlight>
+
然后重试:
+
<syntaxhighlight lang="bash">
+
apt install ifupdown2
+
</syntaxhighlight>
+
你应该不再收到错误。
+
 
+
== 结论 ==
+
完成了,你已经在你的 NanoPC T6 上安装了 Proxmox。下面附上所有有用的链接,以跟踪此移植的开发状态。
+

Latest revision as of 09:23, 4 June 2024

1 Unbricking Method

If the ROM is not installed correctly, causing the development board to become bricked, and you might not have the opportunity to reinstall the ROM via an SD card, you need to enter Maskrom mode to unbrick it by erasing the storage device.

1.1 Windows Users

1.1.1 Download Required Files

  • Get the necessary tools: Visit here, find RKDevTool_v3.19_for_window.zip and DriverAssitant_v5.12.zip in the 05_Tools directory, and download them to your local machine.
  • Install Rockchip USB driver and RKDevTool: Extract DriverAssitant_v5.12.zip to install the Rockchip USB driver, and extract RKDevTool_v3.19_for_window.zip to obtain the Rockchip flashing tool RKDevTool.
  • Get the loader: Visit here, enter the tools directory corresponding to your CPU model, and download MiniLoaderAll.bin.

1.1.2 Enter Maskrom Mode to Erase the Storage Device

  • Connect NanoPC-T4 to your computer using a USB data cable.
  • Start RKDevTool on your computer.
  • Disconnect the power from NanoPC-T4, hold down the MASK button, connect the power, and release the button when you see Found One MASKROM Device displayed at the bottom of the interface, as shown below:

Rkdevtool found one maskrom device.png

  • Click the Advanced Function tab in the RKDevTool interface.
  • In the Boot text box, select MiniLoaderAll.bin, then click the Download button.
  • Select EMMC, click Switch Storage, then click the EraseAll button to erase the eMMC.

Rkdevtool erase emmc.png

  • At this point, NanoPC-T4 is restored to its initial state and can be normally booted via SD card or eMMC.

1.2 Linux/Mac Users

1.2.1 Download the Required Files

  • Get the necessary tools: Visit here and find upgrade_tool_v2.30_for_linux.tgz (or for Mac users, select upgrade_tool_v2.25_for_mac.tgz) in the 05_Tools directory and download it locally.
  • Get the loader: Visit here, enter the tools directory corresponding to your CPU model, and download MiniLoaderAll.bin.

1.2.2 Installation for upgrade_tool

The following commands are for Linux, with only slight differences in file and directory names for Mac users:

tar xzf upgrade_tool_v2.30_for_linux.tgz
cd upgrade_tool_v2.30_for_linux
sudo cp upgrade_tool /usr/local/sbin/
sudo chmod 755 /usr/local/sbin/upgrade_tool

1.2.3 Enter Maskrom Mode to Erase the Storage Device

  • Connect NanoPC-T4 to the computer using a USB data cable.
  • Disconnect the power from NanoPC-T4, hold down the MASK button, connect the power, and release the button after 4 seconds.
  • Check the connection with the following command:
upgrade_tool LD

A result similar to "DevNo=1 Vid=0x2207,Pid=0x350b,LocationID=13 Mode=Maskrom SerialNo=" indicates that the device has been detected.

  • Erase the eMMC with the following command:
upgrade_tool EF MiniLoaderAll.bin
  • At this point, NanoPC-T4 has been restored to its initial state and can boot the system normally via SD card or eMMC.