andreasgal / B2G

Boot to Gecko aims to create a complete, standalone operating system for the open web.
https://wiki.mozilla.org/B2G
908 stars 158 forks source link

Get rid of dependency on JDK/JRE #127

Open joneschrisg opened 12 years ago

joneschrisg commented 12 years ago

First step in Operation Decaf. I would hope we can achieve this with steps something like

ThinkerYzu commented 12 years ago

Another solution is to override BUILD_XXX variables in build/core/config.mk. Content of these variables are pathes to makefiles in build/core/. We only need to create noop makefiles which creates noop module for Android, and assign their path to BUILD_XXX varaibles. Then, build system of android would do nothing for Java packages and libraries.

ThinkerYzu commented 12 years ago

It seems work to override BUILD_XXX variables fro me, but some modules would define rules by them-self. Most of modules having customized rules can be override by LOCAL_OVERRIDES_PACKAGES variable to stop them from being built. But, host tools that will not be installed to target system can not be override. I am finding another solution for host tools.

ThinkerYzu commented 12 years ago

https://github.com/ThinkerYzu/android-build/tree/decaf-noop-mk This is the branch for my efforts on decaf tasks. I have overrode BUILD_XXX variables in config.mk, and change attributes of some modules at run-time. It make |make gonk| faster by taking 1m35s. But, it does not boot correctly. Mediaserver does not run. Does mediaserver need dalvik to help him?

ThinkerYzu commented 12 years ago

After clobbering my working directory, the problem have been fixed. But, audio seems broken. Dialer does not play tones. After check logcat, I believe it is about audio_policy. I remember dialer does not play tones, too, at beginning. It is also about audio_policy. I think @philikon or @qdot may know what is happened.

ThinkerYzu commented 12 years ago

I have shifted to another more flexible and less impacted way (I think so). Instead of rewrote BUILD_XXX, I let building system works as normal. After building system having found all Android.mk and loaded them, the code that I have added would look into ALL_MODULES and relative variables. Building system decides what targets should be built according these variables. The code would remove all targets with Java to prevent them from being built. It seems works fine for me. The only one exception is droiddoc targets, they don't generate modules. They are handled by rewriting BUILD_XXX.

ThinkerYzu commented 12 years ago

It is very similar to #123 the audio policy issue that I have mentioned.

joneschrisg commented 12 years ago

@michaelwu found that a maguro fix for mediaserver broken the sgs2. So your patches didn't cause that.