分享

用loadx下载linux内核

 败败0619 2012-09-13
在u-boot-1.1.6中添加对xmodem的支持后可以用loadx命令将内核下载到内存,然后烧写到nand flash。
开机运行uboot,可以看见如下打印信息:
U-Boot 1.1.6 (Sep  5 2011 - 18:31:18)

DRAM:  64 MB
NAND:  256 MiB
*** Warning - bad CRC or NAND, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
Booting Linux without key press...
Copy linux kernel from 0x00280000 to 0x30008000, size = 0x00300000 ... Copy Kernel to SDRAM done,
NOW, Booting Linux......

进入uboot命令行模式,
# loadx 0x32000000     
/*然后点击SecureCRT Transfer / Send Xmodem / zImage.bin 把内核文件下载到内存0x32000000处*/

# nand erase 0x00280000 0x00300000 /*擦除nand flash偏移地址为0x00280000,长度为0x00300000的空间*/

# nand write.jffs2 0x32000000  0x00280000   0x00300000   /*把内存偏移地址为0x32000000的内容,
                                                         *写到nand flash偏移地址为0x00280000,长度为 0x00300000*/
# reset /*重启*/
可以看到内核已启动:
U-Boot 1.1.6 (Sep  5 2011 - 18:31:18)

DRAM:  64 MB
NAND:  256 MiB
*** Warning - bad CRC or NAND, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
Booting Linux without key press...
Copy linux kernel from 0x00280000 to 0x30008000, size = 0x00300000 ... Copy Kernel to SDRAM done,NOW, Booting Linux......
Uncompressing Linux........................................................................................................................................................ done, booting the kernel.
Linux version 2.6.30.4-EmbedSky (root@EmbedSky) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) ) #7 Mon May 31 10:56:58 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: TQ2440
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
NR_IRQS:85
irq: clearing pending ext status 00080000
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59896KB available (4340K code, 448K data, 188K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 97 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
yaffs May 31 2010 10:39:00 Installing.
msgmni has been set to 117
alg: No test for stdrng (krng)
io scheduler noop registered (default)
Console: switching to colour frame buffer device 40x15
fb0: s3c2410fb frame buffer device
backlight initialized
GPIO-Control initialized
PWM-Test initialized
adc initialized
s3c2440-uart.0: tq2440_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: tq2440_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: tq2440_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
loop: module loaded
Driver 'sd' needs updating - please use bus_type methods
dm9000 Ethernet Driver, V1.31
Now use the default MAC address: 10:23:45:67:89:ab
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000e at c4814000,c4818004 IRQ 51 MAC: 10:23:45:67:89:ab (EmbedSky)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=2, 20ns Twrph0=3 30ns, Twrph1=2 20ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Bad eraseblock 511 at 0x000003fe0000
Bad eraseblock 742 at 0x000005cc0000
Bad eraseblock 910 at 0x0000071c0000
Bad eraseblock 1035 at 0x000008160000
Bad eraseblock 1611 at 0x00000c960000

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多