[Xiaomi Mi Note 10 Guides, News, & Discussion] Squida:
A NEW UPDATE DESERVES CAPS AND A NEW POST.

I have Discovered things, did research. Heaps of it. So much of it infact. I had to step away.

Came back with a fresh Mind and Summed up, using QAEP and not AOSP and not building the kernel the manual way. I have finally gotten it to work. but it says it is -dirty on the end of the kernel when i go to about phone. BUT I CAN USE IT! the touch input works. No WiFi (I'll work that out in due time.) but I manage to get it to build. There was Heaps of the so called Cherry picking though.

this link right here. https://review.lineageos.org is the biggest life saver on fixing the errors during the build. make sure to have branch:"branch-name" type branch name with no quotes.

You need to get the fixes for the QAEP project in order to get it working, also try your best to match the repo closest to your phone. For example. android_device_xiaomi_sm6150-common or android_vendor_qcom_opensource_system_bt to narrow the results.

Below is all to do with QAEP and not AOSP or Manual kernel building.

Spoiler content hidden.

Spoiler content hidden.

Spoiler content hidden.

Spoiler content hidden.

Please remember to Cherry pick the QAEP fixes before trying to build.

Also the VMLinux (gsi_write_scratch) Solution is to Cherry pick gsi.c located at kernel/drivers/platform/msm/gsi/gsi.c

Get it from Lineage-OS, link is provided above.

In the gsi.c file, anywhere it says __packed. remove it.

Or you can get the file from here > https://review.lineageos.org/c/Line.../298196/2/drivers/platform/msm/gsi/gsi.c#2694

it has __packed removed.

I am excited that progress has been made.

Kernel standalone build parameters so far. I am still using QAEP because it builds the boot.img for me.

Spoiler content hidden.

If you see -Dirty on the end of your kernel it is because you have not added the changes to the git. so make sure to do " git add --all " and " git commit --all "

I also realize that you need to do a heap of changes to BoardConfig.mk and the main sm6150.mk (tucana.mk) so it matches your device.

things I found hard to find.

1. Getting Partition Information for your device, So i got it off LineageOS sm6150-common device.

Link I found to convert MB to bytes

Convert megabytes to bytes | computing capacity-size and computer storage conversion

This on the web one-way conversion tool converts computing capacity-size and computer storage units from megabytes ( MB ) into bytes ( B ) instantly online. 1 megabyte ( MB ) = 1,048,576.00 bytes ( B ). How many bytes ( B ) are in 1 megabyte ( 1 MB )? How much of computing capacity-size and...

convert-to.com

2. Knowing what Device files you need off the phone to put in the device/brand/model folder and then also making sure the structure matches the builder files.

For example. The AOSP device tree works off pre made binaries located in the vendor/brand/proprietaries for easy setup install.

QAEP(MSM) goes off the Source code during the build process and in order to use the premade binary files

you can use Soong and setup Soong Paths. this requires having to include files.

I have not used Soong, I stuck with how QAEP has made the builder, using Make and not soong. still unsure if you have to use both Soong and make for the build. Make is the general building and the Soong does the linking from how I am looking at it.

3. QAEP Vendor QCOM Source is not complete. like if you go interfaces, you are missing HWcrypts and some other files. they can be downloaded from LineageOS github under qcom-opensource-interfaces

4. Knowing the difference between building the standalone to using AOSP or QAEP builders.

Differences I have noticed.

Using AOSP or QAEP and running the command " make bootimage " it does exactly that and creates a boot.img.

Going standalone. You must make the boot.img manually. so for wifi to work. you must add a folder and have the wifi files in it and then make sure to set it for module export.

Example: so dlkm will be in root of your Kernel source.

EXT_MODULES="

dlkm/msm-google-modules/wlan/qcacld-3.0

dlkm/msm-google-modules/touch/fts

"

Some information on shared libraries that helped understanding what I need from the phone for linking.

Namespaces for native libraries | Android Open Source Project

source.android.com

this helped a heap for the BoardConfig.mk file.

LINK > https://xdaforums.com/t/script-twrp-device-tree-generator.4085463/ <

Having the prebuilts extracted helped as well. got a fully functioning extracted kernel with a dtbo.img. and the boot.img built no problems at all. only thing is i would like to configure the kernel. so trying to build from source again.

Key boardconfig.mk variables used. to get the stock prebuilt kernel and dtbo.img

BOARD_KERNEL_IMAGE_NAME :=

EXAMPLE:

BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb

#

TARGET_PREBUILT_KERNEL :=

EXAMPLE:

TARGET_PREBUILT_KERNEL := device/xiaomi/tucana/prebuilt/Image.gz-dtb

#

BOARD_PREBUILT_DTBOIMAGE :=

EXAMPLE:

BOARD_PREBUILT_DTBOIMAGE := device/xiaomi/tucana/prebuilt/dtbo.img

Most of the problems I have been getting are a result of QAEP using source files over .so files for linking. not sure if soong is able to work with HIDL.

API Reference for build tools

Artifacts

ci.android.com

this is the error I am getting.

Spoiler content hidden.

I have been trying to work out, how to use the .so file over the source files. Will update when I find out.

If someone knows the solution please do drop a post.