Error while building recovery.img on CyanogenMod - Android Q&A, Help & Troubleshooting

Hello,
I've been building CM based ROMs for my device for a quite while but while compiling it for my device, it gives me an error of recovery building.
Code:
Building recovery from boot.img
Error: boot.img not found
make: failed to build some projects
*Edited text from actual error
--
I'm not sure why does it builds recovery before boot.img? I've built the same ROM before and didn't encountered the error. I'm compiling LP 5.1.

Related

[Q] Make dist build from AOKP source

Hello there,
I am trying to build a custom ROM for Samsung P3113 based on AOKP source on the jb branch. I was able to make "unofficial" release using "brunch aokp_p3113". However, when I attempted to make a distribution release, the "make -j4 dist" failed. The following are the commands I used:
. build/envsetup.sh
lunch aokp_p3113-userdebug
make -j4 dist
I got the following error messages:
device/moto/stingray/recovery/recovery_ui.cpp:22:20: fatal error: device.h: No such file or directory compilation terminated.
make: *** [out/target/product/p3113/obj/STATIC_LIBRARIES/librecovery_ui_stingray_intermediates/recovery_ui.o] Error 1
Can someone help? By the way, I don't need to build OTA package.
Found root cause
Found the root cause -
All the three header files needed by recovery_ui.cpp are missing. To workaround, I excluded the stingray recovery from the make, and the problem solved.
Hopefully, someone in the AOKP team will add the missing files to repository.

[Q] compiling kernel for MT6589...! ( PLEASE HELP )

I'm trying to compile a rom for micromax a116 and I'm having trouble with the kernel sources... The sources don't have a defconfig file.. Its very different from other samsung device sources that I've seen before..
Sources :
https://github.com/zeetherocker/android_device_micromax_a116
https://github.com/zeetherocker/android_vendor_micromax_a116
https://github.com/zeetherocker/android_kernel_micromax_a116
When I try to compile it gives me error..!!
And I googled about it and found that these kernels have to be pre-built or something using these instructions...
Code:
Set toolchain path and compile with this command: TARGET_PRODUCT=wiko TARGET_BUILD_VARIANT=user MTK_ROOT_CUSTOM=../mediatek/custom/ make
and then patch zImage using mkimage tool located in mediatek/build/tools using this command: ./mkimage zImage KERNEL > zImage_patched
Repack zImage_patched with stock ramdisk to get boot.img.
Strip all built modules: make INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=./out/wiko/system INSTALL_MOD_DIR=./out/wiko/system android_modules_install
And then flash boot.img + modules from kernel/out/system/lib/modules !
I'm having troubles with those commands...
The first command TARGET_PRODUCT=wiko TARGET_BUILD_VARIANT=user MTK_ROOT_CUSTOM=../mediatek/custom/ make
Gave me an error : make: *** No targets specified and no makefile found. Stop.
I don't know how to build this kernel
And even if I build it...I don't know how to use this pre-built kernel to build my rom...
Thanks in advance...

[HELP][SOLVED]Errors while building from source

I am trying to port AOSPA marshmallow-caf (paranoid android) to victara and i cant get past these 2
1.
Code:
frameworks/base/packages/StatementService/src/com/android/statementservice/DirectStatementService.java:149: error: cannot access OkCacheContainer
mHttpResponseCache = HttpResponseCache.install(httpCacheDir, HTTP_CACHE_SIZE_IN_BYTES);
^
class file for com.android.okhttp.OkCacheContainer not found
1 error
make: *** [build/core/java.mk:394: out/target/common/obj/APPS/StatementService_intermediates/classes-full-debug.jar] Error 41
i tried building for the bacon using device trees and vendor stuff from official aospa repos but it also throws this error so i think its not device specific.
2.
Secondly the kernel is not compiling its throwing section mismatch error
Code:
ERROR: modpost: Found 11 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
i am using the CM kernel sources and defconfig
On googling someone suggested to change toolchains so switched to the one provided in AOSPA manifest (namely eabi-4.8 toolchain in google aosp repos , revision android-r16) previously i was using UBERTC arm-eabi-4.8.
But the exact same error popped up and the exact same file vmlinux.o
Interestingly the kernel is built successfully if i build it separately outside the AOSPA tree , or if i build it inside resurrection remix source tree , with both the toolchains .
Also since i mentioned bacon previously , bacon's kernel doesn't throw this error.
EDIT :
I reverted this
the kernel compiled without section mismatches but i encountered
Code:
The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.
make[2]: *** [modules] Error 1
make[1]: *** [sub-make] Error 2
i think this and this were responsible
i tried compiling with
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
and got the bootimg
so i guess kernel is done
but the class file not found error remains
Ok so i was able to fix the class file not found error also
The problem was that i was using jdk8 i switched to jdk7 and it compiled successfully

Porting Cyanogenmod 13.0 for Lenovo K3 Note: build issues

Hi,
I am trying to port cyanogenmod 13.0 to the Lenovo K3 note.
I have two problems that I have not been able to solve despite googling and searching this forum. Any answers would be appreciated.
Problem 1)
Build terminates close to very end at this line:
Code:
Installing recovery patch to system partition
Warning: could not find RECOVERY/RAMDISK/etc/recovery.fstab
Warning: could not find SYSTEM/build.prop in <built-in function zip>
using prebuilt recovery.img from BOOTABLE_IMAGES...
using prebuilt boot.img from BOOTABLE_IMAGES...
cp: cannot stat ‘$OUT/target/product/aio_otfp/ota_temp/SYSTEM/bin/install-recovery.sh’: No such file or directory
build/core/Makefile:1074: recipe for target '$OUT/target/product/aio_otfp/system/bin/install-recovery.sh' failed
make: *** [$OUT/target/product/aio_otfp/system/bin/install-recovery.sh] Error 1
build/core/Makefile contains the lines
Code:
$(hide) cp $(ota_temp_root)/SYSTEM/bin/install-recovery.sh $(TARGET_OUT)/bin/install-recovery.sh
$(hide) cp $(ota_temp_root)/SYSTEM/recovery-from-boot.p $(TARGET_OUT)/recovery-from-boot.p
however the file install-recovery.sh is missing. In fact the whole $(ota_temp_root)/SYSTEM/bin/ directory is empty.
Has anyone encountered this error before, or have thoughts on a solution?
Problem 2)
If I remove the line entirely from the makefile (i.e. skip install-recovery.sh) the build completes successfully. The $OUT directory contains the files recovery.img, boot.img, system.img, userdata.img, and so forth. I can flash the recovery.img to my recovery partition, and all is well booting into it. However, there is no .zip file for flashing the system as a whole.
I have tried various combinations of make otapackage, make bacon, etc., but none of these seem to work (possibly they were features in previous versions of CM). Is there a different target I should use, or a flag that I need to change in the device tree?
Many thanks for everyone's help!

need help in oreo build

i was trying to create plain aosp build of oreo using pixel experience device tree and kernel source and vendor source from muppets i have created the androidproduct.mk and vendorsetup.mk files as said in android source page.
till lunch everything would be prefect but after make -j10
i get struck here
[126/873] including device/xiaomi/mido/Android.mk ...
build/make/core/binary.mk:1470: error: device/xiaomi/mido/camera/QCamera2/Android.mk: camera.msm8953: C_INCLUDES must be under the source or output directories: /libstagefrighthw /mm-core/inc /libqservice.
20:58:39 ckati failed with: exit status 1
please do help

Categories

Resources