**As this is only for personal learning and not a real developing thread, I didn't create it as DevDB project. Maybe in the future, when I learn how to, at least, handle the basic**
Hi all!
I'm trying to compile the stock EMUI 5.0 kernel for Nova and I'm really new to this. First, I ended up with a bunch of path errors and I already fixed it. Now, I'm having c errors that I can't solve, beside of looking extensively how to.
To the code =)
compiling:
Code:
$ make -j8
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/usb/gadget/u_f.o
CC drivers/usb/gadget/android.o
CC drivers/usb/gadget/function/f_fs.o
LD drivers/usb/gadget/libcomposite.o
LD drivers/usb/gadget/function/usb_f_fs.o
LD drivers/usb/gadget/function/built-in.o
LD drivers/usb/gadget/g_android.o
LD drivers/usb/gadget/built-in.o
drivers/usb/gadget/g_android.o: In function `alloc_ep_req':
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/u_f.c:18: multiple definition of `alloc_ep_req'
drivers/usb/gadget/libcomposite.o:$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/u_f.c:18: first defined here
drivers/usb/gadget/g_android.o: In function `f_midi_disable':
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/./drivers/usb/gadget/function/f_midi.c:383: multiple definition of `__ksymtab_alloc_ep_req'
drivers/usb/gadget/libcomposite.o:$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/usbstring.c:41: first defined here
make[3]: *** [scripts/Makefile.build:336: drivers/usb/gadget/built-in.o] Error 1
make[2]: *** [scripts/Makefile.build:402: drivers/usb/gadget] Error 2
make[1]: *** [scripts/Makefile.build:402: drivers/usb] Error 2
make: *** [Makefile:955: drivers] Error 2
looking for multiple definitions of "alloc_ep_req":
Code:
$ grep --exclude=*.o -rnw '$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel' -e "alloc_ep_req"
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_hid.c:342: return alloc_ep_req(ep, length, length);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_midi.c:43:extern struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_midi.c:206: return alloc_ep_req(ep, length, length);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_loopback.c:299: return alloc_ep_req(ep, len, buflen);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_sourcesink.c:435: return alloc_ep_req(ep, len, buflen);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/u_f.h:48:struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/u_f.c:17:struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len)
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/u_f.c:32:EXPORT_SYMBOL_GPL(alloc_ep_req);
looking for multiple definition of "ksymtab_alloc_ep_req" returns nothing.
looking for multiple definition of "f_midi_disabel":
Code:
$ grep --exclude=*.o -rnw '$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel' -e "f_midi_disable"
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_midi.c:382:static void f_midi_disable(struct usb_function *f)
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_midi.c:406: f_midi_disable(f);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_midi.c:984: midi->func.disable = f_midi_disable;
As I can see, there is only one definition of the first function as the only another occurrency rightly do it as "extern" and inside "u_f.h" is the prototype of the function.
Any ideas? Should I upload any file, just ask me =)
Vinnom said:
**As this is only for personal learning and not a real developing thread, I didn't create it as DevDB project. Maybe in the future, when I learn how to, at least, handle the basic**
Click to expand...
Click to collapse
Firstly, you've made the thread in the wrong section . Yes, it's related to development, but it's a question so it should be at Q&A. Well, I've reported it to be moved.
It's nice to see that you've already started to build.
Code:
$ make -j8
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/usb/gadget/u_f.o
CC drivers/usb/gadget/android.o
CC drivers/usb/gadget/function/f_fs.o
LD drivers/usb/gadget/libcomposite.o
LD drivers/usb/gadget/function/usb_f_fs.o
LD drivers/usb/gadget/function/built-in.o
LD drivers/usb/gadget/g_android.o
LD drivers/usb/gadget/built-in.o
drivers/usb/gadget/g_android.o: In function `alloc_ep_req':
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/u_f.c:18: multiple definition of `alloc_ep_req'
drivers/usb/gadget/libcomposite.o:$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/u_f.c:18: first defined here
drivers/usb/gadget/g_android.o: In function `f_midi_disable':
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/./drivers/usb/gadget/function/f_midi.c:383: multiple definition of `__ksymtab_alloc_ep_req'
drivers/usb/gadget/libcomposite.o:$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/usbstring.c:41: first defined here
make[3]: *** [scripts/Makefile.build:336: drivers/usb/gadget/built-in.o] Error 1
make[2]: *** [scripts/Makefile.build:402: drivers/usb/gadget] Error 2
make[1]: *** [scripts/Makefile.build:402: drivers/usb] Error 2
make: *** [Makefile:955: drivers] Error 2
Click to expand...
Click to collapse
Did you get those errors at the start of compiling? If yes, that's weird because I've tried to compile N kernel myself and I didn't get any error at begin, but rather when it was almost finishing. But I think I've used cm13's defconfig by mistake if I remember properly.
looking for multiple definitions of "alloc_ep_req":
Code:
$ grep --exclude=*.o -rnw '$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel' -e "alloc_ep_req"
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_midi.c:43:extern struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/u_f.h:48:struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/u_f.c:17:struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len)
As I can see, there is only one definition of the first function as the only another occurrency rightly do it as "extern" and inside "u_f.h" is the prototype of the function.
Click to expand...
Click to collapse
If you look at the start of u_f.c, you'll see this:
PHP:
#include "u_f.h"
So, the file where there's a definition of "alloc_ep_req" gets included in the file where's there's already a definition of this.
Try to remove the one from u_f.h. So, remove this line:
PHP:
# I think you have to keep those two lines, I'm not sure:
# struct usb_ep;
# struct usb_request;
struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len);
Two days ago, I've got a similar error. As you can see there, "LOOKUP_CASE_INSENSITIVE" was being used in a function in fs/f2fs/dir.c, but it wasn't even declared before. I've declared it in include/linux/namei.h (file which gets included in dir.c) and the error has been fixed. By the way, I've took the declaration from cm-13 branch since I've "synced" f2fs with the one from cm13- branch because I was getting too many errors, but I may take a look at it again.
EDIT: The kernel left by Grarak (cm13-0 branch) seems to have "struct usb_request *alloc_ep_req" in both files, u_f.c and u_f.h. I didn't get any such error while building that kernel and that's weird.
looking for multiple definition of "ksymtab_alloc_ep_req" returns nothing.
Click to expand...
Click to collapse
Have you tried to look for it manually?
looking for multiple definition of "f_midi_disabel":
Code:
$ grep --exclude=*.o -rnw '$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel' -e "f_midi_disable"
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_midi.c:382:static void f_midi_disable(struct usb_function *f)
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_midi.c:406: f_midi_disable(f);
$HOME/celular/Nova/CAZ_NG_EMUI5.0_opensource/Code_Opensource/kernel/drivers/usb/gadget/function/f_midi.c:984: midi->func.disable = f_midi_disable;
Click to expand...
Click to collapse
I don't know about this one.
The error says only this:
PHP:
drivers/usb/gadget/g_android.o: In function `f_midi_disable':
It doesn't says about multiple definitions of "f_midi_disable".
I didn't know that there's such a command which can tell you if a string/line exists in a file from a folder with many files. Thank you a lot for that!
#Henkate said:
Firstly, you've made the thread in the wrong section . Yes, it's related to development, but it's a question so it should be at Q&A. Well, I've reported it to be moved.
It's nice to see that you've already started to build.
Did you get those errors at the start of compiling? If yes, that's weird because I've tried to compile N kernel myself and I didn't get any error at begin, but rather when it was almost finishing. But I think I've used cm13's defconfig by mistake if I remember properly.
Click to expand...
Click to collapse
thanks for that! I was really confused where I should've posted it.
I got those errors after 5 minutes that it started compiling I think. But to send a more compacted message, I compiled it again, so it displays only the part that fails.
#Henkate said:
If you look at the start of u_f.c, you'll see this:
PHP:
#include "u_f.h"
So, the file where there's a definition of "alloc_ep_req" gets included in the file where's there's already a definition of this.
Try to remove the one from u_f.h. So, remove this line:
PHP:
# I think you have to keep those two lines, I'm not sure:
# struct usb_ep;
# struct usb_request;
struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len);
Two days ago, I've got a similar error. As you can see there, "LOOKUP_CASE_INSENSITIVE" was being used in a function in fs/f2fs/dir.c, but it wasn't even declared before. I've declared it in include/linux/namei.h (file which gets included in dir.c) and the error has been fixed. By the way, I've took the declaration from cm-13 branch since I've "synced" f2fs with the one from cm13- branch because I was getting too many errors, but I may take a look at it again.
EDIT: The kernel left by Grarak (cm13-0 branch) seems to have "struct usb_request *alloc_ep_req" in both files, u_f.c and u_f.h. I didn't get any such error while building that kernel and that's weird.
Click to expand...
Click to collapse
It is really strange. I looked a lot of stackoverflow threads about this hahahhaha. It is a c compiling error, so it should be possible to solve with c knowledge. I have some of it, really basic you know. Things I learned when searching for a solution:
- Inside a header file should be only the prototype of the function (which is inside u_f.h);
- When declaring a function in another file, it should be declared as extern (which is inside f_midi.c);
So I was really lost when I confirmed that, apparently, everything is right. I'll take a look at grarak's kernel tree so I can compare things.
#Henkate said:
Have you tried to look for it manually?
Click to expand...
Click to collapse
Yeah =/ The grep command was the way I found to show that I didn't found the function.
#Henkate said:
I don't know about this one.
The error says only this:
PHP:
drivers/usb/gadget/g_android.o: In function `f_midi_disable':
It doesn't says about multiple definitions of "f_midi_disable".
Click to expand...
Click to collapse
I looked for f_midi_disable just to be sure. Eliminating the possibilities. The error it says it has is inside the function. But everything seems fine
#Henkate said:
I didn't know that there's such a command which can tell you if a string/line exists in a file from a folder with many files. Thank you a lot for that!
Click to expand...
Click to collapse
grep is really powerful. I don't know all the extent of its usage, but it really helps =P
WOW MAN!
It was a lot easier than I tought! I looked at Grarak's kernel tree and compared. My f_midi.c was including the u_f.c file for some reason, but the correct is to include the u_f.h file. I fixed it and it just finished compiling. I'll mark this as solved.
I don't know why, the compare method didn't even cross my mind. Would take less effort if this idea came to me earlier =)
Thank you very much =)
Vinnom said:
WOW MAN!
It was a lot easier than I tought! I looked at Grarak's kernel tree and compared. My f_midi.c was including the u_f.c file for some reason, but the correct is to include the u_f.h file. I fixed it and it just finished compiling. I'll mark this as solved.
I don't know why, the compare method didn't even cross my mind. Would take less effort if this idea came to me earlier =)
Thank you very much =)
Click to expand...
Click to collapse
That's great!
However, it sounds weird that it fails within/after 5 minutes. What commands did you use to start building?
Did you check "README_Kernel.txt" which is inside the kernel source?
#Henkate said:
That's great!
However, it sounds weird that it fails within/after 5 minutes. What commands did you use to start building?
Did you check "README_Kernel.txt" which is inside the kernel source?
Click to expand...
Click to collapse
I used:
Code:
make nova_defconfig
make menuconfig
make -j8
I renamed our chipset defconfig for nova_defconfig, the menuconfig was to enable lz4 compression support and make -j8 already build the zImage.gz-dtb (-j8 for parallelism, because my cpu supports 8 threads).
Btw, do you know how to compress it with lz4? Lz4 is much better for swiftness than gzip and I'm almost sure that is what keeps us from using superSU, as superSU doesn't support gzip but does lz4
Vinnom said:
Btw, do you know how to compress it with lz4? Lz4 is much better for swiftness than gzip and I'm almost sure that is what keeps us from using superSU, as superSU doesn't support gzip but does lz4
Click to expand...
Click to collapse
I'm sorry for late reply.
1) I'm not sure about lz4, but if I'm not wrong, you have to do changes in defconfig. You can try to search for kernels which are compressed with lz4 and look into their source.
2) How do you know that SuperSU doesn't support gzip? When I google "supersu gzip", it gives some threads/posts where it says:
SuperSU can only work with gzip compressed ramdisks while we have lz4 compressed ones
Click to expand...
Click to collapse
Unfortunately SuperSU can only decompress and tweak gzip compressed ramdisks up to now.
Click to expand...
Click to collapse
#Henkate said:
I'm sorry for late reply.
1) I'm not sure about lz4, but if I'm not wrong, you have to do changes in defconfig. You can try to search for kernels which are compressed with lz4 and look into their source.
Click to expand...
Click to collapse
No need to be sorry
I made some changes but I'm not sure how to set it as default. In any case, I let gzip and lz4 as compatibles compression types.
#Henkate said:
2) How do you know that SuperSU doesn't support gzip? When I google "supersu gzip", it gives some threads/posts where it says:
Click to expand...
Click to collapse
I don't know. I'm sure I read something about this that Chainfire himself wrote, but I may have read wrong. I'll try to search for it again later.
EDIT:
I surely misread what he said. But the latest version of superSu beta includes lz4 compression in the kernel binary, as I read in his G+ post. It says that some huawei specific code was done. I'll test it here and report in his thread if anything goes wrong.
Related
I am currently trying to build CM9 for my A500 on my Mac (which is running OS X 10.8). It is failing while building the kernel, with the error:
Code:
Undefined symbols for architecture i386:
"android::renderscript::rsi_Allocation1DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, void const*, unsigned long, unsigned int)", referenced from:
...
android::renderscript::rsp_Allocation2DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
I'll describe the steps I followed to get to that point below, but first: It doesn't look like I'm the only one having this problem, but it doesn't look common - I found the same error in three pastebins: 1, 2, 3. The interesting thing is that 1 and 2 there are both on OS X (both contain 'out/host/darwin-x86/'), and they are for different devices.
Anyway, to get to that point I did the following:
(Following the CyanogenMod Wiki template for Mac OS X building)
1. Trashed my entire MacPorts tree using the commands provided in the CyanogenMod wiki.
2. Reinstalled all the ports I already had installed, along with those indicated in the CyanogenMod wiki. I used the supplied command, but then after the described error appeared the first time, I installed all the ports with the +universal directive as well.
3. Checked out the code for CM9 using:
Code:
repo init -u http:github.com/CyanogenMod/android.git -b ics --reference=/Volumes/Backup/AndroidDevelopment/cm9/mirror/CyanogenMod/
repo sync
4. Following the post by waydownsouth, ran:
Code:
. build/envsetup.sh
lunch cm_a500-userdebug
This synced the a500 bits from the repository
5. Plugged in the tablet, and entered the commands:
Code:
cd device/acer/a500
./extract-files.sh
A bunch of files downloaded, and all was well.
6. I returned to the root of my working directory, and ran:
Code:
brunch cm_a500-userdebug
and received the error:
Code:
It bombed with:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/a500/system/app/RomManager.apk'. Stop.
make: *** Waiting for unfinished jobs....
7. Got the prebuilts using the commands:
Code:
cd vendor/cm
./get-prebuilts
8. Returned to the root of the working directory again, and ran:
Code:
brunch cm_a500-userdebug
It looked like it was working until I received the error:
Code:
Result was:
target thumb C++: libwebcore <= external/webkit/Source/WebCore/xml/XPathP****r.cpp
out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/XPathGrammar.hpp: In member function 'WebCore::XPath::Expression* WebCore::XPath::P****r::p****Statement(const WTF::String&, WTF::PassRefPtr<WebCore::XPathNSResolver>, WebCore::ExceptionCode&)':
out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/XPathGrammar.hpp:106: error: too many arguments to function 'int WebCore::XPath::xpathyyp****()'
external/webkit/Source/WebCore/xml/XPathP****r.cpp:480: error: at this point in file
make: *** [out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/xml/XPathP****r.o] Error 1
9. I found that the above error was due to Bison 2.6, and I shopped around, and found a patch which appeared to address this issue. It didn't apply quite correctly (on file Source/WebCore/xml/XPathP****r.cpp), but I manually merged that file.
10. I shut down and restarted (because I was going from one place to another, and stuff in on an external drive) so I got my environment variables set etc. again by running:
Code:
9. At this point, I shut down. When I recommenced, I ran
. build/envsetup.sh
lunch cm_a500-userdebug
brunch cm_a500-userdebug
Webkit built correctly this time, but then I hit the error:
Code:
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:4:17: error: elf.h: No such file or directory
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c: In function ‘main’:
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:9: error: ‘EI_NIDENT’ undeclared (first use in this function)
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:9: error: (Each undeclared identifier is reported only once
...
make[4]: *** [scripts/mod/mk_elfconfig] Error 1
11. I looked around and found one thread which suggested I copy the elf.h file to /external/elfutils/libelf but that didn't appear to fix the problem, so deleted the elf.h file from that directory again.
Then I found another thread which suggested the way to solve the problem was to build the kernel separately, and in advance using the command:
Code:
make -j`sysctl -an hw.logicalcpu` ARCH=arm CROSS_COMPILE=./prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- HOSTCFLAGS="-I./external/elfutils/libelf"
(Note that I changed the paths here to match my system).
To save from having to recompile everything every time, I ran:
export USE_CCACHE=1 && ./prebuilt/darwin-x86/ccache/ccache -M 20G
Then I used the command identified above (i.e. make -j`sysctl -an hw.logicalcpu` ...).
It failed after quite some time with the error:
Code:
Build failed with:
Undefined symbols for architecture i386:
"android::renderscript::rsi_Allocation1DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, void const*, unsigned long, unsigned int)", referenced from:
android::renderscript::rspr_Allocation1DElementData(android::renderscript::Context*, android::renderscript::Fifo*, unsigned char*, unsigned long)in libRS.a(rsgApiReplay.o)
android::renderscript::rsp_Allocation1DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
"android::renderscript::rsi_Allocation2DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, unsigned int, RsAllocationCubemapFace, void const*, unsigned long, unsigned int)", referenced from:
android::renderscript::rspr_Allocation2DElementData(android::renderscript::Context*, android::renderscript::Fifo*, unsigned char*, unsigned long)in libRS.a(rsgApiReplay.o)
android::renderscript::rsp_Allocation2DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
As I noted above, it seems like one or two other people have had this error also. At this point, I'm basically stumped. I've never really done much C/C++ dev, so I'm fairly unfamiliar with reading the output of the linker. Looking over it, I wouldn't have expected it to need i386 symbols for libRS.a (if that is indeed what it is looking for symbols of) because it is building for ARM, but I could just be completely misunderstanding the output.
Anyway, if anyone has suggestions as to what might be causing the problem or how to address it (or even wants to briefly explain what that linker error actually means in a clearer way) that would be great. I've fought with CM7 builds in the past (for the Moto Defy) and basically given up because I couldn't get them to build. I'd rather not just do that again.
Have you solved this issue? Any update?
Any update?
FFU5y said:
I am currently trying to build CM9 for my A500 on my Mac (which is running OS X 10.8). It is failing while building the kernel, with the error:
Code:
Undefined symbols for architecture i386:
"android::renderscript::rsi_Allocation1DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, void const*, unsigned long, unsigned int)", referenced from:
...
android::renderscript::rsp_Allocation2DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
I'll describe the steps I followed to get to that point below, but first: It doesn't look like I'm the only one having this problem, but it doesn't look common - I found the same error in three pastebins: 1, 2, 3. The interesting thing is that 1 and 2 there are both on OS X (both contain 'out/host/darwin-x86/'), and they are for different devices.
Anyway, to get to that point I did the following:
(Following the CyanogenMod Wiki template for Mac OS X building)
1. Trashed my entire MacPorts tree using the commands provided in the CyanogenMod wiki.
2. Reinstalled all the ports I already had installed, along with those indicated in the CyanogenMod wiki. I used the supplied command, but then after the described error appeared the first time, I installed all the ports with the +universal directive as well.
3. Checked out the code for CM9 using:
Code:
repo init -u http:github.com/CyanogenMod/android.git -b ics --reference=/Volumes/Backup/AndroidDevelopment/cm9/mirror/CyanogenMod/
repo sync
4. Following the post by waydownsouth, ran:
Code:
. build/envsetup.sh
lunch cm_a500-userdebug
This synced the a500 bits from the repository
5. Plugged in the tablet, and entered the commands:
Code:
cd device/acer/a500
./extract-files.sh
A bunch of files downloaded, and all was well.
6. I returned to the root of my working directory, and ran:
Code:
brunch cm_a500-userdebug
and received the error:
Code:
It bombed with:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/a500/system/app/RomManager.apk'. Stop.
make: *** Waiting for unfinished jobs....
7. Got the prebuilts using the commands:
Code:
cd vendor/cm
./get-prebuilts
8. Returned to the root of the working directory again, and ran:
Code:
brunch cm_a500-userdebug
It looked like it was working until I received the error:
Code:
Result was:
target thumb C++: libwebcore <= external/webkit/Source/WebCore/xml/XPathP****r.cpp
out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/XPathGrammar.hpp: In member function 'WebCore::XPath::Expression* WebCore::XPath::P****r::p****Statement(const WTF::String&, WTF::PassRefPtr<WebCore::XPathNSResolver>, WebCore::ExceptionCode&)':
out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/XPathGrammar.hpp:106: error: too many arguments to function 'int WebCore::XPath::xpathyyp****()'
external/webkit/Source/WebCore/xml/XPathP****r.cpp:480: error: at this point in file
make: *** [out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/xml/XPathP****r.o] Error 1
9. I found that the above error was due to Bison 2.6, and I shopped around, and found a patch which appeared to address this issue. It didn't apply quite correctly (on file Source/WebCore/xml/XPathP****r.cpp), but I manually merged that file.
10. I shut down and restarted (because I was going from one place to another, and stuff in on an external drive) so I got my environment variables set etc. again by running:
Code:
9. At this point, I shut down. When I recommenced, I ran
. build/envsetup.sh
lunch cm_a500-userdebug
brunch cm_a500-userdebug
Webkit built correctly this time, but then I hit the error:
Code:
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:4:17: error: elf.h: No such file or directory
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c: In function ‘main’:
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:9: error: ‘EI_NIDENT’ undeclared (first use in this function)
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:9: error: (Each undeclared identifier is reported only once
...
make[4]: *** [scripts/mod/mk_elfconfig] Error 1
11. I looked around and found one thread which suggested I copy the elf.h file to /external/elfutils/libelf but that didn't appear to fix the problem, so deleted the elf.h file from that directory again.
Then I found another thread which suggested the way to solve the problem was to build the kernel separately, and in advance using the command:
Code:
make -j`sysctl -an hw.logicalcpu` ARCH=arm CROSS_COMPILE=./prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- HOSTCFLAGS="-I./external/elfutils/libelf"
(Note that I changed the paths here to match my system).
To save from having to recompile everything every time, I ran:
export USE_CCACHE=1 && ./prebuilt/darwin-x86/ccache/ccache -M 20G
Then I used the command identified above (i.e. make -j`sysctl -an hw.logicalcpu` ...).
It failed after quite some time with the error:
Code:
Build failed with:
Undefined symbols for architecture i386:
"android::renderscript::rsi_Allocation1DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, void const*, unsigned long, unsigned int)", referenced from:
android::renderscript::rspr_Allocation1DElementData(android::renderscript::Context*, android::renderscript::Fifo*, unsigned char*, unsigned long)in libRS.a(rsgApiReplay.o)
android::renderscript::rsp_Allocation1DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
"android::renderscript::rsi_Allocation2DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, unsigned int, RsAllocationCubemapFace, void const*, unsigned long, unsigned int)", referenced from:
android::renderscript::rspr_Allocation2DElementData(android::renderscript::Context*, android::renderscript::Fifo*, unsigned char*, unsigned long)in libRS.a(rsgApiReplay.o)
android::renderscript::rsp_Allocation2DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
As I noted above, it seems like one or two other people have had this error also. At this point, I'm basically stumped. I've never really done much C/C++ dev, so I'm fairly unfamiliar with reading the output of the linker. Looking over it, I wouldn't have expected it to need i386 symbols for libRS.a (if that is indeed what it is looking for symbols of) because it is building for ARM, but I could just be completely misunderstanding the output.
Anyway, if anyone has suggestions as to what might be causing the problem or how to address it (or even wants to briefly explain what that linker error actually means in a clearer way) that would be great. I've fought with CM7 builds in the past (for the Moto Defy) and basically given up because I couldn't get them to build. I'd rather not just do that again.
Click to expand...
Click to collapse
sean.wang said:
Any update?
Click to expand...
Click to collapse
I actually gave up in the end, and took to running an Ubuntu 12.04 virtual machine for compiling. There just isn't enough people building on OSX to be able to readily work through the problems.
FFU5y said:
I actually gave up in the end, and took to running an Ubuntu 12.04 virtual machine for compiling. There just isn't enough people building on OSX to be able to readily work through the problems.
Click to expand...
Click to collapse
I believe this fixes this particular problem:
Code:
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index bbf2dbd..c4def9c 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -429,13 +429,13 @@ void rsi_Allocation1DData(Context *rsc, RsAllocation va, uint32_t xoff, uint32_t
}
void rsi_Allocation2DElementData(Context *rsc, RsAllocation va, uint32_t x, uint32_t y, uint32_t lod, RsAllocationCubemapFace face,
- const void *data, uint32_t sizeBytes, size_t eoff) {
+ const void *data, size_t sizeBytes, uint32_t eoff) {
Allocation *a = static_cast<Allocation *>(va);
a->elementData(rsc, x, y, data, eoff, sizeBytes);
}
void rsi_Allocation1DElementData(Context *rsc, RsAllocation va, uint32_t x, uint32_t lod,
- const void *data, uint32_t sizeBytes, size_t eoff) {
+ const void *data, size_t sizeBytes, uint32_t eoff) {
Allocation *a = static_cast<Allocation *>(va);
a->elementData(rsc, x, data, eoff, sizeBytes);
}
The issue has been fixed in another way, as a part of a larger patch, in the upstream AOSP. So, this is most probably only useful if you try to build CM9 / AOSP 4.0.4 under MacOS X 10.7 (Lion) with a suitable version of XCode. My XCode is 4.5 (i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1).
Got the following error while compiling:
target Java: KeyChain (/ubhome/theo/android/omnirom/out/target/common/obj/APPS/KeyChain_intermediates/classes)
target Java: LiveWallpapers (/ubhome/theo/android/omnirom/out/target/common/obj/APPS/LiveWallpapers_intermediates/classes)
packages/apps/CertInstaller/src/com/android/certinstaller/CertInstallerMain.java:88: cannot find symbol
symbol : variable EXTRA_SHOW_ADVANCED
location: class android.provider.DocumentsContract
openIntent.putExtra(DocumentsContract.EXTRA_SHOW_ADVANCED, true);
^
Note: packages/apps/CertInstaller/src/com/android/certinstaller/CertInstaller.java uses or overrides 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.
1 error
Any ideas where the problem is ?
Greetz
Open /frameworks/base/core/java/android/provider/DocumentsContract.java, go to line #86 and check if it is like this:
Code:
public static final String EXTRA_SHOW_ADVANCED = "android.content.extra.SHOW_ADVANCED";
If not, you have either data corruption due to forced system reboob, power outage or similar, or you have a bad cherry pick.
If you have tried to cherry pick the popular Multi-widow™, you are out of luck: it breaks the build today and will continue to do so
until someone does a rebase..
In either case, rm -rf your /frameworks and /.repo/projects/frameworks, then resync, check again DocumentsContract.java's line 86
and get the build rolling if everything's OK.
chasmodo said:
If you have tried to cherry pick the popular Multi-widow™, you are out of luck: it breaks the build today and will continue to do so
until someone does a rebase..
Click to expand...
Click to collapse
Not anymore
https://gerrit.omnirom.org/#/c/1510/
chasmodo said:
Open /frameworks/base/core/java/android/provider/DocumentsContract.java, go to line #86 and check if it is like this:
Code:
public static final String EXTRA_SHOW_ADVANCED = "android.content.extra.SHOW_ADVANCED";
If not, you have either data corruption due to forced system reboob, power outage or similar, or you have a bad cherry pick.
If you have tried to cherry pick the popular Multi-widow™, you are out of luck: it breaks the build today and will continue to do so
until someone does a rebase..
In either case, rm -rf your /frameworks and /.repo/projects/frameworks, then resync, check again DocumentsContract.java's line 86
and get the build rolling if everything's OK.
Click to expand...
Click to collapse
Yap, you're right...
Seems that for some reason have data corruption. Will completely refetch sources and try again...
Thanx...
And the next one after refetch of sources....
target thumb C++: third_party_WebKit_Source_web_webkit_gyp <= external/chromium_org/third_party/WebKit/Source/web/DOMUtilitiesPrivate.cpp
target thumb C++: third_party_WebKit_Source_web_webkit_gyp <= external/chromium_org/third_party/WebKit/Source/web/DatabaseObserver.cpp
frameworks/base/core/java/com/android/internal/view/CheckableLinearLayout.java:48: cannot find symbol
symbol : variable check
location: class com.android.internal.R.id
mCheckBox = (CheckBox) findViewById(R.id.check);
^
target thumb C++: third_party_WebKit_Source_web_webkit_gyp <= external/chromium_org/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp
target thumb C++: third_party_WebKit_Source_web_webkit_gyp <= external/chromium_org/third_party/WebKit/Source/web/DeviceOrientationClientProxy.cpp
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.
Greetz
Temporary commented out to see if it is the only problem. Now continue compiling...
EDIT2:
after a lot of frustrating compilation errors, i finally found the problem. Beside making sure that all 'java' components point to JDK6, this is also necessary for 'config.jar'. So check this with:
$ sudo update-alternatives --config jar
and select the jar tool provided by JDK6 instead of other jar tools like fastjar or openjdk jar.
So I am building Omni Rom for my device which is not currently supported by Omni. I have declared the kernel, device in the local manifest. I am getting the below error:
No private recovery resources for TARGET_DEVICE d2att
build/core/tasks/kernel.mk:65: ***************************************************************
build/core/tasks/kernel.mk:66: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:67: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED
http://hastebin.com/yapimovido.md
Putting the kernel repo in local_manifest.xml is not enough. You have to add the path to the kernel local source and its target defconfig to your device's BoardConfig.mk.
For example, see n7100 BoardConfig.mk here: https://github.com/omnirom/android_device_samsung_n7100/blob/android-4.4/BoardConfig.mk
Lines 30-32.
chasmodo said:
Putting the kernel repo in local_manifest.xml is not enough. You have to add the path to the kernel local source and its target defconfig to your device's BoardConfig.mk.
For example, see n7100 BoardConfig.mk here: https://github.com/omnirom/android_device_samsung_n7100/blob/android-4.4/BoardConfig.mk
Lines 30-32.
Click to expand...
Click to collapse
I fixed that by changing the reference of the d2 kernel in the d2-common folder.
Now I am getting the following error:
http://hastebin.com/cehadiwika.vhdl
matrixzone said:
I fixed that by changing the reference of the d2 kernel in the d2-common folder.
Now I am getting the following error:
http://hastebin.com/cehadiwika.vhdl
Click to expand...
Click to collapse
Go to device/samsung/d2-common/overlay/frameworks/base/core/res/res/values/config.xml and comment out the three lines containing
config_forceDisableHardwareKeyboard
config_panelAutoBrightnessValue
config_enableTorch
like this
<!-- <bool name="config_forceDisableHardwareKeyboard">true/false/whatever</bool> -->
chasmodo said:
Go to device/samsung/d2-common/overlay/frameworks/base/core/res/res/values/config.xml and comment out the three lines containing
config_forceDisableHardwareKeyboard
config_panelAutoBrightnessValue
config_enableTorch
like this
<!-- <bool name="config_forceDisableHardwareKeyboard">true/false/whatever</bool> -->
Click to expand...
Click to collapse
Thanks for your response but I have deleted the overlay folder. Will that work?
matrixzone said:
Thanks for your response but I have deleted the overlay folder. Will that work?
Click to expand...
Click to collapse
No, it won't. Even if you pull off a build with no errors, many of the device specific settings will be lost.
rm -rf /device folder, resync and solve the overlay error in the proper fashion.
chasmodo said:
No, it won't. Even if you pull off a build with no errors, many of the device specific settings will be lost.
rm -rf /device folder, resync and solve the overlay error in the proper fashion.
Click to expand...
Click to collapse
That fixed the issue. Thanks.
Now new error:
----- Making recovery image ------
error: could not load kernel '/home/kunal/android/omni/kernel/samsung/d2att'
make: *** [/home/kunal/android/omni/out/target/product/d2att/recovery.img] Error 1
I have defined the correct location of the kernel, but still getting the above error
Getting this error:
hardware/qcom/media-caf/mm-video/vidc/venc/src/video_encoder_device.cpp:3227:9: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat]
hardware/qcom/media-caf/mm-video/vidc/venc/src/video_encoder_device.cpp:3248:9: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat]
hardware/qcom/media-caf/mm-video/vidc/venc/src/video_encoder_device.cpp:3260:9: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat]
hardware/qcom/media-caf/mm-video/vidc/venc/src/video_encoder_device.cpp:3270:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
make: *** [/home/kunal/android/omni/out/target/product/d2att/obj/SHARED_LIBRARIES/libOmxVenc_intermediates/src/video_encoder_device.o] Error 1
Manage to nail all error, now stuck in the below:
hardware/qcom/media-caf/mm-video/vidc/venc/src/video_encoder_device.cpp:1615:3: error: 'struct venc_entropycfg' has no member named 'longentropysel'
Building AOSP for the Nexus 6!
I want to give thanks to @sykopompos and @GROGG88. This was pretty much a concerted effort between all of us!
Preface
This is to help you learn to build, for other developers to share knowledge, for you to ask questions, etc. The main focus is not the ROM but it is in post #2 if you want to check out out!
I built this guide do to lack of 100% clear / easy resources I could not find on the net. The Google AOSP page made it seem much more difficult than it needed to be.
The intent of this guide is to streamline the process of setting up for and building AOSP!
Feel free to ask any questions about the build process. Please do not ask questions about Ubuntu / Linux!
Check out some basic edits to source in Post #2
This guide assumes the following
Have Ubuntu 14.04 setup, fully operation, and up to date. Hard Machine or Virtual, makes no difference. Must meet the minimum specs for compiling. Info from Google HERE
Understand terminal command line entry as this is all command line processes.
You are not here to ask for help with Linux, only the Android build process!
If you want to try the ROM then I have the latest build of Lollipop in this thread HERE!
Lets Begin!
Add Java
Code:
sudo apt-get install openjdk-7-jdk
Add Build tools (Adds the required packages at the time of this posting)
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip
Add Repo command (Syncs Google Repository with your local machine)
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Add bin folder to path for repo command (After you do this close Terminal and re-open to institute changes (easy way))
Code:
sudo gedit .bashrc
export PATH=~/bin:$PATH <-(add to end of bashrc)
Identify Yourself to the Repo (One day you may make commits so think about that when choosing your info!)
Code:
git config --global user.email "[email protected]"
git config --global user.name "yourpreferredusername"
Sync Repo (Download source... Sit back and grab a pop and a sandwich...)
Code:
mkdir ~/AOSP
cd ~/AOSP
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r10
repo sync
Note: I use AOSP as my directory name. You can use what you want. You could use "aosp" or "Source" or "android" or "whateveryoulike"
Set up ccache (this makes subsequent compiling much faster!)
First: Close then re-open the terminal so you are in the home root
Code:
sudo gedit .bashrc
export USE_CCACHE=1 <-Append that line to .bashrc then save and close
cd AOSP
prebuilts/misc/linux-x86/ccache/ccache -M 25G <-I use 25 gigs but you can change that value to any size you feel appropriate)
Install proprietary binaries (Needed for things like GPS and Bluetooth, they are not Open Source like Android) (Install proprietary binaries from here in the root of AOSP folder (or whatever you called yours))
Code:
[url]https://developers.google.com/android/nexus/drivers[/url]
Run envsetup.sh
Code:
source build/envsetup.sh
Choose Device
Code:
lunch
Build it!
Code:
make -j16 otapackage
Note: using -j16 means 16 worker threads. This is fine if you have 8 logical CPU's so you may need to adjust that to a smaller or larger number if you have more or less Logical CPU's. Example: I have an i7 K edition Haswell so I have 8 logical cores; so I build with -j16. If you have an i5 quad core CPU which is 4 logical cores then you may want to consider -j8 as the set number of worker threads. Oddly enough Google actually recommends 3 to 4 times the number of logical CPU's. When I do that I have nothing but build crashes. You may need to experiment to get the right blend of performance and stability during build!
Find it
Should be located here: /home/yourusername/AOSP/out/target/product/shamu
Congrats!
Your know among the elite enthusiast that can build from source! Pat yourself on the back!
Change Log
1/10/2016
Updated guide to reflect Android 6.0.1 repository
Updated list of tools to install
3/19/2015
Updated guide to reflect Android 5.1.0 repository
Fixed Youtube, Net flix DRM play back issue. Thanks to @sykopompos for pointing me to @ayysir git hub for the fix by @BeansTown106
1/17/2015
Added ccache instructions
Listed changes for AOSP Browser to not F/C on settings
12/14/2014
Initial Release
Congrats on building but you need to make some edits to make the ROM more "useable"
Note: Attached is a complete diff from pure AOSP to the changes made / noted in this post.
With AOSP defaults you to
Reload the stock recovery on boot
Doesn't utilize all Google Location services (all the way?)
Browser settings crash
Cant Play Youtube or Netflix, etc.
The following is a list of code changes to negate all that. Ignore the Flo and Deb specific files mentioned in there as I also build for those devices too! This is sorta hard to read but once you get it the first time it will make sense. Feel free to ask questions on how to read! I have attached a copy of the "ota_from_target_files" as it is modified in this guide.
My Changes
Code:
project build/
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 755e5c2..620f5c6 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -522,8 +522,8 @@ def WriteFullOTAPackage(input_zip, output_zip):
# set up system to update recovery partition on first boot
# complete script normally (allow recovery to mark itself finished and reboot)
- recovery_img = common.GetBootableImage("recovery.img", "recovery.img",
- OPTIONS.input_tmp, "RECOVERY")
+# recovery_img = common.GetBootableImage("recovery.img", "recovery.img",
+# OPTIONS.input_tmp, "RECOVERY")
if OPTIONS.two_step:
if not OPTIONS.info_dict.get("multistage_support", None):
assert False, "two-step packages not supported by this build"
@@ -582,11 +582,11 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
if not block_based:
def output_sink(fn, data):
- common.ZipWriteStr(output_zip, "recovery/" + fn, data)
+# common.ZipWriteStr(output_zip, "recovery/" + fn, data)
system_items.Get("system/" + fn, dir=False)
- common.MakeRecoveryPatch(OPTIONS.input_tmp, output_sink,
- recovery_img, boot_img)
+# common.MakeRecoveryPatch(OPTIONS.input_tmp, output_sink,
+# recovery_img, boot_img)
system_items.GetMetadata(input_zip)
system_items.Get("system").SetPermissions(script)
@@ -730,12 +730,12 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip):
updating_boot = (not OPTIONS.two_step and
(source_boot.data != target_boot.data))
- source_recovery = common.GetBootableImage(
- "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY",
- OPTIONS.source_info_dict)
- target_recovery = common.GetBootableImage(
- "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
- updating_recovery = (source_recovery.data != target_recovery.data)
+# source_recovery = common.GetBootableImage(
+# "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY",
+# OPTIONS.source_info_dict)
+# target_recovery = common.GetBootableImage(
+# "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
+# updating_recovery = (source_recovery.data != target_recovery.data)
system_src = GetImage("system", OPTIONS.source_tmp, OPTIONS.source_info_dict)
system_tgt = GetImage("system", OPTIONS.target_tmp, OPTIONS.target_info_dict)
@@ -1104,12 +1104,12 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
updating_boot = (not OPTIONS.two_step and
(source_boot.data != target_boot.data))
- source_recovery = common.GetBootableImage(
- "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY",
- OPTIONS.source_info_dict)
- target_recovery = common.GetBootableImage(
- "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
- updating_recovery = (source_recovery.data != target_recovery.data)
+# source_recovery = common.GetBootableImage(
+# "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY",
+# OPTIONS.source_info_dict)
+# target_recovery = common.GetBootableImage(
+# "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
+# updating_recovery = (source_recovery.data != target_recovery.data)
# Here's how we divide up the progress bar:
# 0.1 for verifying the start state (PatchCheck calls)
@@ -1313,9 +1313,9 @@ else
script.Print("Unpacking new vendor files...")
script.UnpackPackageDir("vendor", "/vendor")
- if updating_recovery and not target_has_recovery_patch:
- script.Print("Unpacking new recovery...")
- script.UnpackPackageDir("recovery", "/system")
+# if updating_recovery and not target_has_recovery_patch:
+# script.Print("Unpacking new recovery...")
+# script.UnpackPackageDir("recovery", "/system")
system_diff.EmitRenames(script)
if vendor_diff:
project device/asus/flo/
diff --git a/aosp_flo.mk b/aosp_flo.mk
index 6f1ad0c..c1c99fb 100644
--- a/aosp_flo.mk
+++ b/aosp_flo.mk
@@ -24,7 +24,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
PRODUCT_NAME := aosp_flo
PRODUCT_DEVICE := flo
PRODUCT_BRAND := Android
-PRODUCT_MODEL := AOSP on Flo
+PRODUCT_MODEL := Nexus 7
PRODUCT_MANUFACTURER := ASUS
PRODUCT_RESTRICT_VENDOR_FILES := true
diff --git a/system.prop b/system.prop
index 937fbb7..dc3a07f 100644
--- a/system.prop
+++ b/system.prop
@@ -3,3 +3,4 @@
#LTE, GSM, WCDMA(9)
#
ro.telephony.default_network=9
+persist.sys.usb.config=mtp,adb
project device/moto/shamu/
diff --git a/aosp_shamu.mk b/aosp_shamu.mk
index e5fa301..ef53d06 100644
--- a/aosp_shamu.mk
+++ b/aosp_shamu.mk
@@ -26,7 +26,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
PRODUCT_NAME := aosp_shamu
PRODUCT_DEVICE := shamu
PRODUCT_BRAND := Android
-PRODUCT_MODEL := AOSP on Shamu
+PRODUCT_MODEL := Nexus 6
PRODUCT_MANUFACTURER := motorola
PRODUCT_RESTRICT_VENDOR_FILES := true
project frameworks/base/
diff --git a/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.jpg b/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.jpg
index 03a14c0..9ab8944 100644
Binary files a/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.jpg and b/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.jpg differ
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 8006659..cfd55b1 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -946,6 +946,7 @@
-->
<string-array name="config_locationProviderPackageNames" translatable="false">
<!-- The standard AOSP fused location provider -->
+ <item>com.google.android.gms</item>
<item>com.android.location.fused</item>
</string-array>
project packages/apps/Browser/
diff --git a/src/com/android/browser/BrowserPreferencesPage.java b/src/com/android/browser/BrowserPreferencesPage.java
index 6e6da17..cd91f11 100644
--- a/src/com/android/browser/BrowserPreferencesPage.java
+++ b/src/com/android/browser/BrowserPreferencesPage.java
@@ -43,6 +43,12 @@ public class BrowserPreferencesPage extends PreferenceActivity {
}
}
+ @Override
+ protected boolean isValidFragment(String fragmentName) {
+ return true;
+ }
+
+
/**
* Populate the activity with the top-level headers.
*/
@@ -82,8 +88,7 @@ public class BrowserPreferencesPage extends PreferenceActivity {
} else {
finish();
}
- return true;
- }
+ return true; }
return false;
}
@@ -98,4 +103,5 @@ public class BrowserPreferencesPage extends PreferenceActivity {
return intent;
}
+
}
project system/core/
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 8ba7c10..e5120f1 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -594,9 +594,8 @@ service installd /system/bin/installd
class main
socket installd stream 600 system system
-service flash_recovery /system/bin/install-recovery.sh
+service flash_recovery /system/etc/install-recovery.sh
class main
- seclabel u:r:install_recovery:s0
oneshot
service racoon /system/bin/racoon
Now to fix Youtube and Netflix, etc...
You will need to add the following changes from Ayysir's git hub Here: Add QCOM targert-specific cong & helper macros
Are we going to get a shamu clean rom? Glad to see you here @scrosler!
Sent from my Nexus 6
housry23 said:
Are we going to get a shamu clean rom? Glad to see you here @scrosler!
Sent from my Nexus 6
Click to expand...
Click to collapse
For sure!
I am just still playing with it. I had it barely over 24hrs... So far I am crazy impressed with it!
That's the best news I've heard so far! After running tons of different roms I always end up coming back to cleanrom, and I use it on all of my touchwiz devices.
xlemonhed1 said:
That's the best news I've heard so far! After running tons of different roms I always end up coming back to cleanrom, and I use it on all of my touchwiz devices.
Click to expand...
Click to collapse
Very cool. Dont know when I will get started but I hope this weekend.
I am going to make it identical to my Nexus 7 ROM.
They seem to like it :highfive:
scrosler said:
For sure!
I am just still playing with it. I had it barely over 24hrs... So far I am crazy impressed with it!
Click to expand...
Click to collapse
Nice! I ran Cleanrom on my nexus 7 and loved it. Thanks in advance. I'll be watching for it. It is an impressive device. Enjoy!
Sent from my Nexus 6
Well, congrats on the new device! I was window shopping them a week ago, and couldn't justify it yet. I'm sure you'll enjoy!
**edit**
Also, the patched source files in the Nexus 7 thread will work to a degree. I do have Shamu binaries added in, but some of the features I've added are device specific and have not been applied to Shamu. The last build I made for Shamu was on 11/23 and I decided not to continue with it.
Yes, I was window shopping too and could NOT resist!
They make it so tempting with these "Next" and "Edge" programs!
reported to moderator (with a request to make it sticky)
Wow amazing! I'm going to give this a try when I get home from work! Just two questions.. How to compile with another tool chain such as sabermod or linaro? And how to compile it with a different kernel?
Xileforce said:
Wow amazing! I'm going to give this a try when I get home from work! Just two questions.. How to compile with another tool chain such as sabermod or linaro? And how to compile it with a different kernel?
Click to expand...
Click to collapse
I am not an expert by any means but you will need to change the make files that point to the tool chain. It should not be that hard.
Same for the kernel.
IM sure another, more experienced AOSP developer will explain in greater detail (cough @GROGG88) :good:
scrosler said:
I am not an expert by any means but you will need to change the make files that point to the tool chain. It should not be that hard.
Same for the kernel.
IM sure another, more experienced AOSP developer will explain in greater detail (cough @GROGG88) :good:
Click to expand...
Click to collapse
Thanks man! I'm sure between this and Google I'll be able to figure it out!
For your code changes in the tutorial for building AOSP for the Nexus 6. Are there multiple files I need to change the code in or is it a single .mk file or different extension? I haven't been able to locate a file with similar code. If you could just let me know which files that is all I am asking, I can figure out the rest I think!
If anyone knows what files need to be edited feel free to reply!
Xileforce said:
And how to compile it with a different kernel?
Click to expand...
Click to collapse
It depends. To compile with another (prebuilt) kernel, you can just overwrite the prebuilt kernel in.. I think it's in ./device/moto/shamu-kernel. (If you rename the kernel image to match the existing file, that's all you have to do.)
On the other hand, if you want to compile a new kernel while building the rest of AOSP, there are several changes that you'll have to make (even for the stock kernel.) Here's a link to a page that might get you started: http://nosemaj.org/howto-build-android-kitkat-nexus-5 (The instructions are for kitkat on a nexus5, but they should be good enough to give you an idea of what you need to do.)
Take care
gary
EmptyGODFATHER said:
For your code changes in the tutorial for building AOSP for the Nexus 6. Are there multiple files I need to change the code in or is it a single .mk file or different extension? I haven't been able to locate a file with similar code. If you could just let me know which files that is all I am asking, I can figure out the rest I think!
If anyone knows what files need to be edited feel free to reply!
Click to expand...
Click to collapse
There are multiple files. Most of them pertain to the Nexus 7 and can be skipped. The Repo Diff command can be hard to read but I will tty to break it down a little bit so you can understand how to read that file....
I will use the "remove recovery" commit we found I think from @simpleaOSP.
Ex:
Project -> project build/ (So this means we ill make edits in the build folder)
diff --git a (Shows where the difference start)/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files (Name of file we will be modifying)
index 755e5c2..1951e95 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
(Prefaced lines to help you find your place in the file)
@@ -522,8 +522,8 @@ def WriteFullOTAPackage(input_zip, output_zip):
# set up system to update recovery partition on first boot
# complete script normally (allow recovery to mark itself finished and reboot)
Actual Changes...
- = Remove line
+ = Add line....
In this example: I put "#" to comment out building the recovery image.
Original
- recovery_img = common.GetBootableImage("recovery.img", "recovery.img",
- OPTIONS.input_tmp, "RECOVERY")
Modded
+# recovery_img = common.GetBootableImage("recovery.img", "recovery.img",
+# OPTIONS.input_tmp, "RECOVERY")
(More Prefaced lines to help you find your place in the file)
if OPTIONS.two_step:
if not OPTIONS.info_dict.get("multistage_support", None):
assert False, "two-step packages not supported by this build"
@@ -582,11 +582,11 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
Click to expand...
Click to collapse
Now thare are more changes in that file and more files in the Diff. IM not savvy enough with git to post it all to a git but using tha tfile and taking the time to look at and search for the file locations will get you the same results.
I also know this is not a "great" explanation of the repo diff changes so if anyone can explain it better than me I will NOT be offended.
For @Xileforce
scrosler said:
IM sure another, more experienced AOSP developer will explain in greater detail (cough @GROGG88) :good:
Click to expand...
Click to collapse
Damnit Jim! I'm a Doctor, not a Shamu owner... Heck, I'm not even a "Developer". I"m a "Contributor"
garyd9 said:
It depends. To compile with another (prebuilt) kernel, you can just overwrite the prebuilt kernel in.. I think it's in ./device/moto/shamu-kernel. (If you rename the kernel image to match the existing file, that's all you have to do.)
On the other hand, if you want to compile a new kernel while building the rest of AOSP, there are several changes that you'll have to make (even for the stock kernel.) Here's a link to a page that might get you started: http://nosemaj.org/howto-build-android-kitkat-nexus-5 (The instructions are for kitkat on a nexus5, but they should be good enough to give you an idea of what you need to do.)
Take care
gary
Click to expand...
Click to collapse
Yes, those instructions work well! I fought for a little bit to get the Nexus 7 kernel to compile with the 4.8 toolchain. As a result I had things setup to compile the kernel before the firmware and using the output as my prebuilt directory specified in the device-common.mk which should be 'device.mk' for shamu. I have scripts setup for the 3 devices I'm building for that take care of cleaning and building everything. I have since modified my scripts to run the 4.8 toolchain within the AOSP tree instead of an external 4.6 toolchain... It's basically outlined here:
GROGG88 said:
AOSP PATCHES:
DOWNLOAD
(these are built into the firmware above)
**Patch/Build instruction**
Make sure your source tree is located in ~/AOSP
Clone kernel sources and checkout for devices using:
Code:
cd ~/AOSP
git clone https://android.googlesource.com/kernel/msm.git hh-kernel/kernel
git clone https://android.googlesource.com/kernel/msm.git flo-kernel/kernel
cd hh-kernel/kernel
git checkout 88fbc66
cd ../../flo-kernel/kernel
git checkout 154bef4
Download and copy my patches to ~/AOSP
Commit flo kernel changes if desired
Code:
cd ~/AOSP/flo-kernel/kernel
git commit -a
Enter a description, ctrl+x and then enter to commit.
You can now use the included scripts to build 1/3 devices:
Code:
$cd ~/AOSP
./build-hammerhead.sh
or
./build-flo.sh
or
./build-deb.sh
That's it!! Grab your custom firmware and FLASH!
Click to expand...
Click to collapse
It's turning it into a two step process, but the result is the same. As far as compiling with a different toolchain is concerned, I have yet to try. I shy away from many of the "optimizations" and really just target physical features that I feel are missing from stock AOSP.
Hahahaha! Your the man Dude!
We need DLMontage over here too. I hope he gets a Nex6.
You need to get one!
Thanks guys! I'll be giving the things you guys said a shot.. I'm sure I'll figure it out. This is my first try every compiling a rom,, so it should be interesting lol.. Though I'm sure it will be significantly easier after the first time.
Xileforce said:
Thanks guys! I'll be giving the things you guys said a shot.. I'm sure I'll figure it out. This is my first try every compiling a rom,, so it should be interesting lol.. Though I'm sure it will be significantly easier after the first time.
Click to expand...
Click to collapse
It does get easier each time... Or more frustrating depending on what changes you make, lol
I would like to port omni for the z3 compact,
If you could point me in the right direction in regards to repositories to include in my local manifest I would be very grateful.
From omni
android_device_sony_msm8974-common
android_device_qcom_common
android_device_sony_common
android_device_sony_qcom-common, seems to be missing a lot of proprietary files.
From CM?
android_device_sony_z3c
android_device_sony_shinano-common
android_kernel_sony_msm8974
Which caf repositories would I need?
Omnirom's kernel for 8974 is only for 4.4, will it do or should I use CM?
Do I need android_hardware_sony_DASH ?
Thank you in advance
Using
android_device_sony_z3c
android_device_sony_shinano-common
android_kernel_sony_msm8974
android_device_sony_qcom-common
android_device_sony_msm8974-common
android_device_sony_common
android_device_qcom_sepolicy
The first issue I had was
Code:
make: *** No rule to make target `.../omni/out/target/common/obj/JAVA_LIBRARIES/qcmediaplayer_intermediates/classes.jar', needed by `.../omni/out/target/common/obj/PACKAGING/boot-jars-package-check_intermediates/stamp'. Stop.
I tried adding android_hardware_qcom_media-caf-bfam and android_hardware_qcom_display-caf-bfam to the local manifest.
I tried removing projects android_hardware_qcom_media and android_hardware_qcom_display and replacing them with the above two and the error still showed up.
It only stopped showing after I commented out
Code:
# Media
#PRODUCT_PACKAGES += \
# qcmediaplayer
#PRODUCT_BOOT_JARS += \
# qcmediaplayer
from msm8974.mk in /device/sony/msm8974-common
Now I am getting,
Code:
/home/ne/zZz/omni/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/ne/zZz/omni/out/target/product/z3c/obj/ETC/sepolicy_intermediates/policy.conf
libsepol.check_assertion_helper: neverallow on line 297 of external/sepolicy/domain.te (or line 5288 of policy.conf) violated by allow vold vfat:filesystem { relabelto };
Error while expanding policy
make: *** [/home/ne/zZz/omni/out/target/product/z3c/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
You might want to try getting it up and running with 4.4 instead
Right now, find7 is the only non-Nexus 8974 we have running with 5.0, we're a bit behind on bringing up other devices. We also have yet to do any work on any of the z2 or z3 family. (I have a Z3 I plan on bringing up when I have the time... but I have no idea when I'll have the time...)
Entropy512 said:
You might want to try getting it up and running with 4.4 instead
Right now, find7 is the only non-Nexus 8974 we have running with 5.0, we're a bit behind on bringing up other devices. We also have yet to do any work on any of the z2 or z3 family. (I have a Z3 I plan on bringing up when I have the time... but I have no idea when I'll have the time...)
Click to expand...
Click to collapse
I am currently trying to get it to build recovery, but having some compile errors.
Code:
cp: cannot stat ‘/home/ne/zZz/omni/out/target/product/z3c/ramdisk-recovery.cpio’: No such file or directory
Is there any reason as to why it would be better|easier to try 4.4?
since in both cases z3c is not supported.
If you can help me with suggestions in regards to the error I will be grateful
m0d said:
I am currently trying to get it to build recovery, but having some compile errors.
Code:
cp: cannot stat ‘/home/ne/zZz/omni/out/target/product/z3c/ramdisk-recovery.cpio’: No such file or directory
Is there any reason as to why it would be better|easier to try 4.4?
since in both cases z3c is not supported.
If you can help me with suggestions in regards to the error I will be grateful
Click to expand...
Click to collapse
With 4.4 we at least had some Sony 8974s up and running, but we have yet to do a bringup of any Sony with 5.0 yet.
Thank you for the suggestion.
I will try and check to see if it will be any easier.
The problem I am having is with the custombootimg.mk, since CM uses android_device_qcom_common which has the dtbToolCM. Omni includes the dtbTool in the 8974-common repo.
in the oppo mkbootimg.mk (the 8974 sony devices also have a similar code in regards to dtbTool)
I believe I have to add something of the sort:
Code:
## Imported from the original makefile...
KERNEL_CONFIG := $(KERNEL_OUT)/.config
MSM8974_DTS_NAMES := msm8974
MSM8974_DTS_FILES = $(wildcard $(TOP)/$(TARGET_KERNEL_SOURCE)/arch/arm/boot/dts/msm8974pro*.dts)
MSM8974_DTS_FILE = $(lastword $(subst /, ,$(1)))
DTB_FILE = $(addprefix $(KERNEL_OUT)/arch/arm/boot/,$(patsubst %.dts,%.dtb,$(call MSM8974_DTS_FILE,$(1))))
ZIMG_FILE = $(addprefix $(KERNEL_OUT)/arch/arm/boot/,$(patsubst %.dts,%-zImage,$(call MSM8974_DTS_FILE,$(1))))
KERNEL_ZIMG = $(KERNEL_OUT)/arch/arm/boot/zImage
DTC = $(KERNEL_OUT)/scripts/dtc/dtc
define append-msm8974-dtb
mkdir -p $(KERNEL_OUT)/arch/arm/boot;\
$(foreach MSM8974_DTS_NAME, $(MSM8974_DTS_NAMES), \
$(foreach d, $(MSM8974_DTS_FILES), \
$(DTC) -p 1024 -O dtb -o $(call DTB_FILE,$(d)) $(d); \
cat $(KERNEL_ZIMG) $(call DTB_FILE,$(d)) > $(call ZIMG_FILE,$(d));))
endef
## Build and run dtbtool
DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbTool.oppo.msm8974$(HOST_EXECUTABLE_SUFFIX)
INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img