- 論壇徽章:
- 0
|
板子是優(yōu)龍的fs2410,linux移植的是2.6.32.45。
看了內(nèi)核的reboot命令,最后調(diào)用的函數(shù)是arch_reset,位于arch\arm\mach-s3c2410\include\mach\system-reset.h中,代碼如下
arch_reset(char mode, const char *cmd)
{
if (mode == 's') {
cpu_reset(0);
}
if (s3c24xx_reset_hook)
s3c24xx_reset_hook();
arch_wdt_reset();
/* we'll take a jump through zero as a poor second */
cpu_reset(0);
}
內(nèi)核用的是開門狗復(fù)位,沒有問題。我將紅色部分代碼注釋掉(即看門狗復(fù)位代碼),直接通過cpu_reset(0)復(fù)位,也可以,但是會死機,死在解壓內(nèi)核處,死機打印如下:
/ #
/ #
/ # reboot
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
kernel_restart(307)cmd=0
Restarting system.
s3c24xx_pm_restart(197)mode=68
U-Boot 1.1.6 (Sep 21 2011 - 22:26:00)
DRAM: 64 MB
NAND 64MiB 3,3V 8-bit
Manufacturer: Samsung
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
TFTP from server 192.168.0.1; our IP address is 192.168.0.23
Filename 'uImage'.
Load address: 0x32000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#####################
done
Bytes transferred = 1433780 (15e0b4 hex)
TFTP from server 192.168.0.1; our IP address is 192.168.0.23
Filename 'initrd.image'.
Load address: 0x33000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#########################################################
done
Bytes transferred = 4614202 (46683a hex)
## Booting image at 32000000 ...
Image Name: Linux-2.6.32.45-svn27
Created: 2011-10-10 15:26:00 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1433716 Bytes = 1.4 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 33000000 ...
Image Name: RAM Disk Aviator
Created: 2011-10-10 15:16:19 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 4614138 Bytes = 4.4 MB
Load Address: 30e00000
Entry Point: 30e00000
Verifying Checksum ... OK
## Transferring control to Linux (at address 30008000) ...
setup_commandline_tag(343) commandline=/dev/ram rw console=ttySAC0,115200
Starting kernel ...
Uncompressing Linux...........................................................................
這是為什么呢?望哪位大俠能夠解釋一下,謝謝 |
|