Skip to content

Commit

Permalink
docs: split buildimage.md
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeChenL committed Apr 12, 2024
1 parent b96de0e commit 5b99a4e
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 152 deletions.
3 changes: 2 additions & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
50 changes: 50 additions & 0 deletions docs/cmd/rsdk-build.md
Original file line number Diff line number Diff line change
@@ -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 <options> [product] <suite> <edition>

## 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
```
4 changes: 4 additions & 0 deletions docs/cmd/rsdk-shell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# `rsdk shell`

Please run `rsdk shell` before performing any operations.
This will automate the development environment configuration.
151 changes: 0 additions & 151 deletions docs/tutorials/buildimage.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/tutorials/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
55 changes: 55 additions & 0 deletions docs/tutorials/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 │
│ │
<Ok> <Cancel>
│ │
└───────────────────────────────────────────┘
```
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 ▒ │
│ │
<Ok> <Cancel>
│ │
└───────────────────────────────────────────┘
```
4. Select `Yes` to sure to build Radxa OS image
```bash
┌─────────────────┤ RSDK ├──────────────────┐
│ │
│ Are you sure to build for 'rock-5b-6_1'?
│ │
│ │
<Yes> <No>
│ │
└───────────────────────────────────────────┘
```

0 comments on commit 5b99a4e

Please sign in to comment.