first commit
This commit is contained in:
30
.gitea/build-kernel.yaml
Normal file
30
.gitea/build-kernel.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Build Custom Kernel
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-kernel:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Nix
|
||||
run: |
|
||||
curl -L https://nixos.org/nix/install | sh
|
||||
source ~/.nix-profile/etc/profile.d/nix.sh
|
||||
|
||||
- name: Build custom kernel
|
||||
run: |
|
||||
export NIX_BUILD_CORES=0
|
||||
nix-build '<nixpkgs/nixos>' -A config.system.build.kernel --arg configuration ./custom-kernel.nix
|
||||
|
||||
- name: Upload kernel artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: custom-kernel
|
||||
path: ./result
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/result
|
||||
custom-kernel.tar.gz
|
||||
21
README.md
Normal file
21
README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Building the custom kernel
|
||||
|
||||
On a NIX machine:
|
||||
```bash
|
||||
nix-build '<nixpkgs/nixos>' -A config.system.build.kernel --arg configuration ./custom-kernel.nix
|
||||
```
|
||||
|
||||
# Uploading the kernel as an artifact to Gitea
|
||||
|
||||
1. Create a tarball of the built kernel:
|
||||
```bash
|
||||
tar -czf custom-kernel.tar.gz -C result .
|
||||
```
|
||||
|
||||
2. Upload the tarball as an artifact to Gitea:
|
||||
```bash
|
||||
curl -X POST -H "Content-Type: application/octet-stream" \
|
||||
-H "Authorization: token YOUR_GITEA_TOKEN" \
|
||||
--data-binary @custom-kernel.tar.gz \
|
||||
"https://gitea.example.com/api/v1/repos/your-username/your-repo/releases/YOUR_RELEASE_ID/assets?name=custom-kernel.tar.gz"
|
||||
```
|
||||
16
custom-kernel.nix
Normal file
16
custom-kernel.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_6_6;
|
||||
boot.kernelPatches = [
|
||||
{
|
||||
name = "enable-ov5693";
|
||||
patch = null;
|
||||
extraConfig = ''
|
||||
MEDIA_SUPPORT y
|
||||
VIDEO_DEV y
|
||||
VIDEO_CAMERA_SENSOR y
|
||||
VIDEO_OV5693 y
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user