天嵌 ARM开发社区

 找回密码
 注册
查看: 1858|回复: 2

自己移植好了u-boot,可是在移植内核时通过自己的u-boot无法启动内核。。

[复制链接]
下一个奇迹 发表于 2014-4-1 09:24:22 | 显示全部楼层 |阅读模式
首先我将天嵌自带的《天嵌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引导内核这块希望亲们给讲讲。。。
lbn321 发表于 2014-4-1 17:29:36 | 显示全部楼层
内核nandflash配置好了没?
要按照linux移植教程中的附录5来对内核进行配置。
回复

使用道具 举报

nosolo 发表于 2014-4-13 22:45:24 | 显示全部楼层
看信息, 是用uboot自带的bootm 命令启动kernel。 bootm是不直接支持 zImage镜像文件的。 uboot根本没识别到镜像的类型。 要用uboot里tools的mkimage 来制作uImage。 具体可以google “uboot制作uImage”.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2025-6-17 20:33 , Processed in 2.036605 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表