Skip to content

Commit

Permalink
AGNi HyperOS v7.5 stable [5.4.288] with Non-KSU builds
Browse files Browse the repository at this point in the history
  • Loading branch information
psndna88 committed Dec 20, 2024
1 parent 3a17599 commit 782ce57
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 13 deletions.
7 changes: 3 additions & 4 deletions AGNi_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
## AGNi version info
KERNELDIR=`readlink -f .`

export AGNI_VERSION_PREFIX="stable"
export AGNI_VERSION="v7.4"
sed -i 's/5.4.286/5.4.287/' $KERNELDIR/arch/arm64/configs/agni_*
sed -i 's/v7.3-stable/v7.4-stable/' $KERNELDIR/arch/arm64/configs/agni_*
export AGNI_VERSION="v7.5"
sed -i 's/5.4.287/5.4.288/' $KERNELDIR/arch/arm64/configs/agni_*
sed -i 's/v7.4-stable/v7.5-stable/' $KERNELDIR/arch/arm64/configs/agni_*

echo " AGNi Version info loaded."

4 changes: 2 additions & 2 deletions arch/arm64/configs/agni_haydn_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.4.287 Kernel Configuration
# Linux/arm64 5.4.288 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="clang version 18.0.0"
CONFIG_GCC_VERSION=0
Expand All @@ -21,7 +21,7 @@ CONFIG_THREAD_INFO_IN_TASK=y
#
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
CONFIG_LOCALVERSION="-AGNi_haydn_HyperOS_v7.4-stable-qgki"
CONFIG_LOCALVERSION="-AGNi_haydn_HyperOS_v7.5-stable-qgki"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_BUILD_SALT=""
CONFIG_DEFAULT_HOSTNAME="haydn"
Expand Down
55 changes: 51 additions & 4 deletions build_kernel_haydn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export AGNI_BUILD_TYPE="HyperOS"
SYNC_CONFIG=1

. $KERNELDIR/AGNi_version.sh
FILENAME="AGNi_kernel-$DEVICE-$AGNI_VERSION_PREFIX-$AGNI_VERSION-$AGNI_BUILD_TYPE.zip"
FILENAME="AGNi_kernel-$DEVICE-$AGNI_VERSION-$AGNI_BUILD_TYPE.zip"

if [ -f ~/WORKING_DIRECTORY/AGNi_stamp.sh ]; then
. ~/WORKING_DIRECTORY/AGNi_stamp.sh
Expand Down Expand Up @@ -50,7 +50,7 @@ cd $KERNELDIR/

echo ""
echo " ~~~~~ Cross-compiling AGNi kernel $DEVICE ~~~~~"
echo " VERSION: AGNi $AGNI_VERSION_PREFIX $AGNI_VERSION $AGNI_BUILD_TYPE"
echo " VERSION: AGNi $AGNI_VERSION $AGNI_BUILD_TYPE"
echo ""

rm $COMPILEDIR_HAYDN/.config 2>/dev/null
Expand All @@ -63,7 +63,6 @@ make -j`nproc --ignore=2` O=$COMPILEDIR_HAYDN
if [ $SYNC_CONFIG -eq 1 ]; then # SYNC CONFIG
cp -f $COMPILEDIR_HAYDN/.config $KERNELDIR/arch/arm64/configs/$CONFIG1
fi
rm $COMPILEDIR_HAYDN/.config $COMPILEDIR_HAYDN/.config.old 2>/dev/null

if ([ -f $COMPILEDIR_HAYDN/arch/arm64/boot/Image ]); then
mv $COMPILEDIR_HAYDN/arch/arm64/boot/Image $KERNELDIR/$DIR/Image
Expand All @@ -88,7 +87,55 @@ if [ -f $KERNELDIR/$DIR/Image ]; then
fi
rm -rf $KERNELDIR/$DIR
echo " <<<<< AGNi has been built for $DEVICE !!! >>>>>>"
echo " VERSION: AGNi $AGNI_VERSION_PREFIX $AGNI_VERSION $AGNI_BUILD_TYPE"
echo " VERSION: AGNi $AGNI_VERSION $AGNI_BUILD_TYPE"
echo " FILE: $FILENAME"
# cd $KERNELDIR && ./abi_generate.sh
else
echo " >>>>> AGNi $DEVICE BUILD ERROR <<<<<"
fi

############################# NO KERNELSU #######################################

sed -i 's/CONFIG_KSU=y/# CONFIG_KSU is not set/' $COMPILEDIR_HAYDN/.config
FILENAME="AGNi_kernel-$DEVICE-$AGNI_VERSION-$AGNI_BUILD_TYPE-NoKSU.zip"

echo ""
echo " ~~~~~ Cross-compiling AGNi kernel $DEVICE NoKernelSU ~~~~~"
echo " VERSION: AGNi $AGNI_VERSION $AGNI_BUILD_TYPE"
echo ""

DIR="BUILT-$DEVICE"
rm -rf $KERNELDIR/$DIR
mkdir -p $KERNELDIR/$DIR
cd $KERNELDIR/

make -j`nproc --ignore=2` O=$COMPILEDIR_HAYDN

rm $COMPILEDIR_HAYDN/.config $COMPILEDIR_HAYDN/.config.old 2>/dev/null

if ([ -f $COMPILEDIR_HAYDN/arch/arm64/boot/Image ]); then
mv $COMPILEDIR_HAYDN/arch/arm64/boot/Image $KERNELDIR/$DIR/Image
mv $COMPILEDIR_HAYDN/arch/arm64/boot/dtb.img $KERNELDIR/$DIR/dtb.img
mv $COMPILEDIR_HAYDN/arch/arm64/boot/dtbo.img $KERNELDIR/$DIR/dtbo.img
else
echo " ERROR: Cross-compiling AGNi kernel $DEVICE."
rm -rf $KERNELDIR/$DIR
fi

echo ""

if [ -f $KERNELDIR/$DIR/Image ]; then
cp -r $KERNELDIR/anykernel3/* $KERNELDIR/$DIR/
cd $KERNELDIR/$DIR/
zip -rq $READY_ZIP/$FILENAME *
if [ -f ~/WORKING_DIRECTORY/zipsigner-3.0.jar ]; then
echo " Zip Signing...."
java -jar ~/WORKING_DIRECTORY/zipsigner-3.0.jar $READY_ZIP/$FILENAME $READY_ZIP/$FILENAME-signed 2>/dev/null
mv $READY_ZIP/$FILENAME-signed $READY_ZIP/$FILENAME
fi
rm -rf $KERNELDIR/$DIR
echo " <<<<< AGNi has been built for $DEVICE !!! >>>>>>"
echo " VERSION: AGNi $AGNI_VERSION $AGNI_BUILD_TYPE"
echo " FILE: $FILENAME"
# cd $KERNELDIR && ./abi_generate.sh
else
Expand Down
54 changes: 51 additions & 3 deletions build_kernel_haydn_90hz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export AGNI_BUILD_TYPE="HyperOS-90HZ"
SYNC_CONFIG=1

. $KERNELDIR/AGNi_version.sh
FILENAME="AGNi_kernel-$DEVICE-$AGNI_VERSION_PREFIX-$AGNI_VERSION-$AGNI_BUILD_TYPE.zip"
FILENAME="AGNi_kernel-$DEVICE-$AGNI_VERSION-$AGNI_BUILD_TYPE.zip"

if [ -f ~/WORKING_DIRECTORY/AGNi_stamp.sh ]; then
. ~/WORKING_DIRECTORY/AGNi_stamp.sh
Expand Down Expand Up @@ -50,7 +50,7 @@ cd $KERNELDIR/

echo ""
echo " ~~~~~ Cross-compiling AGNi kernel $DEVICE ~~~~~"
echo " VERSION: AGNi $AGNI_VERSION_PREFIX $AGNI_VERSION $AGNI_BUILD_TYPE"
echo " VERSION: AGNi $AGNI_VERSION $AGNI_BUILD_TYPE"
echo ""

rm $COMPILEDIR_HAYDN/.config 2>/dev/null
Expand All @@ -66,6 +66,54 @@ make -j`nproc --ignore=2` O=$COMPILEDIR_HAYDN
if [ $SYNC_CONFIG -eq 1 ]; then # SYNC CONFIG
cp -f $COMPILEDIR_HAYDN/.config $KERNELDIR/arch/arm64/configs/$CONFIG1
fi

if ([ -f $COMPILEDIR_HAYDN/arch/arm64/boot/Image ]); then
mv $COMPILEDIR_HAYDN/arch/arm64/boot/Image $KERNELDIR/$DIR/Image
mv $COMPILEDIR_HAYDN/arch/arm64/boot/dtb.img $KERNELDIR/$DIR/dtb.img
mv $COMPILEDIR_HAYDN/arch/arm64/boot/dtbo.img $KERNELDIR/$DIR/dtbo.img
else
echo " ERROR: Cross-compiling AGNi kernel $DEVICE."
rm -rf $KERNELDIR/$DIR
fi

echo ""

###### ZIP Packing
if [ -f $KERNELDIR/$DIR/Image ]; then
cp -r $KERNELDIR/anykernel3/* $KERNELDIR/$DIR/
cd $KERNELDIR/$DIR/
zip -rq $READY_ZIP/$FILENAME *
if [ -f ~/WORKING_DIRECTORY/zipsigner-3.0.jar ]; then
echo " Zip Signing...."
java -jar ~/WORKING_DIRECTORY/zipsigner-3.0.jar $READY_ZIP/$FILENAME $READY_ZIP/$FILENAME-signed 2>/dev/null
mv $READY_ZIP/$FILENAME-signed $READY_ZIP/$FILENAME
fi
rm -rf $KERNELDIR/$DIR
echo " <<<<< AGNi has been built for $DEVICE !!! >>>>>>"
echo " VERSION: AGNi $AGNI_VERSION $AGNI_BUILD_TYPE"
echo " FILE: $FILENAME"
# cd $KERNELDIR && ./abi_generate.sh
else
echo " >>>>> AGNi $DEVICE BUILD ERROR <<<<<"
fi

############################# NO KERNELSU #######################################

sed -i 's/CONFIG_KSU=y/# CONFIG_KSU is not set/' $COMPILEDIR_HAYDN/.config
FILENAME="AGNi_kernel-$DEVICE-$AGNI_VERSION-$AGNI_BUILD_TYPE-NoKSU.zip"

echo ""
echo " ~~~~~ Cross-compiling AGNi kernel $DEVICE NoKernelSU ~~~~~"
echo " VERSION: AGNi $AGNI_VERSION $AGNI_BUILD_TYPE"
echo ""

DIR="BUILT-$DEVICE"
rm -rf $KERNELDIR/$DIR
mkdir -p $KERNELDIR/$DIR
cd $KERNELDIR/

make -j`nproc --ignore=2` O=$COMPILEDIR_HAYDN

rm $COMPILEDIR_HAYDN/.config $COMPILEDIR_HAYDN/.config.old 2>/dev/null

if ([ -f $COMPILEDIR_HAYDN/arch/arm64/boot/Image ]); then
Expand Down Expand Up @@ -94,7 +142,7 @@ if [ -f $KERNELDIR/$DIR/Image ]; then
fi
rm -rf $KERNELDIR/$DIR
echo " <<<<< AGNi has been built for $DEVICE !!! >>>>>>"
echo " VERSION: AGNi $AGNI_VERSION_PREFIX $AGNI_VERSION $AGNI_BUILD_TYPE"
echo " VERSION: AGNi $AGNI_VERSION $AGNI_BUILD_TYPE"
echo " FILE: $FILENAME"
# cd $KERNELDIR && ./abi_generate.sh
else
Expand Down

0 comments on commit 782ce57

Please sign in to comment.