Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
remove sata variant as it does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
schneid-l committed Aug 28, 2024
1 parent 1b9c355 commit c3e2d0f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 199 deletions.
24 changes: 2 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ AUTHORS ?= Louis S. <[email protected]>
PUSH ?= false
ARTIFACTS_FOLDER ?= ./out

SATA ?= no

HACK ?= ./hack

TAG ?= $(shell git describe --tag --always --dirty)
Expand Down Expand Up @@ -39,17 +37,10 @@ INSTALLER_OUTPUT_TAG ?= $(TAG)
INSTALLER_OUTPUT_IMAGE ?= $(REGISTRY_AND_USERNAME)/$(INSTALLER_OUTPUT_NAME):$(INSTALLER_OUTPUT_TAG)

IMAGE_INSTALLER_NAME ?= $(NAME)
ifeq ($(SATA),yes)
IMAGE_INSTALLER_NAME := $(IMAGE_INSTALLER_NAME)-sata
endif
IMAGE_INSTALLER_TAG ?= $(TAG)
IMAGE_INSTALLER_IMAGE ?= $(REGISTRY_AND_USERNAME)/$(IMAGE_INSTALLER_NAME):$(IMAGE_INSTALLER_TAG)

IMAGE_FILENAME ?= $(NAME)

ifeq ($(SATA),yes)
IMAGE_FILENAME := $(IMAGE_FILENAME)-sata
endif

IMAGE_OUTPUT_KIND ?=
IMAGE_KIND ?= metal
Expand All @@ -60,7 +51,6 @@ IMAGER_ARGS += --overlay-name=orangepi-5
IMAGER_ARGS += --overlay-image=$(INSTALLER_OUTPUT_IMAGE)
IMAGER_ARGS += --output-kind=$(IMAGE_OUTPUT_KIND)
IMAGER_ARGS += $(forach IMAGE_EXTENSION,$(IMAGE_EXTENSIONS),--system-extension-image=$(IMAGE_EXTENSION))
IMAGER_ARGS += --overlay-option="sata=$(SATA)"

INITIAL_COMMIT_SHA := $(shell git rev-list --max-parents=0 HEAD)
SOURCE_DATE_EPOCH ?= $(shell git log $(INITIAL_COMMIT_SHA) --pretty=%ct)
Expand Down Expand Up @@ -191,18 +181,13 @@ image: $(ARTIFACTS_FOLDER)
$(IMAGER_ARGS)

.PHONY: images-metal
images-metal: image-metal image-metal-sata
images-metal: image-metal

.PHONY: image-metal
image-metal:
@$(MAKE) image && \
mv "$(ARTIFACTS_FOLDER)/metal-arm64.raw.zst" "$(ARTIFACTS_FOLDER)/$(strip $(IMAGE_FILENAME)).raw.zst"

.PHONY: image-metal-sata
image-metal-sata:
@$(MAKE) image-metal \
SATA=yes

.PHONY: image-pxe
image-pxe: image-kernel image-initramfs

Expand All @@ -219,7 +204,7 @@ image-initramfs:
IMAGE_OUTPUT_KIND="initramfs"

.PHONY: images-installer
images-installer: image-installer image-installer-sata
images-installer: image-installer

.PHONY: image-installer
image-installer:
Expand All @@ -230,11 +215,6 @@ image-installer:
crane push $(ARTIFACTS_FOLDER)/installer-arm64.tar $(IMAGE_INSTALLER_IMAGE); \
fi

.PHONY: image-installer-sata
image-installer-sata:
$(MAKE) image-installer \
SATA=yes

###### Clean ######

.PHONY: clean
Expand Down
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,25 @@ The device tree are included in the image at the paths required by U-Boot and ED

#### Install on a drive

The Talos image can be flashed on an SD card, a NVMe drive, or a SATA drive.
The Talos image can be flashed on an SD card or a NVMe drive.

You can download the latest image from the [releases page](https://github.com/si0ls/talos-orangepi5/releases).

You can choose between the following images:
- `talos-orangepi5.raw.zst`: the base image for **Orange Pi 5 (Plus)**, flashable on a **SD card, eMMC, M.2 NVMe drive, USB drive, or USB-connected SATA drive**
- `talos-orangepi5-sata.raw.zst`: the base image for **Orange Pi 5 (Plus)** with SATA overlay applied, flashable on a **M.2 SATA drive**

The image can be flashed using [Etcher](https://www.balena.io/etcher/) on Windows, macOS, or Linux or using `dd` on Linux:

```bash
# Extract the image for the variant you want to flash
zstd -d talos-orangepi5[-sata].raw.zst
# Extract the image
zstd -d talos-orangepi5.raw.zst

# Flash the image
# Replace /dev/sdX with the device of the SD card, NVMe drive, or SATA drive
# Replace /dev/sdX with the destination device
# You can find the device with `lsblk` or `fdisk -l`
dd if=talos-orangepi5[-sata].raw of=/dev/sdX bs=4M status=progress
dd if=talos-orangepi5.raw of=/dev/sdX bs=4M status=progress
```

#### PXE Boot

**This repository does not provide a PXE server**, it is up to you to set up the PXE server.
**This repository does not provide a PXE server**, it is up to you to set up the PXE environment.

The [release page](https://github.com/si0ls/talos-orangepi5/releases) provides the following files needed for PXE boot:

Expand All @@ -69,21 +65,21 @@ The [release page](https://github.com/si0ls/talos-orangepi5/releases) provides t

## Machine configuration

Use the `ghcr.io/si0ls/talos-orangepi5` images instead of the upstream Talos Linux images. It also available with the SATA overlay with the `ghcr.io/si0ls/talos-orangepi5-sata` image.
Use the `ghcr.io/si0ls/talos-orangepi5` image instead of the upstream Talos Linux one.

```yaml
machine:
install:
disk: /dev/sda # replace with the device you want to install Talos on
image: ghcr.io/si0ls/talos-orangepi5[-sata]:v1.1
image: ghcr.io/si0ls/talos-orangepi5:v1.1
wipe: false
```
To upgrade you machine to the latest version with `talosctl`, you can use the following command:

```bash
talosctl upgrade --nodes <node-ip> \
--image ghcr.io/si0ls/talos-orangepi5[-sata]:<version>
--image ghcr.io/si0ls/talos-orangepi5:<version>
```

## Build
Expand All @@ -102,12 +98,13 @@ _The detail of all the build steps and parameters can be found in the [Makefile]

## License

This project is not affiliated with Xunlong, Orange Pi, Armbian, or Sidero Labs.
This project is not affiliated with Xunlong, Orange Pi, Armbian, Collabora or Sidero Labs.

The code in this repository is licensed under the Mozilla Public License Version 2.0 to respect the Talos project license.

## Special thanks

- [Sidero Labs](https://www.siderolabs.com/) for the Talos project
- [Armbian](https://www.armbian.com/) for the initial work on the Orange Pi 5
- [Collabora](https://www.collabora.com/) for the kernel
- [@nberlee](https://github.com/nberlee) and [@pl4nty](https://github.com/pl4nty) for the initial work on other rk3588 devices and their help ❤️
- [@nberlee](https://github.com/nberlee) and [@pl4nty](https://github.com/pl4nty) for the initial work on other rk3588 devices for Talos and their help ❤️
11 changes: 2 additions & 9 deletions installer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ func main() {

type OrangePi5Installer struct{}

type orangePi5ExtraOptions struct {
Sata bool `json:"sata"`
}
type orangePi5ExtraOptions struct{}

func (i *OrangePi5Installer) GetOptions(extra orangePi5ExtraOptions) (overlay.Options, error) {
return overlay.Options{
Expand All @@ -59,14 +57,9 @@ func (i *OrangePi5Installer) GetOptions(extra orangePi5ExtraOptions) (overlay.Op
}

func (i *OrangePi5Installer) Install(options overlay.InstallOptions[orangePi5ExtraOptions]) error {
sataSuffix := ""
if options.ExtraOptions.Sata {
sataSuffix = "-sata"
}

for board := range boardDTBNames {
if err := copyFiles(
filepath.Join(options.ArtifactsPath, "/dtb/", boardDTBNames[board]+sataSuffix+".dtb"),
filepath.Join(options.ArtifactsPath, "/dtb/", boardDTBNames[board]+".dtb"),
filepath.Join(options.MountPrefix, uBootDTBDest, boardDTBNames[board]+".dtb"),
filepath.Join(options.MountPrefix, edk2DTBDest, boardDTBNames[board]+".dtb")); err != nil {
return err
Expand Down
18 changes: 0 additions & 18 deletions kernel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,11 @@ RUN apk --no-cache add \

ARG KERNEL_VERSION=6.10
ARG KERNEL_SOURCE=https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.10.tar.gz
ARG KERNEL_PATCHES_DIR=./patches

RUN mkdir -p /kernel/src && \
mkdir -p /kernel/patches && \
curl -L $KERNEL_SOURCE | tar -xz -C /kernel/src --strip-components=1

COPY $KERNEL_PATCHES_DIR/* /kernel/patches/

RUN for patch in /kernel/patches/*.patch; do \
patch -d /kernel/src -p1 < $patch; \
done

FROM ubuntu:22.04 AS builder

ARG SOURCE_DATE_EPOCH
Expand Down Expand Up @@ -80,25 +73,14 @@ RUN --mount=type=cache,target=/kernel/build \
make -j$(nproc) modules && \
make -j$(nproc) dtbs

RUN --mount=type=cache,target=/kernel/build \
fdtoverlay -o /kernel/build/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-sata.dtb \
-i /kernel/build/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtb \
/kernel/build/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3588-sata.dtbo && \
fdtoverlay -o /kernel/build/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus-sata.dtb \
-i /kernel/build/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dtb \
/kernel/build/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3588-sata.dtbo

RUN --mount=type=cache,target=/kernel/build \
mkdir -p /kernel/out/boot && \
mkdir -p /kernel/out/dtb/rockchip/overlay && \
mkdir -p /kernel/out/certs && \
cp -r /kernel/build/certs/signing_key.x509 /kernel/out/certs/signing_key.x509 && \
cp -r /kernel/build/arch/arm64/boot/Image /kernel/out/boot/vmlinuz && \
cp -r /kernel/build/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtb /kernel/out/dtb/rockchip/ && \
cp -r /kernel/build/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-sata.dtb /kernel/out/dtb/rockchip/ && \
cp -r /kernel/build/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dtb /kernel/out/dtb/rockchip/ && \
cp -r /kernel/build/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus-sata.dtb /kernel/out/dtb/rockchip/ && \
cp -r /kernel/build/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3588-sata.dtbo /kernel/out/dtb/rockchip/overlay && \
export KERNEL_RELEASE=$(cat /kernel/build/include/config/kernel.release) && \
make -j$(nproc) modules_install INSTALL_MOD_PATH=/kernel/out INSTALL_MOD_STRIP=1 && \
depmod -b /kernel/out $KERNEL_RELEASE && \
Expand Down
11 changes: 0 additions & 11 deletions kernel/patches/0000-add-rockchip-overlay-subdir.patch

This file was deleted.

69 changes: 0 additions & 69 deletions kernel/patches/0001-general-add-overlay-support.patch

This file was deleted.

55 changes: 0 additions & 55 deletions kernel/patches/9999-add-rk3588-sata-overlay.patch

This file was deleted.

0 comments on commit c3e2d0f

Please sign in to comment.