Skip to content

Commit

Permalink
docs: megrez fix the no npu dtb url
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonfix committed Feb 24, 2025
1 parent 861a9f0 commit f7fb8b9
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 4 deletions.
36 changes: 34 additions & 2 deletions docs/megrez/getting-started/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
```
Expand All @@ -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.
:::
Original file line number Diff line number Diff line change
Expand Up @@ -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 文件:
```
Expand All @@ -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 会恢复系统默认的内存分配。
:::

0 comments on commit f7fb8b9

Please sign in to comment.