AOSP Build For Bullhead - Make Otapackage Failed - Why? [HELP] - Nexus 5X Q&A, Help & Troubleshooting

Hi! I ran make otapackage -j6 for my AOSP build, and it tells me this:
Code:
return CreateImage(input_dir, info_dict, "system", block_list=block_list)
File "./build/tools/releasetools/add_img_to_target_files", line 211, in CreateImage
assert succ, "build " + what + ".img image failed"
AssertionError: build system.img image failed
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

Related

[Q] Issues Compiling Droid Incredible Kernel

Evening All,
I am attempting to compile a kernel for my droid incredible and am running into a problem. I successfully compiled one a few weeks ago, but am trying to refresh so i can learn more. I am using instructions found at:
http://wiki.cyanogenmod.com/index.php?title=Building_from_source,
only changing commands when necessary. I have pulled a working .config from Skyraider 2.2, created the backup and was able to edit it to my liking. For this I decided to leave everything as stock, as my intention was to just compile the stock kernel to help myself learn. When I enter
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER
,
I receive the following error:
Code:
[email protected]:~/androkern/incredible$ make ARCH=arm CROSS_COMPILE=$CCOMPILER
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
Generating include/asm-arm/mach-types.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
kernel/bounds.c:1: error: unknown ABI (aapcs-linux) for -mabi= switch
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
Being new to compiling would anyone be able to help me understand what this error means. I have not found anything so far that could help me. I was not expecting any issues since I was essential just compiling the Stock Kernel for my own use.
Would someone be able to help me learn what is causing this? Thank you.
tcberg2010 said:
Evening All,
I am attempting to compile a kernel for my droid incredible and am running into a problem. I successfully compiled one a few weeks ago, but am trying to refresh so i can learn more. I am using instructions found at:
http://wiki.cyanogenmod.com/index.php?title=Building_from_source,
only changing commands when necessary. I have pulled a working .config from Skyraider 2.2, created the backup and was able to edit it to my liking. For this I decided to leave everything as stock, as my intention was to just compile the stock kernel to help myself learn. When I enter
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER
,
I receive the following error:
Code:
[email protected]:~/androkern/incredible$ make ARCH=arm CROSS_COMPILE=$CCOMPILER
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
Generating include/asm-arm/mach-types.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
kernel/bounds.c:1: error: unknown ABI (aapcs-linux) for -mabi= switch
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
Being new to compiling would anyone be able to help me understand what this error means. I have not found anything so far that could help me. I was not expecting any issues since I was essential just compiling the Stock Kernel for my own use.
Would someone be able to help me learn what is causing this? Thank you.
Click to expand...
Click to collapse
you need to do:
export CCOMPILER=${HOME}/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
(assuming you pulled everything down in ~/mydroid , otherwise change it to where it is)
then you should be able to compile it
That command did work for me. I was able to compile it. What I would still like to know is what exactly I did when i ran that command? I don't really enjoy mashing in commands when i don't know what they mean.
Basically you created an environmental variable called CCOMPILER that is equal to the location of the cross compiler binaries.
This command would do the same thing:
make ARCH=arm CROSS_COMPILE=${HOME}/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
You are just pointing the make file to the location of the cross compiler so that it doesn't use the host compiler by default
mattwood2000 said:
Basically you created an environmental variable called CCOMPILER that is equal to the location of the cross compiler binaries.
This command would do the same thing:
make ARCH=arm CROSS_COMPILE=${HOME}/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
You are just pointing the make file to the location of the cross compiler so that it doesn't use the host compiler by default
Click to expand...
Click to collapse
+1 Whenever you "export" you're setting an environment variable to something. Then you can verify it by typing: "echo $CCOMPILER" (without quotes) and it should spit that path back at you.
fwiw, you can add that line to your .bashrc and it will always be set for you
Thank you guys, to be honest that answer is a little over my head, but its a nice basis to help me learn more. Really appreciate the quick responses.
Sent from my ADR6300 using XDA App

[Q] Build kernel modules fail for flo

I build stock kernel for flo (commit 9e52a21) successful. But when I tries add module support in kernel I get errors on modules build. I add only CONFIG_MODULES=y in flo_defconfig.
Error log:
...
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 17 modules
ERROR: "diagfwd_bridge_init" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "diagfwd_connect_bridge" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "diag_hsic" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "msm_smux_write" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "diagfwd_bridge_exit" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "read_msm_cpu_type" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "diagfwd_disconnect_bridge" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "msm_hsic_ch_driver" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "diag_bridge" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "diagfwd_write_complete_hsic" [drivers/char/diag/diagchar.ko] undefined!
ERROR: "diagfwd_cancel_hsic" [drivers/char/diag/diagchar.ko] undefined!
make [1]: *** [__modpost] Error 1
make: *** [modules] Error 2
...
Please help me.

AOSP Build For Bullhead - Make Otapackage Failed - Why? [HELP]

Hi! I ran make otapackage -j6 for my AOSP build, and it tells me this:
Code:
return CreateImage(input_dir, info_dict, "system", block_list=block_list)
File "./build/tools/releasetools/add_img_to_target_files", line 211, in CreateImage
assert succ, "build " + what + ".img image failed"
AssertionError: build system.img image failed
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
Why doees this happen?

error: 'INSTALLED_KERNEL_HEADERS'

[ 99% 1598/1599] glob vendor/qcom/open...erfaces/wifi/supplicant/1.0/Android.bp
ninja: error: 'INSTALLED_KERNEL_HEADERS', needed by '/home/ubuntu/los/out/target/product/ocm/obj/SHARED_LIBRARIES/libcryptfs_hw_intermediates/cryptfs_hw.o', missing and no known rule to make it
11:29:39 ninja failed with: exit status 1

[Q]/[ROOT]/[NEWBIE] Help to root Sony Walkman NW-A105 *kernel build achived*

Hello everyone!
Why am I writing this?
I would like to ask help regarding this DAP rooting process. I didn't find any method to root this device, so I tought, why not, let's try to make one from a "scratch".
The modding its self is not new for me, I've changed kernels, custom roms and done other tweaks on several sony and samsung device earlier, so I've worked with pre-made stuff, maybe my knowledge has been faded a bit, it was around Andorid 4-5-6-7. But this dev side of modding is absolutely new for me, however this isn't an issue, I'm willing to learn new things.
Red a lot of materials here and other sites, and tried to figured it how it works tens of hours before started to write this thread.
Here's where I've looked for already:
-[Tutorial] Building Your First Kernel: https://forum.xda-developers.com/showthread.php?t=1748297
-[GUIDE]Building a Kernel from source{Mediatek}: https://forum.xda-developers.com/showthread.php?t=2754513
-AlaskaLinuxUser AKLU's youtube channel, there are a bunch of good education stuff (he made several post on xda aswell):https://www.youtube.com/c/AlaskaLinuxUserAKLU/playlists
- Followed/studied the AOSP guidelines, started from here: https://source.android.com/setup
-...and from other comments/threads over the internet
Based on these, here's what I've found:
Should I create a custom kernel or is just enough to make a recovery? My only goal only the root permission. I've tried both, but maybe I'm mixing things ups, so first I've summarise what I've done so far:
Tried the kernel:
-Got the kernel source of the Walkman: https://oss.sony.net/Products/Linux/Audio/NW-A105.html
- Got the manifest to build TWRP: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-9.0
- Pulled the config.gz out from the device: https://drive.google.com/file/d/1MRbf1uciNEb5VJ2hVEqtEmZfAOEbGpI4/view?usp=sharing
Tried with only recovery building:
-[DEV]How to compile TWRP touch recovery: https://forum.xda-developers.com/showthread.php?t=1943625
Here, I didn't found the BoardConfig.mk for ex.
My problem is, that all of the mentioned tutorials, there was always a point, where I've just saw a totally different things and lost the "track". I know, isn't will be the same process as mine and will be differences, but those were just too significant for me
Final thougts:
I'm really interested in this process, but ran out of ideas. Where do I miss? How should I proceed? Maybe I'm not seeing the whole picture and there are missing basic knowledge?
What I missed from those tutorials, to write down the big picture, the steps without any modell specific examples, if this makes sense
I'm looking forward to learn this and make it happen, not I'm the only one who would be happy to root this device
If there are (I'm sure it is) grammar problems, sorry for those, english is not my main language.
Any help would be appreciated!
Thank You!
Update #1
Since I wasn't able to proceed with the downloaded source, I thougt maybe I can extract the boot.img from the device. My problem is, that there are 2 boot partitions (I guess this is the "A/B partition" )
I've reached the destinaiton where I saw 2 boot items:
Code:
icx1293:/dev/block/platform/30b60000.mmc/by-name $
Code:
[B]boot_a[/B] bootloader_a dtbo_b m4_os_a misc opt2 rca system_b vbmeta_a vendor_b
[B]boot_b [/B] bootloader_b fbmisc m4_os_b nvp opt3 rsv_boot userdata vbmeta_b
boot_logo dtbo_a idd metadata opt1 presistdata system_a var vendor_a
But I wasn't able to copy those, since I doesn't have permisison ( rooted device needed?)
So there is another showstopper...
Update #2
I've managed to find the right defconfig file in the source folder. I followed this Sony AOSP article(I cannot post links, my account too fresh): developer.sony.com/develop/open-devices/guides/kernel-compilation-guides/how-to-build-and-flash-a-linux-kernel-for-aosp-supported-devices#AutoLinuxKernell
On the "How to manually build the Linux kernel for 64 bit devices" part:
-got trough 2,3 points
-skipped the 4th, I have the source,
-skipped the 5th, I've found the defconfig file (the "How to Build".txt told me, which one I need):
Kernel Configuration Information
The kernel is configured with following defconfig.
linux-kernel-4.14.78.tar.gz
arch/arm64/configs/android_dmp1_defconfig
Please compile using this configuration.
Click to expand...
Click to collapse
-at the 6th step I've tried to configure the kernel with the :
Code:
make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE android_dmp1_defconfig
but I got this:
Code:
make: Nothing to be done for 'android_dmp1_defconfig'.
Any Ideas?
Update #3
At the end, I was able to start the build process. It turned out, I was in the wrong folder however even if I was in the right folder, I had issues with the compiler (GCC 4.9) so switched back to 4.8. (aarch64-linux-android-)
The build was sucessfull, however I cannot find the image file. As I see, there isn't any...
Update 4#
Here's what's happening when I try to compile with 4.9.
I'm here:
Code:
[email protected]:~/Desktop/tools/walkman/vendor/nxp-opensource/kernel_imx$
Commands:
Code:
export CROSS_COMPILE=/home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-
export ARCH=arm64
the next, when I'm try to give this: make clean
I got this:
Code:
./scripts/gcc-version.sh: line 26: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory
./scripts/gcc-version.sh: line 27: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN .
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN arch/arm64/kernel/vdso
CLEAN arch/arm64/kernel
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN crypto
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN drivers/firmware/efi/libstub
CLEAN drivers/tty/vt
CLEAN drivers/video/logo
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
./scripts/gcc-version.sh: line 26: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory
./scripts/gcc-version.sh: line 27: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
./scripts/gcc-version.sh: line 26: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory
./scripts/gcc-version.sh: line 27: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory
CLEAN kernel
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN lib/raid6
CLEAN lib
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN net/wireless
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN security/selinux
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN usr
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN arch/arm64/boot/dts/freescale
CLEAN arch/arm64/boot/dts/qcom
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
make: /home/a/gcc/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: Command not found
CLEAN .tmp_versions
..and of course the upcoming commands are failing aswell.
When I'm using the 4.8, after the make clean--> make mrproper-->make android_dmp1_defconfig, I have to give this:
Code:
scripts/config --disable CC_STACKPROTECTOR_STRONG
and then make -j4. It's becouse the compiler is old or something like that...don't know the exact reason.
Hi there, while I do not have much experience on what you're trying to achieve here, I do want to show my support to your project. DAPs do not have a lot lf attention here on XDA but I can totally see the massive potential to improve the platform via rooting and magisk. Please keep up the good work and if there's anything I can participate, i am eager to help.
Best
Hey there.
It has been a while, but have you got any updates on this?
I can help with this if anyone can simply enlighten me on how to get into fastboot mode? Or reboot to bootloader? I'm using adb reboot bootloader but it's jamming at the sony splash screen
Edit... I should've googled. I had to setup dev is all
does anyone have a stock boot.img? or has anyone been able to extract or find firmware packages that can be extracted?
@kinghell can you dm me back please?
Mentalmuso said:
@kinghell can you dm me back please?
Click to expand...
Click to collapse
It would be amazing if this gets twrp and a clean cfw some day.
Mentalmuso said:
I can help with this if anyone can simply enlighten me on how to get into fastboot mode? Or reboot to bootloader? I'm using adb reboot bootloader but it's jamming at the sony splash screen
Edit... I should've googled. I had to setup dev is all
Click to expand...
Click to collapse
There is no boot.img available from Sony.
They are shipping the update.zip in an encrypted .UPG file, which we can't decrypt.
The only solution I see is building a custom boot image or something, which we can then flash it to the device.
Hi there.
I've managed to access fastboot, but it's not a complete one. @Mentalmuso it's using imx8mm chip, so after rebooting to bootloader, you can use NXP's uuu tool to access fastboot like uuu FB: oem unlock, uuu FB: flash recovery x.img
However, its uboot doesn't support "ucmd" or "fastboot fetch", so I found no way to get boot.img, I'm planning to make a dump of the whole emmc directly from the chip.
could you unlock the bootloader?
juandx said:
could you unlock the bootloader?
Click to expand...
Click to collapse
Yep, turn on OEM unlock in developers option, then download the latest uuu tools from GitHub (nxp-imx/mfgtools), adb reboot bootloader, then type uuu FB: oem unlock. You can use uuu FB: flash xx.img, etc to flash it.Here I uploaded its system images, including boot.img
Guys I have the images now, but met problems when installing magisk.... I need help.issue

Categories

Resources