redmi-fire-devs / twrp_device_xiaomi_fire

TWRP Device Tree for Xiaomi Redmi 12
https://twrp.me/xiaomi/xiaomiredmi12.html
GNU General Public License v3.0
6 stars 5 forks source link

Fix PRODUCT_STATIC_BOOT_CONTROL_HAL #22

Closed mahdi-salimi05 closed 5 months ago

mahdi-salimi05 commented 5 months ago

when i run `lunch twrp_fire-eng; this error message appears :

lunch twrp_fire-eng In file included from build/make/core/config.mk:313: In file included from build/make/core/envsetup.mk:312: In file included from build/make/target/product/telephony_vendor.mk:24: device/xiaomi/fire/device.mk:24: error: PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete. Use shared library module instead. See https://android.googlesource.com/platform/build/+/master/Changes.md#PRODUCT_STATIC_BOOT_CONTROL_HAL. 19:08:42 dumpvars failed with: exit status 1 Device fire not found. Attempting to retrieve device repository from TeamWin Github (http://github.com/TeamWin). Found repository: android_device_xiaomi_fire Checking branch info Traceback (most recent call last): File "/home/mahdi/twrp/vendor/twrp/build/tools/roomservice.py", line 317, in <module> main() File "/home/mahdi/twrp/vendor/twrp/build/tools/roomservice.py", line 296, in main fallback_branch = detect_revision(repository) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mahdi/twrp/vendor/twrp/build/tools/roomservice.py", line 234, in detect_revision result = json.loads(urllib.request.urlopen(githubreq).read().decode()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 216, in urlopen return opener.open(url, data, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 525, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 634, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 563, in error return self._call_chain(*args) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 496, in _call_chain result = func(*args) ^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 643, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: rate limit exceeded In file included from build/make/core/config.mk:313: In file included from build/make/core/envsetup.mk:312: In file included from build/make/target/product/telephony_vendor.mk:24: device/xiaomi/fire/device.mk:24: error: PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete. Use shared library module instead. See https://android.googlesource.com/platform/build/+/master/Changes.md#PRODUCT_STATIC_BOOT_CONTROL_HAL. 19:08:45 dumpvars failed with: exit status 1 In file included from build/make/core/config.mk:313: In file included from build/make/core/envsetup.mk:312: In file included from build/make/target/product/telephony_vendor.mk:24: device/xiaomi/fire/device.mk:24: error: PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete. Use shared library module instead. See https://android.googlesource.com/platform/build/+/master/Changes.md#PRODUCT_STATIC_BOOT_CONTROL_HAL. 19:08:46 dumpvars failed with: exit status 1

Don't have a product spec for: 'twrp_fire' Do you have the right repo manifest?

`

mahdi-salimi05 commented 5 months ago

fixed by using your updated version (official twrp version have this bug)

mahdi-salimi05 commented 5 months ago

build failed at `build/soong/scripts/strip.sh: line 95: 57 Illegal instruction "${CREATE_MINIDEBUGINFO}" "${infile}" "${ outfile}.mini_debuginfo.xz" 20:15:25 ninja failed with: exit status 1 `

` log

mka bootimage
20:10:13 **** 20:10:13 You are building on a machine with 15.6GB of RAM 20:10:13 20:10:13 The minimum required amount of free memory is around 16GB, 20:10:13 and even with that, some configurations may not work. 20:10:13 20:10:13 If you run into segfaults or other errors, try reducing your 20:10:13 -j value. 20:10:13 **** build/make/core/soong_config.mk:194: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_E XT_PUBLIC_SEPOLICY_DIRS instead. build/make/core/soong_config.mk:195: warning: BOARD_PLAT_PRIVATE_SEPOLICYDIR has been deprecated. Use SYSTEM EXT_PRIVATE_SEPOLICY_DIRS instead.

PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=99.87.36 TARGET_PRODUCT=twrp_fire TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_ARCH=arm64 TARGET_ARCH_VARIANT=armv8-2a-dotprod 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.6.30Core2+-x86_64-Debian-GNU/Linux-12-(bookworm) HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=SP2A.220405.004 OUT_DIR=out PRODUCT_SOONG_NAMESPACES=device/xiaomi/fire

wildcard(out/target/product/fire/clean_steps.mk) was changed, regenerating... [ 4% 1026/21812] //bionic/linker:ld-android strip ld-android.so FAILED: out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-2a-dotprod_shared/ld-android.so XZ=prebuilts/build-tools/linux-x86/bin/xz CREATE_MINIDEBUGINFO=prebuilts/build-tools/linux-x86/bin/create_mini debuginfo CLANG_BIN=prebuilts/clang/host/linux-x86/clang-r416183b1/bin build/soong/scripts/strip.sh --keep-mi ni-debug-info -i out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-2a-dotprod_shared/unstr ipped/ld-android.so -o out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-2a-dotprod_shared /ld-android.so -d out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-2a-dotprod_shared/ld-a ndroid.so.d build/soong/scripts/strip.sh: line 95: 55 Illegal instruction "${CREATE_MINIDEBUGINFO}" "${infile}" "${ outfile}.mini_debuginfo.xz" [ 4% 1027/21812] //bionic/linker:ld-android strip ld-android.so [arm] FAILED: out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-2a_shared/ld-android.so XZ=prebuilts/build-tools/linux-x86/bin/xz CREATE_MINIDEBUGINFO=prebuilts/build-tools/linux-x86/bin/create_mini debuginfo CLANG_BIN=prebuilts/clang/host/linux-x86/clang-r416183b1/bin build/soong/scripts/strip.sh --keep-mi ni-debug-info -i out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-2a_shared/unstripped/ld-a ndroid.so -o out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-2a_shared/ld-android.so -d ou t/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-2a_shared/ld-android.so.d build/soong/scripts/strip.sh: line 95: 56 Illegal instruction "${CREATE_MINIDEBUGINFO}" "${infile}" "${ outfile}.mini_debuginfo.xz" [ 4% 1028/21812] //bionic/linker:ld-android strip ld-android.so FAILED: out/soong/.intermediates/bionic/linker/ld-android/android_recovery_arm64_armv8-2a-dotprod_shared/ld-an droid.so XZ=prebuilts/build-tools/linux-x86/bin/xz CREATE_MINIDEBUGINFO=prebuilts/build-tools/linux-x86/bin/create_mini debuginfo CLANG_BIN=prebuilts/clang/host/linux-x86/clang-r416183b1/bin build/soong/scripts/strip.sh --keep-mi ni-debug-info -i out/soong/.intermediates/bionic/linker/ld-android/android_recovery_arm64_armv8-2a-dotprod_sha red/unstripped/ld-android.so -o out/soong/.intermediates/bionic/linker/ld-android/android_recovery_arm64_armv8 -2a-dotprod_shared/ld-android.so -d out/soong/.intermediates/bionic/linker/ld-android/android_recovery_arm64_a rmv8-2a-dotprod_shared/ld-android.so.d build/soong/scripts/strip.sh: line 95: 57 Illegal instruction "${CREATE_MINIDEBUGINFO}" "${infile}" "${ outfile}.mini_debuginfo.xz" 20:15:25 ninja failed with: exit status 1

failed to build some targets (05:12 (mm:ss))

`

AntarcticShaurant commented 5 months ago

Hello! sorry for the late reply but i've been so busy lately

fixed by using your updated version (official twrp version have this bug)

My updated version? you mean the one in this repo? there should be no differences since the teamwin repo this one's fork

AntarcticShaurant commented 5 months ago

Oh i get what you mean, yeah i need to fix that

mahdi-salimi05 commented 5 months ago

Oh i get what you mean, yeah i need to fix that

how can i fix compiler error?

AntarcticShaurant commented 5 months ago

What did you do to get this error?

Let me try building it as well.

mahdi-salimi05 commented 5 months ago

What did you do to get this error?

first i cloned twrp 12.1 mini sources by this command: repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-12.1 then repo sync && cd <source-dir>; export ALLOW_MISSING_DEPENDENCIES=true; . build/envsetup.sh; lunch twrp_<device>-eng

AntarcticShaurant commented 5 months ago

What did you do to get this error?

first i cloned twrp 12.1 mini sources by this command: repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-12.1 then repo sync && cd <source-dir>; export ALLOW_MISSING_DEPENDENCIES=true; . build/envsetup.sh; lunch twrp_<device>-eng

Hmm, I tried to build it again using action builder and everything worked as expected.

Let me try building it on my computer now.

mahdi-salimi05 commented 5 months ago

Let me try building it on my computer now.

ok

AntarcticShaurant commented 5 months ago

Sorry but there is a pretty bad storm here, and i can't clone sources because of the unstable connection.

I'll try again later this evening or tomorrow.

sorry for the inconvenience

mahdi-salimi05 commented 5 months ago

Sorry but there is a pretty bad storm here, and i can't clone sources because of the unstable connection.

I'll try again later this evening or tomorrow.

sorry for the inconvenience

i am edited art/build/Android.bp file to comment some Illegal instructions and i am trying again to build

mahdi-salimi05 commented 5 months ago

this error must fix by using a most recent cpu