-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: install os form nvme using SD card/eMMC as a boot disk #47
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5fee34a
perf: install os form nvme using SD card/eMMC as a boot disk
nascs 2451792
fix: fix error checked by pre-commit
nascs 69c80b1
fix: fix the code style
nascs 7d5c3ab
perf: add radxa rock 3c nvme installation guide
nascs 4510cfa
fix: fix the error checked by pre-commit
nascs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { Image } from "@site/src/utils/docs"; | ||
import { PreView } from "@site/src/utils/docs"; | ||
|
||
### 整体步骤: | ||
|
||
- 准备一张 SD 卡或者 eMMC Module, 充当启动盘 | ||
|
||
- 使用系统工具 rsetup 刷 SPI | ||
|
||
- 将系统镜像刷到 NVME SSD 里面 | ||
|
||
- 拔掉 SD 卡/eMMC Module, 从 NVME 启动 | ||
|
||
### 准备一张 SD 卡或者 eMMC Module, 充当启动盘 | ||
|
||
参考<a href={props.install_os_path}>安装操作系统部分</a>将系统安装在 SD 卡/eMMC Module 当中。 | ||
|
||
这里 SD 卡/eMMC Module 的作用相当于 x86 的启动盘,目的是拿到 spi.img, 将 spi.img 刷到 spi flash 中。 | ||
|
||
从 SD 卡/eMMC Module 启动后,执行一下命令以更新系统: | ||
|
||
``` | ||
sudo apt-get update | ||
sudo apt-get full-upgrade | ||
``` | ||
|
||
### 使用系统工具 rsetup 刷 SPI | ||
|
||
<img | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 图片过大 |
||
src="/img/common/nvme/system_maintenance.webp" | ||
width="700" | ||
height="500" | ||
alt="system maintenance" | ||
/> | ||
|
||
<img | ||
src="/img/common/nvme/update_spi_bootloader.webp" | ||
width="700" | ||
alt="update spi bootloader" | ||
/> | ||
|
||
<Image | ||
src="/img/common/nvme/rsetup-select-bootloader-#model#.webp" | ||
model={props.model} | ||
fallback={props.model} | ||
width="700" | ||
/> | ||
|
||
<img src="/img/common/nvme/writing_mtd.webp" width="700" alt="writing to mtd" /> | ||
|
||
<img src="/img/common/nvme/success.webp" width="700" alt="success" /> | ||
|
||
### 将系统镜像刷到 NVME SSD 里面 | ||
|
||
确认 NVME 是否被系统识别, | ||
|
||
<PreView params={{ model: props.model }}> | ||
{` | ||
radxa@#model#:~$ lsblk | ||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
mmcblk0 179:0 0 14.5G 0 disk | ||
├─mmcblk0p1 179:1 0 16M 0 part /config | ||
└─mmcblk0p2 179:2 0 14.4G 0 part / | ||
mmcblk0boot0 179:32 0 4M 1 disk | ||
mmcblk0boot1 179:64 0 4M 1 disk | ||
zram0 254:0 0 3.8G 0 disk [SWAP] | ||
nvme0n1 259:0 0 238.5G 0 disk | ||
`} | ||
</PreView> | ||
|
||
如上所示系统已经识别到 NVME SSD 即 nvme0n1。 | ||
|
||
将系统镜像拷贝到当前系统下, | ||
|
||
<PreView params={{ model: props.model, release_num: props.release_num }}> | ||
{` | ||
PC Host: scp /path/to/img radxa@boardIP:/home/radxa/ | ||
例如: | ||
scp ~/Download/#model#_debian_bullseye_xfce_#release_num#.img.xz [email protected]:/home/xxa/ | ||
`} | ||
</PreView> | ||
|
||
然后在**板子**上将系统镜像 dd 到 NVME 中。 | ||
|
||
<PreView params={{ model: props.model, release_num: props.release_num }}> | ||
sudo xzcat /home/radxa/#model#_debian_bullseye_xfce_#release_num#.img.xz | dd | ||
of=/dev/nvme0n1 bs=1M status=progress | ||
</PreView> | ||
|
||
### 拔掉 SD 卡/eMMC Module, 从 NVME 启动 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
sidebar_position: 22 | ||
--- | ||
|
||
# 从 NVME 启动系统 | ||
|
||
import NVME from '../../../common/dev/\_nvme.mdx' | ||
|
||
<NVME model="rock-3c" release_num="b42" install_os_path="../getting-started/install-os" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
i18n/en/docusaurus-plugin-content-docs/current/common/dev/_nvme.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { Image } from "@site/src/utils/docs"; | ||
import { PreView } from "@site/src/utils/docs"; | ||
|
||
### Overall steps: | ||
|
||
- Prepare an SD card or eMMC Module as a boot disk. | ||
|
||
- Use the system utility rsetup to flash the SPI. | ||
|
||
- Flush the system image to the NVME SSD. | ||
|
||
- Unplug the SD card/eMMC Module and boot from NVME. | ||
|
||
### Prepare an SD card or eMMC Module as a boot disk. | ||
|
||
Refer to the <a href={props.install_os_path}>Installing the OS section</a> to install the system on the SD card/eMMC Module. | ||
|
||
Here the SD card/eMMC Module acts as a boot disk for x86, the purpose is to get the spi.img, and flush the spi.img to the spi flash. | ||
|
||
After booting from the SD card/eMMC Module, execute the following command to update the system. | ||
|
||
``` | ||
sudo apt-get update | ||
sudo apt-get full-upgrade | ||
``` | ||
|
||
### Use the system utility rsetup to flush the SPI. | ||
|
||
<img | ||
src="/img/common/nvme/system_maintenance.webp" | ||
width="700" | ||
height="500" | ||
alt="system maintenance" | ||
/> | ||
|
||
<img | ||
src="/img/common/nvme/update_spi_bootloader.webp" | ||
width="700" | ||
alt="update spi bootloader" | ||
/> | ||
|
||
<Image | ||
src="/img/common/nvme/rsetup-select-bootloader-#model#.webp" | ||
model={props.model} | ||
fallback={props.model} | ||
width="700" | ||
/> | ||
|
||
<img src="/img/common/nvme/writing_mtd.webp" width="700" alt="writing to mtd" /> | ||
|
||
<img src="/img/common/nvme/success.webp" width="700" alt="success" /> | ||
|
||
### Flashing the system image to the NVME SSD | ||
|
||
Verify that NVME is recognized by the system. | ||
|
||
<PreView params={{ model: props.model }}> | ||
{` | ||
radxa@#model#:~$ lsblk | ||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
mmcblk0 179:0 0 14.5G 0 disk | ||
├─mmcblk0p1 179:1 0 16M 0 part /config | ||
└─mmcblk0p2 179:2 0 14.4G 0 part /config | ||
mmcblk0boot0 179:32 0 4M 1 disk | ||
mmcblk0boot1 179:64 0 4M 1 disk | ||
zram0 254:0 0 3.8G 0 disk [SWAP] | ||
nvme0n1 259:0 0 238.5G 0 disk | ||
`} | ||
</PreView> | ||
|
||
As shown above the system has recognized the NVME SSD as nvme0n1. | ||
|
||
Copy the system image to the current system. | ||
|
||
<PreView params={{ model: props.model, release_num: props.release_num }}> | ||
{` | ||
PC Host: scp /path/to/img radxa@boardIP:/home/radxa/ | ||
Example: | ||
scp ~/Download/#model#_debian_bullseye_xfce_#release_num#.img.xz [email protected]:/home/xxa/ | ||
`} | ||
</PreView> | ||
|
||
Then dd the system image into NVME on the **board**. | ||
|
||
<PreView params={{ model: props.model, release_num: props.release_num }}> | ||
sudo xzcat /home/radxa/#model#_debian_bullseye_xfce_#release_num#.img.xz | dd | ||
of=/dev/nvme0n1 bs=1M status=progress | ||
</PreView> | ||
|
||
### Unplug SD card/eMMC Module, boot from NVME |
9 changes: 9 additions & 0 deletions
9
...us-plugin-content-docs/current/rock3/rock3c/low-level-dev/install-os-on-nvme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
sidebar_position: 22 | ||
--- | ||
|
||
# Boot the system from NVME | ||
|
||
import NVME from '../../../common/dev/\_nvme.mdx' | ||
|
||
<NVME model="rock-3c" release_num="b42" install_os_path="../getting-started/install-os" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eMMC => eMMC Module