I couldn't be able to build dictool_aosp.jar. I downloaded the aosp source from the repository then run the following commands:
source build/envsetup.sh
lunch aosp_flo-userdebug
make -j3
make dictool_aosp
But, I got the following error:
including ./system/vold/Android.mk ...
including ./tools/external/fat32lib/Android.mk ...
make: *** No rule to make target `dictool_aosp'. Stop.
#### make failed to build some targets (01:02 (mm:ss)) ####
Can you please guide me on how to build the jar file?
I have also tried to build from the directory using mm and mma and got the following result:
$ cd packages/inputmethods/LatinIME/tools/dicttool/
$ mma
...
including ./tools/external/fat32lib/Android.mk ...
No private recovery resources for TARGET_DEVICE flo
make: Entering directory `/android-repo'
make: Nothing to be done for `all_modules'.
make: Leaving directory `/android-repo'
#### make completed successfully (24 seconds) ####
$ mm
...
No private recovery resources for TARGET_DEVICE flo
make: Entering directory `/android-repo'
make: *** No rule to make target `/temp/out/dist/android-repo/host/linux-x86/framework/junit.jar', needed by `/temp/out/dist/android-repo/host/common/obj/JAVA_LIBRARIES/dicttool_aosp_intermediates/javalib.jar'. Stop.
make: Leaving directory `/android-repo'
Although mma succeeded there is no jar file in the output directory.
I assume you receive this error when you run make dictool_aosp:
make: *** No rule to make target `dictool_aosp'. Stop.
Means there is no make target named dictool_aosp.
You could try to build dictool_aosp by checking the Android.mk of that package. Look if there is a LOCAL_MODULE definition. If there is one you can use this one for your make call. If not you can add that or simply run mm on top of your project directory you want to build.
Some useful hints:
You can see all make targets with: make modules
You can build a subproject with mm (builds all of the modules in the current directory) or use mma (builds all of the modules in the current directory with dependencies)
Related
i want to build pixel3 blueline android10 kernel module.
my example test.c:
#include"linux/module.h"
#include"linux/kernel.h"
int init_module(void)
{
printk(KERN_INFO "Hello android kernel...\n");
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "Goodbye android kernel...\n");
}
my Makefile:
obj-m += test.o
all:
make -C /home/ijiami/newdisk/android10/aosp_kernel M=$(PWD) modules
i get android kernel branch android-msm-crosshatch-4.9-android10-qpr3:
ijiami#ijiami-All-Series:~/newdisk/android10/aosp_kernel$ ls
build build.config out prebuilts prebuilts-master private
the error:
ijiami#ijiami-All-Series:~/newdisk/android10/ko_test$ make
make -C /home/ijiami/newdisk/android10/aosp_kernel M=/home/ijiami/newdisk/android10/ko_test modules
make[1]: Entering directory '/home/ijiami/newdisk/android10/aosp_kernel'
make[1]: *** No rule to make target 'modules'. Stop.
make[1]: Leaving directory '/home/ijiami/newdisk/android10/aosp_kernel' Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2
It appears that the makefile in the specified directory is not being found or is not being executed properly. Make sure that you are in the correct directory and that the makefile exists.
The error message also suggests that there is no rule for building target 'modules' in the makefile. Check the makefile in the specified directory and ensure that it has the correct target and dependencies for building the kernel modules.
Make sure that the kernel source has been successfully built and that the environment is set up correctly for building kernel modules. This typically involves setting the CROSS_COMPILE variable to point to the correct toolchain and ensuring that the correct headers are in place.
Also check if you have the necessary build dependencies installed.
It might be helpful to check the build documentation for the specific Android version and device that you are working with to ensure that you are following the correct steps for building kernel modules.
I am trying to build the recovery.img for AOSP 4.2.2 with the following commands:
cd myandroidsrc
source build/envsetup.sh
lunch
make recoveryimage -j8
But I keep running into the following error:
find: `src': No such file or directory
...
a lot of "PRODUCT_COPY_FILES /frameworkds/base/data/.. .ogg ignored" messages
...
cp -f /boot.img /device/myvendor/mydevice/boot/
cp: cannot stat `/boot.img': No such file or directory
make: *** [out/target/product/mydevice/boot.img] Error 1
make: *** Deleting file `out/target/product/mydevice/boot.img'
make: *** Waiting for unfinished jobs....
I also tried to build the boot image with:
make bootimage
But this also results in the same error like # the make recoveryimage call. Am I missing some make call here or is my file structure wrong ?
are you using prebuilt boot.img if yes check its path properly. cp -f /boot.img /device/myvendor/mydevice/boot/
As you can see above the root of device tree should have boot.img which is being copied.
I need to customize the kernel of android to run on my Nexus S.
So I download the kernel with branch name "remotes/origin/android-samsung-2.6.35-gingerbread"
I tried to follow the instruction here http://source.android.com/source/building-kernels.html to build the kernel. To do this, I need the cross compile tool.In my target android source code version android-2.3.5_r1, there is no such tool(no prebuilts/ folder). So I downloaded the version 4.1.2 and set up the tool as path prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin .
Then I tried to build my kernel, but I got the following error:
[root#localhost samsung]# make
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC drivers/gpu/pvr/osfunc.o
In file included from drivers/gpu/pvr/osfunc.c:39:0:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:415:16: error: variable 'c' set but not used [-Werror=unused-but-set-variable]
drivers/gpu/pvr/osfunc.c: In function 'OSAccessOK':
drivers/gpu/pvr/osfunc.c:2144:13: error: variable 'linuxType' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[3]: *** [drivers/gpu/pvr/osfunc.o] Error 1
make[2]: *** [drivers/gpu/pvr] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
Should I just disable the "all warnings being treated as errors" to solve it? Or maybe I need a better toolchain?
PS: The tool chain of the master branch and branch 4.2 can not be used by me. Because it looks like they are made for a 64-bit OS while my linux is 32-bit
Do you have the path of ARCH=ARM and TOOLCHAIN pointing to the toolchain in \prebuilts folder?
make ARCH=ARM TOOLCHAIN=\<homeofAOSP>\prebuilt\.. herring_defconfig
make clean before you do the make
I've been trying to build Android WebKit from source (from here https://github.com/android/platform_external_webkit), but haven't had any success so far. I've run make and ndk-build from the root directory of my repo copy and from from the Source directory inside it, with the following results:
make from the root directory (makes sense, because there is no Makefile),
make: *** No targets specified and no makefile found. Stop.
make from the /Source directory:
make[1]: Entering directory `/webkit/Source/JavaScriptGlue'
../Makefile.shared:2: ../../Makefile.shared: No such file or directory
make[1]: *** No rule to make target `../../Makefile.shared'. Stop.
make[1]: Leaving directory `/webkit/Source/JavaScriptGlue'
make: *** [all] Error 2
ndk-build from root and ./Source:
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
<NDK>/build/core/build-local.mk:130: *** Android NDK: Aborting . Stop.
Can anyone advise as to what I'm doing wrong? I've read mention of Android needing to be compiled as a whole, but since this is 'external', I thought it would compile standalone. Am I wrong about that? Or is there some configuration step I've missed? Or anything else?
Thanks for the help.
This doesn't allow you to get a build fully working, I suspect you did the same as me and cloned to a folder called webkit.
If you rename that to jni and then run ndk-build from the folder containing jni, it does at least get past the problem you mention. I now get the error:
jni/Android.mk:314: external/stlport/libstlport.mk: No such file or directory
Android NDK: Trying to define local module 'webcore' in jni/Source/WebKit/Android.mk.
Android NDK: But this module was already defined by jni/Source/WebKit/Android.mk.
/cygdrive/e/android-ndk-r7/build/core/build-module.mk:34: *** Android NDK: Aborting. . Stop.
I'm still trying to figure out how to solve this new error.
I have downloaded the android 2.2.3_r1 and set up build environement.
I have made a special change to build the output in the USB drive by adding following line to buildspec.mk file and placing it in the source directory (the file has only that line as I want only to change the out directory).
OUT_DIR:=/media/SHANTHA/ANDROID
The build process is done issuing following commands in order:
source build/envsetup.sh
lunch full-eng
make -j4
When I run make -j4 it ends after fairly long time with following lines at the end of trace.
...
...
target Prelink: libthread_db (/media/SHANTHA/ANDROID/target/product/generic/symbols/system/lib/libthread_db.so)
target StaticLib: libwebcore (/media/SHANTHA/ANDROID/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a)
make: execvp: /bin/bash: Argument list too long
make: *** [/media/SHANTHA/ANDROID/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a] Error 127
make: *** Waiting for unfinished jobs....
shantha#shantha:~/ANDROID_S$
The trace indicates the error as make: execvp: /bin/bash: Argument list too long
It is a great help if someone can help me to solve this.
I had this problem too while building WebKit.
My solution was to download the kernel-sources, change line 14 in include/linux/binfmts.h from
#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
to
#define MAX_ARG_STRLEN (PAGE_SIZE * 64)
compile and install the kernel and reboot.
However, the problem of this solution is that every running process needs more memory. But you could boot this kernel for building android only.