移植Android内核到FS2410开发板上的方法与步骤
- UID
- 852722
|
移植Android内核到FS2410开发板上的方法与步骤
作者:王安
一、目前进展
1.Android已经可以通过NFS在FS2410开发板上运行
二、目前缺陷
1.触摸屏没有校准
2.Android中时钟停止,结束Zygote进程,系统重启,时钟更新,但再次停止不动
3.串口无法与GPRS模块通讯
三、移植步骤
一、移植Android内核到FS2410开发板上
1、下载Linux-2.6.25-Android-1.0_r1.Tar.Gz
2、将内核解压到用户目录,如/Home/Wangan/Kernel.Git
3、进入Kernel.Git文件夹,如Cd ~/Kernel.Git/
4、修改Arch/Arm/Plat-S3c24xx/Common-Smdk.C文件中的Nand Flash分区设置,如Gedit Arch/Arm/Plat-S3c24xx/Common-Smdk.C
修改Static Struct Mtd_partition Smdk_default_nand_part[]结构体为:
Static Struct Mtd_partition Smdk_default_nand_part[] = {
[0] = {
.Name = "Boot Agent",
.Size = SZ_256K,
.Offset = 0,
},
[1] = {
.Name = "Linux Kernel",
.Offset = SZ_256K,
.Size = SZ_2M - SZ_256K,
},
[2] = {
.Name = "File System",
.Offset = SZ_2M,
.Size = SZ_32M - SZ_2M,
},
[3] = {
.Name = "Other",
.Offset = SZ_32M,
.Size = SZ_32M,
}
};
5、在网站上下载IA32 GNU/Linux TAR。
6、将文件解压到用户目录,如/Home/Wangan/Arm-2008q3
7、进入Arm-2008q3/Bin文件夹,如Cd ~/Arm-2008q3/Bin/
8、添加当前路径进入环境变量,如Export PATH=$PWDPATH,或修改~/.Bashrc文件并重新登录
9、进入内核文件夹,如Cd ~/Kernel.Git/
10、修改Makefile文件,如Gedit Makefile
更改ARCH和CROSS_COMPILE
#ARCH ?= $(SUBARCH)
ARCH ?= Arm
#CROSS_COMPILE ?= Arm-Eabi-
CROSS_COMPILE ?= Arm-None-Eabi-
11、从华清远见Linux-2.6.8.1内核压缩包中提取.Config文件(注意:Config前面有个“.”)放入Kernel.Git文件夹
12、运行Make Menuconfig
(1) 确保System Type ---> ARM System Type ()中的内容为Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443
(2) 确保System Type ---> S3C2410 Machines ---> SMDK2410/A9M2410被勾选
(3) 取消选择与Goldfish相关的内容
Device Drivers ---> Character Devices ---> < > Goldfish TTY Driver
Device Drivers ---> Power Supply Class Support ---> < > Goldfish Battery Driver (NEW)
Device Drivers ---> Real Time Clock ---> < > GOLDFISH (NEW)
Device Drivers ---> Graphics Support ---> Support For Frame Buffer Devices ---> < > Goldfish Framebuffer
(4) 选择S3C2410 LCD相关的内容
Device Drivers ---> Graphics Support ---> Support For Frame Buffer Devices ---> <*> S3C2410 LCD Framebuffer Support
Device Drivers ---> Graphics Support ---> Bootup Logo ---> Standard Black And White Linux Logo
Device Drivers ---> Graphics Support ---> Bootup Logo ---> Standard 16-Color Linux Logo
Device Drivers ---> Graphics Support ---> Bootup Logo ---> Standard 224-Color Linux Logo
(5) 选中Android内核必须选项
Kernel Features ---> Use The ARM EABI To Compile The Kernel
General Setup ---> Use Full Shmem Filesystem
General Setup ---> Enable Android''S Shared Memory Subsystem
System Type ---> Support Thumb User Binaries
Device Drivers ---> Android ---> Android Log Driver
Device Drivers ---> Android ---> <*> Binder IPC Driver
(6) 尽量选中Android内核可选选项
Device Drivers ---> Android ---> RAM Buffer Console
Device Drivers ---> Android ---> Android Timed Gpio Driver
Device Drivers ---> Android ---> Only Allow Certain Groups To Create Sockets
(7) 其余CONFIG选项,如系统支持请一并选择
CONFIG_ANDROID_POWER =Y
CONFIG_ANDROID_POWER_STAT =Y
CONFIG_ANDROID_POWER_ALARM =Y
(可以在Kconfig文件中查找ANDROID_POWER等字段进行选择,或者直接修改.Config文件)
13、退出并保存.Config |
|
|
|
|
|