Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add applesmc-t2 to support fan control #299

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ COMMON_ARGS += --build-arg=PKGS="$(PKGS)"

TARGETS = amdgpu-firmware
TARGETS += amd-ucode
TARGETS += applesmc-t2
TARGETS += binfmt-misc
TARGETS += bnx2-bnx2x
TARGETS += btrfs
Expand Down
18 changes: 18 additions & 0 deletions drivers/applesmc-t2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# applesmc-t2 extension

## Installation

See [Installing Extensions](https://github.com/siderolabs/extensions#installing-extensions).

## Usage

Provides:

* `applesmc`

```yaml
machine:
kernel:
modules:
- name: applesmc
```
10 changes: 10 additions & 0 deletions drivers/applesmc-t2/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: applesmc-t2
version: "$VERSION"
author: Anthony A.
description: |
applesmc module patched for t2 chips to allow fan control with t2fand
compatibility:
talos:
version: ">= v1.5.0"
23 changes: 23 additions & 0 deletions drivers/applesmc-t2/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: applesmc-t2
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/<talos version>/pkg/machinery/gendata/data/pkgs
- image: "{{ .PKGS_PREFIX }}/applesmc-t2-pkg:{{ .BUILD_ARG_PKGS }}"
steps:
- prepare:
- |
export KERNELRELEASE=$(find /lib/modules -type d -name "*-talos" -exec basename {} \+)
sed -i "s#\$VERSION#${KERNELRELEASE}-{{ .VERSION }}#" /pkg/manifest.yaml
- install:
- |
mkdir -p /rootfs/lib/modules

cp -R /lib/modules/* /rootfs/lib/modules
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
1 change: 1 addition & 0 deletions drivers/applesmc-t2/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION: "{{ .BUILD_ARG_TAG }}"