BuildScript: support for new installer

This commit is contained in:
xxmustafacooTR 2023-05-03 15:14:33 +03:00
parent 8b3ed567ea
commit 276b6f0bd6
No known key found for this signature in database
GPG key ID: 520B6FE385CBF5C9
6 changed files with 97 additions and 16 deletions

View file

@ -7,9 +7,23 @@ clean_temp
cp -vr $CUR_DIR/arch/arm64/configs/exynos9810_defconfig $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
echo "" >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
cat $CUR_DIR/arch/arm64/configs/exynos9810-crownlte_defconfig >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
make exynos9810_temp_defconfig -j$(nproc --all)
if [ ! -z "$1" ]
then
if [ "$1" == "stock" ]; then
patch_stock
elif [ "$1" == "a11" ]; then
patch_wifi
elif [ "$1" == "aosp" ]; then
patch_aosp
fi
fi
make -j$(nproc --all)
cp -vr $CUR_DIR/arch/arm64/boot/Image $ZIP_DIR/Kernel/crownlte/zImage
cp -vr $CUR_DIR/arch/arm64/boot/dtb.img $ZIP_DIR/Kernel/crownlte/dtb.img
printf $KERNEL_NAME
cp -vr $CUR_DIR/arch/arm64/boot/Image $ZIP_DIR/$KERNEL_NAME/crownlte/zImage
cp -vr $CUR_DIR/arch/arm64/boot/dtb.img $ZIP_DIR/$KERNEL_NAME/crownlte/dtb.img

View file

@ -9,9 +9,21 @@ echo "" >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
cat $CUR_DIR/arch/arm64/configs/exynos9810-starxlte_defconfig >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
echo "" >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
cat $CUR_DIR/arch/arm64/configs/exynos9810-star2lte_defconfig >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
make exynos9810_temp_defconfig -j$(nproc --all)
if [ ! -z "$1" ]
then
if [ "$1" == "stock" ]; then
patch_stock
elif [ "$1" == "a11" ]; then
patch_wifi
elif [ "$1" == "aosp" ]; then
patch_aosp
fi
fi
make -j$(nproc --all)
cp -vr $CUR_DIR/arch/arm64/boot/Image $ZIP_DIR/Kernel/star2lte/zImage
cp -vr $CUR_DIR/arch/arm64/boot/dtb.img $ZIP_DIR/Kernel/star2lte/dtb.img
printf $KERNEL_NAME
cp -vr $CUR_DIR/arch/arm64/boot/Image $ZIP_DIR/$KERNEL_NAME/star2lte/zImage
cp -vr $CUR_DIR/arch/arm64/boot/dtb.img $ZIP_DIR/$KERNEL_NAME/star2lte/dtb.img

View file

@ -9,9 +9,21 @@ echo "" >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
cat $CUR_DIR/arch/arm64/configs/exynos9810-starxlte_defconfig >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
echo "" >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
cat $CUR_DIR/arch/arm64/configs/exynos9810-starlte_defconfig >> $CUR_DIR/arch/arm64/configs/exynos9810_temp_defconfig
make exynos9810_temp_defconfig -j$(nproc --all)
if [ ! -z "$1" ]
then
if [ "$1" == "stock" ]; then
patch_stock
elif [ "$1" == "a11" ]; then
patch_wifi
elif [ "$1" == "aosp" ]; then
patch_aosp
fi
fi
make -j$(nproc --all)
cp -vr $CUR_DIR/arch/arm64/boot/Image $ZIP_DIR/Kernel/starlte/zImage
cp -vr $CUR_DIR/arch/arm64/boot/dtb.img $ZIP_DIR/Kernel/starlte/dtb.img
printf $KERNEL_NAME
cp -vr $CUR_DIR/arch/arm64/boot/Image $ZIP_DIR/$KERNEL_NAME/starlte/zImage
cp -vr $CUR_DIR/arch/arm64/boot/dtb.img $ZIP_DIR/$KERNEL_NAME/starlte/dtb.img

View file

@ -1,8 +1,16 @@
#!/bin/bash
export ARCH=arm64
export CROSS_COMPILE=../PLATFORM/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
export ANDROID_MAJOR_VERSION=q
make exynos9810-star2lte_defconfig
make -j64
. clean.sh all
. buildN9.sh stock
. buildS9.sh stock
. buildS9+.sh stock
. buildS9.sh
. buildS9.sh a11
. buildS9.sh aosp
. buildN9.sh
. buildN9.sh a11
. buildN9.sh aosp
. buildS9+.sh aosp
. buildS9+.sh a11
. buildS9+.sh
. zip.sh

View file

@ -5,5 +5,16 @@
printf "Cleaning\n"
clean_temp
cd $CUR_DIR
if [ ! -z "$1" ]
then
if [ "$1" == "all" ]; then
clean_prebuilt
make -j$(nproc) clean
make -j$(nproc) mrproper
elif [ "$1" == "zip" ]; then
clean_prebuilt
fi
else
make -j$(nproc) clean
make -j$(nproc) mrproper
fi

View file

@ -18,6 +18,7 @@ export KALLSYMS_EXTRA_PASS=1
export ARCH=arm64 && export SUBARCH=arm64
ZIP_DIR="/home/$USER/Android/Kernel/Zip"
KERNEL_NAME="Kernel"
CUR_DIR=$PWD
clean_temp() {
@ -25,6 +26,21 @@ clean_temp() {
rm -rf vmlinux.* drivers/gator_5.27/gator_src_md5.h scripts/dtbtool_exynos/dtbtool arch/arm64/boot/dtb.img arch/arm64/boot/dts/exynos/*dtb* arch/arm64/configs/exynos9810_temp_defconfig
}
clean_prebuilt() {
cd $CUR_DIR
rm -rf $ZIP_DIR/Kernel/crownlte/zImage $ZIP_DIR/Kernel/crownlte/dtb.img $ZIP_DIR/Kernel/star2lte/zImage $ZIP_DIR/Kernel/star2lte/dtb.img $ZIP_DIR/Kernel/starlte/zImage $ZIP_DIR/Kernel/starlte/dtb.img
rm -rf $ZIP_DIR/Kernel-a11/crownlte/zImage $ZIP_DIR/Kernel-a11/crownlte/dtb.img $ZIP_DIR/Kernel-a11/star2lte/zImage $ZIP_DIR/Kernel-a11/star2lte/dtb.img $ZIP_DIR/Kernel-a11/starlte/zImage $ZIP_DIR/Kernel-a11/starlte/dtb.img
rm -rf $ZIP_DIR/Kernel-aosp/crownlte/zImage $ZIP_DIR/Kernel-aosp/crownlte/dtb.img $ZIP_DIR/Kernel-aosp/star2lte/zImage $ZIP_DIR/Kernel-aosp/star2lte/dtb.img $ZIP_DIR/Kernel-aosp/starlte/zImage $ZIP_DIR/Kernel-aosp/starlte/dtb.img
rm -rf $ZIP_DIR/Kernel-stock/crownlte/zImage $ZIP_DIR/Kernel-stock/crownlte/dtb.img $ZIP_DIR/Kernel-stock/star2lte/zImage $ZIP_DIR/Kernel-stock/star2lte/dtb.img $ZIP_DIR/Kernel-stock/starlte/zImage $ZIP_DIR/Kernel-stock/starlte/dtb.img
}
patch_wifi() {
printf "Patching Wifi to Old Driver\n"
sed -i 's/CONFIG_BCMDHD_101_16=y/# CONFIG_BCMDHD_101_16 is not set/g' "$CUR_DIR"/.config
sed -i 's/# CONFIG_BCMDHD_100_15 is not set/CONFIG_BCMDHD_100_15=y/g' "$CUR_DIR"/.config
KERNEL_NAME="Kernel-a11"
}
patch_stock() {
printf "Patching Cached Defconfig For Stock Rom\n"
sed -i 's/CONFIG_SECURITY_SELINUX_NEVER_ENFORCE=y/# CONFIG_SECURITY_SELINUX_NEVER_ENFORCE is not set/g' "$CUR_DIR"/.config
@ -38,11 +54,19 @@ patch_stock() {
sed -i 's/CONFIG_VSOCKETS=y/# CONFIG_VSOCKETS is not set/g' "$CUR_DIR"/.config
sed -i 's/# CONFIG_CGROUP_NET_CLASSID is not set/CONFIG_CGROUP_NET_CLASSID=y/g' "$CUR_DIR"/.config
sed -i 's/CONFIG_CUSTOM_FORCETOUCH=y/# CONFIG_CUSTOM_FORCETOUCH is not set/g' "$CUR_DIR"/.config
sed -i 's/CONFIG_BCMDHD_101_16=y/# CONFIG_BCMDHD_101_16 is not set/g' "$CUR_DIR"/.config
sed -i 's/# CONFIG_BCMDHD_100_15 is not set/CONFIG_BCMDHD_100_15=y/g' "$CUR_DIR"/.config
patch_wifi
echo "" >> "$CUR_DIR"/.config
echo "CONFIG_TCP_CONG_LIA=y" >> "$CUR_DIR"/.config
echo "CONFIG_TCP_CONG_OLIA=y" >> "$CUR_DIR"/.config
echo "CONFIG_NETFILTER_XT_MATCH_QTAGUID=y" >> "$CUR_DIR"/.config
echo "CONFIG_NETFILTER_XT_MATCH_ONESHOT=y" >> "$CUR_DIR"/.config
KERNEL_NAME="Kernel-stock"
}
patch_aosp() {
printf "Patching Cached Defconfig For AOSP Base\n"
sed -i 's/CONFIG_USB_ANDROID_SAMSUNG_MTP=y/# CONFIG_USB_ANDROID_SAMSUNG_MTP is not set/g' "$CUR_DIR"/.config
sed -i 's/CONFIG_ZRAM_LRU_WRITEBACK=y/# CONFIG_ZRAM_LRU_WRITEBACK is not set/g' "$CUR_DIR"/.config
sed -i 's/CONFIG_ZRAM_LRU_WRITEBACK_LIMIT=5120/CONFIG_ZRAM_LRU_WRITEBACK_LIMIT=1024/g' "$CUR_DIR"/.config
KERNEL_NAME="Kernel-aosp"
}