怎樣將Android移植到FS2410開發(fā)板上
二、移植LCD驅(qū)動(dòng)到Linux-2.6.25內(nèi)核
1、 進(jìn)入kernel.git文件夾,如cd ~/kernel.git/
2、 修改arch/arm/mach-s3c2410/mach-smdk2410.c文件,如gedit arch/arm/mach-s3c2410/mach-smdk2410.c
(1) 增加頭文件#include asm/arch/fb.h>
(2) 增加兩給結(jié)構(gòu)體
static struct s3c2410fb_display smdk2410_lcd_cfg __initdata = {
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
.type = S3C2410_LCDCON1_TFT,
.width = 320,
.height = 240,
.pixclock = 174757,
.xres = 320,
.yres = 240,
.bpp = 16,
.left_margin = 16,
.right_margin = 59,
.hsync_len = 9,
.upper_margin = 2,
.lower_margin = 6,
.vsync_len = 16,
};
static struct s3c2410fb_mach_info smdk2410_fb_info __initdata = {
.displays = smdk2410_lcd_cfg,
.num_displays = 1,
.default_display = 0,
.gpccon = 0xaa955699,
.gpccon_mask = 0xffc003cc,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpdcon = 0xaa95aaa1,
.gpdcon_mask = 0xffc0fff0,
.gpdup = 0x0000faff,
.gpdup_mask = 0xffffffff,
.lpcsel = 0xf82,
};
(3) 在smdk2410_init()函數(shù)中增加s3c24xx_fb_set_platdata(smdk2410_fb_info);
三、移植觸摸屏驅(qū)動(dòng)到Linux-2.6.25內(nèi)核(參見《基于linux-2.26.5內(nèi)核的FS2410開發(fā)板觸摸屏驅(qū)動(dòng)移植》)并制作zImage文件,如make
這里提一下,確保已經(jīng)勾選Device Drivers ---> Input device support ---> *> Event interface,本人曾經(jīng)在這里徘徊,感謝游老師悉心教誨!
四、制作支持ARMv4的Android根文件系統(tǒng)
1、從下載Android的ARMv4版本根文件
2、在/dev下增加null和console兩個(gè)設(shè)備節(jié)點(diǎn)
mknod -m 660 null c 1 3
mknod -m 660 console c 5 1
3、在U-boot中修改啟動(dòng)參數(shù)init為/init,完整的命令行如:root=nfs nfsroot=169.254.7.118:/source/rootfs ip=169.254.7.119 console=ttySAC0,115200 init=/init
4、修改/init.rc文件,去除除mount tmpfs tmpfs /sqlite_stmt_journals size=4m之外的所有mount命令
系統(tǒng)制作完成,現(xiàn)在應(yīng)該可以看到漂亮的大表了。首次啟動(dòng)需要?jiǎng)?chuàng)建文件,大約17分鐘。然后每次啟動(dòng)只需要2分鐘。
評(píng)論