Added build-info to the images
This commit is contained in:
82
README.md
82
README.md
@@ -7,11 +7,6 @@ https://docs.mono.si/gateway-development-kit/getting-started
|
|||||||
## DISCLAIMER
|
## DISCLAIMER
|
||||||
USE AT YOUR OWN RISKS. I leverage ChatGPT heavily for this. I am testing them all by myself right now.
|
USE AT YOUR OWN RISKS. I leverage ChatGPT heavily for this. I am testing them all by myself right now.
|
||||||
|
|
||||||
### 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
|
## Build
|
||||||
|
|
||||||
Find the latest package versions and update build.env
|
Find the latest package versions and update build.env
|
||||||
@@ -25,6 +20,48 @@ Then run
|
|||||||
make release
|
make release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Flashing
|
||||||
|
|
||||||
|
#### USB Drive
|
||||||
|
1. `make release`
|
||||||
|
2. Format the USB in vfat
|
||||||
|
3. Copy out/[RELEASE].img.gz and out/board.itb your usb drive's root
|
||||||
|
4. Run
|
||||||
|
```
|
||||||
|
usb start
|
||||||
|
usb tree
|
||||||
|
fatls usb 0:1 # For fat
|
||||||
|
ext4ls usb 0:1 # For ext4 if you insist
|
||||||
|
fatload usb 0 0x80000000 board.itb
|
||||||
|
|
||||||
|
setenv bootargs "console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=/dev/ram0 rootwait rw"
|
||||||
|
bootm 0x80000000
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Inside initramfs, run
|
||||||
|
```
|
||||||
|
flash-emmc.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
4. If it boots, create the A/B deployment scheme
|
||||||
|
- (WORK IN PROGRESS)
|
||||||
|
|
||||||
|
#### tftp (network is required)
|
||||||
|
1. Put out/[RELEASE].img.gz and out/board.itb into your ftp server
|
||||||
|
```
|
||||||
|
setenv ipaddr 10.0.0.153
|
||||||
|
setenv serverip 10.0.0.129
|
||||||
|
tftp 0x80000000 board.itb
|
||||||
|
|
||||||
|
setenv bootargs "console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=/dev/ram0 rootwait rw"
|
||||||
|
bootm 0x80000000
|
||||||
|
```
|
||||||
|
2. Inside initramfs, run
|
||||||
|
```
|
||||||
|
flash-emmc.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Making sub stages
|
### Making sub stages
|
||||||
```bash
|
```bash
|
||||||
make build-base # The image the builds kernel and everything
|
make build-base # The image the builds kernel and everything
|
||||||
@@ -61,33 +98,8 @@ reboot
|
|||||||
PENDING
|
PENDING
|
||||||
```
|
```
|
||||||
|
|
||||||
## tftp (network is required)
|
## NOTES
|
||||||
```
|
### The device's dts files are located at here
|
||||||
setenv ipaddr 10.0.0.153
|
https://github.com/we-are-mono/OpenWRT-ASK/tree/mono-25.12.0-rc3/target/linux/layerscape/files/arch/arm64/boot/dts/freescale
|
||||||
setenv serverip 10.0.0.129
|
* We need both `mono-gateway-dk-sdk.dts` and `mono-gateway-dk.dts` since the sdk one includes the non-sdk one.
|
||||||
tftp 0x80000000 board.itb
|
* The actual dts being used is the `mono-gateway-dk-sdk.dts`
|
||||||
```
|
|
||||||
|
|
||||||
## USB Flashing
|
|
||||||
1. Copy board.itb into an SDCard
|
|
||||||
2. Copy `[RELEASE_NAME].img.gz` into an SDCard
|
|
||||||
```
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Inside initramfs
|
|
||||||
```
|
|
||||||
mount /dev/sda /mnt
|
|
||||||
gunzip -c /mnt/[RELEASE_IMAGE].img.gz | dd of=/dev/mmcblk0
|
|
||||||
reboot -f
|
|
||||||
```
|
|
||||||
|
|
||||||
4. If it boots, create the A/B deployment scheme
|
|
||||||
- (WORK IN PROGRESS)
|
|
||||||
|
|||||||
6
alpine/rootfs-extra/etc/motd.tmpl
Normal file
6
alpine/rootfs-extra/etc/motd.tmpl
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Alpine monok8s for mono Gateway Development Kit
|
||||||
|
|
||||||
|
Version: $BUILD_VERSION
|
||||||
|
Built: $BUILD_DATE
|
||||||
|
Git: $BUILD_GIT
|
||||||
|
|
||||||
@@ -24,4 +24,5 @@ COPY packages/kubernetes/* /out/rootfs/usr/local/bin/
|
|||||||
RUN chmod +x /out/rootfs/usr/local/bin/*
|
RUN chmod +x /out/rootfs/usr/local/bin/*
|
||||||
|
|
||||||
COPY alpine/rootfs-extra ./rootfs-extra
|
COPY alpine/rootfs-extra ./rootfs-extra
|
||||||
|
COPY out/build-info ./rootfs-extra/etc/profile.d/build-info.sh
|
||||||
COPY alpine/*.sh /
|
COPY alpine/*.sh /
|
||||||
|
|||||||
3
makefile
3
makefile
@@ -190,6 +190,9 @@ $(RELEASE_IMAGE): $(RELEASE_DEPS) | $(OUT_DIR)
|
|||||||
-e KUBE_IMG_CACHE=/var/cache/k8s-images \
|
-e KUBE_IMG_CACHE=/var/cache/k8s-images \
|
||||||
-e KUBE_VERSION=$(KUBE_VERSION) \
|
-e KUBE_VERSION=$(KUBE_VERSION) \
|
||||||
-e ALPINE_HOSTNAME=$(ALPINE_HOSTNAME) \
|
-e ALPINE_HOSTNAME=$(ALPINE_HOSTNAME) \
|
||||||
|
-e BUILD_VERSION=$(BUILD_VERSION) \
|
||||||
|
-e BUILD_DATE=$(BUILD_DATE) \
|
||||||
|
-e BUILD_GIT=$(BUILD_GIT) \
|
||||||
-e ARCH=$(ARCH) \
|
-e ARCH=$(ARCH) \
|
||||||
$(DOCKER_IMAGE_ROOT)/buildenv-alpine:$(TAG) \
|
$(DOCKER_IMAGE_ROOT)/buildenv-alpine:$(TAG) \
|
||||||
bash -lc '/build-rootfs.sh'); \
|
bash -lc '/build-rootfs.sh'); \
|
||||||
|
|||||||
Reference in New Issue
Block a user