Add upstream kernel package (#551)

This commit is contained in:
Itxaka
2023-12-01 14:17:46 +01:00
committed by GitHub
parent 023149ff39
commit ab8facdf28
7 changed files with 25083 additions and 31 deletions

View File

@@ -9,7 +9,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: fast
env:
ARCH: amd64
steps:
@@ -56,6 +56,25 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Get kernel version
uses: mikefarah/yq@v4.40.3
id: kernel_version
with:
cmd: yq -r '.version' packages/kernels/upstream/definition.yaml
# this builds the kernel cross-compiled for arm64 so its faster
# notice that wee are not using builx nor platform so it runs under amd64
# This is much faster than building the kernel on arm64 via buildx and --platform
- name: Build kernel 🔧
uses: luet-lab/luet-github-action@master
with:
build: true
FINAL_REPO: quay.io/kairos/packages-arm64
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
REPOSITORY_TYPE: docker
pushFinalImages: true
pushCache: true
CURRENT_PACKAGE: kernels/linux@${{ steps.kernel_version.outputs.result }}
values: values/arm64.yaml
- name: Download meta 🔧
uses: luet-lab/luet-github-action@master
with:

View File

@@ -9,7 +9,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: fast
env:
ARCH: amd64
steps:

View File

@@ -7,7 +7,7 @@ on:
pull_request:
jobs:
build-arm64:
runs-on: ubuntu-latest
runs-on: fast
env:
ARCH: amd64
steps:
@@ -22,10 +22,29 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Get kernel version
uses: mikefarah/yq@v4.40.3
id: kernel_version
with:
cmd: yq -r '.version' packages/kernels/upstream/definition.yaml
# this builds the kernel cross-compiled for arm64 so its faster
# notice that wee are not using builx nor platform so it runs under amd64
# This is much faster than building the kernel on arm64 via buildx and --platform
- name: Build kernel 🔧
uses: luet-lab/luet-github-action@master
with:
build: true
FINAL_REPO: quay.io/kairos/packages-arm64
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
REPOSITORY_TYPE: docker
pushFinalImages: false
pushCache: false
CURRENT_PACKAGE: kernels/linux@${{ steps.kernel_version.outputs.result }}
values: values/arm64.yaml
- name: Download meta 🔧
uses: luet-lab/luet-github-action@master
with:
FINAL_REPO: quay.io/kairos/packages
FINAL_REPO: quay.io/kairos/packages-arm64
REPOSITORY_TYPE: docker
downloadAllMeta: false
downloadFromList: true
@@ -36,7 +55,7 @@ jobs:
build: true
fromIndex: true
onlyMissing: true
FINAL_REPO: quay.io/kairos/packages
FINAL_REPO: quay.io/kairos/packages-arm64
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
REPOSITORY_TYPE: docker
pushFinalImages: false
@@ -44,33 +63,32 @@ jobs:
values: values/arm64.yaml
buildx: true
platform: linux/arm64
build:
runs-on: ubuntu-latest
runs-on: fast
env:
ARCH: amd64
steps:
- uses: actions/checkout@v4
- run: |
git fetch --prune --unshallow
mkdir build
- name: Download meta 🔧
uses: luet-lab/luet-github-action@master
with:
FINAL_REPO: quay.io/kairos/packages
REPOSITORY_TYPE: docker
downloadAllMeta: false
downloadFromList: true
downloadMeta: true
- name: Build packages 🔧
uses: luet-lab/luet-github-action@master
with:
build: true
fromIndex: true
onlyMissing: true
FINAL_REPO: quay.io/kairos/packages
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
REPOSITORY_TYPE: docker
pushFinalImages: false
pushCache: false
values: values/amd64.yaml
- uses: actions/checkout@v4
- run: |
git fetch --prune --unshallow
mkdir build
- name: Download meta 🔧
uses: luet-lab/luet-github-action@master
with:
FINAL_REPO: quay.io/kairos/packages
REPOSITORY_TYPE: docker
downloadAllMeta: false
downloadFromList: true
downloadMeta: true
- name: Build packages 🔧
uses: luet-lab/luet-github-action@master
with:
build: true
fromIndex: true
onlyMissing: true
FINAL_REPO: quay.io/kairos/packages
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
REPOSITORY_TYPE: docker
pushFinalImages: false
pushCache: false
values: values/amd64.yaml

View File

@@ -0,0 +1,47 @@
image: "fedora:latest"
package_dir: "/package"
prelude:
- dnf update -y && dnf install -y gcc make bison flex openssl openssl-devel elfutils-libelf-devel bc kmod xxd wget xz dwarves python3 cpio perl gettext diffutils bash coreutils tar which bzip2 findutils m4 perl-interpreter perl-Carp perl-devel perl-generators make diffutils gawk binutils redhat-rpm-config hmaccalc gcc-c++ python3-devel zstd gcc-c++-aarch64-linux-gnu binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu
- wget https://cdn.kernel.org/pub/linux/kernel/v${PACKAGE_VERSION%%.*}.x/linux-${PACKAGE_VERSION}.tar.xz
- ls -lh
- tar xf linux-${PACKAGE_VERSION}.tar.xz
env:
{{ if .Values.arch }}
{{ if eq .Values.arch "arm64" }}
- ARCH=arm64
- CROSS_COMPILE=aarch64-linux-gnu-
{{else}}
- ARCH=x86_64
{{end}}
{{end}}
steps:
- mkdir -p /package/boot
- mkdir -p /package/lib/modules/${PACKAGE_VERSION}/
{{ if .Values.arch }}
{{ if eq .Values.arch "arm64" }}
- cp configs/arm64.config linux-${PACKAGE_VERSION}/.config
{{ else }}
- cp configs/x86.config linux-${PACKAGE_VERSION}/.config
{{ end }}
{{ end }}
- cd linux-${PACKAGE_VERSION} && make olddefconfig
{{ if .Values.arch }}
{{ if eq .Values.arch "arm64" }}
- diff configs/arm64.config linux-${PACKAGE_VERSION}/.config || true
{{ else }}
- diff configs/x86.config linux-${PACKAGE_VERSION}/.config || true
{{ end }}
{{ end }}
- cd linux-${PACKAGE_VERSION} && make kernelversion
{{ if .Values.arch }}
{{ if eq .Values.arch "arm64" }}
- cd linux-${PACKAGE_VERSION} && make -j$(nproc) Image
{{ else }}
- cd linux-${PACKAGE_VERSION} && make -j$(nproc) bzImage
{{ end }}
{{ end }}
- cd linux-${PACKAGE_VERSION} && make -j$(nproc) modules
- cd linux-${PACKAGE_VERSION} && make install
- cd linux-${PACKAGE_VERSION} && ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="/package/" INSTALL_MOD_STRIP=1 modules_install
- cp /boot/* /package/boot

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
category: "kernels"
name: "linux"
version: "6.5.7"
labels:
autobump.revdeps: "false"
autobump.string_replace: '{ "prefix": "" }'
autobump.strategy: "custom"
autobump.prefix: "prefix"
autobump.hook: |
curl -Ls https://kernel.org/releases.json | jq -cr '.latest_stable.version'
autobump.version_hook: |
curl -Ls https://kernel.org/releases.json | jq -cr '.latest_stable.version'
package.version: "6.5.7"