mini6410基于linux2.6.36内核通过NFS启动根文件系统总结(五 内核测试 一 unrecognized/unsupported machine ID (r1=0x000009d8)

本系列文章有本人yinjiabin制作,转载请注明出处:

http://blog.csdn.net/yinjiabin/article/details/7489801

step1:启动uboot

从flash启动tiny6410,按任意键进入uboot

启动界面如下所示:

CPU:     S3C6410@532MHz                                                                                                                                                                                            
         Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz, Serial = CLKUART (SYNC Mode)                                                                                                                                  
Board:   MINI6410                                                                                                                                                                                                  
DRAM:    256 MB                                                                                                                                                                                                    
Flash:   0 kB                                                                                                                                                                                                      
NAND:    2048 MB                                                                                                                                                                                                   
In:      serial                                                                                                                                                                                                    
Out:     serial                                                                                                                                                                                                    
Err:     serial                                                                                                                                                                                                    
MAC: 08:90:90:90:90:90                                                                                                                                                                                             
Hit any key to stop autoboot:  0                                                                                                                                                                                   
##### FriendlyARM U-Boot(2011-03, NAND) for 6410 #####                                                                                                                                                             
[f] Format the nand flash                                                                                                                                                                                          
[v] Download u-boot.bin                                                                                                                                                                                            
[k] Download Linux/Android kernel                                                                                                                                                                                  
[y] Download root yaffs2 image                                                                                                                                                                                     
[a] Download Absolute User Application                                                                                                                                                                             
[n] Download Nboot.nb0 for WinCE                                                                                                                                                                                   
[w] Download WinCE NK.nb0                                                                                                                                                                                          
[s] Set the boot parameter of Linux                                                                                                                                                                                
[b] Boot Linux                                                                                                                                                                                                     
[q] Quit to shell                                                                                                                                                                                                  
NAND(MLC2): 2048 MiB, RAM: 256 MiB                                                                                                                                                                                 
LCD type, firmware version: 1 1046                                                                                                                                                                                 
Enter your Selection:

step2: 进入uboot命令窗口

按q键进入uboot命令窗口
如下所示:

Enter your Selection:q                                                                                                                                                                                             
Caution: any nand write command may damage your data. DON'T use them                                                                                                                                               
MINI6410 #

step3:用tftp下载编译好的内核

tftp 通过网络下载文件
注意:使用tftp,需要先配置好网络
setenv serverip 192.168.1.100 (tftp服务器的地址)

tftp  c0008000 uImage    //把server(IP=环境变量中设置的serverip)中tftp服务目录 (我的是tftpboot)下的uImage通过TFTP读入到0xc0008000(内存地址)处

step4: 加载内核

bootm c0008000       //执行内存c0008000中的二进制代码


setp5:内核运行结果

MINI6410 # bootm c0008000                                                       
## Booting image at c0008000 ...                                                
   Image Name:   Linux-2.6.36.2                                                 
   Image Type:   ARM Linux Kernel Image (uncompressed)                          
   Data Size:    3584176 Bytes =  3.4 MB                                        
   Load Address: 50008000                                                       
   Entry Point:  50008000                                                       
   Verifying Checksum ... OK                                                    
OK                                                                              
                                                                                
Starting kernel ...                                                             
                                                                                
Uncompressing Linux... done, booting the kernel.                                
                                                                                
Error: unrecognized/unsupported machine ID (r1 = 0x000009d8).                   
                                                                                
Available machine support:                                                      
                                                                                
ID (hex)        NAME                                                            
000004f6        SMDK6400                                                        
0000065a        SMDK6410                      
                                  
                                                                                
Please check your kernel config and/or bootloader.

step  6: 解决Error: unrecognized/unsupported machine ID (r1 = 0x000009d8)的方法

进入linux2.6.36内核

vim arch/arm/mach-s3c64xx/mach-smdk6410.c
原始内容:
MACHINE_START(SMDK6410, "SMDK6410")(大概是1001行)
修改后的内容:
MACHINE_START(MINI6410, "MINI6410")


step7:  修改后的内核情况

mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA                
s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133000000 Hz)                     
s3c-sdhci s3c-sdhci.1: clock source 1: hsmmc (133000000 Hz)                     
s3c-sdhci s3c-sdhci.1: clock source 2: mmc_bus (24000000 Hz)                    
enter s3c64xx_setup_sdhci1_cfg_gpio                                             
s3c6400_setup_sdhci_cfg_card: CTRL 2=c0004120, 3=80808080                       
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA                
usbcore: registered new interface driver usbhid                                 
usbhid: USB HID core driver                                                     
asoc: AC97 HiFi <-> s3c-ac97 mapping ok                                         
s3c6400_setup_sdhci_cfg_card: CTRL 2=c0004100, 3=00008080                       
mmc0: new high speed SDHC card at address 1234                                  
mmcblk0: mmc0:1234 SA04G 3.65 GiB                                               
 mmcblk0: p1                                                                    
s3c6400_setup_sdhci_cfg_card: CTRL 2=c0004120, 3=80808080                       
ALSA device list:                                                               
  #0: SMDK (WM9713)                                                             
TCP cubic registered                                                            
lib80211: common routines for IEEE802.11 drivers                                
Registering the dns_resolver key type                                           
s3c-rtc s3c64xx-rtc: setting system clock to 2000-10-30 06:50:40 UTC (972888640)
VFS: Cannot open root device "ubi0:FriendlyARM-root" or unknown-block(0,0)      
Please append a correct "root=" boot option; here are the available partitions:
1f00             512 mtdblock0 (driver?)                                        
1f01            5120 mtdblock1 (driver?)                                        
1f02         2091520 mtdblock2 (driver?)                                        
b300         3829760 mmcblk0 driver: mmcblk                                     
  b301         3825664 mmcblk0p1                                                
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)  
[<c00368cc>] (unwind_backtrace+0x0/0xf4) from [<c049a85c>] (dump_stack+0x18/0x1)
[<c049a85c>] (dump_stack+0x18/0x1c) from [<c049a8c4>] (panic+0x64/0x188)        
[<c049a8c4>] (panic+0x64/0x188) from [<c0009024>] (mount_block_root+0x174/0x244)
[<c0009024>] (mount_block_root+0x174/0x244) from [<c0009284>] (prepare_namespac)
[<c0009284>] (prepare_namespace+0x94/0x198) from [<c0008c5c>] (kernel_init+0x11)
[<c0008c5c>] (kernel_init+0x114/0x154) from [<c0031a3c>] (kernel_thread_exit+0x)

你可能感兴趣的:(c,linux,image,测试,download,WinCE)