From a73a663d57edadba681f2478de517aa2e15f09d5 Mon Sep 17 00:00:00 2001 From: Nico Berlee Date: Sun, 17 Dec 2023 17:02:45 +0100 Subject: [PATCH] initial extension for RK3588 and kernel modules --- .github/workflows/ci.yaml | 59 ++---------------- .github/workflows/slack-notify.yaml | 93 ----------------------------- .github/workflows/weekly.yaml | 42 ------------- Makefile | 38 ++---------- README.md | 60 ++++++------------- misc/binfmt-misc/pkg.yaml | 2 +- sbcs/rk3588/README.md | 29 +++++++++ sbcs/rk3588/files/modules.txt | 10 ++++ sbcs/rk3588/manifest.yaml | 10 ++++ sbcs/rk3588/pkg.yaml | 29 +++++++++ sbcs/rk3588/vars.yaml | 1 + sbcs/vars.yaml | 0 12 files changed, 111 insertions(+), 262 deletions(-) delete mode 100644 .github/workflows/slack-notify.yaml delete mode 100644 .github/workflows/weekly.yaml create mode 100644 sbcs/rk3588/README.md create mode 100644 sbcs/rk3588/files/modules.txt create mode 100644 sbcs/rk3588/manifest.yaml create mode 100644 sbcs/rk3588/pkg.yaml create mode 100644 sbcs/rk3588/vars.yaml create mode 100644 sbcs/vars.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7bd37b9..ab2e740 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,9 +25,7 @@ jobs: issues: read packages: write pull-requests: read - runs-on: - - self-hosted - - pkgs + runs-on: ubuntu-latest if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/')) outputs: labels: ${{ steps.retrieve-pr-labels.outputs.result }} @@ -43,23 +41,15 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 - - name: Unshallow - run: | - git fetch --prune --unshallow + with: + # need history for `git describe` to work for Talos `Makefile` + fetch-depth: 0 + fetch-tags: true - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - with: - append: | - - endpoint: tcp://buildkit-arm64.ci.svc.cluster.local:1234 - platforms: linux/arm64 - driver: remote - endpoint: tcp://localhost:1234 - name: Build run: | make - - name: Build nonfree - run: | - make nonfree - name: Login to registry if: github.event_name != 'pull_request' uses: docker/login-action@v3 @@ -70,11 +60,7 @@ jobs: - name: Push to registry if: github.event_name != 'pull_request' run: | - make PUSH=true - - name: Push nonfree - if: github.event_name != 'pull_request' - run: | - make nonfree PUSH=true + make PUSH=true - name: Retrieve PR labels id: retrieve-pr-labels uses: actions/github-script@v7 @@ -106,36 +92,3 @@ jobs: with: body_path: _out/RELEASE_NOTES.md draft: "true" - reproducibility: - runs-on: - - self-hosted - - pkgs - if: contains(fromJSON(needs.default.outputs.labels), 'integration/reproducibility') - needs: - - default - services: - buildkitd: - image: moby/buildkit:v0.12.4 - options: --privileged - ports: - - 1234:1234 - volumes: - - /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit - - /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml - steps: - - name: checkout - uses: actions/checkout@v4 - - name: Unshallow - run: | - git fetch --prune --unshallow - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - append: | - - endpoint: tcp://buildkit-arm64.ci.svc.cluster.local:1234 - platforms: linux/arm64 - driver: remote - endpoint: tcp://localhost:1234 - - name: reproducibility-test - run: | - make reproducibility-test diff --git a/.github/workflows/slack-notify.yaml b/.github/workflows/slack-notify.yaml deleted file mode 100644 index 6d589d5..0000000 --- a/.github/workflows/slack-notify.yaml +++ /dev/null @@ -1,93 +0,0 @@ -# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. -# -# Generated on 2023-11-13T17:09:48Z by kres latest. - -name: slack-notify -"on": - workflow_run: - workflows: - - default - - weekly - types: - - completed -jobs: - slack-notify: - runs-on: - - self-hosted - - generic - if: github.event.workflow_run.conclusion != 'skipped' - steps: - - name: Get PR number - id: get-pr-number - if: github.event.workflow_run.event == 'pull_request' - env: - GH_TOKEN: ${{ github.token }} - run: | - echo pull_request_number=$(gh pr view -R ${{ github.repository }} ${{ github.event.workflow_run.head_repository.owner.login }}:${{ github.event.workflow_run.head_branch }} --json number --jq .number) >> $GITHUB_OUTPUT - - name: Slack Notify - uses: slackapi/slack-github-action@v1 - with: - channel-id: proj-talos-maintainers - payload: | - { - "attachments": [ - { - "color": "${{ github.event.workflow_run.conclusion == 'success' && '#2EB886' || github.event.workflow_run.conclusion == 'failure' && '#A30002' || '#FFCC00' }}", - "fallback": "test", - "blocks": [ - { - "type": "section", - "fields": [ - { - "type": "mrkdwn", - "text": "${{ github.event.workflow_run.event == 'pull_request' && format('*Pull Request:* {0} (`{1}`)\n<{2}/pull/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, steps.get-pr-number.outputs.pull_request_number, github.event.workflow_run.display_title) || format('*Build:* {0} (`{1}`)\n<{2}/commit/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, github.sha, github.event.workflow_run.display_title) }}" - }, - { - "type": "mrkdwn", - "text": "*Status:*\n`${{ github.event.workflow_run.conclusion }}`" - } - ] - }, - { - "type": "section", - "fields": [ - { - "type": "mrkdwn", - "text": "*Author:*\n`${{ github.actor }}`" - }, - { - "type": "mrkdwn", - "text": "*Event:*\n`${{ github.event.workflow_run.event }}`" - } - ] - }, - { - "type": "divider" - }, - { - "type": "actions", - "elements": [ - { - "type": "button", - "text": { - "type": "plain_text", - "text": "Logs" - }, - "url": "${{ github.event.workflow_run.html_url }}" - }, - { - "type": "button", - "text": { - "type": "plain_text", - "text": "Commit" - }, - "url": "${{ github.event.repository.html_url }}/commit/${{ github.sha }}" - } - ] - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.github/workflows/weekly.yaml b/.github/workflows/weekly.yaml deleted file mode 100644 index 54c9d73..0000000 --- a/.github/workflows/weekly.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. -# -# Generated on 2023-12-14T15:26:27Z by kres latest. - -name: weekly -concurrency: - group: ${{ github.head_ref || github.run_id }} - cancel-in-progress: true -"on": - schedule: - - cron: 30 1 * * 1 -jobs: - reproducibility: - runs-on: - - self-hosted - - pkgs - services: - buildkitd: - image: moby/buildkit:v0.12.4 - options: --privileged - ports: - - 1234:1234 - volumes: - - /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit - - /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml - steps: - - name: checkout - uses: actions/checkout@v4 - - name: Unshallow - run: | - git fetch --prune --unshallow - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - append: | - - endpoint: tcp://buildkit-arm64.ci.svc.cluster.local:1234 - platforms: linux/arm64 - driver: remote - endpoint: tcp://localhost:1234 - - name: reproducibility-test - run: | - make reproducibility-test diff --git a/Makefile b/Makefile index 6355612..e6ae15a 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ ifeq ($(GOARCH),x86_64) GOARCH := amd64 endif REGISTRY ?= ghcr.io -USERNAME ?= siderolabs +USERNAME ?= nberlee REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME) KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest @@ -35,7 +35,7 @@ BLDR := docker run --rm --user $(shell id -u):$(shell id -g) --volume $(PWD):/sr # docker build settings BUILD := docker buildx build -PLATFORM ?= linux/amd64,linux/arm64 +PLATFORM ?= linux/arm64 PROGRESS ?= auto PUSH ?= false CI_ARGS ?= @@ -46,45 +46,19 @@ COMMON_ARGS += --platform=$(PLATFORM) COMMON_ARGS += --build-arg=SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) COMMON_ARGS += --build-arg=TAG="$(TAG)" COMMON_ARGS += --build-arg=PKGS="$(PKGS)" +COMMON_ARGS += --build-arg=PKG_KERNEL="$(PKG_KERNEL)" # targets defines all the available targets -TARGETS = amdgpu-firmware -TARGETS += amd-ucode -TARGETS += binfmt-misc -TARGETS += bnx2-bnx2x -TARGETS += btrfs -TARGETS += chelsio-drivers -TARGETS += chelsio-firmware -TARGETS += drbd -TARGETS += ecr-credential-provider -TARGETS += fuse3 -TARGETS += gasket-driver -TARGETS += gvisor -TARGETS += hello-world-service -TARGETS += i915-ucode -TARGETS += intel-ice-firmware -TARGETS += intel-ucode -TARGETS += iscsi-tools -TARGETS += mdadm -TARGETS += nut-client -TARGETS += nvidia-container-toolkit -TARGETS += nvidia-fabricmanager -TARGETS += nvidia-open-gpu-kernel-modules -TARGETS += qemu-guest-agent -TARGETS += stargz-snapshotter -TARGETS += tailscale -TARGETS += thunderbolt +TARGETS = binfmt-misc +TARGETS += rk3588 TARGETS += usb-modem-drivers -TARGETS += util-linux-tools -TARGETS += xe-guest-utilities -TARGETS += zfs -NONFREE_TARGETS = nonfree-kmod-nvidia # extra variables EXTENSIONS_IMAGE_REF ?= $(REGISTRY_AND_USERNAME)/extensions:$(TAG) PKGS ?= v1.6.0-12-g0078a66 +PKG_KERNEL ?= ghcr.io/nberlee/kernel:v1.6.0-14-g1f06402 # help menu diff --git a/README.md b/README.md index 9be77a7..67ec64c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# Friendy fork + +This is a friendly fork, only here as the Turing RK1 has a different kernel, therefor it needs different extensions for kernel module drivers. +Also please use the *rk3588* extension and make sure to add `rockchip-cpufreq` to the `machine.kernel.modules` in your machine config. +See: [rk3588](sbcs/rk3588) extension + # Talos Linux System Extensions This repo serves as a central place for publishing supported extensions to Talos Linux. @@ -17,105 +23,77 @@ The extension image is composed of a `manifest.yaml` file that provides informat In order to find a container reference for a system extension compatible with your Talos Linux version, you can use the following command: ```bash -crane export ghcr.io/siderolabs/extensions:v | tar x -O image-digests | grep +crane export ghcr.io/nberlee/extensions:v | tar x -O image-digests | grep ``` For example, to find a compatible version of the `gasket-driver` extension for Talos v1.5.3, you can run: ```bash -$ crane export ghcr.io/siderolabs/extensions:v1.5.3 | tar x -O image-digests | grep gasket-driver -ghcr.io/siderolabs/gasket-driver:97aeba58-v1.5.3@sha256:c786edb356edae3b451cb82d5322f94e54ea0710195181b93ae37ccc8e7ba908 +$ crane export ghcr.io/nberlee/extensions:v1.5.3 | tar x -O image-digests | grep gasket-driver +ghcr.io/nberlee/gasket-driver:97aeba58-v1.5.3@sha256:c786edb356edae3b451cb82d5322f94e54ea0710195181b93ae37ccc8e7ba908 ``` Please always use the pinned digest when referencing an extension image. -All extensions are signed with Google Accounts OIDC issuer matching `@siderolabs.com` domain, so the image signatures can be verified, for example: - -```bash -cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oidc-issuer https://accounts.google.com ghcr.io/siderolabs/extensions:v1.5.3 -cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oidc-issuer https://accounts.google.com ghcr.io/siderolabs/gasket-driver:97aeba58-v1.5.3@sha256:c786edb356edae3b451cb82d5322f94e54ea0710195181b93ae37ccc8e7ba908 -``` - ## Extension Catalog ### Container Runtimes | Name | Image | Description | Version Format | | ----------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------- | ---------------------------------- | -| [gvisor](container-runtime/gvisor/) | [ghcr.io/siderolabs/gvisor](https://github.com/siderolabs/extensions/pkgs/container/gvisor) | [gVisor](https://gvisor.dev/) container runtime | `upstream version`-`talos version` | -| [stargz-snapshotter](container-runtime/stargz-snapshotter/) | [ghcr.io/siderolabs/stargz-snapshotter](https://github.com/siderolabs/extensions/pkgs/container/stargz-snapshotter) | [Stargz Snapshotter](https://github.com/containerd/stargz-snapshotter) container runtime | `upstream version`-`talos version` | -| [ecr-credential-provider](container-runtime/ecr-credential-provider) | [ghcr.io/siderolabs/ecr-credential-provider](https://github.com/siderolabs/extensions/pkgs/container/ecr-credential-provider) | [ECR Credential Provider](https://github.com/kubernetes/cloud-provider-aws/tree/master/cmd/ecr-credential-provider) kubelet plugin | `upstream version` | ### Firmware | Name | Image | Description | Version Format | | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------------------------ | -| [amd-ucode](firmware/amd-ucode/) | [ghcr.io/siderolabs/amd-ucode](https://github.com/siderolabs/extensions/pkgs/container/amd-ucode) | AMD CPU microcode updates | `linux firmware version` | -| [amdgpu-firmware](firmware/amdgpu-firmware/) | [ghcr.io/siderolabs/amdgpu-firmware](https://github.com/siderolabs/extensions/pkgs/container/amdgpu-firmware) | AMD GPU firmware | `linux firmware version` | -| [bnx2-bnx2x](firmware/bnx2-bnx2x/) | [ghcr.io/siderolabs/bnx2-bnx2x](https://github.com/siderolabs/extensions/pkgs/container/bnx2-bnx2x) | Broadcom NetXtreme firmware | `linux firmware version` | -| [chelsio-firmware](firmware/chelsio-firmware/) | [ghcr.io/siderolabs/chelsio-firmware](https://github.com/siderolabs/extensions/pkgs/container/chelsio-firmware) | Chelsio NIC firmware | `linux firmware version` | -| [i915-ucode](firmware/i915-ucode/) | [ghcr.io/siderolabs/i915-ucode](https://github.com/siderolabs/extensions/pkgs/container/i915-ucode) | Intel GPU firmware | `linux firmware version` | -| [intel-ice-firmware](firmware/intel-ice-firmware/) | [ghcr.io/siderolabs/intel-ice-firmware](https://github.com/siderolabs/extensions/pkgs/container/intel-ice-firmware) | Intel ICE NIC firmware | `linux firmware version` | -| [intel-ucode](firmware/intel-ucode/) | [ghcr.io/siderolabs/intel-ucode](https://github.com/siderolabs/extensions/pkgs/container/intel-ucode) | Intel CPU microcode updates | `upstream version` | ### Drivers -| Name | Image | Description | Version Format | -| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----------------------------------------------------- | -| [chelsio](drivers/chelsio/) | [ghcr.io/siderolabs/chelsio-drivers](https://github.com/siderolabs/extensions/pkgs/container/chelsio-drivers) | Chelsio NIC drivers | `talos version` | -| [gasket](drivers/gasket/) | [ghcr.io/siderolabs/gasket-driver](https://github.com/siderolabs/extensions/pkgs/container/gasket-driver) | Driver for Google Coral PCIe devices | `gasket driver upstream short commit`-`talos version` | -| [nvidia](nvidia-gpu/nvidia-modules/) | [ghcr.io/siderolabs/nvidia-open-gpu-kernel-modules](https://github.com/siderolabs/extensions/pkgs/container/nvidia-open-gpu-kernel-modules) | NVIDIA OSS Driver | `nvidia driver upstream version`-`talos version` | -| [thunderbolt](drivers/thunderbolt/) | [ghcr.io/siderolabs/thunderbolt](https://github.com/siderolabs/extensions/pkgs/container/thunderbolt) | Thunderbolt drivers | `talos version` | -| [usb-modem](drivers/usb-modem/) | [ghcr.io/siderolabs/usb-modem-drivers](https://github.com/siderolabs/extensions/pkgs/container/usb-modem-drivers) | USB Modem drivers | `talos version` | +| Name | Image | Description | Version Format | +| ------------------------------------ | ----------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----------------------------------------------------- | +| [usb-modem](drivers/usb-modem/) | [ghcr.io/nberlee/usb-modem-drivers](https://github.com/nberlee/extensions/pkgs/container/usb-modem-drivers) | USB Modem drivers | `talos version` | ### Miscellaneous | Name | Image | Description | Version Format | | ------------------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------- | ------------------ | -| [binfmt-misc](misc/binfmt-misc) | [ghcr.io/siderolabs/binfmt-misc](https://github.com/siderolabs/extensions/pkgs/container/binfmt-misc) | Miscellaneous Binary Format | `talos version` | +| [binfmt-misc](misc/binfmt-misc) | [ghcr.io/nberlee/binfmt-misc](https://github.com/nberlee/extensions/pkgs/container/binfmt-misc) | Miscellaneous Binary Format | `talos version` | ### Network | Name | Image | Description | Version Format | | ------------------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------- | ------------------ | -| [tailscale](network/tailscale/) | [ghcr.io/siderolabs/tailscale](https://github.com/siderolabs/extensions/pkgs/container/tailscale) | [Tailscale](https://tailscale.com) | `upstream version` | + +### SBCs +| Name | Image | Description | Version Format | +| --------------------- | -------------------------------------------------------------- | --------------------------------- | ------------------ | +| [rk3588](sbcs/rk3588) | [ghcr.io/nberlee/rk3588](https://github.com/nberlee/extensions | Support modules for RK3588 boards | `talos version` | + ### Storage | Name | Image | Description | Version Format | | ----------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------- | ---------------------------------- | -| [iscsi-tools](storage/iscsi-tools/) | [ghcr.io/siderolabs/iscsi-tools](https://github.com/siderolabs/extensions/pkgs/container/iscsi-tools) | Open iSCSI tools | `v0.1.0` | -| [mdadm](storage/mdadm/) | [ghcr.io/siderolabs/mdadm](https://github.com/siderolabs/extensions/pkgs/container/mdadm) | manage MD devices tool | `upstream version`-`talos version` | -| [drbd](storage/drbd/) | [ghcr.io/siderolabs/drbd](https://github.com/siderolabs/extensions/pkgs/container/drbd) | DRBD driver module | `upstream version`-`talos version` | -| [zfs](storage/zfs/) | [ghcr.io/siderolabs/zfs](https://github.com/siderolabs/extensions/pkgs/container/zfs) | ZFS driver module | `upstream version`-`talos version` | -| [btrfs](storage/btrfs/) | [ghcr.io/siderolabs/btrfs](https://github.com/siderolabs/extensions/pkgs/container/btrfs) | BTRFS driver module | `talos version` | ### Power | Name | Image | Description | Version Format | | ------------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------- | -| [nut-client](power/nut-client/) | [ghcr.io/siderolabs/nut-client](https://github.com/siderolabs/talos-extensions/pkgs/container/nut-client) | [Network UPS Tools](https://networkupstools.org) upsmon client | `upstream version`-`talos version` | ### Guest Agents | Name | Image | Description | Version Format | | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------ | -| [qemu-guest-agent](guest-agents/qemu-guest-agent/) | [ghcr.io/siderolabs/qemu-guest-agent](https://github.com/siderolabs/talos-extensions/pkgs/container/qemu-guest-agent) | [QEMU Guest Agent](https://wiki.qemu.org/Features/GuestAgent) | `upstream version` | -| [xe-guest-utilities](guest-agents/xe-guest-utilities/) | [ghcr.io/siderolabs/xe-guest-utilities](https://github.com/siderolabs/talos-extensions/pkgs/container/xe-guest-utilities) | [xe-guest-utilities](https://github.com/xenserver/xe-guest-utilitiest) | `upstream version` | ### NVIDIA GPU | Name | Description | Version Format | | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -| [nvidia-container-toolkit](nvidia-gpu/nvidia-container-toolkit/) | Tools to run [NVIDIA GPU workloads](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/overview.html) in containers | `driver version`-`toolkit version` | -| [nvidia-fabricmanager](nvidia-gpu/nvidia-fabricmanager/) | [NVIDIA fabric manager](https://docs.nvidia.com/datacenter/tesla/pdf/fabric-manager-user-guide.pdf) support for GPU workloads | `driver version` | -| [nvidia-open-gpu-kernel-modules](nvidia-gpu/nvidia-modules/) | NVIDIA driver kernel modules | `driver version`-`talos version` | #### Tools | Name | Description | Version Format | | ------------------------------------- | ---------------------------------- | --------------- | -| [util-linux-tools](tools/util-linux/) | Util Linux tools (only fstrim now) | `talos version` | ## Building Extensions diff --git a/misc/binfmt-misc/pkg.yaml b/misc/binfmt-misc/pkg.yaml index a2f78e5..d8f19cd 100644 --- a/misc/binfmt-misc/pkg.yaml +++ b/misc/binfmt-misc/pkg.yaml @@ -5,7 +5,7 @@ dependencies: - stage: base # The pkgs version for a particular release of Talos as defined in # https://github.com/siderolabs/talos/blob//pkg/machinery/gendata/data/pkgs - - image: "{{ .PKGS_PREFIX }}/kernel:{{ .BUILD_ARG_PKGS }}" + - image: "{{ .BUILD_ARG_PKG_KERNEL }}" steps: - prepare: - | diff --git a/sbcs/rk3588/README.md b/sbcs/rk3588/README.md new file mode 100644 index 0000000..1cdecf7 --- /dev/null +++ b/sbcs/rk3588/README.md @@ -0,0 +1,29 @@ +# RK3588 extension + +## Installation + +See [Installing Extensions](https://github.com/siderolabs/extensions#installing-extensions). + +## Usage + +The following modules to to loaded manually, so add this to the talos config: +```yaml +machine: + kernel: + modules: + - name: rockchip-cpufreq +``` + +The rest is automatically detected and loaded based on the device-tree. + +Provides: + +* `rockchip-cpufreq`: his module is responsible for CPU frequency scaling on Rockchip processors. It manages the CPU's operating frequency and voltage to balance performance and power consumption. +* `rk_crypto2`: A cryptographic driver module for Rockchip SoCs, providing hardware acceleration for cryptographic operations like encryption and decryption, enhancing performance in cryptographic tasks. Currently only hashes are supported. +* `phy-rockchip-naneng-combphy`: Enable this to support the Rockchip PCIe/USB3.0/SATA/QSGMII combo PHY with NaNeng IP block. +* `phy-rockchip-snps-pcie3`: A PHY driver module for Rockchip's Synopsys PCIe3, it manages the physical layer interface for PCI Express 3.0, ensuring reliable and efficient data transmission over PCIe connections. +* `rk808-regulator`: This module controls voltage regulators in the RK808 chip. It's used for managing power supply to various components of the system, ensuring stable operation and power efficiency. +* `rk8xx-core`: A core driver for the RK8xx series of Multi-Function Devices (MFD). This module provides support and interfaces for various integrated functions like power management and others within RK8xx chips. +* `rk8xx-spi`: This module is specifically for SPI (Serial Peripheral Interface) support in RK8xx series chips. It facilitates communication with devices connected via SPI, a common interface used in embedded systems. +* `sm3_generic`: A generic implementation of the SM3 cryptographic hash algorithm. This module provides functionality for generating secure hash values, commonly used in data integrity checks and digital signatures. Need for `rk_crypto2`. +* `rockchip-rng`: A hardware random number generator module for Rockchip SoCs. It provides high-quality random numbers, crucial for cryptographic applications and ensuring system security. diff --git a/sbcs/rk3588/files/modules.txt b/sbcs/rk3588/files/modules.txt new file mode 100644 index 0000000..975e84d --- /dev/null +++ b/sbcs/rk3588/files/modules.txt @@ -0,0 +1,10 @@ +modules.order +modules.builtin +modules.builtin.modinfo +kernel/drivers/cpufreq/rockchip-cpufreq.ko +kernel/drivers/crypto/rockchip/rk_crypto2.ko +kernel/drivers/regulator/rk808-regulator.ko +kernel/drivers/mfd/rk8xx-core.ko +kernel/drivers/mfd/rk8xx-spi.ko +kernel/crypto/sm3_generic.ko +kernel/drivers/char/hw_random/rockchip-rng.ko diff --git a/sbcs/rk3588/manifest.yaml b/sbcs/rk3588/manifest.yaml new file mode 100644 index 0000000..1ac9ac9 --- /dev/null +++ b/sbcs/rk3588/manifest.yaml @@ -0,0 +1,10 @@ +version: v1alpha1 +metadata: + name: rk3588-drivers + version: "$VERSION" + author: Nico Berlee + description: | + This system extension provides drivers needed for RK3588 boards. + compatibility: + talos: + version: ">= v1.6.0" diff --git a/sbcs/rk3588/pkg.yaml b/sbcs/rk3588/pkg.yaml new file mode 100644 index 0000000..6d68a57 --- /dev/null +++ b/sbcs/rk3588/pkg.yaml @@ -0,0 +1,29 @@ +name: rk3588 +variant: scratch +shell: /toolchain/bin/bash +dependencies: + - stage: base + # The pkgs version for a particular release of Talos as defined in + # https://github.com/siderolabs/talos/blob//pkg/machinery/gendata/data/pkgs + - image: "{{ .BUILD_ARG_PKG_KERNEL }}" +steps: + - prepare: + - | + sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml + - install: + - | + export KERNELRELEASE=$(find /lib/modules -type d -name "*-talos" -exec basename {} \+) + + mkdir -p /rootfs + + xargs -a /pkg/files/modules.txt -I {} install -D /lib/modules/${KERNELRELEASE}/{} /rootfs/lib/modules/${KERNELRELEASE}/{} + depmod -b /rootfs ${KERNELRELEASE} + - test: + - | + # https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping + find /rootfs/lib/modules -name '*.ko' -exec grep -FL '~Module signature appended~' {} \+ +finalize: + - from: /rootfs + to: /rootfs + - from: /pkg/manifest.yaml + to: / diff --git a/sbcs/rk3588/vars.yaml b/sbcs/rk3588/vars.yaml new file mode 100644 index 0000000..f380ba7 --- /dev/null +++ b/sbcs/rk3588/vars.yaml @@ -0,0 +1 @@ +VERSION: "{{ .BUILD_ARG_TAG }}" diff --git a/sbcs/vars.yaml b/sbcs/vars.yaml new file mode 100644 index 0000000..e69de29