U-Boot 1.3.2(Nov 19 2016 - 22:02:08) DRAM: 64 MB Flash: 512 kB NAND: 64 MiB In: serial Out: serial Err: serial Hit any key to stop autoboot: 0 [yqliu2410 #] tftp Found DM9000 ID:90000a46 at address 10000000 ! DM9000 work in 16 bus width bd->bi_entaddr: 08:00:3e:26:0a:5b [eth_init]MAC:8:0:3e:26:a:5b: TFTP from server 192.168.1.152; ourIP address is 192.168.1.155 Filename 'uImage'. Load address: 0x30008000 Loading: T T#######################################################done Bytes transferred = 1617316 (18ada4 hex) [up-tech2410 #] bootm ## Booting image at 30008000 ... Image Name: Linux-2.6.24.4 Created: 2016-11-19 14:05:29 UTC Image Type: ARM Linux Kernel Image(uncompressed) Data Size: 1617252 Bytes= 1.5 MB Load Address: 30008000 Entry Point: 30008040 Verifying Checksum ... OK Starting kernel ...
2、linux低级调试信息输出
Uncompressing Linux............................................................. done, booting the kernel.
3、linux调试信息输出
Linux version 2.6.24.4(root@vm-dev)(gcc version 3.4.6) #100 Sat Nov 19 07:47:35 CST 2016 CPU: ARM920T [41129200] revision 0(ARMv4T), cr=00007177 Machine: SMDK2410 Memory policy: ECC disabled, Data cache writeback CPU S3C2410A (id 0x32410002) S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 MHz S3C24XX Clocks,(c) 2004 Simtec Electronics CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on CPU0: D VIVT write-back cache CPU0: I cache: 16384 bytes, associativity 64, 32byte lines, 8sets CPU0: D cache: 16384 bytes, associativity 64, 32byte lines, 8sets Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: root=/dev/mtdblock2 noinitrd console=ttySAC1,115200 irq: clearing subpending status 00000010 PID hash table entries: 256 (order: 8, 1024 bytes) timer tcon=00500000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c Console: colour dummy device 80x30 console [ttySAC1] enabled
............................
现在要将所有的调试信息输出到别的串口。以com1为例(从com0开始计算)!
一、将bootloader的输出信息输出到com1
这里以u-boot1.3.2为例:很简单只需要修改一个宏定义就ok
Vi inlcude/configs/xxxconfig.h(xxx为你定义的开发板的名字)
更改原有的宏
/* * select serial console configuration */ //#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on SMDK2410*/ //modify for xxx2410 //by lyj_uptech #define CONFIG_SERIAL2 1 /* we use SERIAL 2 on SMDK2410*/
/* we can deal with the case the UARTs are being run * in FIFO mode, so that we don't hold up our execution * waiting for tx to happen... */ staticvoidputc(int ch) { if(uart_rd(S3C2410_UFCON)& S3C2410_UFCON_FIFOMODE){ int level; while (1){ level = uart_rd(S3C2410_UFSTAT); level &= fifo_mask;
if (level < fifo_max) break; } }else{ /* not using fifos */ while ((uart_rd(S3C2410_UTRSTAT)& S3C2410_UTRSTAT_TXE)!= S3C2410_UTRSTAT_TXE) barrier(); } /* write byte to transmission register */ uart_wr(S3C2410_UTXH, ch); }