History log of /external/qemu/android/kernel/kernel_utils_unittest.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c6e0caedac5585546cb68605418eedc9e726b44b 07-Mar-2014 David 'Digit' Turner <digit@google.com> Support kernels with version >= 3.10

Newer Android Linux kernels modify the way certain devices are
named, i.e.:

/dev/qemu_pipe is renamed as /dev/goldfish_pipe.
/dev/ttyS<num> is renamed as /dev/ttyGF<num>

This patch adds support code to the emulator to deal with this
as transparently as possible:

1) Add a new hardware property 'kernel.newDeviceNaming', a string
which can only take the values 'autodetect', 'no', and 'yes'.

2) Support code to probe the type of a kernel image.
IMPORTANT: The kernel implementation depends on the host
/usr/bin/file to properly recognize kernel files and extract
their version number. This really only works on Linux and
OS X, and only for x86 and x86_64 kernel images.

A future patch will implement more robust detection by
essentially doing its own probing through libmagic or equivalent.

Note that there doesn't seem to be any existing libmagic rules
to recognize ARM and MIPS kernel images at the moment :-(

See android/kernel/kernel_utils*

3) Modify the emulator startup code to perform auto-detection
when possible (broken on Windows, and non Intel archs, see
comment above).

4) Modify the kernel command line generation to handle the new
TTY device naming

5) Modify the Goldfish pipe virtual device implementation
(since the device name presented to the kernel also changed).

This should be enough to auto-detect Linux 3.10+ x86_64 kernel
images on Linux.

Change-Id: Ied517f8a1fdeb18d84fa9a12ebcdc3daa1f41d9a
/external/qemu/android/kernel/kernel_utils_unittest.cpp