Skip to content

Commit eed8d21

Browse files
committed
Update build instructions
Closes radxa-repo#29
1 parent 116f953 commit eed8d21

File tree

6 files changed

+393
-5
lines changed

6 files changed

+393
-5
lines changed

.github/workflows/docs.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
uses: peaceiris/actions-mdbook@v1
3131
with:
3232
mdbook-version: 'latest'
33+
- name: Set suite based on input variables
34+
shell: bash
35+
run: |
36+
cargo install mdbook-admonish
3337
- name: Build
3438
run: mdbook build
3539
- name: Setup Pages

book.toml

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,11 @@ title = "rbuild"
77

88
[output.html]
99
git-repository-url = "https://github.com/radxa-repo/rbuild/tree/main"
10-
edit-url-template = "https://github.com/radxa-repo/rbuild/edit/main/{path}"
10+
edit-url-template = "https://github.com/radxa-repo/rbuild/edit/main/{path}"
11+
additional-css = ["./theme/css/mdbook-admonish.css"]
12+
13+
[preprocessor]
14+
15+
[preprocessor.admonish]
16+
command = "mdbook-admonish"
17+
assets_version = "2.0.2" # do not edit: managed by `mdbook-admonish install`

docs/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- [Set some arguments as default on](dev/config.md)
1111
- [Use apt mirrors to speed up build](dev/mirror.md)
1212
- [Use locally built kernel and firmware](dev/bsp.md)
13+
- [About Ubuntu](dev/ubuntu.md)
1314

1415
# Create Release
1516

docs/dev/ubuntu.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# About Ubuntu
2+
3+
## Current status
4+
5+
While Ubuntu is a build target for `rbuild`, it is not officially supported by Radxa for use on our products. The reason is multifold:
6+
7+
1. Starting from Ubuntu 21.10, all of its packages are [compressed with Zstd](https://www.phoronix.com/news/Ubuntu-21.10-Zstd-Debs). We are currently using [the official Debos docker image](https://hub.docker.com/r/godebos/debos), which is based on Debian, and does not support Zstd compressed package. Attempts to create an Ubuntu based docker image are [getting](https://github.com/go-debos/debos/issues/9) [nowhere](https://github.com/go-debos/debos/issues/314), so currently one has to both use Ubuntu as the build host and disable the container build for `rbuild` to work, which greatly limits the developer's choice of OS and build reproducibility.
8+
9+
2. Rockchip only provides Debian SDK, and for some dependencies the package names and/or versions are different between Debian and Ubuntu, meaning they cannot be installed as-is. This cannot be simply fixed by changing the control file pointing to a different package, as packaged binaries are hardcoded to some specific version of dynamic libraries, and there might be incompatible ABI changes between the two OS. Recompilation and repackaging are required to properly fix this issue, but they can be time-consuming, and sometimes the necessary code for those is not available.
10+
11+
For those reasons, Radxa has historically only provided the Ubuntu CLI image with no vendor hardware enablement packages. With the release of `rbuild`, we now dropped Ubuntu CLI as an officially supported system entirely, and recommend our users to use Debian CLI instead. The only exception is that some users want to run ROS on our products, which requires Ubuntu.
12+
13+
## Build Ubuntu
14+
15+
To build Ubuntu, there are additional requirements beyond what was listed in [Build your first image](first_image.md):
16+
17+
1. The host should run Ubuntu.
18+
2. The host Ubuntu version should be greater or equal to the version you plan to build.
19+
3. You should install `debos` on your system: `sudo apt-get update && sudo apt-get install -y debos`.
20+
4. Replace any `./rbuild` command with `sudo ./rbuild --native-build` like what we did in our [GitHub Action](https://github.com/radxa-repo/rbuild/blob/main/action.yaml#L78) (which runs on Ubuntu runner).

docs/first_image.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Install dependencies
44

5-
Currently, due to our dependency on [`debos`](https://github.com/go-debos/debos/issues/363), we can only run `rbuild` on x86 based system. If you are building in a virtual machine, we suggest you [enable nested virtualization](https://github.com/radxa-repo/rbuild/issues/16#issuecomment-1534176754).
5+
Currently, due to our dependency on [`debos`](https://github.com/go-debos/debos/issues/363), we can only run `rbuild` on x86 based system. If you are building in a virtual machine, you need to [enable nested virtualization](https://github.com/radxa-repo/rbuild/issues/16#issuecomment-1534176754), as KVM is required for building the image.
66

77
### Debian 12 / Ubuntu 22.04
88

@@ -17,9 +17,6 @@ sudo touch /etc/containers/nodocker
1717
#sudo apt install -y docker.io
1818
#sudo adduser $USER docker
1919
#sudo reboot
20-
21-
# For Ubuntu user you can also install `debos` package for building Ubuntu image
22-
sudo apt install -y debos
2320
```
2421

2522
## Check out the code
@@ -47,3 +44,9 @@ Most options listed in the help messages are targetting at developers. If you on
4744
```
4845

4946
Supported products, suites, and flavors are listed at the end of the help message.
47+
48+
```admonish
49+
Radxa supports and recommends Debian on all Radxa products.
50+
51+
Building Ubuntu requires [special instruction](dev/ubuntu.md).
52+
```

0 commit comments

Comments
 (0)