0
0
.dotfiles/micro/backups/%home%corinthe%kern%dewit.sh

42 lines
2.0 KiB
Bash
Raw Permalink Normal View History

2024-03-24 14:13:58 -04:00
#!/bin/bash
export prefix=/home/corinthe
cd kernel_google_wahoo.tryagain
rm -rf out
mkdir out
export ARCH=arm64
export SUBARCH=arm64
export DTC_EXT=dtc
if [ -z $1 ]; then
make O=out ARCH=arm64 wahoo_defconfig
make menuconfig
fi
export ARCH=arm64
#export CLANG_TRIPLE=aarch64-linux-gnu-
#export CROSS_COMPILE=$prefix/hi/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-androidkernel-
#export LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=$prefix/hi/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
#export PATH="$prefix/hi/prebuilts/clang/kernel/linux-x86/clang-r416183b/bin:$PATH"
# $prefix/ndk/tools/gcc/linux-x86/aarch64/gcc-linaro-7.5.0/bin
#export PATH="$(cat /home/corinthe/path-uniq.txt | awk -v RS='Start|End' -v OFS=":" '$1=$1')"
export PREV=$(pwd)
cd $prefix/hi
source $prefix/hi/build/envsetup.sh
cd $PREV
export PATH="$prefix/proton-clang/bin:$prefix/ndk/tools/misc/linux-x86/libufdt:$PATH"
export ARCH=arm64
export CC=clang
export CROSS_COMPILE=aarch64-linux-gnu-
export CROSS_COMPILE_ARM32=arm-linux-gnueabi-
#export CFLAGS=-I/home/corinthe/ndk/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include/
which ld
shopt -s globstar
#export O=out ARCH=arm64 CLANG_TRIPLE=aarch64-linux-gnu-gcc LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN="$prefix/ndk/tools/gcc/linux-x86/aarch64/gcc-linaro-7.5.0/bin" CROSS_COMPILE=/home/corinthe/ndk/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/bin CFLAGS="-mabi=lp64 -march=armv8-a" CROSS_COMPILE_ARM32=aarch64-linux-android ARCH=arm64 SUBARCH=arm64 V=2
#LD=$prefix/ndk/android-ndk-r26b/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
export MYCFLAGS="-Wno-misleading-indentation -Wno-maybe-uninitialized -Wno-array-parameter -Wno-format-security -Wno-format -Iinc/"
make all -j8 HOST_CFLAGS="" HOSTCFLAGS="" ETRA_CFLAGS=$MYCFLAGS LD=aarch64-linux-gnu-ld.bfd HOSTLD=/bin/ld OUT=out LDFLAGS_vmlinux="-EL -maarch64elf -X -z norelro -shared -Bsymbolic -z notext --no-apply-dynamic-relocs --fix-cortex-a53-843419 --build-id"
#KBUILD_SRC=$(pwd)/out
echo $?