flakeforever / device_xiaomi_mondrian

Warning: always rebase
24 stars 10 forks source link

Build modules #10

Closed Fauxly closed 7 months ago

Fauxly commented 7 months ago

Hello everyone, tell us how you compiled the vendor_dlkm, vendor_ramdisk, kernel-headers and system.map modules? what commands did you use? make modules does not work on the baalam kernel for unicorn. maybe I'm doing something wrong, please correct me. Thanks

flakeforever commented 7 months ago

You see, there are two options: 1. Using open-source drivers and 2. Using stock drivers. This project do not use open-source drivers. I believe that stock drivers are more stable, even though they are closed-source. If you are interested in open-source drivers, you can look into Arian's project. https://github.com/cupid-development/android_kernel_xiaomi_sm8450 https://github.com/cupid-development/android_kernel_xiaomi_sm8450-modules

I haven't tested whether Baalam's drivers can be used, but they can be built.

flakeforever commented 7 months ago

In my project, it's using Baalam's kernel + stock drivers.

Fauxly commented 7 months ago

are you using drivers from sm8450? on my phone and on your phone the processor is sm8475

flakeforever commented 7 months ago

I got the drivers from the stock ROM, so they should be for SM8475.

Fauxly commented 7 months ago

ok. I do as you say. i dont know how to fix this

[100% 1026/1026] initializing build system ... Adding CUSTOM_LOCALES [ast_ES gd_GB cy_GB fur_IT] to PRODUCT_LOCALES [en_US en_US af_ZA am_ET ar_EG ar_XB as_IN az_AZ be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_DE el_GR en_AU en_CA en_GB en_IN en_XA es_ES es_US et_EE eu_ES fa_IR fi_FI fr_CA fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ko_KR ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_NL or_IN pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_Latn_RS sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA en_XC] [ 96% 1181/1224] including system/sepolicy/Android.mk ... system/sepolicy/Android.mk:87: warning: Be careful when using the SELINUX_IGNORE_NEVERALLOWS flag. It does not work in user builds and using it will not stop you from failing CTS. [ 99% 1223/1224] finishing build rules ... FAILED: hardware/qcom-caf/sm8450/audio/agm/ipc/HwBinders/agm_ipc_service/Android.mk: error: "vendor.qti.hardware.AGMIPC@1.0-service (EXECUTABLES android-arm64) missing vendor.qti.hardware.AGMIPC@1.0-impl (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/pal/ipc/HwBinders/pal_ipc_server/Android.mk: error: "vendor.qti.hardware.pal@1.0-impl (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/pal/ipc/HwBinders/pal_ipc_server/Android.mk: error: "vendor.qti.hardware.pal@1.0-impl (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/Android.mk: error: "audio.primary.taro (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/Android.mk: error: "audio.primary.taro (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/audio_extn/Android.mk: error: "libhfp_pal (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/audio_extn/Android.mk: error: "libhfp_pal (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/audio_extn/Android.mk: error: "libfmpal (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/audio_extn/Android.mk: error: "libfmpal (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/post_proc/Android.mk: error: "libqcompostprocbundle (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/post_proc/Android.mk: error: "libqcompostprocbundle (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/post_proc/Android.mk: error: "libvolumelistener (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/post_proc/Android.mk: error: "libvolumelistener (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/visualizer/Android.mk: error: "libqcomvisualizer (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/visualizer/Android.mk: error: "libqcomvisualizer (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. build/make/core/main.mk:1128: error: exiting from previous errors. 21:40:54 ckati failed with: exit status 1

failed to build some targets (01:42 (mm:ss))

flakeforever commented 7 months ago

Hi, the simple way is here https://github.com/flakeforever/vendor_xiaomi_mondrian/blob/b298384dddd356ea529424d91457130fd8288043/Android.bp#L28

Fauxly commented 7 months ago

fauxly@fauxly-z390:~/crDroid$ m bacon cat: /vendor_ramdisk/modules.load: No such file or directory cat: /vendor_ramdisk/modules.load.recovery: No such file or directory cat: /vendor_dlkm/modules.load: No such file or directory

PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=13 CR_VERSION=9.12 TARGET_DEVICE=unicorn TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_TYPE=release TARGET_ARCH=arm64 TARGET_ARCH_VARIANT=armv8-a-branchprot TARGET_CPU_VARIANT=generic TARGET_2ND_ARCH=arm TARGET_2ND_ARCH_VARIANT=armv8-2a TARGET_2ND_CPU_VARIANT=generic HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-6.5.0-14-generic-x86_64-Ubuntu-22.04.3-LTS HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=TQ3A.230901.001 OUT_DIR=out PRODUCT_SOONG_NAMESPACES=vendor/xiaomi/unicorn device/xiaomi/unicorn hardware/xiaomi hardware/gsi hardware/qcom-caf/sm8450 vendor/qcom/opensource/commonsys/display vendor/qcom/opensource/commonsys-intf/display vendor/qcom/opensource/data-ipa-cfg-mgr vendor/qcom/opensource/dataservices

FAILED: ninja: '/dtbs/dtb', needed by 'out/target/product/unicorn/dtb.img', missing and no known rule to make it 21:12:33 ninja failed with: exit status 1

new error

flakeforever commented 7 months ago

You need to get dtb file from vendor_boot.img (stock rom). Try to get an unpack tools like this one : sudo apt install mkbootimg unpack_bootimg --boot_img vendor_boot.img --out BOOTOUT

Maybe the crDroid environment comes with this tool: source build/envsetup.sh

Fauxly commented 7 months ago

I can’t understand where these files should be located? dtb

flakeforever commented 7 months ago

stock rom (fastboot version) -> super.img (it's a zip archive) -> vendor_boot_a.img -> dtb

Fauxly commented 7 months ago

I know where to get it from, where to put it after? which folder should I put dtb in?

flakeforever commented 7 months ago

`# Kernel TARGET_PREBUILT_DTB := $(DEVICE_PATH)/prebuilts/dtbs/dtb BOARD_PREBUILT_DTBIMAGE_DIR := $(DEVICE_PATH)/prebuilts/dtbs

PRODUCT_COPY_FILES += $(DEVICE_PATH)/prebuilts/dtbs/dtb:dtb.img`

then put it in here: device/xiaomi/unicorn/prebuilts/

Fauxly commented 7 months ago

why do you use this name in bootctrl: "bootctrl.xiaomi_sm8450"??
We have the same processor sm8475

flakeforever commented 7 months ago

Because AOSP does not include a solution for SM8475, all SM8475 devices are built on the SM8450 platform.

Fauxly commented 7 months ago

Mondrian TARGET_PREBUILT_KERNEL := $(KERNEL_PREBUILT_DIR)/Image BOARD_PREBUILT_DTBOIMAGE := $(KERNEL_PREBUILT_DIR)/dtbs/dtbo.img

Unicorn TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilts/kernel BOARD_PREBUILT_DTBOIMAGE := $(DEVICE_PATH)/prebuilts/dtbo.img

Explain to me why we have different paths???

flakeforever commented 7 months ago

You can define them freely as long as the paths are valid; it doesn't make much sense.

Fauxly commented 7 months ago

ok

$(shell date -u +%H) was changed, regenerating... cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/30.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/31.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/32.0/plat_pub_versioned.cil: No such file or directory [100% 1/1] initializing build system ... cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/30.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/31.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/32.0/plat_pub_versioned.cil: No such file or directory [ 56% 93/166] including hardware/qcom-caf/sm8450/Android.mk ... FAILED: In file included from hardware/qcom-caf/sm8350/Android.mk:2: hardware/qcom-caf/sm8450/Android.mk:4: error: hardware/qcom-caf/sm8450/audio/Android.mk: No such file or directory 09:12:14 ckati failed with: exit status 1

failed to build some targets (36 seconds)

flakeforever commented 7 months ago

This file is already corrupted, just find it and delete it and make a new one.

hardware/qcom-caf/sm8350/Android.mk:

LOCAL_PATH := $(call my-dir)

include $(call first-makefiles-under,$(LOCAL_PATH))
Fauxly commented 7 months ago

Do I need to download modules and add them to the source code?

https://github.com/cupid-development/android_kernel_xiaomi_sm8450-modules

flakeforever commented 7 months ago

If you are using prebuilts, you don't need them.

Fauxly commented 7 months ago

This file is already corrupted, just find it and delete it and make a new one.

hardware/qcom-caf/sm8350/Android.mk:

delete

cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/30.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/31.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/32.0/plat_pub_versioned.cil: No such file or directory [100% 2/2] initializing build system ... cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/30.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/31.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/32.0/plat_pub_versioned.cil: No such file or directory [ 2% 4/169] including out/soong/Android-aosp_unicorn.mk ... FAILED: In file included from out/soong/installs-aosp_unicorn.mk:184902: In file included from out/soong/Android-aosp_unicorn.mk:967998: In file included from build/make/core/soong_cc_rust_prebuilt.mk:54: build/make/core/base_rules.mk:338: error: vendor/qcom/opensource/display/services/config/src: MODULE.TARGET.SHARED_LIBRARIES.libdisplayconfig.qti already defined by hardware/qcom-caf/sm8450/display/services/config/src. 09:54:36 ckati failed with: exit status 1

flakeforever commented 7 months ago

try to define TARGET_USE_DISPLAY_VENDOR_FREEZER := true
in device/xiaomi/mondrian/BoardConfig.mk

Fauxly commented 7 months ago

try to define TARGET_USE_DISPLAY_VENDOR_FREEZER := true in device/xiaomi/mondrian/BoardConfig.mk

add

device/xiaomi/unicorn/BoardConfig.mk was modified, regenerating... cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/30.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/31.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/32.0/plat_pub_versioned.cil: No such file or directory [100% 2/2] initializing build system ... cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/30.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/31.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/32.0/plat_pub_versioned.cil: No such file or directory [ 56% 96/169] including hardware/qcom-caf/sm8450/Android.mk ... FAILED: In file included from hardware/qcom-caf/sm8350/media/Android.mk:1: hardware/qcom-caf/sm8450/Android.mk:4: error: hardware/qcom-caf/sm8450/audio/Android.mk: No such file or directory 11:45:02 ckati failed with: exit status 1

failed to build some targets (01:38 (mm:ss))

Fauxly commented 7 months ago

cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/31.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/32.0/plat_pub_versioned.cil: No such file or directory [ 56% 96/169] including hardware/qcom-caf/sm8450/Android.mk ... FAILED: In file included from hardware/qcom-caf/sm8350/media/Android.mk:1: hardware/qcom-caf/sm8450/Android.mk:4: error: hardware/qcom-caf/sm8450/audio/Android.mk: No such file or directory 11:45:02 ckati failed with: exit status 1

failed to build some targets (01:38 (mm:ss))

FIX, but... I build PEPlus

OUT_DIR=out PRODUCT_SOONG_NAMESPACES=vendor/gms/common vendor/xiaomi/unicorn device/xiaomi/unicorn hardware/xiaomi hardware/gsi hardware/qcom-caf/sm8450 vendor/qcom/opensource/commonsys/display vendor/qcom/opensource/commonsys-intf/display vendor/qcom/opensource/data-ipa-cfg-mgr-legacy-um vendor/qcom/opensource/dataservices vendor/qcom/opensource/fm-commonsys hardware/nxp hardware/qcom-caf/common/fwk-detect

device/xiaomi/unicorn/BoardConfig.mk was modified, regenerating... cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/30.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/31.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/32.0/plat_pub_versioned.cil: No such file or directory [100% 1/1] initializing build system ... cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/30.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/31.0/plat_pub_versioned.cil: No such file or directory cat: /home/fauxly/Peplus/system/sepolicy/prebuilts/api/32.0/plat_pub_versioned.cil: No such file or directory [ 80% 134/166] including system/sepolicy/Android.mk ... system/sepolicy/Android.mk:87: warning: Be careful when using the SELINUX_IGNORE_NEVERALLOWS flag. It does not work in user builds and using it will not stop you from failing CTS. [ 99% 165/166] finishing build rules ... FAILED: hardware/qcom-caf/sm8450/audio/agm/ipc/HwBinders/agm_ipc_service/Android.mk: error: "vendor.qti.hardware.AGMIPC@1.0-service (EXECUTABLES android-arm64) missing vendor.qti.hardware.AGMIPC@1.0-impl (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/agm/ipc/HwBinders/agm_ipc_service/Android.mk: error: "vendor.qti.hardware.AGMIPC@1.0-service (EXECUTABLES android-arm64) missing libagm (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/pal/ipc/HwBinders/pal_ipc_server/Android.mk: error: "vendor.qti.hardware.pal@1.0-impl (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/pal/ipc/HwBinders/pal_ipc_server/Android.mk: error: "vendor.qti.hardware.pal@1.0-impl (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/Android.mk: error: "audio.primary.taro (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/Android.mk: error: "audio.primary.taro (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/audio_extn/Android.mk: error: "libhfp_pal (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/audio_extn/Android.mk: error: "libhfp_pal (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/audio_extn/Android.mk: error: "libfmpal (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/hal/audio_extn/Android.mk: error: "libfmpal (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/post_proc/Android.mk: error: "libqcompostprocbundle (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/post_proc/Android.mk: error: "libqcompostprocbundle (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/post_proc/Android.mk: error: "libvolumelistener (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/post_proc/Android.mk: error: "libvolumelistener (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/visualizer/Android.mk: error: "libqcomvisualizer (SHARED_LIBRARIES android-arm64) missing libar-pal (SHARED_LIBRARIES android-arm64)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. hardware/qcom-caf/sm8450/audio/primary-hal/audio-effects/visualizer/Android.mk: error: "libqcomvisualizer (SHARED_LIBRARIES android-arm) missing libar-pal (SHARED_LIBRARIES android-arm)" You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build. build/make/core/main.mk:1128: error: exiting from previous errors. 12:04:15 ckati failed with: exit status 1

failed to build some targets (42 seconds)

fauxly@fauxly-z390:~/Peplus$

flakeforever commented 7 months ago

refer this https://github.com/flakeforever/device_xiaomi_mondrian/issues/10#issuecomment-1900011866

or just define ALLOW_MISSING_DEPENDENCIES := true

Fauxly commented 7 months ago

refer this\n#10 (comment)\n\nor just define ALLOW_MISSING_DEPENDENCIES := true

I added the missing files and started the build. runs without errors

does your tree include gapps?

flakeforever commented 7 months ago

Yes, it's default in pe.

Fauxly commented 7 months ago

new error

ork in user builds and using it will not stop you from failing CTS. [ 99% 165/166] finishing build rules ... vendor/aosp/build/tasks/kernel.mk:141: warning: *** vendor/aosp/build/tasks/kernel.mk:142: warning: Using prebuilt kernel binary instead of source vendor/aosp/build/tasks/kernel.mk:143: warning: THIS IS DEPRECATED, AND IS NOT ADVISED. vendor/aosp/build/tasks/kernel.mk:144: warning: Please configure your device to download the kernel vendor/aosp/build/tasks/kernel.mk:145: warning: source repository to kernel/xiaomi/unicorn vendor/aosp/build/tasks/kernel.mk:146: warning: for more information * vendor/aosp/build/tasks/kernel.mk:147: warning: *** [100% 166/166] writing build rules ... build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system/lib/libtflite.so' out/soong/installs-aosp_unicorn.mk:129731: warning: ignoring old commands for targetout/target/product/unicorn/system/lib/libtflite.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system/lib64/libtflite.so' out/soong/installs-aosp_unicorn.mk:129727: warning: ignoring old commands for targetout/target/product/unicorn/system/lib64/libtflite.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib/libdisplayconfig.system.qti.so' out/soong/installs-aosp_unicorn.mk:180013: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib/libdisplayconfig.system.qti.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib/vendor.qti.hardware.perf@2.0.so' out/soong/installs-aosp_unicorn.mk:174272: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib/vendor.qti.hardware.perf@2.0.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib/vendor.qti.hardware.perf@2.1.so' out/soong/installs-aosp_unicorn.mk:174308: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib/vendor.qti.hardware.perf@2.1.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib/vendor.qti.hardware.perf@2.2.so' out/soong/installs-aosp_unicorn.mk:174344: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib/vendor.qti.hardware.perf@2.2.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib/vendor.qti.hardware.perf@2.3.so' out/soong/installs-aosp_unicorn.mk:174380: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib/vendor.qti.hardware.perf@2.3.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib/vendor.xiaomi.hardware.fingerprintextension@1.0.so' out/soong/installs-aosp_unicorn.mk:179065: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib/vendor.xiaomi.hardware.fingerprintextension@1.0.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib64/libdisplayconfig.system.qti.so' out/soong/installs-aosp_unicorn.mk:180009: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib64/libdisplayconfig.system.qti.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib64/vendor.qti.hardware.perf@2.0.so' out/soong/installs-aosp_unicorn.mk:174268: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib64/vendor.qti.hardware.perf@2.0.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib64/vendor.qti.hardware.perf@2.1.so' out/soong/installs-aosp_unicorn.mk:174304: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib64/vendor.qti.hardware.perf@2.1.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib64/vendor.qti.hardware.perf@2.2.so' out/soong/installs-aosp_unicorn.mk:174340: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib64/vendor.qti.hardware.perf@2.2.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib64/vendor.qti.hardware.perf@2.3.so' out/soong/installs-aosp_unicorn.mk:174376: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib64/vendor.qti.hardware.perf@2.3.so' build/make/core/Makefile:72: warning: overriding commands for target out/target/product/unicorn/system_ext/lib64/vendor.xiaomi.hardware.fingerprintextension@1.0.so' out/soong/installs-aosp_unicorn.mk:179061: warning: ignoring old commands for targetout/target/product/unicorn/system_ext/lib64/vendor.xiaomi.hardware.fingerprintextension@1.0.so' [ 0% 168/75374] //vendor/aosp/build/soong:generated_kernel_includes generate FAILED: out/soong/.intermediates/vendor/aosp/build/soong/generated_kernel_includes/gen/.dummy_dep out/host/linux-x86/bin/sbox --sandbox-path out/soong/.temp --output-dir out/soong/.intermediates/vendor/aosp/build/soong/generated_kernel_includes/gen --manifest out/soong/.intermediates/vendor/aosp/build/soong/generated_kernel_includes/custom.sbox.textproto The failing command was run inside an sbox sandbox in temporary directory out/soong/.temp/sbox/022f7fbb28a4c7f77c6d038089f8e2ef818dbf86 The failing command line can be found in out/soong/.temp/sbox/022f7fbb28a4c7f77c6d038089f8e2ef818dbf86/sbox_command.0.bash make: вход в каталог «/home/fauxly/Peplus»

flakeforever commented 7 months ago

hmmm which kernel you got? This error indicates that your kernel directory is missing the "generated_kernel". Even if you are using prebuilts, you still need to generate header files because some libraries rely on them.

Fauxly commented 7 months ago

using prebuilts, you still need to generate header files because some libraries rely on them.

I use stok kernel

how generate header?

flakeforever commented 7 months ago

but you still need kernel source

Fauxly commented 7 months ago

i have sorce code baalam

flakeforever commented 7 months ago

https://github.com/cupid-development/android_kernel_xiaomi_sm8450 get this one

TARGET_KERNEL_SOURCE := kernel/xiaomi/sm8450

TARGET_KERNEL_CONFIG := \
    gki_defconfig \
    vendor/waipio_GKI.config \
    vendor/xiaomi_GKI.config \
    vendor/$(PRODUCT_DEVICE)_GKI.config
flakeforever commented 7 months ago

Oh wait, you can ignore this, I forgot, check my patchs

https://github.com/flakeforever/device_xiaomi_mondrian/blob/peplus-13/patches/vendor_aosp/0001-Disable-generated-kernel-headers-for-prebuilt.diff

Fauxly commented 7 months ago

First, I'll check the first method, and then I'll try to apply your patch.

Fauxly commented 7 months ago

The first method did not help, now I applied the patch.

Fauxly commented 7 months ago

8, in File "/home/fauxly/Peplus/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 1090, in main File "/home/fauxly/Peplus/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 984, in AddImagesToTargetFiles File "/home/fauxly/Peplus/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 542, in AddVBMeta File "/home/fauxly/Peplus/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 1515, in BuildVBMeta File "/home/fauxly/Peplus/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 313, in RunAndCheckOutput common.ExternalError: Failed to run command '['avbtool', 'make_vbmeta_image', '--output', '/home/fauxly/Peplus/out/target/product/unicorn/obj/PACKAGING/target_files_intermediates/aosp_unicorn-target_files-eng.fauxly/IMAGES/vbmeta.img', '--key', 'external/avb/test/data/testkey_rsa4096.pem', '--algorithm', 'SHA256_RSA4096', '--include_descriptors_from_image', '/home/fauxly/Peplus/out/target/product/unicorn/obj/PACKAGING/target_files_intermediates/aosp_unicorn-target_files-eng.fauxly/IMAGES/boot.img', '--include_descriptors_from_image', '/home/fauxly/Peplus/out/target/product/unicorn/obj/PACKAGING/target_files_intermediates/aosp_unicorn-target_files-eng.fauxly/IMAGES/vendor_boot.img', '--chain_partition', 'recovery:1:/home/fauxly/Peplus/out/soong/.temp/avb-36o69u97.avbpubkey', '--include_descriptors_from_image', '/home/fauxly/Peplus/out/target/product/unicorn/obj/PACKAGING/target_files_intermediates/aosp_unicorn-target_files-eng.fauxly/IMAGES/vendor.img', '--include_descriptors_from_image', '/home/fauxly/Peplus/out/target/product/unicorn/obj/PACKAGING/target_files_intermediates/aosp_unicorn-target_files-eng.fauxly/IMAGES/odm.img', '--include_descriptors_from_image', '/home/fauxly/Peplus/out/target/product/unicorn/obj/PACKAGING/target_files_intermediates/aosp_unicorn-target_files-eng.fauxly/IMAGES/vendor_dlkm.img', '--include_descriptors_from_image', '/home/fauxly/Peplus/out/target/product/unicorn/obj/PACKAGING/target_files_intermediates/aosp_unicorn-target_files-eng.fauxly/IMAGES/dtbo.img', '--chain_partition', 'vbmeta_system:2:/home/fauxly/Peplus/out/soong/.temp/avb-t013wg0p.avbpubkey', '--flags', '3', '--padding_size', '4096']' (exit code 1): /home/fauxly/Peplus/out/host/linux-x86/bin/avbtool: Given image does not look like a vbmeta image.

flakeforever commented 7 months ago

Your img is missing vbmeta information, you need to add them manually.

python ~/android/peplus/external/avb/avbtool.py add_hashtree_footer --image vendor.img --partition_name vendor --partition_size 1621123072 --key ~/android/peplus/external/avb/test/data/testkey_rsa4096.pem --hash_algorithm sha256 --fec_num_roots 2 --prop_from_file com.android.build.vendor.fingerprint:prop/fingerprint.prop --prop_from_file com.android.build.vendor.os_version:prop/os_version.prop --prop_from_file com.android.build.vendor.security_patch:prop/security_patch.prop

flakeforever commented 7 months ago

partition_size is calculated based on your img size. It is usually larger than your img size. There is reserved space for saving vbmeta and alignmen

flakeforever commented 7 months ago

You can check the vbmeta information of the img you got from stock (like odm.img or vendor.img). use it as a reference python ~/android/peplus/external/avb/avbtool.py info_image --image vendor.img

flakeforever commented 7 months ago

I don't recommend that you modify vendor.img at first, because this also involves reconfiguration of selinux. You can try to keep the initial version as is and modify it later.

Fauxly commented 7 months ago

and so, the assembly is completed, PEPlus has already been installed. There are micro friezes in the Chrome browser. How are things going with micro friezes? sometimes the system freezes

flakeforever commented 7 months ago

Well, you have already completed the most difficult part, which is get it to boot.

Fauxly commented 7 months ago

python ~/android/peplus/external/avb/avbtool.py add_hashtree_footer --image vendor.img --partition_name vendor --partition_size 1621123072 --key ~/android/peplus/external/avb/test/data/testkey_rsa4096.pem --hash_algorithm sha256 --fec_num_roots 2 --prop_from_file com.android.build.vendor.fingerprint:prop/fingerprint.prop --prop_from_file com.android.build.vendor.os_version:prop/os_version.prop --prop_from_file com.android.build.vendor.security_patch:prop/security_patch.prop

Can I also sign?

tell me how to make a signature after editing the vendor?

flakeforever commented 7 months ago

If you want to modify the vendor.img requires reconfiguring SELinux, which includes defining labels and attributes, as well as SELinux rules.

For labels and attributes, check "vendor_file_contexts" and "vendor_fs_config" in config. For SELinux rules, check vendor\etc\selinux\vendor_sepolicy.cil.

You need to manually edit them as I haven't found a better tool.

After packaging the vendor.img, you need to manually add vbmeta information to it. Please refer to the script command I provided.

flakeforever commented 7 months ago

For example, if you want to add a fingerprint service, you can unpack my ROM and then explore all its configurations.

Fauxly commented 7 months ago
flakeforever commented 7 months ago

You need to understand this command on your own as I cannot know your specific environment. For example, where is your vendor.img located?

Fauxly commented 7 months ago

You need to understand this command on your own as I cannot know your specific environment. For example, where is your vendor.img located?

Does odm.img also need to be patched? or only vendor?

flakeforever commented 7 months ago

If you modify the vendor.img, odm must be not prebuilt( can not us odm.img) and define PRODUCT_PRECOMPILED_SEPOLICY := false