-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts: refactor for new enviroment
- boi has a VM now Signed-off-by: UtsavBalar1231 <[email protected]>
- Loading branch information
1 parent
c7a1370
commit d3cac4b
Showing
4 changed files
with
150 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
|
||
# HOME path | ||
HOME=/home/utsavthecunt | ||
# Kernel Output | ||
OUT_DIR=out/ | ||
|
||
DATE=$(date +"%d.%m.%y") | ||
ZIPNAME=IMMENSiTY-AUTO-RAPHAEL-LOSFOD-${DATE}.zip | ||
|
||
make ARCH=arm64 \ | ||
O=${OUT_DIR} \ | ||
raphael_defconfig \ | ||
-j6 | ||
|
||
# Enable LLD | ||
scripts/config --file ${OUT_DIR}/.config \ | ||
-d LTO \ | ||
-d LTO_CLANG \ | ||
-e SHADOW_CALL_STACK \ | ||
-e TOOLS_SUPPORT_RELR \ | ||
-e LD_LLD | ||
|
||
# Make olddefconfig | ||
cd ${OUT_DIR} | ||
make O=${OUT_DIR} \ | ||
ARCH=arm64 \ | ||
olddefconfig | ||
cd ../ | ||
|
||
# Set compiler PATH | ||
PATH=${HOME}/proton-clang/bin/:$PATH | ||
|
||
# Let's build | ||
START=$(date +"%s") | ||
|
||
make ARCH=arm64 \ | ||
O=${OUT_DIR} \ | ||
CC="ccache clang" \ | ||
LD="ld.lld" \ | ||
AR="llvm-ar" \ | ||
NM="llvm-nm" \ | ||
OBJCOPY="llvm-objcopy" \ | ||
OBJDUMP="llvm-objdump" \ | ||
STRIP="llvm-strip" \ | ||
CLANG_TRIPLE="aarch64-linux-gnu-" \ | ||
CROSS_COMPILE="aarch64-linux-gnu-" \ | ||
CROSS_COMPILE_ARM32="arm-linux-gnueabi-" \ | ||
-j6 | ||
|
||
# Import Anykernel3 folder | ||
cp -r ${HOME}/anykernel $(pwd)/ | ||
cp $(pwd)/${OUT_DIR}/arch/arm64/boot/Image.gz-dtb $(pwd)/anykernel/ | ||
cp $(pwd)/${OUT_DIR}/arch/arm64/boot/dtbo.img $(pwd)/anykernel/ | ||
|
||
cd anykernel | ||
zip -r9 ${ZIPNAME} * | ||
CHECKER=$(ls -l ${ZIPNAME} | awk '{print $5}') | ||
if (($((CHECKER / 1048576)) > 5)); then | ||
gdrive upload ${ZIPNAME} | ||
else | ||
echo -e '\033[01;31m' "kernel compilation unsuccesfull" | ||
exit 1; | ||
fi | ||
cd ../ | ||
|
||
# Cleanup | ||
rm -fr anykernel/ | ||
rm ${OUT_DIR}/.version | ||
rm ${OUT_DIR}/arch/arm64/boot/Image.gz-dtb | ||
rm ${OUT_DIR}/arch/arm64/boot/dtbo.img | ||
|
||
END=$(date +"%s") | ||
DIFF=$(( END - START)) | ||
echo -e '\033[01;32m' "Kernel compiled successfully in $((DIFF / 60)) minute(s) and $((DIFF % 60)) seconds" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
|
||
# HOME path | ||
HOME=/home/utsavthecunt | ||
# Kernel Output | ||
OUT_DIR=out/ | ||
|
||
DATE=$(date +"%d.%m.%y") | ||
ZIPNAME=IMMENSiTY-AUTO-RAPHAEL-LOSFOD-${DATE}.zip | ||
|
||
make ARCH=arm64 \ | ||
O=${OUT_DIR} \ | ||
raphael_defconfig \ | ||
-j6 | ||
|
||
# Enable LLD + LTO | ||
scripts/config --file ${OUT_DIR}/.config \ | ||
-e LTO \ | ||
-e LTO_CLANG \ | ||
-e SHADOW_CALL_STACK \ | ||
-e TOOLS_SUPPORT_RELR \ | ||
-e LD_LLD | ||
|
||
# Make olddefconfig | ||
cd ${OUT_DIR} | ||
make O=${OUT_DIR} \ | ||
ARCH=arm64 \ | ||
olddefconfig | ||
cd ../ | ||
|
||
# Set compiler PATH | ||
PATH=${HOME}/proton-clang/bin/:$PATH | ||
|
||
# Let's build | ||
START=$(date +"%s") | ||
|
||
make ARCH=arm64 \ | ||
O=${OUT_DIR} \ | ||
CC="ccache clang" \ | ||
LD="ld.lld" \ | ||
AR="llvm-ar" \ | ||
NM="llvm-nm" \ | ||
OBJCOPY="llvm-objcopy" \ | ||
OBJDUMP="llvm-objdump" \ | ||
STRIP="llvm-strip" \ | ||
CLANG_TRIPLE="aarch64-linux-gnu-" \ | ||
CROSS_COMPILE="aarch64-linux-gnu-" \ | ||
CROSS_COMPILE_ARM32="arm-linux-gnueabi-" \ | ||
-j6 | ||
|
||
# Import Anykernel3 folder | ||
cp -r ${HOME}/anykernel $(pwd)/ | ||
cp $(pwd)/${OUT_DIR}/arch/arm64/boot/Image.gz-dtb $(pwd)/anykernel/ | ||
cp $(pwd)/${OUT_DIR}/arch/arm64/boot/dtbo.img $(pwd)/anykernel/ | ||
|
||
cd anykernel | ||
zip -r9 ${ZIPNAME} * | ||
CHECKER=$(ls -l ${ZIPNAME} | awk '{print $5}') | ||
if (($((CHECKER / 1048576)) > 5)); then | ||
gdrive upload ${ZIPNAME} | ||
else | ||
echo -e '\033[01;31m' "kernel compilation unsuccesfull" | ||
exit 1; | ||
fi | ||
cd ../ | ||
|
||
# Cleanup | ||
rm -fr anykernel/ | ||
rm ${OUT_DIR}/.version | ||
rm ${OUT_DIR}/arch/arm64/boot/Image.gz-dtb | ||
rm ${OUT_DIR}/arch/arm64/boot/dtbo.img | ||
|
||
END=$(date +"%s") | ||
DIFF=$(( END - START)) | ||
echo -e '\033[01;32m' "Kernel compiled successfully in $((DIFF / 60)) minute(s) and $((DIFF % 60)) seconds" |
This file was deleted.
Oops, something went wrong.