Files
monok8s/README.md

74 lines
1.8 KiB
Markdown

# monok8s
Kubernetes image for Mono Gateway Development Kit
https://docs.mono.si/gateway-development-kit/getting-started
### 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`
## Build
To avoid frequent downloading on rebuild. Find and download the latest packages
* [kernel](https://github.com/nxp-qoriq/linux/archive/refs/tags/) - `dev/nxplinux.tar.gz`
* [busybox](https://github.com/mirror/busybox/archive/refs/tags/) (for initramfs) - `dev/busybox.tar.gz`
* [CRI-O](https://github.com/cri-o/cri-o/releases) - `dev/crio.tar.gz`
* [Kubelet](https://kubernetes.io/releases/download/) - `dev/kubelet.tar.gz`
Put them into the `dev/` directory
```bash
make itb # for out/board.itb (contains the kernel and the initramfs)
make release # WORK IN PROGRESS
```
## Architecture
- A/B deployment
- Read-only OS
## Upgrade process
Rough idea
```bash
./configure
# - asks for some config for kubelet
# - Join a cluster? Start a cluster?
make release
# Copy the new image to the upgrade-scheduler
kubectl cp -n kube-system upgrade-scheduler:/tmp/upgrade.img
# Upgrade scheduler reads the file that issue a self-reboot
reboot
# uboot to boot into partition B
```
```yaml
PENDING
```
## tftp (network is required)
```
setenv ipaddr 10.0.0.153
setenv serverip 10.0.0.129
tftp 0x80000000 board.itb
```
## USB
```
usb start
usb tree
fatls usb 0:1 # For fat
ext4ls usb 0:1 # For ext4
fatload usb 0 0x80000000 board.itb
setenv bootargs "console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=/dev/ram0 rootwait rw"
bootm 0x80000000
```