解決方法一 ====================================================== Linux 內核啟動時出現(xiàn):bad machine ID,,原因大致是u-boot 傳遞給 內核的machine ID錯誤,,可以手動在內核源代碼中添加machine ID. 解決方法: 在u-boot 命令行中輸入bdinfo 查看板卡信息,我的輸出如下: FS2410# bdinfo arch_number = 0x000000C1 env_t = 0x00000000 boot_params = 0x30000100 DRAM bank = 0x00000000 -> start = 0x30000000 -> size = 0x04000000 ethaddr = 08:00:3E:26:0A:5B ip_addr = 10.1.8.245 baudrate = 115200 bps 修改內核的arch/arm/kernel/head.S,,直接將s3c2410的參數賦給內核 # cd linux-2.6.19 # vi arch/arm/kernel/head.S +72 ---------------------------------------------- 70 __INIT 71 .type stext, %function 72 ENTRY(stext)
mov r0, #0 mov r1, #0xc1 ldr r2, =0x30000100
73 msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
解決方法二 ====================================================== == 修改u-boot,,填寫ID; # vi common/cmd_boot.c ---------------------------------------------- 31 #if defined(CONFIG_I386) 32 DECLARE_GLOBAL_DATA_PTR; 33 #endif ====> 31 //#if defined(CONFIG_I386) 32 DECLARE_GLOBAL_DATA_PTR; 33 //#endif ... 60 #if !defined(CONFIG_NIOS)
if(argc==2) rc = ((ulong (*)(int, char *[]))addr) (0, gd->bd->bi_arch_number); else
61 rc = ((ulong (*)(int, char *[]))addr) (--argc, &argv[1]); 62 #else 63
|