核心移植相關的部分修改
1. MTD修改
/arch/arm/plat-s3c24xx$ vi common-smdk.c
static struct mtd_partition smdk_default_nand_part[] = {
2.時鐘修改
/arch/arm$ vi mach-s3c2440/mach-smdk2440.c
static void __init smdk2440_map_io(void) 161 { 162 s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); 163 s3c24xx_init_clocks(16934400); 164 s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); 165 } 166
3.串列埠
drivers/serial/samsung.c
static int __init 1400 s3c24xx_serial_console_setup(struct console *co, char *options) 1401 { 1402 struct uart_port *port; 1403 int baud = 9600; 1404 int bits = 8; 1405 int parity = 'n';
1406 int flow = 'n';
4. 機器碼
核心:/arch/arm/tools$ vi mach-types
s3c2440 ARCH_S3C2440 S3C2440 362
uboot:/arch/arm/include/asm/mach-types.h
#define MACH_TYPE_S3C2440 362
5.引導啟動程式碼:
arch/arm/kernel/head.S
ENTRY(stext)
6 . init/main.c
start_kernel 是否能啟動核心:
不能 {
1.boot傳入的引數不準
2. arch/arm/kernel/setup.c 中設定不對
}