[Xiaomi Redmi 4X Questions & Answers] mauroaraujo:
Hello guys,

I'm taking some baby steps into ROM building, so I decided to follow the LineageOS's official build instructions for Santoni so as to install it into my device, which is still running MIUI Stock ROM.

Everything went well during the build steps (even when extracting proprietary blobs from a zip file), except for the kernel, which has not been found.

After investigating a little bit, I just found out that the kernel was not being downloaded when running the command "breakfast santoni". Since I'm still learning, I don't know exactly where should I clone the device kernel sources and which build files are modified by "breakfast". I have also found out that I'm not the only one struggling to build LineageOS in Fedora (refer to this reddit post). However, althought they mention the issue (and that they were able to build, somehow), the "answer" is not there.

This is the output I've got when running "brunch santoni":

[mauro.mascarenhas@localhost lineage]$ croot
[mauro.mascarenhas@localhost lineage]$ brunch santoni
including vendor/lineage/vendorsetup.sh
Looking for dependencies in device/xiaomi/santoni
Looking for dependencies in device/xiaomi/msm8937-common
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
Looking for dependencies in kernel/xiaomi/msm8937
kernel/xiaomi/msm8937 has no additional dependencies.

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
LINEAGE_VERSION=16.0-20210906-UNOFFICIAL-santoni
TARGET_PRODUCT=lineage_santoni
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.13.13-200.fc34.x86_64-x86_64-Fedora-34-(Workstation-Edition)
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190801.002
OUT_DIR=/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out
PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf/msm8996 hardware/qcom/display-caf/msm8996 hardware/qcom/media-caf/msm8996
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
LINEAGE_VERSION=16.0-20210906-UNOFFICIAL-santoni
TARGET_PRODUCT=lineage_santoni
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.13.13-200.fc34.x86_64-x86_64-Fedora-34-(Workstation-Edition)
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190801.002
OUT_DIR=/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out
PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf/msm8996 hardware/qcom/display-caf/msm8996 hardware/qcom/media-caf/msm8996
============================================
[1/1] /home/mauro.mascarenhas/Document...neage/out/soong/.bootstrap/build.ninja
[61/62] glob prebuilts/ndk/stl.bp
[80/80] /home/mauro.mascarenhas/Docume.../android/lineage/out/soong/build.ninja
/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out/build-lineage_santoni-cleanspec.ninja is missing, regenerating...
/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out/build-lineage_santoni.ninja is missing, regenerating...
[113/1036] including device/xiaomi/msm8937-common/Android.mk ...
device/xiaomi/msm8937-common/vndk/Android.mk:2: warning: ************* BOARD VNDK is not enabled - compiling vndk-sp ***************************
[1036/1036] including vendor/xiaomi/santoni/Android.mk ...
vendor/lineage/build/tasks/kernel.mk:107: warning: ***************************************************************
vendor/lineage/build/tasks/kernel.mk:108: warning: * Using prebuilt kernel binary instead of source *
vendor/lineage/build/tasks/kernel.mk:109: warning: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
vendor/lineage/build/tasks/kernel.mk:110: warning: * Please configure your device to download the kernel *
vendor/lineage/build/tasks/kernel.mk:111: warning: * source repository to kernel/xiaomi/msm8937
vendor/lineage/build/tasks/kernel.mk:112: warning: * for more information *
vendor/lineage/build/tasks/kernel.mk:113: warning: ***************************************************************
build/make/core/Makefile:28: warning: overriding commands for target `/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out/target/product/santoni/vendor/lib/hw/consumerir.default.so'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out/target/product/santoni/vendor/lib/hw/consumerir.default.so'
build/make/core/Makefile:28: warning: overriding commands for target `/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out/target/product/santoni/vendor/lib64/hw/consumerir.default.so'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out/target/product/santoni/vendor/lib64/hw/consumerir.default.so'
[ 99% 820/821] glob frameworks/base/core/res/res/**/*
ninja: error: '/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out/target/product/santoni/kernel', needed by '/home/mauro.mascarenhas/Documentos/LineageOS/android/lineage/out/target/product/santoni/boot.img', missing and no known rule to make it
15:55:02 ninja failed with: exit status 1

#### failed to build some targets (08:20 (mm:ss)) ####

[mauro.mascarenhas@localhost lineage]$

Things I've already tried:

- Cloning xiaomi msm8937 sources into "/android/lineage/device/xiaomi/" directory (removing the "android_kernel_xiaomi_" prefix);

- Cloning xiaomi msm8937 sources into "/android/lineage/vendor/xiaomi/" directory (also removing the "android_kernel_xiaomi_" prefix);

Well, all I can say is that although the sources are there, they are not being found by the build script (when running "brunch santoni"). Which script should I check/modify?

PS.: I had run "breakfast santoni" after extracting the proprietary blobs from zip (since I received an error regarding vendo makefiles, just like described in the tutorial).

System details:

OS: Fedora 34 (Workstation Edition) x86_64

Host: HP Pavilion 14 Notebook PC 097610000

Kernel: 5.13.13-200.fc34.x86_64

Shell: bash 5.1.0

CPU: Intel i5-4210U (4) @ 2.700GHz

GPU: NVIDIA GeForce 830M

GPU: Intel Haswell-ULT

Memory: 7869MiB

I would just like to thank you in advance, guys :)