Comments (13)
I got an error message to complain that `stmfd sp!,{r0-r4}' is not supported by ARMv5 when I try to build Gecko for qemu. It is a line of inline assembly in linker.c. Why we need a copy of linker (from bionic?) here? Is it for implementing plugin? 'stmfd' and 'ldmia' in the linker.c:plt_reloc() should be replaced by other instructions supported by ARMv5.
Submodule boot/kernel-android-qemu is not in goldfish branch for Android emulator.
from b2g.
The reason we use a custom linker in Gecko is long and complicated; ask @michaelwu to tell you the story sometime ;).
To fix that particular bug, you need to make a custom .mozconfig for the emulator that disables use of THUMB (and also forces ARMv5, IIRC). It needs to include these options
ac_add_options --disable-thumb2
ac_add_options --with-thumb=no
This new mozconfig can live in config/gecko-emulatorv5-gonk.
Alternatively, if you run into a lot of ARM bugs inside the emulator, it might be a better use of time to import a newer ARMv7-compatible version of qemu.
from b2g.
I have booted B2G with Android emulator. But, it stop at "Setting up Fennec...", it hanged. Current configuration is with ARMv7 for Gecko, but Android image was built for ARMv5. It seems workable. I will figure out what make it hanged later.
from b2g.
Gonk is now ARMv6 + vfpv2 for Android emulator. But, gdb and gdbserver seem having no consensus on architecture of a debugged target. I am trying to find out a solution for remote debugging and will go back to hanging issue later.
from b2g.
Nice work!
from b2g.
I have a resolution for GDB issue, now. gdb-7.x provides a way to specify architecture features. You should set a target description file for GDB when you debug B2G for Android emulator. For example,
set tdesc filename /path/to/gdb-src/gdb/features/arm-with-iwmmxt.xml
arm-with-iwmmxt.xml is provided by gdb in the gdb/features/ sub-directory. It makes gdb to support XScale features. Without this, gdbserver would send more data than expected when gdb requests for register values.
To enable target description, you must build gdb-7.x with --with-expat option. I use gdb-7.3 from moz-gdb @ https://wiki.mozilla.org/Mobile/Fennec/Android/GDB. But, this version has a litte bug in configure/configure.ac that you can not cross-compile without dirty hacking. I have a fixed version @ git://github.com/ThinkerYzu/android-gdb.git. Following is my configuration command
../configure --target=arm-linux-androideabi --with-python=yes --prefix=/root/moz-gdb --with-gdb-datadir=/root/moz-gdb/utils --with-system-gdbinit=/root/moz-gdb/utils/gdbinit --with-expat
from b2g.
Get SIGILL with si_code == ILL_ILLOPC. It means running an illegal instruction. I will try to add these instructions for Android emulator.
from b2g.
I have switched Android emulator to tools_r13 branch. There is ARMv7 supporting code in the branch. But, it hangs at some place once boot it with any CPU model other than "arm926" (default one).
from b2g.
Kernel can not recoganize CPU type for cortex-a8. Try to add proc_info for it from existing ones.
from b2g.
It is successful to run B2G on Android emulator with ARMv7. Use goldfish_armv7_defconfig instead of goldfish_defconfig to config Linux. After building B2G with config-qemu, you can run Android emulator with following command for B2G.
$B2G_HOME/glue/gonk/out/host/linux-x86/bin/emulator \
-kernel $B2G_HOME/boot/kernel-android-qemu/arch/arm/boot/zImage \
-sysdir $B2G_HOME/glue/gonk/out/target/product/generic/ \
-data $B2G_HOME/glue/gonk/out/target/product/generic/userdata.img \
-memory 512 \
-verbose \
-qemu -cpu 'cortex-a8'
This command runs Android emulator with 'cortex-a8'.
You can pull changes, of B2G for Android emulator, from git://github.com/ThinkerYzu/B2G.git.
from b2g.
Fantastic, nice work! :)
Would you like to create a pull request for these changes? Andreas and I will be in the office this afternoon so we can discuss this in person.
from b2g.
@ThinkerYzu want to close this issue? This works great for me! :)
from b2g.
ok... Let's close it.
from b2g.
Related Issues (20)
- make gonk error with qemu-ics HOT 6
- Use Clockworkmod-recovery HOT 5
- VPN Client HOT 1
- Tor Client
- Volume Mount Problem Cause B2G Boot Failure HOT 1
- After May 8th build, Samsung S2 will not boot up (Terminated ALSA PLAYBACK device hifi) HOT 10
- Screen swiping stuck on SGS2-ICS HOT 2
- arm qemu won't boot HOT 2
- Blank screen when flashing to SGS2
- /usr/bin/ld.bfd.real: cannot find -lGL HOT 4
- /usr/bin/ld.bfd.real: cannot find -lX11 HOT 2
- Errors while making B2G emulator HOT 3
- source load-config.sh fails on mac HOT 2
- two questions, thanks HOT 1
- About APP/Task Manager HOT 2
- where is the source code for app.launch()? HOT 4
- What is B2G GUI Framework? Is QT or GTK? HOT 1
- How to contribute? HOT 8
- WebGL context from canvas with width = height = 0
- Broken Submodules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from b2g.