Closed
Bug 908659
Opened 11 years ago
Closed 7 years ago
B2G Emulator: update kernel to 3.4
Categories
(Firefox OS Graveyard :: Emulator, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: vicamo, Unassigned)
References
Details
Attachments
(3 files)
Some backgrounds: we're now using kernel version 2.6.29 for both ICS and JB emulator. For ICS, we use kernel images from prebuilts/qemu-kernel, master branch, which is forked from an outdated AOSP master branch[1] , and it happens to be tagged as "android-4.3_r2.1" as well. We pinned qemu-kernel because we had problem booting emulator with 3.4 kernel. Logs to be attached later. Besides, migrating to kernel 3.4 also follows rebasing bluetooth emulation works in bug 852583.
However, some features (bug 828869) do depend on a newer kernel, and most of existing Android JB devices are running with 3.4 kernel, too. Rumor has it that official Android kernel v3.10 is coming[2] by the way.
[1]: https://github.com/mozilla-b2g/platform_prebuilts_qemu-kernel/commit/ec4a882d411d0d4ceadc5912ab4ce6fd4df23ab7
[2]: http://www.androidheadlines.com/2013/08/google-working-on-linux-kernel-3-10-long-term-release-possibly-for-android-5-0.html
Reporter | ||
Comment 1•11 years ago
|
||
Reporter | ||
Comment 2•11 years ago
|
||
Edit |build-kernel.sh| and specify both AOSP and target B2G path. This script will build goldfish, goldfish_armv7, x86 variants of goldfish kernel.
$ git clone https://android.googlesource.com/kernel/goldfish.git
$ cd goldfish; git checkout -t origin/android-goldfish-3.4
$ <downloads>/build-kernel.sh
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #1)
> Created attachment 794657 [details]
> goldfish-ics-with-kernel-3.4_console-log.txt
init runs, but all other processes die instantly, even adbd does, so there is no way to get into the device. `emulator -shell` doesn't help, either.
Comment 4•11 years ago
|
||
Perhaps an issue with the dynamic linker?
Reporter | ||
Comment 5•11 years ago
|
||
Verbose log by alias NOTICE/INFO to KLOG_ERROR in system/core/init/log.h
Reporter | ||
Comment 6•11 years ago
|
||
Comment on attachment 794657 [details]
goldfish-ics-with-kernel-3.4_console-log.txt
>init: critical process 'servicemanager' exited 4 times in 4 minutes; rebooting into recovery mode
>SysRq : Emergency Remount R/O
>Emergency Remount complete
>Restarting system with command 'recovery'.
>Reboot failed -- System halted
By the way, one can simply remove the 'critical' attribute from 'servicemanager' segment of init.rc to keep device alive.
Reporter | ||
Comment 7•11 years ago
|
||
Comment on attachment 794657 [details]
goldfish-ics-with-kernel-3.4_console-log.txt
>init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
not big deal, won't help.
Comment 8•11 years ago
|
||
Since JB made to changes to the kernel interface, the highest kernel version I'm comfortable running the ICS emulator with is 3.0.4.
On JB, the qemu-kernel repo already ships with 3.4 - we just have to hack the build files to point to that if they're not already being used. We'll probably want to build our own kernel there at some point though to add things like seccomp.
Reporter | ||
Comment 9•11 years ago
|
||
(In reply to Michael Wu [:mwu] from comment #8)
> Since JB made to changes to the kernel interface, the highest kernel version
> I'm comfortable running the ICS emulator with is 3.0.4.
Do you have a goldfish fork of 3.0.x at hand? The closest one I can find is AOSP "linux-goldfish-3.0-wip" branch[1]. And since it has a postfix "-wip", I'm not sure if it's ready for deployment.
> On JB, the qemu-kernel repo already ships with 3.4 - we just have to hack
> the build files to point to that if they're not already being used.
Like comment 0, it's true we're not using Mozilla's qemu-kernel fork for JB Gonk, but that doesn't follow we're using kernel 3.4. Following messages are available by adding '-show-kernel' to |run-emulator.sh| within a JB B2G build.
Linux version 2.6.29-gea477bb (kroot@kennyroot.mtv.corp.google.com) (gcc version
4.6.x-google 20120106 (prerelease) (GCC) ) #1 Wed Sep 26 11:04:45 PDT 2012
CPU: ARMv7 Processor [410fc080] revision 0 (ARMv7), cr=10c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Goldfish
...
[1]: https://android.googlesource.com/kernel/goldfish.git/+/linux-goldfish-3.0-wip
Reporter | ||
Comment 10•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #9)
> (In reply to Michael Wu [:mwu] from comment #8)
> > On JB, the qemu-kernel repo already ships with 3.4 - we just have to hack
> > the build files to point to that if they're not already being used.
Sorry, I misunderstood you. Yes, JB Gonk works fine with 3.4 kernel.
Comment 11•11 years ago
|
||
How about we just update on the JB emulator then? If bug 828869 is the only problem with running an old kernel, I don't mind leaving the ICS emulator on the old kernel.
Comment 12•11 years ago
|
||
We're also running into issues with the network stack on the old emulator.
Bug 898074 is looking very much like an issue with the emulator.
Data is being written to a socket, and its not showing up until the other side closes the socket. This is causing intermittent failures in the test harness.
So if we could get a newer kernel which runs the ICS emulator, we could at least try it out and see if the problem goes away.
Comment 13•11 years ago
|
||
Do you have evidence that the linux kernel in particular is the source of the bug? I would not normally blame the Linux kernel first for a bug like that.
The JB emulator is getting setup in bug 885630. Curious to see if the failure rate there will be any lower..
Comment 14•11 years ago
|
||
So far, the only environment where we see the problem is when running under the emulator.
This isn't really "proof", but that's all I have right now.
I suppose that now that we sort of understand what's going on, that we could write a much smaller program and see if that reproduces the problem.
Reporter | ||
Updated•11 years ago
|
Component: General → Emulator
Comment 15•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•