diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 7e6ad41..dd7de6c 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -9,9 +9,10 @@ - [Using released Debian package](install/deb.md) - [Native installation](install/native.md) - [Basic usage](tutorials/usage.md) -- [Build image](tutorials/buildimage.md) - [Migrating from old toolchain](tutorials/migration.md) # Command References - [rsdk](cmd/rsdk.md) +- [rsdk-shell](cmd/rsdk-shell.md) +- [rsdk-build](cmd/rsdk-build.md) diff --git a/docs/cmd/rsdk-build.md b/docs/cmd/rsdk-build.md new file mode 100644 index 0000000..a7d96d3 --- /dev/null +++ b/docs/cmd/rsdk-build.md @@ -0,0 +1,50 @@ +# `rsdk build` + +`rsdk build` can be use to build Radxa OS image. + +## Check CLI help + +```bash +rsdk on  main [?⇡] via  v20.11.1 via ❄️ impure (devenv-shell-env) +⬢ [Docker] ❯ rsdk help build +rsdk-build +==== + +## Command usage + +$ rsdk build [product] + +## Options + +--no-cache + Do not use cached build artifacts. This will result in rootfs rebuild. +--no-efi + Do not create EFI partition in the generated image. +-d | --debug + Enable debug output. This will also build rootfs into a folder for easier + examination. +-T | --test-repo + Build using Radxa APT test archives. +-m | --mirror [mirror_url] + Specify custom Debian / Ubuntu archive mirror URL. +-M [mirror_url] + Specify custom non-Debian non-Ubuntu archive mirror URL. This mirror should + serve both Radxa archives as well as any other 3rd party archives. + + The following archives will use this mirror: + radxa + vscodium +-i | --image-name [image_name] + Set the system image name. (Default: output.img) +-h | --help + Show this message. + +``` + +## Build Radxa OS image + +Using ROCK 3C as an example, if you want to build a KDE edition Radxa OS image for Debian bullseye, you can run the following commands. + +```bash +rsdk build rock-3c bullseye kde +``` diff --git a/docs/cmd/rsdk-shell.md b/docs/cmd/rsdk-shell.md new file mode 100644 index 0000000..ded8332 --- /dev/null +++ b/docs/cmd/rsdk-shell.md @@ -0,0 +1,4 @@ +# `rsdk shell` + +Please run `rsdk shell` before performing any operations. +This will automate the development environment configuration. diff --git a/docs/tutorials/buildimage.md b/docs/tutorials/buildimage.md deleted file mode 100644 index 06bc7c3..0000000 --- a/docs/tutorials/buildimage.md +++ /dev/null @@ -1,151 +0,0 @@ -# How to build a Radxa OS image by RSDK - -## Enter RSDK development environment - -```bash -rsdk shell -``` - -## Build Radxa OS image - -RSDK provides both TUI and CLI methods to build Radxa OS image - -### Use TUI - -1. Enter TUI - -```bash -rsdk -``` - -2. Select `Build system image` - -```bash -┌─────────────────┤ RSDK ├──────────────────┐ -│ Please select a task: │ -│ │ -│ Build system image │ -│ ========= │ -│ About │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -└───────────────────────────────────────────┘ -``` - -3. Select which product you want to compile an image for - -```bash -┌─────────────────┤ RSDK ├──────────────────┐ -│ Please select a product: │ -│ │ -│ ( ) radxa-cm3i-io │ -│ ( ) radxa-e25 ▒ │ -│ ( ) rock-3a ▒ │ -│ ( ) rock-3b ▒ │ -│ ( ) radxa-cm5-io-6_1 ▒ │ -│ ( ) radxa-cm5-io ▒ │ -│ ( ) radxa-cm5-rpi-cm4-io ▒ │ -│ ( ) radxa-nx5-io ▒ │ -│ ( ) rock-5a ▒ │ -│ ( ) rock-5b-plus ▒ │ -│ (*) rock-5b-6_1 ▒ │ -│ ( ) rock-5b ▒ │ -│ ( ) rock-5c │ -│ ( ) rock-5-itx │ -│ │ -│ │ -│ │ -│ │ -└───────────────────────────────────────────┘ -``` - -4. Select `Yes` to sure to build Radxa OS image - -```bash -┌─────────────────┤ RSDK ├──────────────────┐ -│ │ -│ Are you sure to build for 'rock-5b-6_1'? │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -│ │ -└───────────────────────────────────────────┘ -``` - -### Use CLI - -1. Check CLI help - -```bash -rsdk on  main [?⇡] via  v20.11.1 via ❄️ impure (devenv-shell-env) -⬢ [Docker] ❯ rsdk help build -rsdk-build -==== - -## Command usage - -$ rsdk build [product] - -## Options - ---no-cache - Do not use cached build artifacts. This will result in rootfs rebuild. ---no-efi - Do not create EFI partition in the generated image. --d | --debug - Enable debug output. This will also build rootfs into a folder for easier - examination. --T | --test-repo - Build using Radxa APT test archives. --m | --mirror [mirror_url] - Specify custom Debian / Ubuntu archive mirror URL. --M [mirror_url] - Specify custom non-Debian non-Ubuntu archive mirror URL. This mirror should - serve both Radxa archives as well as any other 3rd party archives. - - The following archives will use this mirror: - radxa - vscodium --i | --image-name [image_name] - Set the system image name. (Default: output.img) --h | --help - Show this message. - -``` - -2. Using ROCK 3C as an example, if you want to build a KDE edition Radxa OS image for Debian bullseye, you can run the following commands. - -```bash -rsdk build rock-3c bullseye kde -``` - -## Radxa OS image save path - -Using ROCK 3C as an example, you can find in `out/rock-3c_bullseye_kde/output.img`. diff --git a/docs/tutorials/migration.md b/docs/tutorials/migration.md index 5ec91ed..735a21e 100644 --- a/docs/tutorials/migration.md +++ b/docs/tutorials/migration.md @@ -25,3 +25,7 @@ This subcommand is no longer needed, as now image shrinking is no longer a root `rsdk write-image` is the `rbuild write-image` replacement. It uses the same argument ordering. + +## Radxa OS image save path + +Using ROCK 3C as an example, you can find in `out/rock-3c_bullseye_kde/output.img`. diff --git a/docs/tutorials/usage.md b/docs/tutorials/usage.md index 4abae9a..d75b13b 100644 --- a/docs/tutorials/usage.md +++ b/docs/tutorials/usage.md @@ -7,3 +7,58 @@ After typing `rsdk` into your terminal, if there is no subcommand suggestion aft From there, you can use autocompletion to query the supported command list. Running `rsdk help` command will display its help text. + +# Use TUI + +`rsdk` command is the common CLI entry point. + +When it was run without any argument, it will run `rsdk-tui` instead. + +1. Enter TUI + +```bash +rsdk +``` + +2. Select `Build system image` + +```bash +┌─────────────────┤ RSDK ├──────────────────┐ +│ Please select a task: │ +│ │ +│ Build system image │ +│ ========= │ +│ About │ +│ │ +│ │ +│ │ +└───────────────────────────────────────────┘ +``` + +3. Select which product you want to compile an image for + +```bash +┌─────────────────┤ RSDK ├──────────────────┐ +│ Please select a product: │ +│ │ +│ ( ) radxa-e25 ▒ │ +│ (*) rock-5b-6_1 ▒ │ +│ ( ) rock-5b ▒ │ +│ │ +│ │ +│ │ +└───────────────────────────────────────────┘ +``` + +4. Select `Yes` to sure to build Radxa OS image + +```bash +┌─────────────────┤ RSDK ├──────────────────┐ +│ │ +│ Are you sure to build for 'rock-5b-6_1'? │ +│ │ +│ │ +│ │ +│ │ +└───────────────────────────────────────────┘ +```