S3C6410 porting Android kernel

Publisher:平和心态Latest update time:2017-02-26 Source: eefocusKeywords:S3C6410 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Main process:
. Install lunux environment
. Install compilation tools
. Download Linux kernel
. Install Android  SDK
. Get root file system
. Modify Linux kernel source code
. Configure Linux kernel
. Modify root file system
. Compile Linux kernel
. Download kernel Image

1. Install the Linux environment 
Install the Ubuntu Linux system, download the operating system installation CD image from the website, address:
http://mirror.lupaworld.com/ubuntu/releases/8.04/ 
Download ubuntu-8.04.2-desktop-i386.iso, burn it to a CD for installation, the installation can be done under the Windows system,
select a hard disk with 15G space for installation, enter the user password to start the installation
  
, this step is over, exit the CD and restart into the Ubuntu system to complete the rest of the system installation. After
the Linux installation is complete, enter the Ubuntu system, make sure the computer is connected to the Internet, and install some necessary software.
Open the terminal and enter the command box, and perform the following operations:
$ sudo apt-get install ssh
$ sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl
$ sudo apt-get install valgrind
$ sudo apt-get install sun-java6-jdk
$ sudo apt-get install libncurses5-dev
The system will automatically download and install all software from the Internet. After completion, you can start the Android porting.

2. Install the compilation tool
Download:
$ wget 
http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 
Installation:
$ tar -xjvf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

3. Download the Linux kernel 
from the following address:
http://code.google.com/p/android/downloads/list?can=1&q=&colspec=Filename+Summary+Uploaded+Size+DownloadCount 
Kernel: linux-2.6.23-android-m5-rc14.tar.gz
Unzip the file
$ tar -xf linux-2.6.23-android-m5-rc14.tar.gz

4. Install Android SDK 
Download the Linux version of Android SDK from the Internet, as follows:
http://dl.google.com/android/android-sdk_m5-rc15_linux-x86.zip 
Download and unzip to obtain the android-sdk_m5-rc15_linux-x86 file

5. Get the root file system 
⑴ Download the busybox tool from the following address:
http://benno.id.au/blog/2007/11/14/android-busybox  (download in Linux environment)
⑵ Run the emulator to get the root file system
$ cd / android-sdk_m5-rc15_linux-x86/tools
$ ./emulator&
Wait for the emulator to start, and see the Android system screen appear. Enter the menu ALL/Dev Tools/Development Settings, check the three items of Wait for debugger, Show running processes, and Show screen updates, and return to the command input terminal.
$ ./adb push /busybox /data
$ ./adb shell
# /data/busybox tar -czf system.tar.gz /system
# /data/busybox tar -czf data.tar.gz /data
# /data/busybox tar -czf etc.tar.gz /etc
# /data/busybox tar -czf sbin.tar.gz /sbin
# exit
$ ./adb pull /system.tar.gz ./
$ ./adb pull /data.tar.gz ./
$ ./adb pull /etc.tar.gz ./
$ ./adb pull /sbin.tar.gz ./
$ ./adb pull /init ./The
emulator files are obtained and packaged through the busybox tool. Now create the root file directory
$ mkdir initial_ram_disk
$ cd initial_ram_disk
$ mkdir cache
$ mkdir d
$ mkdir dev
$ mkdir proc
$ mkdir root
$ mkdir sdcard
$ mkdir sys
$ mkdir tmp
$ mkdir var
$ tar -xf /system.tar.gz ./
$ tar -xf /data.tar.gz ./
$ tar -xf /etc.tar.gz ./
$ tar -xf / sbin.tar.gz ./
$ cp /init ./
initial_ram_disk containing the Android root file system is done.

6. Modify
the kernel file downloaded from the Linux kernel source code does not support the smdk6400 development board. You must add the smdk6400 configuration file to the kernel and modify the Kconfig and Makefile files.
Modify as follows:
1> Select /arch/arm/mach-s3c2410/Makefile.boot and change it to the following content:
zreladdr-$(CONFIG_PLAT_S3C24XX) := 0x30008000
params_phys-$(CONFIG_PLAT_S3C24XX) := 0x30000100
zreladdr-$(CONFIG_PLAT_S3C64XX) := 0x50008000
params_phys-$(CONFIG_PLAT_S3C64XX) := 0x50000100

2> Copy the following files from the mature smdk6400 platform file to the kernel directory
/arch/arm/mach-s3c6400
/drivers/serial/s3c6400.c
/drivers/input/touchscreen/s3c-ts.c
/drivers/usb/gadget

3> Copy the /drivers/android/ashmem.c file to the corresponding directory from another android kernel (The Android source code for 2.6.23 does not contain this file)

4> Modify the corresponding Kconfig and Makefile files so that they can be compiled into the loaded smdk6400 file.

7. Configure Linux kernel 
After modifying the kernel, configure it and use the compiler tool in step 2.
$ cd
$ make CROSS_COMPILE=/bin/arm-none-linux-gnueabi- ARCH=arm
menuconfig
Now enter the kernel configuration screen. Note that the Initramfs source file option should be configured to specify the initial_ram_disk file.

8. Modify the root file system 
configuration Touchscreen so that it can work properly. Modify /etc/init.rc in the initial_ram_disk file and add the following content:
TSLIB_CONSOLEDEVICE none
TSLIB_FBDEVICE /dev/graphics/fb0
TSLIB_TSDEVICE /dev/input/ts0
TSLIB_CALIBFILE /etc/pointercal
TSLIB_CONFFILE /etc/ts.conf
TSLIB_PLUGINDIR /lib/ts

9. Compile Linux kernel
$ make CROSS_COMPILE=/bin/arm-none-linux-gnueabi- ARCH=arm 
The zImage
is compiled successfully. The generated zImage file is under arch/arm/boot.

10. Download the kernel image 
and enter the Windows system. The download process is completed in the Windows system.
① Open: Program Attachment Communication HyperTerminal, configure COM port, 115200, 8N1
  
② Connect the smdk6400 development board and the computer through the serial port cable, turn on the power of the development board, you can see the output information in the hyperterminal, the bootloader starts, press the space bar to enter the command input state
  
③ Connect the USB cable on the board to the computer and install the USB driver
④ Run the dnw.exe program, configure Configuration/Options, address 0x57e00000, confirm
  
⑤ Enter the corresponding command in the hyperterminal to start downloading
$ run bootup (download bootloader)
$ run kernelup (download kernel Image)
$ run rootup (download root file system)
⑥ Here we enter
$ run kernelup
    and wait for dnw to send the file. dnw displays [COM1,115200bps][USB:OK][ADDR:0x57e00000], indicating that the connection is successful. Select USB Port->Transmit, select the successfully compiled zImage file, and start downloading.
    After the download is complete, restart the development board and wait. Some Android characters will appear on the LCD. The screen will be white for a while, and then a red scroll bar will appear. The main interface will be entered and the Android transplantation will be successful.


Keywords:S3C6410 Reference address:S3C6410 porting Android kernel

Previous article:Location of NVIC register description in STM32 documentation
Next article:Detailed explanation of ARM interrupt registers

Recommended ReadingLatest update time:2024-11-16 19:59

Xiaomi's Android light has unique skills! Mi 12 Pro has not caught up with one key parameter
Today, blogger @数码闲聊站 revealed that the imaging specifications of Xiaomi 11 Ultra are still stronger than those of Xiaomi 12 Pro, and the camera hardware of Xiaomi 11 Ultra will still be strong even in 2022. It is reported that Xiaomi 11 Ultra has three rear cameras. The main camera is the GN2 50-megapixel jointly c
[Mobile phone portable]
Will Apple and Android charging ports be unified? Report: EU to reach agreement on single mobile charging port
     According to Reuters, people familiar with the matter revealed that EU countries and EU lawmakers will meet on June 7 to discuss the details of the universal charging interface for mobile phones, tablets and headphones, and may reach an agreement.   The European Commission first proposed a single mobile chargin
[Mobile phone portable]
Will Apple and Android charging ports be unified? Report: EU to reach agreement on single mobile charging port
UART device driver for s3c6410(3)
The previous article talked about the second part, but did not finish it. This article continues with the second part, as shown below: When the module is initialized, uart_register_driver and uart_add_port are called to register the UART driver and add the port. When the module is unloaded, uart_unregister_driver an
[Microcontroller]
The fifth-anniversary masterpiece, the second-generation Snapdragon 8 helps Realme GT5 create an Android flagship with excellent performance
On August 28, realme held a "leapfrog" fifth anniversary speech and a new product launch conference for the realme GT5, officially launching the new realme GT5. As Realme’s “fifth anniversary leapfrog masterpiece”, Realme GT5 is equipped with the second-generation Snapdragon 8 mobile platform to create an Android flag
[Mobile phone portable]
The fifth-anniversary masterpiece, the second-generation Snapdragon 8 helps Realme GT5 create an Android flagship with excellent performance
qt-embedded-linux-opensource-src-4.5.3 ported to s3c6410
First, you need a configured environment. The compilation environment used in this article is as follows: Host system: Ubuntu 9.10 Host compiler: gcc version 4.4.1 Cross compiler: arm-linux-gcc-4.0.1 Software resources: qt-embedded-linux-opensource-src-4.5.3.tar.gz qt-x11-opensource-src-4.5.1.tar.gz
[Microcontroller]
Android 13 will natively support activating multiple eSIM cards on a single chip
      Traditional mobile phones use physical cards called SIM cards to connect to cellular networks. The current progress of eSIM digital cards is not fast, partly because Android does not provide good support. According to Esper’s latest report, Google may focus on eSIM in Android 13 to promote the popularization of
[Mobile phone portable]
Android 13 will natively support activating multiple eSIM cards on a single chip
ARM11 learning based on S3C6410 (Part 9) Light up the LED
The core initialization of S3C6410 has been completed before, but this is just completed, but whether the program is correct or not needs to be verified. The simplest verification method is to light up the LED. If we write a program to light up the LED after the core initialization is completed, it means that there is
[Microcontroller]
ARM11 learning based on S3C6410 (Part 9) Light up the LED
Microsoft is developing Android 12L system update for Surface Duo 1 and 2
       While Microsoft is still going to launch Android 11 for Surface Duo 1 (and Android 12 for Surface Duo 2), Microsoft is said to be already developing Android 12L for both phones. Microsoft doesn’t actually plan to launch Android 12 for either phone, but will jump directly to Android 12L because it has a special
[Mobile phone portable]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号