commit c6f89651ce47051111e4e0acde13350f020d6b08a2e10f47e111b1b683aeba6b
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2026-04-05T21:47:34Z |
| subject | Update the docs |
commit c6f89651ce47051111e4e0acde13350f020d6b08a2e10f47e111b1b683aeba6b
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2026-04-05T21:47:34Z
Update the docs
---
README.md | 34 +++++++++++++---------------------
clitools/{README => README.md} | 30 +++++++++++-------------------
docs/ota.md | 6 +++---
docs/vendor-resources.md | 12 ++++++++++++
4 files changed, 39 insertions(+), 43 deletions(-)
diff --git a/README.md b/README.md
index 45b45d5..ae7a42b 100644
--- a/README.md
+++ b/README.md
@@ -8,13 +8,13 @@ https://docs.mono.si/gateway-development-kit/getting-started
* Read-only RootFS
* k8s style OS upgrade (see Upgrading)
-## IMPORTANT NOTES
+## DISCLAIMER
+
* This is not your everyday linux image! It is best suited for users that is already familiar
with k8s. For first-timers, you may want to try the default config that gives you a ready-to-use
- cluster then get yourself started from there
+ cluster and get yourself started from there
- * The 3 RJ45 ports are label in eth1, eth2, eth0 respectively by the kernel (left to right)
- So `ip addr eth0` is your right most port
+ * USE AT YOUR OWN RISKS. I leverage ChatGPT heavily for this.
### Table of Contents
1. Flashing
@@ -26,19 +26,20 @@ https://docs.mono.si/gateway-development-kit/getting-started
- [Install an ssh pod](docs/installing-ssh-pod.md) (Recommended)
## Build
-Find the latest package versions and update build.env
- * [kernel](https://github.com/nxp-qoriq/linux/archive/refs/tags/)
- * [busybox](https://github.com/mirror/busybox/archive/refs/tags/)
- * [CRI-O](https://github.com/cri-o/cri-o/releases)
- * [Kubelet](https://kubernetes.io/releases/download/)
- * [UBoot](https://github.com/u-boot/)
-Then run
+Prerequisites
+* make
+* Docker
+* curl (downloading dependency packages, kubelet, crio, etc)
+* go (building clitools, control-agent)
+ * controller-gen (see [clitools readme](clitools/README.md))
+* git (cloning uboot repo because uboot does not provide direct downloads)
+
```
make release
```
-The default configuration will boot as a first time control-plane. Adjust to your own needs.
+The default configuration will boot as a first time control-plane.
For control-plane
```
@@ -73,12 +74,3 @@ make kernel # Builds our kernel from NXP
make initramfs
make itb # Builds out/board.itb (contains the kernel and the initramfs)
```
-
-## NOTES
-### The device's dts files are located at here
-https://github.com/we-are-mono/OpenWRT-ASK/tree/mono-25.12.0-rc3/target/linux/layerscape/files/arch/arm64/boot/dts/freescale
-* We need both `mono-gateway-dk-sdk.dts` and `mono-gateway-dk.dts` since the sdk one includes the non-sdk one.
-* The actual dts being used is the `mono-gateway-dk-sdk.dts`
-
-## DISCLAIMER
-USE AT YOUR OWN RISKS. I leverage ChatGPT heavily for this.
diff --git a/clitools/README b/clitools/README.md
similarity index 78%
rename from clitools/README
rename to clitools/README.md
index 7d084da..c60ce35 100644
--- a/clitools/README
+++ b/clitools/README.md
@@ -1,30 +1,28 @@
-## For development workflow
-
-For running `controll-gen`
+Installing `controller-gen`
```
export PATH="$(go env GOPATH)/bin:$PATH"
go install sigs.k8s.io/controller-tools/cmd/controller-gen@latest
```
-Run this on device
+## For development workflow
+
+Run this on the gateway device
```bash
while true; do nc -l -p 1234 -e sh; done
```
-Run this script on the dev machine
+Run this script on your dev machine
```bash
-#!/bin/bash
make build
-
SIZE=$(wc -c < ./bin/ctl-linux-aarch64-dev)
-
(
echo 'base64 -d > /var/ctl <<'"'"'EOF'"'"''
pv -s "$SIZE" < ./bin/ctl-linux-aarch64-dev | base64
echo 'EOF'
+ echo "export DEBUG=1"
echo 'chmod +x /var/ctl'
- echo '/var/ctl create config > /var/abc.yaml'
- echo "/var/ctl internal run-step $1 -c /var/abc.yaml 2>&1"
+ echo "echo Running /var/ctl $@"
+ echo "/var/ctl $@ 2>&1"
) | nc 10.0.0.10 1234
```
@@ -33,21 +31,14 @@ And use it like this
./send.sh start_crio
```
+### Join token
Create join token from control plane
```
kubeadm token create --print-join-command
```
-Export the token inside the device
-```
-export DEBUG=1
-export HOSTNAME=monok8s-master-1
-export BOOTSTRAP_TOKEN=
-export TOKEN_CACERT_HASH=
-```
-
-Generate using kubectl
+Generate join token using kubectl
```
TOKEN_NAME=bootstrap-token-iwotl0
@@ -61,6 +52,7 @@ HASH=$(kubectl -n kube-public get configmap cluster-info -o jsonpath='{.data.kub
| openssl rsa -pubin -outform der 2>/dev/null \
| openssl dgst -sha256 -hex \
| awk '{print "sha256:" $2}')
+
echo "export API_SERVER_ENDPOINT=${API_SERVER}"
echo "export BOOTSTRAP_TOKEN=${TOKEN}"
echo "export TOKEN_CACERT_HASH=${HASH}"
diff --git a/docs/ota.md b/docs/ota.md
index deacf80..f373263 100644
--- a/docs/ota.md
+++ b/docs/ota.md
@@ -48,8 +48,8 @@ catalog:
ConfigMap: images-cm
```
-※ ConfigMap requires additional RBAC permission which is not by default. You edit the
-control-agent ClusterRole and add `cnofigmaps: get` to allow this.
+※ ConfigMap requires additional RBAC permission which is not enabled by default. You can edit
+the control-agent's ClusterRole and add `cnofigmaps: get` to allow this.
Contents should look like this
```yaml
@@ -118,7 +118,7 @@ status:
## Development notes
-### Simulate OTA
+### Flashing manually into partition B
**Use nmap ncat**. Otherwise we'll have all kinds of fabulous issues sending it.
diff --git a/docs/vendor-resources.md b/docs/vendor-resources.md
new file mode 100644
index 0000000..41d6ee1
--- /dev/null
+++ b/docs/vendor-resources.md
@@ -0,0 +1,12 @@
+## Updating build.env
+You can find the latest package versions in here
+ * [kernel](https://github.com/nxp-qoriq/linux/archive/refs/tags/)
+ * [busybox](https://github.com/mirror/busybox/archive/refs/tags/)
+ * [CRI-O](https://github.com/cri-o/cri-o/releases)
+ * [Kubelet](https://kubernetes.io/releases/download/)
+ * [UBoot](https://github.com/u-boot/)
+
+## The device's dts files are located at here
+https://github.com/we-are-mono/OpenWRT-ASK/tree/mono-25.12.0-rc3/target/linux/layerscape/files/arch/arm64/boot/dts/freescale
+* We need both `mono-gateway-dk-sdk.dts` and `mono-gateway-dk.dts` since the sdk one includes the non-sdk one.
+* The actual dts being used is the `mono-gateway-dk-sdk.dts`