Changes in linux3.0 under android4.0

Source: Internet
Author: User

Linux Kernel for Android 4.0
--- Draft 2011-11-25
1. android 4.0 system be released
Ten o'clock A.M., google released the android4.0 system named Ice Cream Sandwich (ICS for short, Ice Cream Sandwich. Top 10 features:
...
4) Update the Linux kernel version 3.0 or later synchronously.
...
2. linux kernel 3.0
Source code download: ftp://ftp.kernel.org/pub/linux/kernel/v3.0/
2. 1. Release Date:
2. 2. Version changes: Linux2.6.39 ---- linux3.0
There is no milestone change. One statement is to commemorate Linux's 20-year journey to 3rd-10-year journey.
. Main new features are as follows:
Update log: http://kernelnewbies.org/Linux_3.0
1) Btrfs file system automatic fragment, Performance Improvement and inspection;
Btrfs (Butter FS) is designed to replace the current Linux ext3 file system and improve the ext3 restrictions, especially the size of a single file, the total file system size, and the file checksum. It has been applied in ubuntu10.10, openSUSE11.3, and Fedora 16.
2) support for sendmmsg () System Call (syscall );
For a batch processing sendmsg () system call, the UDP sending performance is improved by 20%, and the interface sending performance is improved by 30%.
3) supports XEN dom0;
Xen is a high-performance virtualization solution that can improve the performance of virtual machines.
4) added support for Cleancache;
The encapsulated kernel APIs are called in the file system code such as ext3, ext4, btrfs, and ocsfs2.
5), Berkeley instant package filter;
Use libpcap/tcpdump to improve the efficiency of packet filtering rules.
6) wireless WAN (WLAN) Wake-up support;
7) Implement ICMP_ECHO (ping Command) with non-special authorization );
8) Support for setns () System Call (syscall );
Better namespace management.
9) high-precision timer Alarm-timers support
You can wake up the suspended system through the RTC device. The concept for Alarm-timers was red by the Android Alarm driver, and the interface to userland uses the POSIX clock and timers interface.
3. Linux Kernel for Android
Android is based on linux, but its linux kernel is different from the standard linux kernel.
1) android does not use the linux X Window System;
2) android does not use glibc as the C library, and a set of Bionic Libc is developed to replace glibc;
3) added some android drivers
Android enhancements to the standard Linux kernel and driver:
3.1. Android Alarm
This feature is used to wake up a device from its sleep status and provides a benchmark for the device to continue to run during sleep.
Source code: drives/rtc/alarm. c
Device node name:/dev/alarm
This part of code is updated twice on the basis of linux2.6.32 in Linux 3.0:
1) Don't use save_time_delta.
2) Update hrtimer if alarm at the head of the queue is reprogrammed.
3.2. Ashmem (anonymous shared memory)
Provides large shared memory for processes. Compared with traditional memory allocation mechanisms such as malloc, the advantage is that the kernel driver provides an auxiliary kernel memory collection algorithm mechanism.
Source code location: kernel/mm/ashmem. c
Device node name:/dev/ashmem
Linux 3.0 is updated five times based on linux2.6.32:
1) Implement read in ashmem driver.
2) Fix ASHMEM_SET_PROT_MASK.
3) Update arguments of shrinker for 2.6.35.
4). Support lseek in ashmem driver.
5) Fix arguments to ashmem_shrink.
3.3. Low Memory Killer (Low Memory management)
Kill the process as needed to release the required memory.
Source code: drivers/staging/android/lowmemorykiller. c
Linux 3.0 is updated nine times based on linux2.6.32:
1) Don't try to kill the same pid over and over.
2) Substantially reduce overhead during reclaim.
3) Fix task_struct leak.
4) Remove bitrotted codepath.
5) Update arguments of shrinker for 2.6.35.
6) Don't unregister notifier from atomic context.
7) Don't wait more than one second for a process to die.
8) Ignore shmem pages in page-cache.
9), Fix arguments to lowmem_shrink.
3.4. Logger (Log Device)
To facilitate the use of log information during android Application Development.
Source code location: drivers/staging/android/logger. c
Device node name:/dev/log/main/dev/log/event/dev/log/radio
Linux 3.0 is not updated on the basis of linux2.6.32.
3.5. Android PMEM
Provide continuous physical memory areas to user space (DSP devices can only work on continuous physical memory ).
Source code location: drivers/misc/pmem. c
The source code augustatek has been changed and updated based on linux2.6.32:
1) add pmem node create/destroy entries.
2). change dsp mem map.
3) add 7700 support.
3.6. switch
It is used to detect some switch values (plug insertion, USB device insertion, etc ).
Source code location: drivers/switch/switch_class.c
Drivers/switch/switch_gpio.c
Linux 3.0 is not updated on the basis of linux2.6.32.
3.7. Timed GPIO
Bind the common GPIO driver to the kernel timer to implement the GPIO controlled by the clock.
Source code: drivers/staging/android/timed_gpio.c
Drivers/staging/android/timed_output.c
Linux 3.0 is updated once on the basis of linux2.6.32:
1), Properly discard invalid timeout values.
3.8. Android Ram Console
To provide the debugging function, write the debugging log information to the Ram Console device, which is a Ram-based buffer.
Source code: drivers/staging/android/ram_lele.c
Linux 3.0 is not updated on the basis of linux2.6.32.
3.9. Android Binder
It is the Linux implementation of OpenBinder and provides inter-process communication mechanism for android system running.
Binder driver source code location: drivers/staging/android/binder. c
Device node name:/dev/binder
Linux 3.0 is updated based on linux2.6.32:
1) Use seq_file for debug interface.
2) Move debugging information from products to debugfs.
3) Create dedicated workqueue for binder deffered work.
4) Fix memory upload uption via page aliasing.
3.10. Android Power Management (PM)
Power Management is a method to achieve low power consumption. It is a system project from the application to the kernel framework, to the device driver and hardware.
Source code location: kernel/power/
Linux 3.0 is updated based on linux2.6.32:
1) Fix operator precedence bug.
2) call _ get_wall_to_monotonic () instead of using wall_to_monotonic.
3) use get_xtime_and_monotonic_and_sleep_offset in get_expired_time.
4). Free memory bitmaps if opening/dev/snapshot fails.
5), Merge commit 'v3. 0-rc5 '.
The source code augustatek has been changed and updated based on linux2.6.32:
1) Add sleep in suspend ().
2) Add arm power down support.
3) remove the sleep to solve "wakeup too long ".
3.11. USB Gadget driver
Source code location: drivers/usb/gadget/android. c
Drivers/usb/gadget/f_adb.c
Drivers/usb/gadget/f_accessory.c (new file)
Drivers/usb/gadget/f_mtp.c (new file)
Drivers/usb/gadget/f_mass_storage.c
Linux 3.0 is updated based on linux2.6.32:
1) Add userspace configurations for USB state changes.
2) Remove unused function android_usb_set_connected ().
3) Add usb_composite_force_reset utility to force enumeration.
4). Fix section mismatch warning.
5). Disable MTP when RNDIS function is enabled.
6) Remove WAKEUP flag from bmAttributes.
7) Fixed Android gadget function discovery & product matching.
8), android Fix gadget descriptor compliance for IAD's.
9), Support switching vendor ID when configuration changes.
10), Fix problem switching vendor IDs.
11), New gadget driver for android USB accesories.
12) Misc improvements and cleanup:
-Add URI string.
-Replace type string with a description string.
-Add a control call to retrieve accessory protocol version (currently 1 ).
-Driver read () and write () CILS now fail after USB disconnect until driver file is closed and reopened.
-Misc cleanup work
13) Clear accessory strings when USB is disconnected.
14), Clear previous strings on ACCESSORY_GET_PROTOCOL.
15) Clear disconnected flag when driver file is opened.
16), Add string for accessory's unique serial number.
17), Set bNumEndpoints to correct value of 2.
18), Update android gadget driver.
* Functions and the device descriptor are configured from user space:
Echo 0>/sys/class/android_usb/android0/enable
Echo adb, acm>/sys/class/android_usb/android0/functions
Echo 2>/sys/class/android_usb/android0/f_acm/instances
Echo 1>/sys/class/android_usb/android0/enable
* Driver does not require platform data anymore.
* Moved function initialization to android. c instead of each function file.
* Replaced switches by uevents.
19) Add PTP variant of mtp usb function.
20), dequeue request on error in adb_read.
The source code augustatek has been changed and updated based on linux2.6.32:
1) fix usb pm and adb suspend issues.
2), prevent system suspend when enabling adb.
3) add android usb adb functions.
4), system crash if disconnect usb cable during file transfer.
5) usb cable plug in and out sometimes can cause kernel panic.
3.12. File System Section (UBIFS, Yaffs2)
UBIFS:
Source code: fs/ubifs/
Ubifs source code has been updated, and the ubifs source code for each Linux kernel version has changed. There are 6 merge actions from linux2.6.32 to linux3.0.
The UBI File-System source code git tree has two branches: master and linux-next
Master: contains the most recent stuff which is often incomplete, buggy, or not tested very well.
Linux-next: contains more or less stable patches goes to main-line.
The source code augustatek has been changed and updated based on linux2.6.32:
1) Use continuous memory and async mode to resolve "ubifs is bad for sync mode ".
Yaffs2:
Source code location: fs/yaffs2/
Linux 3.0 is updated based on linux2.6.32:
1) Don't force YAFFS_TRACE_ALWAYS for all trace levels.
The source code augustatek has been changed and updated based on linux2.6.32:
1) Update yaffs2 from official site to fix un-expected android system perm issue.
3.13. MTD driver
On the basis of linux2.6.32, Linux3.0 has merge actions for UBIFS, and there are also some update changes for nand of different vendors.
3.14. Display Driver (Framebuffer)
During the period from android2.2 to android4.0, the changes made to the framebuffer part by android include:
1) Add fb_edid_add_monspecs for parsing extended edid information.
2) Put the partial update magic value into the fix_screen struct.
3) Add support for RGBX 8888 image format.
4), Fix framebuffer console (Don't allow non panning updates to bypass the wait for the panel to turn on ).
5) Set the correct pack pattern for XRGB/ARGB.
6) Add ION Memory Manager.
3.15. Video drive (V4L2)
Linux 3.0 is updated based on linux2.6.32:
1) added support for some camera sensors;
2) Add a media-bus API for caching ing v4l2 subdev pixel and frame formats.
The newly added APIs include
+ Enum_mbus_fmt: enumerate pixel formats, provided by a video data source
+ G_mbus_fmt: get the current pixel format, provided by a video data source
+ Try_mbus_fmt: try to set a pixel format on a video data source
+ S_mbus_fmt: set a pixel format on a video data source
3.16. Audio driver (ALSA)
Linux3.0 use version alsa-driver-1.0.24, android4.0 alsa-lib is not used, replaced by tinyalsa.
Linux2.6.32 use version alsa-driver-1.0.21
3.17. Event Input Device Driver www.2cto.com
Linux 3.0 is updated based on linux2.6.32:
1) added support for some input devices;
2) Implement input filters;
+ Filter: separates normal event handlers from "filters ".
3) add support for disabling gpios through sysfs;
Now gpio-keys input driver exports 4 new attributes to userland through sysfs: /sys/devices/platform/gpio-keys/keys [ro]/sys/devices/platform/gpio-keys/switches [ro]/sys/devices/platform/gpio-keys /disabled_keys [rw]/sys/devices/platform/gpio-keys/disables_switches [rw]
3.18. Wifi
3.19. Bluetooth
Author: zhengmeifu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.