转自 http://blog.csdn.net/knock/article/details/7625623
增加一个新的项目chunge7inch,类似smdkv210,需要做如下步骤:
1. cp -rf device/samsung/smdkv210 device/samsung/chunge7inch
将device/samsung/chunge7inch目录下含有“smdkv210”字样的全部改成"chunge7inch"
2. cp -rf vendor/samsung/smdkv210 vendor/samsung/chunge7inch
将vendor/samsung/chunge7inch目录下含有“smdkv210”字样的全部改成"chunge7inch"
3. 在内核 arch/arm/mach-s5pv210/mach-smdkc110.c 中要修改
#ifdef CONFIG_MACH_SMDKC110
MACHINE_START(SMDKC110, "SMDKC110")
#elif CONFIG_MACH_SMDKV210
#ifdef CONFIG_BOARD_CHUNGE_7INCH
MACHINE_START(SMDKV210, "chunge7inch")
#elif defined(CONFIG_BOARD_IPUTER_8INCH)
MACHINE_START(SMDKV210, "SMDKV210")
#else
MACHINE_START(SMDKV210, "SMDKV210")
#endif
#endif
这样可以从命令看到效果:
# cat /proc/cpuinfo
Processor : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 998.15
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc08
CPU revision : 2
Hardware : chunge7inch
Revision : 0000
Serial : 0000000000000000
#
而Hardware部分非常重要,ramdisk中的init程序会去读/proc/cpuinfo中的Hardware部分,然后
解析 init.$(Hardware).rc文件。
如果这里不修改,会出现在show完文字“A N D R O I D”后,就不动了,log中显示错误信息:
I/SurfaceFlinger( 230): SurfaceFlinger is starting
I/SurfaceFlinger( 230): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
E/SurfaceFlinger( 230): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
E/FramebufferNativeWindow( 230): couldn't open framebuffer HAL (No such device)