build: small script fixes

This commit is contained in:
TheKit
2020-10-02 22:49:50 +03:00
parent cc66175655
commit 1cf0faafd9
2 changed files with 8 additions and 11 deletions

View File

@@ -23,42 +23,39 @@ TMPDOWN=$(mktemp -d)
cd "$TMPDOWN"
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 -b pie-gsi --depth 1
GCC_PATH="$TMPDOWN/aarch64-linux-android-4.9"
if $deviceinfo_kernel_clang_compile; then
if [ -n "$deviceinfo_kernel_clang_compile" ] && $deviceinfo_kernel_clang_compile; then
git clone https://github.com/AICP/prebuilts_clang_host_linux-x86 -b p9.0 --depth=1 linux-x86
CLANG_PATH="$TMPDOWN/linux-x86/clang-r365631c"
fi
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 -b pie-gsi --depth 1
ARM32_TOOLCHAIN_PATH="$TMPDOWN/arm-linux-androideabi-4.9"
GCC_ARM32_PATH="$TMPDOWN/arm-linux-androideabi-4.9"
git clone "$deviceinfo_kernel_source" -b $deviceinfo_kernel_source_branch --depth 1
curl --location --output halium-boot-ramdisk.img \
"https://github.com/halium/initramfs-tools-halium/releases/download/continuous/initrd.img-touch-${RAMDISK_ARCH}"
if $deviceinfo_kernel_apply_overlay; then
if [ -n "$deviceinfo_kernel_apply_overlay" ] && $deviceinfo_kernel_apply_overlay; then
git clone https://android.googlesource.com/platform/system/libufdt -b pie-gsi --depth 1
git clone https://android.googlesource.com/platform/external/dtc -b pie-gsi --depth 1
fi
ls .
cd "$HERE"
if $deviceinfo_kernel_apply_overlay; then
if [ -n "$deviceinfo_kernel_apply_overlay" ] && $deviceinfo_kernel_apply_overlay; then
"$SCRIPT/build-ufdt-apply-overlay.sh" "${TMPDOWN}"
fi
if $deviceinfo_kernel_clang_compile; then
if [ -n "$deviceinfo_kernel_clang_compile" ] && $deviceinfo_kernel_clang_compile; then
CC=clang \
CLANG_TRIPLE=${deviceinfo_arch}-linux-gnu- \
PATH="$CLANG_PATH/bin:$GCC_PATH/bin:${PATH}" \
PATH="$CLANG_PATH/bin:$GCC_PATH/bin:$GCC_ARM32_PATH/bin:${PATH}" \
"$SCRIPT/build-kernel.sh" "${TMPDOWN}" "${TMP}/system"
else
PATH="$GCC_PATH/bin:${PATH}" \
PATH="$GCC_PATH/bin:$GCC_ARM32_PATH/bin:${PATH}" \
"$SCRIPT/build-kernel.sh" "${TMPDOWN}" "${TMP}/system"
fi
PATH="$ARM32_TOOLCHAIN_PATH/bin:${PATH}" \
"$SCRIPT/build-kernel.sh" "${TMPDOWN}" "${TMP}/system"
"$SCRIPT/make-bootimage.sh" "${TMPDOWN}/KERNEL_OBJ" "${TMPDOWN}/halium-boot-ramdisk.img" "${TMP}/partitions/boot.img"
cp -av overlay/* "${TMP}/"

View File

@@ -31,7 +31,7 @@ make O="$OUT" CC=$CC -j$(nproc --all)
make O="$OUT" CC=$CC INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH="$INSTALL_MOD_PATH" modules_install
ls "$OUT/arch/$ARCH/boot/"*Image*
if $deviceinfo_kernel_apply_overlay; then
if [ -n "$deviceinfo_kernel_apply_overlay" ] && $deviceinfo_kernel_apply_overlay; then
${TMPDOWN}/ufdt_apply_overlay "$OUT/arch/arm64/boot/dts/qcom/${deviceinfo_kernel_appended_dtb}.dtb" \
"$OUT/arch/arm64/boot/dts/qcom/${deviceinfo_kernel_dtb_overlay}.dtbo" \
"$OUT/arch/arm64/boot/dts/qcom/${deviceinfo_kernel_dtb_overlay}-merged.dtb"