Skip to content

Commit

Permalink
add: kernel-fyra
Browse files Browse the repository at this point in the history
Signed-off-by: Paskal Sitepu <[email protected]>
  • Loading branch information
rmnscnce committed Sep 18, 2023
1 parent ffeec0c commit c391741
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
6 changes: 6 additions & 0 deletions anda/others/kernel-fyra/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project pkg {
arches = ["x86_64", "aarch64"]
rpm {
spec = "dummy.spec"
}
}
58 changes: 58 additions & 0 deletions anda/others/kernel-fyra/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/sh

# Set the kernel-ark release build rev number
export KERNEL_ARK_REV='200'

# Set the Fyra kernel overlay version
export FYRA_KERNELOVERLAY_VER='2'

# Fetch the patches
git clone https://github.com/FyraLabs/linux-kernel-patches.git patches

# Move into the patches' directory
pushd patches

# Acquire the latest supported kernel-ark branch
export BRANCH="$(readlink current)"

# Move out from the patches' directory
popd

# Fetch the source
git clone -b ${BRANCH} https://gitlab.com/cki-project/kernel-ark.git source

# Move into the source directory
pushd source

# Set proper user name for commits
git config user.name 'Terra' ; git config user.email '[email protected]'

# Apply all patches
for patch in ../patches/${BRANCH}/*.patch
do git am $patch
done

# Build the SRPM
make \
IS_FEDORA=1 \
BUILD=${KERNEL_ARK_REV} \
SPECPACKAGE_NAME='kernel-fyra' \
DISTLOCALVERSION=".fyra${FYRA_KERNELOVERLAY_VER}" \
dist-srpm -j$(nproc)

# Build the resulting SRPM
rpmbuild -rb \
--without=debug \
--without=configchecks \
redhat/rpm/SRPMS/kernel-fyra-*.src.rpm

# Move the resulting RPM files into the target directory
for file in redhat/rpm/RPMS/*.rpm
do mv -v $file ../anda-build/rpm/rpms/
done

# Also move the SRPM package file
mv -v redhat/rpm/SRPMS/*.src.rpm ../anda-build/rpm/srpms/

# We're done here
exit 0
11 changes: 11 additions & 0 deletions anda/others/kernel-fyra/dummy.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Name: dummy
Summary: Dummy package
License: MIT

Version: 1.0.0
Release: 1%{?dist}

%description
Dummy

%files
8 changes: 8 additions & 0 deletions anda/others/kernel-fyra/pre.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Install the kernel dependencies first
sh("sudo dnf5 builddep kernel");

// Install git for source and patchset retrieval
sh("sudo dnf5 install git");

// Run the actual build script
sh("build.sh");

0 comments on commit c391741

Please sign in to comment.