嵌入式linux移植注意小点

时间:2021-12-07 07:41:24

目标:GQ2440 + uboot201106 + linux-2.6.22.6

1、uboot 的启动参数和机器码在 u-boot-2011.06/board/samsung/gq2440/gq2440.c(板级初始化) 中的 int board_init(void) 函数中修改

/* arch number of SMDK2410-Board */
gd->bd->bi_arch_number = 1999;

/* adress of boot parameters */
gd->bd->bi_boot_params = 0x30000100;

 

2、内核的机器码在 include/asm-arm/mach-types.h 中修改

#define MACH_TYPE_S3C2440              1999 

 启动参数在arch/arm/mach-s3c2440/mach-smdk2440.c 中修改

.boot_params = S3C2410_SDRAM_PA + 0x100

 

3、内核启动命令行修改

config_ok:280:CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0" 
include/config/auto.conf:373:CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0"
include/linux/autoconf.h:374:#define CONFIG_CMDLINE "root=/dev/hda1 ro init=/bin/bash console=ttySAC0"