From 782ce576177e0b4e26f9ea3d64ab650a9b8dd9bb Mon Sep 17 00:00:00 2001 From: psndna88 Date: Fri, 20 Dec 2024 14:46:07 +0530 Subject: [PATCH] AGNi HyperOS v7.5 stable [5.4.288] with Non-KSU builds --- AGNi_version.sh | 7 ++-- arch/arm64/configs/agni_haydn_defconfig | 4 +- build_kernel_haydn.sh | 55 +++++++++++++++++++++++-- build_kernel_haydn_90hz.sh | 54 ++++++++++++++++++++++-- 4 files changed, 107 insertions(+), 13 deletions(-) diff --git a/AGNi_version.sh b/AGNi_version.sh index 3c5a25bad433..59466405dcdc 100755 --- a/AGNi_version.sh +++ b/AGNi_version.sh @@ -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." diff --git a/arch/arm64/configs/agni_haydn_defconfig b/arch/arm64/configs/agni_haydn_defconfig index 188d71df8796..df6e7be40e65 100644 --- a/arch/arm64/configs/agni_haydn_defconfig +++ b/arch/arm64/configs/agni_haydn_defconfig @@ -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 @@ -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" diff --git a/build_kernel_haydn.sh b/build_kernel_haydn.sh index 6563c51f2f71..271b50606064 100755 --- a/build_kernel_haydn.sh +++ b/build_kernel_haydn.sh @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/build_kernel_haydn_90hz.sh b/build_kernel_haydn_90hz.sh index a68a8c3e9f4c..2efc80d940ef 100755 --- a/build_kernel_haydn_90hz.sh +++ b/build_kernel_haydn_90hz.sh @@ -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 @@ -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 @@ -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 @@ -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