From f7fb8b986c6a6d231399c7fd59f04f9a1eed2b14 Mon Sep 17 00:00:00 2001 From: carbon Date: Mon, 24 Feb 2025 16:21:10 +0800 Subject: [PATCH] docs: megrez fix the no npu dtb url --- docs/megrez/getting-started/setup.md | 36 +++++++++++++++++-- .../current/megrez/getting-started/setup.md | 36 +++++++++++++++++-- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/docs/megrez/getting-started/setup.md b/docs/megrez/getting-started/setup.md index b19461fe..50ae7f26 100644 --- a/docs/megrez/getting-started/setup.md +++ b/docs/megrez/getting-started/setup.md @@ -59,8 +59,9 @@ Releasing the memory used by the NPU will cause the loss of the NPU and related ### Replace the device tree -Download the dtb file: -[eic7700-milkv-megrez-no-npu.dtb](https://github.com/milkv-megrez/megrez-files/blob/main/software/dtb/eic7700-milkv-megrez-no-npu.dtb?raw=true) +Download the dtb file (download the corresponding dtb file according to the system image version you use): + +[eic7700-milkv-megrez-no-npu.dtb](https://github.com/milkv-megrez/megrez-build/releases/) Back up the dtb file used by the original system: ``` @@ -85,3 +86,34 @@ $ free -h Mem: 15Gi 858Mi 14Gi 10Mi 764Mi 14Gi Swap: 0B 0B 0B ``` + +### A one-time temporary method + +If you only need to temporarily test and release the memory occupied by NPU, you can modify the configuration in u-boot to achieve the convenience. This method requires the use of a serial cable to enter the UART serial console operation. + +After the system is powered on, pay attention to the log information output in the PC serial terminal. After the prompt `Autoboot in 5 seconds` appears, press any key to interrupt the u-boot startup and enter the u-boot command line. (If you have updated u-boot, you need to press the `s` key to enter the u-boot command line) + +Execute the following command: + +``` +=> fdt mmz mmz_nid_0_part_0 0x300000000 0x1000 +``` + +Then enter the `boot` command to start: + +``` +=> boot +``` + +After entering the system, check the memory information and it has become about 16G: + +``` +debian@rockos-eswin:~$ free -h + total used free shared buff/cache available +Mem: 15Gi 472Mi 15Gi 9.3Mi 286Mi 15Gi +Swap: 0B 0B 0B +``` + +:::info +This method is only valid for this startup. After powering on again, the NPU will restore the system's default memory allocation. +::: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/megrez/getting-started/setup.md b/i18n/zh/docusaurus-plugin-content-docs/current/megrez/getting-started/setup.md index b970c3ab..03fdddb1 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/megrez/getting-started/setup.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/megrez/getting-started/setup.md @@ -59,8 +59,9 @@ Swap: 0B 0B 0B ### 替换设备树 -下载该 dtb 文件: -[eic7700-milkv-megrez-no-npu.dtb](https://github.com/milkv-megrez/megrez-files/blob/main/software/dtb/eic7700-milkv-megrez-no-npu.dtb?raw=true) +下载 dtb 文件(根据自己使用的系统镜像版本下载对应的 dtb 文件): + +[eic7700-milkv-megrez-no-npu.dtb](https://github.com/milkv-megrez/megrez-build/releases/) 备份原系统使用的 dtb 文件: ``` @@ -85,3 +86,34 @@ $ free -h Mem: 15Gi 858Mi 14Gi 10Mi 764Mi 14Gi Swap: 0B 0B 0B ``` + +### 临时生效一次的方法 + +如果只需要临时测试释放 NPU 占用的内存,可以通过在 u-boot 修改配置的方便实现。该方法需要使用串口线,进入 UART 串口控制台操作。 + +系统上电后,在 PC 的串口终端中注意输出的日志信息,在出现 `Autoboot in 5 seconds` 提示后,任意键来打断 u-boot 启动,进入 u-boot 的命令行。(如果您更新过 u-boot,需要按 `s` 键来进入 u-boot 的命令行) + +执行以下命令: + +``` +=> fdt mmz mmz_nid_0_part_0 0x300000000 0x1000 +``` + +再输入 `boot` 命令启动: + +``` +=> boot +``` + +进入系统后,查看内存信息,已经变为 16G 左右: + +``` +debian@rockos-eswin:~$ free -h + total used free shared buff/cache available +Mem: 15Gi 472Mi 15Gi 9.3Mi 286Mi 15Gi +Swap: 0B 0B 0B +``` + +:::info +该方法只对本次启动有效,重新上电后 NPU 会恢复系统默认的内存分配。 +:::