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 6b7ca5b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
3 changes: 3 additions & 0 deletions anda/others/kernel-fyra/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
project pkg {
arches = ["x86_64", "aarch64"]
}
55 changes: 55 additions & 0 deletions anda/others/kernel-fyra/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/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 SRPM into the target directory
for file in redhat/rpm/RPMS/*.rpm
do mv -v $file ../anda-build/rpm/rpms/
done

# We're done here
exit 0
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 6b7ca5b

Please sign in to comment.