首先我将天嵌自带的《天嵌4.3寸屏的镜像》中的uboot下载到nandflash中,再将自己按照手册移植的2.6.30.4内核下载到nandflash。
uboot区间:0x0~0x40000
kernel区间:0x200000~0x300000
下载完成后启动界面如下:
##### EmbedSky BIOS for SKY2440/TQ2440 #####
Press Space key to Download Mode !
Booting Linux ...
Copy linux kernel from 0x00200000 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@mabo-desktop) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) ) #1 Tue Apr 1 08:35:49 CST 2014
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
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: 60852KB available (3396K code, 379K data, 128K init, 0K highmem)
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 936 bytes
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
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
。。。。。。。。。。。。。。。。。。。。(之后没贴)
问题出来了:我使用自己移植的uboot下载到nandflash中,再将移植的kernel下载到nandflash中,上电后uboot无法启动内核。
我的uboot界面:
U-Boot 2010.06 (Mar 31 2014 - 20:19:31)
DRAM: 64 MiB
Flash: 2 MiB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: dm9000
Hit any key to stop autoboot: 0
MABO2440 # printenv
bootargs=root=/dev/mtdblock2 rootfstype=yaffs init=/linuxrc mem=64M console=ttySAC0,115200
bootdelay=5
baudrate=115200
ethaddr=08:00:3e:26:0a:5b
ipaddr=10.8.51.41
serverip=10.8.51.40
netmask=255.255.255.0
ethact=dm9000
bootcmd=nand read 0x30000000 0x200000 0x300000;bootm
stdin=serial
stdout=serial
stderr=serial
Environment size: 313/131068 bytes
MABO2440 #
此时重启让其自动引导内核出现下面错误:
U-Boot 2010.06 (Mar 31 2014 - 20:19:31)
DRAM: 64 MiB
Flash: 2 MiB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: dm9000
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x200000, size 0x300000
NAND read from offset 200000 failed -74
3145728 bytes read: ERROR
Wrong Image Format for bootm command
ERROR: can't get kernel image!
MABO2440 #
首先我的uboot和内核的机器码都一样:
uboot中:/u-boot-2010.06/arch/arm/include/asm# vim mach-types.h
#define MACH_TYPE_S3C2440 168
内核中:linux-2.6.30.4/arch/arm/tools# vim mach-types
s3c2440 ARCH_S3C2440 S3C2440 168
我的uboot 中bootcmd,bootargs是不是设置错误了,这块设置没怎么明白!
uboot引导内核这块希望亲们给讲讲。。。 |