Port Andorid4.0.4-steps and problem summary

Source: Internet
Author: User

+ Hua Qing foresight-MichaelTang

Slave --------------------------------------------------------------------------------------------------------------------------------

Development Board: FS100

CPU: S5PC100, 800 Mhz, A8

Memory: 256 Mb

NAND: 256 Mb

LCD 4.3

Android4.0.4 source code:

Linaro-android-12.06-release for origen

Because s5pc100 only provides the release version of Android2.1 and does not have the latest version, you can only port it yourself.

Slave --------------------------------------------------------------------------------------------------------------------------------

1. Download the source code through git

2. Set the compiling environment to origen-eng.

3. Modify BoardConfig. mk in the device.

# Do not compile the kernel and Uboot (Uboot and zImage will be compiled together by default)

# Remove the support for SMP (A8 is a single core)

# Remove the arm debugging service for hardware acceleration and Gator

4. Compile

Because android4.0.4 for origen is the Orion CPU of CPUExynos 4210, the CPU is A9 and supports SMP and Mali-400 GPU, we need to re-compile the kernel for S5PC100.

5. Compile the kernel

Use the default configuration of s5pc100 to compile the kernel. Add the necessary android driver.

Android DRIVER:
# Android Binder: The Driver Based on the openBinder framework. The underlying driver of inter-process communication, without which android cannot work.
# Andorid Logger: it is a lightweight log system, which is a misc device driver in the kernel. It works with logcat for debugging.
Code: driver/staging/android/logger. c
# Andorid Lowmemorykiller: low Memory manager, which is an Out Of Memory (Out Of Memory) release version Of the linux Standard. When the system Memory is insufficient, it will kill unimportant processes and release space.
Code: driver/staging/android/lowmemorykiller. c
# Android Ram Console ram_console: the kernel mechanism used to assist debugging. It virtualizes a console device with a piece of physical memory. In this way, the debugging information will be written to this ram in the printk, finally, output through the/proc file system.
# Android Timed Device timed_gpio: An enhanced gpio driver Based on the platform driver. It is bound with the kernel timer and implements a clock-controlled gpio.
Using sysfs to operate gpio allows gpio to output high and low levels. You can also specify a timer expiration time. When a time-out occurs, a callback function is executed. Currently, vibrator and LED devices are supported.
Code: driver/staging/android/timed_gpio, time_output, corresponding File System (sys/class/timed_output/<dev_name>/enable)
# Androd Switch: it is a new android driver used to check some Switch values, such as earphone insertion and USB device insertion, create a corresponding entry (sys/class/switch/<dev_name>/stat) in sysfs. You can use sysfs to interact with sysfs. You can also use the uevent mechanism to interact with sysfs.
The device file does not have the read and write permissions, and the corresponding uevent. rc STARTUP script file is not loaded (this script file is set for the android device)
Code: driver/switch /*
# Android Power Manager: lightweight Power management Driver Based on the standard linux Power Management System
Code: kernel/power /*
# Android Ashmem: anonymous shared memory, which provides a large shared memory among processes and a mechanism for the kernel to reclaim and manage the memory.
Code: mm/ashmem. c
# Android PMEM: used to provide continuous physical memory to user space. DSP and other devices that require continuous physical memory need to provide services.
Code: driver/misc/pmem. c
# Android alarm: provides a timer to wake up a device from its sleep state. It also provides a clock benchmark that runs even when the device is sleeping.
Code: driver/rtc/alarm. c
# USB Gadget: A Device Driver Based on the standard Linux USB gadget driver framework. The Android USB driver is based on the gadget framework.
Code: driver/usb/gadget/
# Yaffs2 File System: Android uses Yaffs2 as the MTD Nandflash file system.

Platform Device:

NIC: dm9000

Http://www.cnblogs.com/mr-raptor/archive/2012/07/08/2581716.html

LCD: Display

Compile the kernel and put it in the tftp directory for use.

6. Parts root file system

Mount with nfs

# Copy the content in out/target/product/origen/root to nfs_root (root file system directory)

# Copy out/target/product/origen/system to nfs_root

7. Test the file system:
# Can I mount nfs? If not, check Kernel configuration, network, nfs root, etc.
# Change the loglevel of init. rc to the lowest level 7 to view output information.
# Whether the init process can be started. If you see the common: Kernel panic no syncing kill init, it is likely that the Kernel configuration is incorrect. In this case, first mount the compiled kernel to a bare File System (only the busybox command and the fs of the basic library and command line) and use chroot to mount our android file system. If an error occurs, you can use strace to track and view the cause.
# Can I see the sh console? If not, add strace to the service to be tracked in init. rc, for example:
Serice sh/system/bin/strace-f-F-o log/system/bin/sh
Note: Generally, strace does not have this command in android. You must compile it by yourself. For details, see section xx.-f-F indicates, the strace command tracks the sub-processes created by the current program.-o log refers to outputting the trace information to the log file.

# Enter logcat in sh to view the printed log and check whether the android local service is started normally?

Note:
Errors of all local service segments exit abnormally. Use strace to track the causes of segment errors (one of the most difficult debugging errors)
Common causes:
> NEON is not enabled.
The command is invalid when init is executed.
> If the driver is not installed, the device file does not exist, the specified device cannot be opened, and services cannot be provided. For example, the drivers required for android, such as binder, are not installed (see the android driver listed earlier)
> Surfaceflinger restarts automatically.
Generally, the hardware acceleration code is provided by the vendor and is generally not open-source. Therefore, if you can get the hardware acceleration code of the specified version, you can enable hardware acceleration, if there is no corresponding version of the hardware acceleration code, you can only use ultra-slow soft acceleration.
By default, the Android system reads The egl. cfg configuration file from system/lib/egl. 0 android uses software acceleration and 0 1 xxx represents hardware acceleration. If there is no hardware acceleration code, comment out the line 0 1 xxx. Although I have a android2.1 hardware code library, it cannot be used on Android4.0.4.

> No Android text is displayed.
In ANDROID_SRC/system/core/init. rc, find the load_565rle_image function, remove the annotated code, compile init in mmm, and copy it to nfs_root.

> No Android Animation
Check whether the bootanim local service is disabled in init. rc.

> Android desktop invisible
Use logcat to view surfaceflinger and check whether it is started normally. Check whether ActivityManger has started Launcher.

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.