[Q] cant build a Boot.img - Android Q&A, Help & Troubleshooting

[email protected]:~/android$ make -j4 bootimage
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.2
CM_VERSION=
TARGET_PRODUCT=full_asanti_c
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.2.0-39-generic-x86_64-with-Ubuntu-12.10-quantal
HOST_BUILD_TYPE=release
BUILD_ID=JDQ39
OUT_DIR=/home/harry/android/out
============================================
external/bluetooth/bluedroid/Android.mk:8: NO BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR, using only generic configuration
No private recovery resources for TARGET_DEVICE asanti_c
make -C kernel/moto/asanti_c O=/home/harry/android/out/target/product/asanti_c/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/harry/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" msm8960_mmi_defconfig
make[1]: Enter '/home/harry/android/kernel/moto/asanti_c'
GEN /home/harry/android/out/target/product/asanti_c/obj/KERNEL_OBJ/Makefile
drivers/usb/gadget/Kconfig:968:warning: defaults for choice values not supported
#
# configuration written to .config
#
make[1]: Leave '/home/harry/android/kernel/moto/asanti_c'
make -C kernel/moto/asanti_c O=/home/harry/android/out/target/product/asanti_c/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/harry/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" headers_install
make[1]: Enter '/home/harry/android/kernel/moto/asanti_c'
CHK include/linux/version.h
make[1]: Leave '/home/harry/android/kernel/moto/asanti_c'
make -C kernel/moto/asanti_c O=/home/harry/android/out/target/product/asanti_c/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/harry/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" zImage
make[1]: Enter '/home/harry/android/kernel/moto/asanti_c'
GEN /home/harry/android/out/target/product/asanti_c/obj/KERNEL_OBJ/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/usb/gadget/Kconfig:968:warning: defaults for choice values not supported
GEN /home/harry/android/out/target/product/asanti_c/obj/KERNEL_OBJ/Makefile
CHK include/linux/version.h
Using /home/harry/android/kernel/moto/asanti_c as source for kernel
CHK include/generated/utsrelease.h
make[3]: »include/generated/mach-types.h« ist bereits aktualisiert.
CALL /home/harry/android/kernel/moto/asanti_c/scripts/checksyscalls.sh
CHK include/generated/compile.h
GZIP kernel/config_data.gz
CHK kernel/config_data.h
Kernel: arch/arm/boot/Image is ready
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
make[1]: Leave '/home/harry/android/kernel/moto/asanti_c'
make -C kernel/moto/asanti_c O=/home/harry/android/out/target/product/asanti_c/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/harry/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" modules
make[1]: Enter '/home/harry/android/kernel/moto/asanti_c'
GEN /home/harry/android/out/target/product/asanti_c/obj/KERNEL_OBJ/Makefile
CHK include/linux/version.h
Using /home/harry/android/kernel/moto/asanti_c as source for kernel
CHK include/generated/utsrelease.h
make[3]: »include/generated/mach-types.h« ist bereits aktualisiert.
CALL /home/harry/android/kernel/moto/asanti_c/scripts/checksyscalls.sh
Building modules, stage 2.
MODPOST 23 modules
make[1]: Leave '/home/harry/android/kernel/moto/asanti_c'
make -C kernel/moto/asanti_c O=/home/harry/android/out/target/product/asanti_c/obj/KERNEL_OBJ INSTALL_MOD_PATH=../../system ARCH=arm CROSS_COMPILE=" /home/harry/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" modules_install
make[1]: Enter '/home/harry/android/kernel/moto/asanti_c'
INSTALL arch/arm/mach-msm/dma_test.ko
INSTALL arch/arm/mach-msm/msm-buspm-dev.ko
INSTALL arch/arm/mach-msm/reset_modem.ko
INSTALL crypto/ansi_cprng.ko
INSTALL drivers/bluetooth/bluetooth-power.ko
INSTALL drivers/crypto/msm/qcedev.ko
INSTALL drivers/crypto/msm/qce40.ko
INSTALL drivers/crypto/msm/qcrypto.ko
INSTALL drivers/input/evbug.ko
INSTALL drivers/input/evfwd.ko
INSTALL drivers/media/radio/radio-iris-transport.ko
INSTALL drivers/media/video/gspca/gspca_main.ko
INSTALL drivers/misc/config/config.ko
INSTALL drivers/misc/eeprom/eeprom_93cx6.ko
INSTALL drivers/net/ks8851.ko
INSTALL drivers/scsi/scsi_wait_scan.ko
INSTALL drivers/spi/spidev.ko
INSTALL drivers/staging/prima/wlan.ko
INSTALL drivers/staging/zram/zram.ko
INSTALL drivers/video/backlight/lcd.ko
INSTALL net/ipv4/tcp_htcp.ko
INSTALL net/ipv4/tcp_westwood.ko
INSTALL net/wireless/cfg80211.ko
DEPMOD 3.0.72-cm
make[1]: Leave '/home/harry/android/kernel/moto/asanti_c'
mdpath=`find /home/harry/android/out/target/product/asanti_c/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/harry/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/harry/android/out/target/product/asanti_c/system/lib/modules/; done; fi
mdpath=`find /home/harry/android/out/target/product/asanti_c/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
mdpath=`find /home/harry/android/out/target/product/asanti_c/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/harry/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/harry/android/out/target/product/asanti_c/system/lib/modules/; done; fi
mdpath=`find /home/harry/android/out/target/product/asanti_c/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
target Prebuilt: (/home/harry/android/out/target/product/asanti_c/kernel)
Target boot image: /home/harry/android/out/target/product/asanti_c/boot.img
usage: mkbootimg
--kernel <filename>
--ramdisk <filename>
[ --second <2ndbootloader-filename> ]
[ --cmdline <kernel-commandline> ]
[ --board <boardname> ]
[ --base <address> ]
[ --pagesize <pagesize> ]
[ --ramdisk_offset <address> ]
-o|--output <filename>
make: *** [/home/harry/android/out/target/product/asanti_c/boot.img] Error 1
[email protected]:~/android$
Click to expand...
Click to collapse
what is the problem

Don't know, somehow arguments to mkbootimg are not well passed.

Related

Add some code into Build.java in cm10.1 but build false

HI, everybody,i am a new guy about this topic,
Recently i want to add some feature into android code,and i using cm10.1 source code;
i have add some code into Build.java in /system/frameworks/base/core/java/android/os,But buding false.
Does any body want how to solve this? Thanks.
frameworks/base/core/java/android/os/Build.java:471: cannot find symbol
symbol : class Properties
location: class android.os.Build
private static Properties p;
^
frameworks/base/core/java/android/os/Build.java:473: cannot find symbol
symbol : class File
location: class android.os.Build
File f=new File("/system/build.prop");
^
frameworks/base/core/java/android/os/Build.java:473: cannot find symbol
symbol : class File
location: class android.os.Build
File f=new File("/system/build.prop");
^
frameworks/base/core/java/android/os/Build.java:475: cannot find symbol
symbol : class FileInputStream
location: class android.os.Build
FileInputStream fis=new FileInputStream(f);
^
frameworks/base/core/java/android/os/Build.java:475: cannot find symbol
symbol : class FileInputStream
location: class android.os.Build
FileInputStream fis=new FileInputStream(f);
^
frameworks/base/core/java/android/os/Build.java:483: cannot find symbol
symbol : class Properties
location: class android.os.Build
p = new Properties();
^
frameworks/base/core/java/android/os/Build.java:492: cannot find symbol
symbol : class FileNotFoundException
location: class android.os.Build
} catch (FileNotFoundException e) {
^
frameworks/base/core/java/android/os/Build.java:495: cannot find symbol
symbol : class IOException
location: class android.os.Build
} catch (IOException e) {
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
8 errors
make: *** [/home/admini/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
GEN /home/admini/android/system/out/target/product/maguro/obj/KERNEL_OBJ/Makefile
CHK include/linux/version.h
Using /home/admini/android/system/kernel/samsung/tuna as source for kernel
CHK include/generated/utsrelease.h
make[3]: `include/generated/mach-types.h' is up to date.
CALL /home/admini/android/system/kernel/samsung/tuna/scripts/checksyscalls.sh
CHK include/generated/compile.h
Kernel: arch/arm/boot/Image is ready
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
make[1]: Leaving directory `/home/admini/android/system/kernel/samsung/tuna'
make -C kernel/samsung/tuna O=/home/admini/android/system/out/target/product/maguro/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/admini/android/system/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" modules
make[1]: Entering directory `/home/admini/android/system/kernel/samsung/tuna'
GEN /home/admini/android/system/out/target/product/maguro/obj/KERNEL_OBJ/Makefile
CHK include/linux/version.h
Using /home/admini/android/system/kernel/samsung/tuna as source for kernel
CHK include/generated/utsrelease.h
make[3]: `include/generated/mach-types.h' is up to date.
CALL /home/admini/android/system/kernel/samsung/tuna/scripts/checksyscalls.sh
Building modules, stage 2.
MODPOST 4 modules
make[1]: Leaving directory `/home/admini/android/system/kernel/samsung/tuna'
make -C kernel/samsung/tuna O=/home/admini/android/system/out/target/product/maguro/obj/KERNEL_OBJ INSTALL_MOD_PATH=../../system ARCH=arm CROSS_COMPILE=" /home/admini/android/system/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" modules_install
make[1]: Entering directory `/home/admini/android/system/kernel/samsung/tuna'
INSTALL crypto/ansi_cprng.ko
INSTALL drivers/rpmsg/rpmsg_client_sample.ko
INSTALL drivers/rpmsg/rpmsg_server_sample.ko
INSTALL drivers/scsi/scsi_wait_scan.ko
DEPMOD 3.0.31-cyanogenmod-g9c74909
make[1]: Leaving directory `/home/admini/android/system/kernel/samsung/tuna'
mdpath=`find /home/admini/android/system/out/target/product/maguro/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/admini/android/system/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/admini/android/system/out/target/product/maguro/system/lib/modules/; done; fi
mdpath=`find /home/admini/android/system/out/target/product/maguro/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
[email protected]:~/android/system$
Click to expand...
Click to collapse

[Q] Weird Linker Error when Compiling CM 10.2 for LG e970 (Optimus G AT&T)

OK guys, I'm at a loss. I've tried google-ing this, but I haven't found much info on it. I get this weird linker error when trying to compile CyanogenMod 10.2 for the LG Optimus G (e970 [AT&T]):
Code:
make[1]: Leaving directory `/home/greg/android/system/kernel/lge/gproj'
mdpath=`find /home/greg/android/system/out/target/product/e970/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/greg/android/system/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/greg/android/system/out/target/product/e970/system/lib/modules/; done; fi
mdpath=`find /home/greg/android/system/out/target/product/e970/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
mdpath=`find /home/greg/android/system/out/target/product/e970/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/greg/android/system/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/greg/android/system/out/target/product/e970/system/lib/modules/; done; fi
mdpath=`find /home/greg/android/system/out/target/product/e970/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
target Prebuilt: (/home/greg/android/system/out/target/product/e970/kernel)
host Executable: clang (/home/greg/android/system/out/host/linux-x86/obj/EXECUTABLES/clang_intermediates/clang)
/home/greg/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libclangSema_intermediates/libclangSema.a(SemaDeclObjC.o):(.debug_loc+0x1a677): undefined reference to `.LFE1449$'
collect2: ld returned 1 exit status
I can't figure out which library or object file I'm missing that would resolve this reference.
Any ideas on what could be causing this?
Btw, I've tried building it a couple ways: typical "brunch", and lunch / mka. Both produce the same error.
Thanks all!
Anyone???

[Q] Kernel Compilation Error

Can anybody help me to deal with these errors? I don't really understand what's going on
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
arm-cortex_a8-linux-gnueabi-gcc -Wp,-MD,kernel/.bounds.s.d -nostdinc -isystem arm-cortex_a8-linux-gnueabi-gcc -print-file-name=include [Errno 8] Exec format error -I/home/caesar/Downloads/SebastianFM-kernel-master/arch/arm/include -Iarch/arm/include/generated -Iinclude -include /home/caesar/Downloads/SebastianFM-kernel-master/include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-msm/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=7 -march=armv5t -Wa,-march=armv7-a -msoft-float -Uarm -fomit-frame-pointer -g -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(bounds) -DKBUILD_MODNAME=KBUILD_STR(bounds) -fverbose-asm -S -o kernel/bounds.s kernel/bounds.c [Errno 8] Exec format error
make[1]: *** [kernel/bounds.s] Error 8
make: *** [prepare0] Error 2

[Q][Solved]acp fails during compilation

Hello,
I'm not completely sure if this is the right forum, because this happens during compilation of SlimLP, but considering it's an unspecific tool (acp) that fails it's not exclusively related to SlimLP.
Problem: No matter what arguments I use the output of acp is this
Code:
bash: /home/<account>/Source/out/host/linux-x86/bin/acp: No such file or directory
What I did: I invested a whole day into fixing the problem. I googled several things and tried to compile acp to no avail (several errors I can't fix), but I'm not very experienced so it might be simple still. And ofc I compiled, repo synced and repeated every step again and again.
For the sake of completeness here are my steps:
installed phablet-tools, openjdk-7-sdk, ruby-bacon (On Ubuntu 14.04 LTS x64 [VM].
repo init <manifest.git>
repo sync
. build/envsetup.sh
lunch slim_d802-userdebug
make -j1 bacon
I have to move the mkbootimg from <src>/out/host/linux-x86/obj32 to ../bin , but the acp is generated before that anyway.
The whole error message is this:
Code:
make[1]: Leaving directory `/home/<account>/Source/kernel/lge/msm8974'
mdpath=`find /home/<account>/Source/out/target/product/d802/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do arm-eabi-strip --strip-unneeded $i; mv $i /home/<account>/Source/out/target/product/d802/system/lib/modules/; done; fi
mdpath=`find /home/<account>/Source/out/target/product/d802/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
mdpath=`find /home/<account>/Source/out/target/product/d802/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do arm-eabi-strip --strip-unneeded $i; mv $i /home/<account>/Source/out/target/product/d802/system/lib/modules/; done; fi
mdpath=`find /home/<account>/Source/out/target/product/d802/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
target Prebuilt: (/home/<account>/Source/out/target/product/d802/kernel)
/bin/bash: /home/<account>/Source/out/host/linux-x86/bin/acp: No such file or directory
make: *** [/home/<account>/Source/out/target/product/d802/kernel] Error 127
Kind Regard,
NetDwarf
Oh rly ... it was easy. I mean that's expected, but I did not think that acp would fail because of that and just acp a simple tool for copying files. Atop of that it does even compile, but doesn't work as intended. Whatever, when you get this error:
Code:
sudo apt-get install bison g++-multilib git gperf libxml2-utils make python-networkx zlib1g-dev:i386 zip
(from http://source.android.com/source/initializing.html) It was one of the starting tools, but considering phablet-tools includes most (and I thought all) tools, I was thinking I don't need to do it. I mean in the end I had to made a mistake to fail, there was no other option. Only question was at what point. So beware, if you ever encounter this, it's probably of a missing tool.
Kind Regards.

Build ROM and Kernel using custom Toolchain

Cant seem to export linaro 5.x from DespairFactor, the build looks for 4.9 instead of 5.x
What im doing wrong?
This is my "envsetup.sh" setup:
Code:
# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_TOOLCHAIN=
export ANDROID_TOOLCHAIN_2ND_ARCH=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
x86_64) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/[COLOR="Red"]arm-linux-androideabi-5.x[/COLOR]/bin
;;
arm64) toolchaindir=aarch64/aarch64-linux-android-$targetgccversion/bin;
toolchaindir2=arm/arm-linux-androideabi-$targetgccversion2/bin
;;
mips|mips64) toolchaindir=mips/mips64el-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ANDROID_TOOLCHAIN=$gccprebuiltdir/$toolchaindir
fi
if [ -d "$gccprebuiltdir/$toolchaindir2" ]; then
export ANDROID_TOOLCHAIN_2ND_ARCH=$gccprebuiltdir/$toolchaindir2
fi
unset ANDROID_KERNEL_TOOLCHAIN_PATH
case $ARCH in
arm)
# Legacy toolchain configuration used for ARM kernel compilation
toolchaindir=arm/[COLOR="Red"]arm-eabi-5.x-linaro[/COLOR]/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ANDROID_KERNEL_TOOLCHAIN_PATH="$ARM_EABI_TOOLCHAIN":
fi
;;
*)
This ir the error:
Code:
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc: Ficheiro ou directoria inexistente
bionic/libc/crt.mk:92: recipe for target '/home/fsadino/android/temasek/out/target/product/bacon/obj/lib/crtbegin_static1.o' failed
make: *** [/home/fsadino/android/temasek/out/target/product/bacon/obj/lib/crtbegin_static1.o] Error 127
make: ** Esperando que outros processos terminem.
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc: Ficheiro ou directoria inexistente
bionic/libc/crt.mk:39: recipe for target '/home/fsadino/android/temasek/out/target/product/bacon/obj/lib/crtbrand.o' failed
make: *** [/home/fsadino/android/temasek/out/target/product/bacon/obj/lib/crtbrand.o] Error 127

Categories

Resources