SuperiorOS / android_vendor_superior

Our Junkyard.. 😋
20 stars 55 forks source link

Issue with the vendor superior #117

Closed VTVishwanath closed 11 months ago

VTVishwanath commented 11 months ago

I am building unofficially Superior OS for RMX1851 (Realme 3 Pro with sdm710 chipset). I am using thirteen branch. Device tree used: https://github.com/VTVishwanath/superior_device_realme_RMX1851 Kernel tree used: https://github.com/Cykeek/kernel_realme_sdm710 -b A13 kernel/realme/sdm710 Device vendor tree used: https://github.com/ArrowOS-Devices/android_vendor_realme_RMX1851

I get below error.

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=13
SUPERIOR_VERSION=SuperiorOS-Thirteen-RMX1851-COMMUNITY-20231113-0813
TARGET_PRODUCT=lineage_RMX1851
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-2a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_OS=linux
BUILD_ID=TQ3A.230901.001
OUT_DIR=/mnt/data/sos13/out
PRODUCT_SOONG_NAMESPACES=vendor/realme/RMX1851 device/realme/RMX1851
============================================
$(shell date -u '+%Y%m%d-%H%M') was changed, regenerating...
FAILED: ninja: 'kernel/realme/sdm710/arch/configs/lineageos_RMX1851_defconfig', needed by '/mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_O
BJ/.config', missing and no known rule to make it
08:14:31 ninja failed with: exit status 1

#### failed to build some targets (01:31 (mm:ss)) ####

Upon investigation, I found out that KERNEL_ARCH variable not getting set properly. Then I added below line of code to vendor/superior/build/tasks/kernel.mk file at the beginning from the vendor/superior/config/BoardConfigKernel.mk

TARGET_KERNEL_ARCH := $(strip $(TARGET_KERNEL_ARCH))
ifeq ($(TARGET_KERNEL_ARCH),)
    KERNEL_ARCH := $(TARGET_ARCH)
else
    KERNEL_ARCH := $(TARGET_KERNEL_ARCH)
endif

After this I am getting different error. Which is below.

[  1% 2712/142580] Building Kernel Config
FAILED: /mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_OBJ/.config
/bin/bash -c "(PATH=/mnt/data/sos13/out/host/linux-x86/bin:\$PATH PATH=/mnt/data/sos13/prebuilts/clang/host/linux-x86/proton-clang/bin:\$PATH LD_L
IBRARY_PATH=/mnt/data/sos13/prebuilts/clang/host/linux-x86/proton-clang/lib64:\$LD_LIBRARY_PATH PATH=:\$PATH   DTC_EXT=/mnt/data/sos13/out/host/li
nux-x86/bin/dtc HOSTCFLAGS=\"-fuse-ld=lld -Wno-unused-command-line-argument\" -C kernel/realme/sdm710 O=/mnt/data/sos13/out/target/product/RMX1851
/obj/KERNEL_OBJ ARCH=arm64  CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\"  VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= lineageos_RMX1851_defconfig ) && 
(if [ \"\" = \"none\" ]; then kernel/realme/sdm710/scripts/config --file /mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_OBJ/.config -d LTO_
CLANG -e LTO_NONE -d LTO_CLANG_THIN -d LTO_CLANG_FULL -d THINLTO; PATH=/mnt/data/sos13/out/host/linux-x86/bin:\$PATH PATH=/mnt/data/sos13/prebuilt
s/clang/host/linux-x86/proton-clang/bin:\$PATH LD_LIBRARY_PATH=/mnt/data/sos13/prebuilts/clang/host/linux-x86/proton-clang/lib64:\$LD_LIBRARY_PATH
 PATH=:\$PATH   DTC_EXT=/mnt/data/sos13/out/host/linux-x86/bin/dtc HOSTCFLAGS=\"-fuse-ld=lld -Wno-unused-command-line-argument\" -C kernel/realme/
sdm710 O=/mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_OBJ ARCH=arm64  CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\"  olddefconfig; elif [
 \"\" = \"thin\" ]; then kernel/realme/sdm710/scripts/config --file /mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_OBJ/.config -e LTO_CLANG
 -d LTO_NONE -e LTO_CLANG_THIN -d LTO_CLANG_FULL -e THINLTO; PATH=/mnt/data/sos13/out/host/linux-x86/bin:\$PATH PATH=/mnt/data/sos13/prebuilts/cla
ng/host/linux-x86/proton-clang/bin:\$PATH LD_LIBRARY_PATH=/mnt/data/sos13/prebuilts/clang/host/linux-x86/proton-clang/lib64:\$LD_LIBRARY_PATH PATH
=:\$PATH   DTC_EXT=/mnt/data/sos13/out/host/linux-x86/bin/dtc HOSTCFLAGS=\"-fuse-ld=lld -Wno-unused-command-line-argument\" -C kernel/realme/sdm71
0 O=/mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_OBJ ARCH=arm64  CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\"  olddefconfig; elif [ \"\"
 = \"full\" ]; then kernel/realme/sdm710/scripts/config --file /mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_OBJ/.config -e LTO_CLANG -d L
TO_NONE -d LTO_CLANG_THIN -e LTO_CLANG_FULL -d THINLTO; PATH=/mnt/data/sos13/out/host/linux-x86/bin:\$PATH PATH=/mnt/data/sos13/prebuilts/clang/ho
st/linux-x86/proton-clang/bin:\$PATH LD_LIBRARY_PATH=/mnt/data/sos13/prebuilts/clang/host/linux-x86/proton-clang/lib64:\$LD_LIBRARY_PATH PATH=:\$P
ATH   DTC_EXT=/mnt/data/sos13/out/host/linux-x86/bin/dtc HOSTCFLAGS=\"-fuse-ld=lld -Wno-unused-command-line-argument\" -C kernel/realme/sdm710 O=/
mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_OBJ ARCH=arm64  CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\"  olddefconfig; fi ) && (if [ ! 
-z \"\" ]; then echo \"Overriding kernel config with ''\"; echo  >> /mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_OBJ/.config; PATH=/mnt/d
ata/sos13/out/host/linux-x86/bin:\$PATH PATH=/mnt/data/sos13/prebuilts/clang/host/linux-x86/proton-clang/bin:\$PATH LD_LIBRARY_PATH=/mnt/data/sos1
3/prebuilts/clang/host/linux-x86/proton-clang/lib64:\$LD_LIBRARY_PATH PATH=:\$PATH   DTC_EXT=/mnt/data/sos13/out/host/linux-x86/bin/dtc HOSTCFLAGS
=\"-fuse-ld=lld -Wno-unused-command-line-argument\" -C kernel/realme/sdm710 O=/mnt/data/sos13/out/target/product/RMX1851/obj/KERNEL_OBJ ARCH=arm64
  CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\"  oldconfig; fi )"
/bin/bash: -C: command not found
08:22:35 ninja failed with: exit status 1

#### failed to build some targets (01:56 (mm:ss)) ####

Upon investigation found that few of the variables used in the vendor/superior/build/tasks/kernel.mk not getting set properly. Variables are empty. Upon further investigation found that vendor/superior/config/BoardConfigKernel.mk file is not getting included or getting executed as this file has all the missing variables and values are set in here. So both errors caused by this.

Any idea how to fix this? Anyone faced this? What could be the root cause or fix?

VTVishwanath commented 11 months ago

This can be fixed by adding below lines of code at the beginning to vendor/superior/build/tasks/kernel.mk file

include vendor/superior/config/BoardConfigKernel.mk

Created a pull request for this https://github.com/SuperiorOS/android_vendor_superior/pull/121

Darkstar085 commented 11 months ago

Not relevant