uboot命令
uboot是怎么启动kernel的呢?
先熟悉一下uboot的命令吧.
首先是md, 查看内存.
OpenJTAG> md 0
00000000: ea000014 e59ff014 e59ff014 e59ff014 ................
00000010: e59ff014 e59ff014 e59ff014 e59ff014 ................
00000020: 33f80140 33f801a0 33f80200 33f80260 @..3...3...3`..3
00000030: 33f802c0 33f80320 33f80360 deadbeef ...3 ..3`..3....
00000040: 33f80000 33f80000 33fa94a4 33faf4c8 ...3...3...3...3
00000050: 0badc0de 0badc0de e10f0000 e3c0001f ................
00000060: e38000d3 e129f000 e3a00453 e3a01000 ......).S.......
00000070: e5801000 e3e01000 e59f0320 e5801000 ........ .......
00000080: e59f131c e59f031c e5801000 e59f0318 ................
00000090: e3a01003 e5801000 eb000019 e24f00a4 ..............O.
000000a0: e51f1068 e1500001 0a000007 e51f2070 h.....P.....p ..
000000b0: e51f3070 e0432002 e0802002 e8b007f8 p0... C.. ......
000000c0: e8a107f8 e1500002 dafffffb e51f0094 ......P.........
000000d0: e2400701 e2400080 e2400a02 e240d00c ..@...@...@...@.
000000e0: e51f00a0 e51f10a0 e3a02000 e5802000 ......... ... ..
000000f0: e2800004 e1500001 dafffffb e51ff004 ......P.........
接着是查看norflash命令: flinfo, 因为用的cfi驱动, 所以看起来是这样的:
OpenJTAG> flinfo
Bank # 1: CFI conformant FLASH (16 x 16) Size: 2 MB in 35 Sectors
Erase timeout 16384 ms, write timeout 1 ms, buffer write timeout 1 ms, buffer size 1
Sector Start Addresses:
00000000 (RO) 00004000 (RO) 00006000 (RO) 00008000 (RO) 00010000 (RO)
00020000 (RO) 00030000 00040000 00050000 00060000
00070000 00080000 00090000 000A0000 000B0000
000C0000 000D0000 000E0000 000F0000 00100000
00110000 00120000 00130000 00140000 00150000
00160000 00170000 00180000 00190000 001A0000
001B0000 001C0000 001D0000 001E0000 001F0000
print命令显示环境变量或者叫环境设置
OpenJTAG> print
bootargs=noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
bootcmd=nand read.jffs2 0x30007FC0 kernel; bootm 0x30007FC0
bootdelay=2
baudrate=115200
ethaddr=08:00:3e:26:0a:5b
netmask=255.255.255.0
mtdids=nand0=nandflash0
mtdparts=mtdparts=nandflash0:256k@0(bootloader),128k(params),2m(kernel),-(root)
partition=nand0,0
mtddevnum=0
mtddevname=bootloader
ipaddr=192.168.123.3
serverip=192.168.123.124
stdin=serial
stdout=serial
stderr=serial
Environment size: 447/131068 bytes
nandflash操作用nand命令:
OpenJTAG> nand info
Device 0: NAND 256MiB 3,3V 8-bit, sector size 128 KiB
启动的命令
bootargs=noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
bootcmd=nand read.jffs2 0x30007FC0 kernel; bootm 0x30007FC0
----------------
先md 30007FC0内存里面都是啥:
OpenJTAG> md 30007FC0
30007fc0: 00000000 00000000 00000000 00000000 ................
30007fd0: 00000000 00000000 00000000 00000000 ................
30007fe0: 00000000 00000000 00000000 00000000 ................
30007ff0: 30490011 30490411 30002031 30002431 ..I0..I01 .01$.0
30008000: 3a726572 00000000 72657355 6567412d rer:....User-Age
30008010: 003a746e 68747541 7a69726f 6f697461 nt:.Authorizatio
30008020: 00003a6e 69736142 00000063 2d696763 n:..Basic...cgi-
30008030: 2f6e6962 00000000 65646e69 74682e78 bin/....index.ht
30008040: 00006c6d 6967632f 6e69622d 646e692f ml../cgi-bin/ind
30008050: 632e7865 00006967 20626557 76726553 ex.cgi..Web Serv
30008060: 41207265 65687475 6369746e 6f697461 er Authenticatio
30008070: 0000006e 00003038 693a7676 00000066 n...80..vv:if...
30008080: 3a643a63 3a653a68 3a6d3a72 66693a70 c:d:h:e:r:m:p:if
30008090: 00000076 64252326 0000003b 00243124 v...&#%d;...$1$.
300080a0: 000b2b74 00000000 000b2b08 000b2b78 t+.......+..x+..
300080b0: 000b2b9c 000b2bac 000b2bd4 000b2be4 .+...+...+...+..
然后读nand_flash到内存
nand read.jffs2 0x30007FC0 kernel
再看看
OpenJTAG> md 30007FC0
30007fc0: 56190527 15ea7647 beee8d51 5c351c00 '..VGv..Q.....5\
30007fd0: 00800030 00800030 fb1c00e3 00020205 0...0...........
30007fe0: 756e694c 2e322d78 32322e36 0000362e Linux-2.6.22.6..
30007ff0: 00000000 00000000 00000000 00000000 ................
30008000: e1a00000 e1a00000 e1a00000 e1a00000 ................
30008010: e1a00000 e1a00000 e1a00000 e1a00000 ................
30008020: ea000002 016f2818 00000000 001c355c .....(o.....\5..
30008030: e1a07001 e1a08002 e10f2000 e3120003 .p....... ......
30008040: 1a000001 e3a00017 ef123456 e10f2000 ........V4... ..
30008050: e38220c0 e121f002 00000000 00000000 . ....!.........
30008060: e28f00d0 e890307e e0500001 0a00000a ....~0....P.....
30008070: e0855000 e0866000 e08cc000 e0822000 .P...`....... ..
30008080: e0833000 e08dd000 e5961000 e0811000 .0..............
30008090: e4861004 e156000c 3afffffa e3a00000 ......V....:....
300080a0: e4820004 e4820004 e4820004 e4820004 ................
300080b0: e1520003 3afffff9 eb000028 e1a0100d ..R....:(.......
被载入了nand里面的linux内核镜像
bootm 0x30007FC0
bootm 地址, 表示从地址启动内核, 也可以用go 地址, 但是貌似用了go, 直接就重启了.
U-Boot 1.1.6 (Jan 5 2017 - 18:28:43)
DRAM: 64 MB
Flash: 2 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x60000, size 0x200000
Reading data from 0x25f800 -- 100% complete.
2097152 bytes read: OK
## Booting image at 30007fc0 ...
Image Name: Linux-2.6.22.6
Created: 2013-05-11 7:09:50 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1848668 Bytes = 1.8 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux...................................................................................................................... done, booting the kernel.
Linux version 2.6.22.6 (book@book-desktop) (gcc version 3.4.5) #1 Sat May 11 15:09:41 CST 2013
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 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, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists. Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt a4ca, tcfg 00000200,00000000, usec 00001e57
Console: colour dummy device 80x30
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: 60976KB available (3264K code, 458K data, 140K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C2440: Clock Support, DVS off
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
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
NetWinder Floating Point Emulator V0.97 (double precision)
Registering GDB sysrq handler
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
yaffs May 11 2013 15:08:01 Installing.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 60x34
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO map 0x50000000 mem 0xf0400000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO map 0x50004000 mem 0xf0404000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO map 0x50008000 mem 0xf0408000 (irq = 76) is a S3C2440
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
line 400 <DM9KS> I/O: c486a000, VID: 90000a46
line 408 <DM9KS> I/O: c486a000, VID: 90000a46
<DM9KS> error version, chip_revision = 0x1a, chip_info = 0x3
id_val=0
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 63 at 0x007e0000
Bad eraseblock 65 at 0x00820000
Bad eraseblock 136 at 0x01100000
Bad eraseblock 964 at 0x07880000
Bad eraseblock 1262 at 0x09dc0000
Bad eraseblock 1270 at 0x09ec0000
Bad eraseblock 1385 at 0x0ad20000
Bad eraseblock 1856 at 0x0e800000
Bad eraseblock 1918 at 0x0efc0000
Creating 4 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x00040000 : "bootloader"
0x00040000-0x00060000 : "params"
0x00060000-0x00260000 : "kernel"
0x00260000-0x10000000 : "root"
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
s3c2410 TouchScreen successfully loaded
input: s3c2410 TouchScreen as /class/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
mapped channel 0 to 0
s3c2440-sdi s3c2440-sdi: powered down.
s3c2440-sdi s3c2440-sdi: initialisation done.
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC).
ASoC version 0.13.1
s3c2410iis_probe...
UDA1341 audio driver initialized
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
UDF-fs: No VRS found
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: auto selecting yaffs2
block 45 is bad
block 47 is bad
block 118 is bad
block 946 is bad
block 1244 is bad
block 1252 is bad
block 1367 is bad
block 1838 is bad
block 1900 is bad
s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: CMD[TIMEOUT] #2 op:UNKNOWN(8) arg:0x000001aa flags:0x0875 retries:0 Status:nothing to complete
s3c2440-sdi s3c2440-sdi: CMD[TIMEOUT] #3 op:APP_CMD(55) arg:0x00000000 flags:0x0875 retries:0 Status:nothing to complete
s3c2440-sdi s3c2440-sdi: CMD[TIMEOUT] #4 op:APP_CMD(55) arg:0x00000000 flags:0x0875 retries:0 Status:nothing to complete
s3c2440-sdi s3c2440-sdi: CMD[TIMEOUT] #5 op:APP_CMD(55) arg:0x00000000 flags:0x0875 retries:0 Status:nothing to complete
s3c2440-sdi s3c2440-sdi: CMD[TIMEOUT] #6 op:APP_CMD(55) arg:0x00000000 flags:0x0875 retries:0 Status:nothing to complete
s3c2440-sdi s3c2440-sdi: CMD[TIMEOUT] #7 op:ALL_SEND_OCR(1) arg:0x00000000 flags:0x0861 retries:0 Status:nothing to complete
s3c2440-sdi s3c2440-sdi: powered down.
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 140K
init started: BusyBox v1.7.0 (2008-01-22 10:04:09 EST)
starting pid 764, tty '': '/etc/init.d/rcS'
Please press Enter to activate this console. tsdev (compaq touchscreen emulation) is scheduled for removal.
See Documentation/feature-removal-schedule.txt for details.
Warning: TimeZone::data Can't create a valid data object for 'Europe/Oslo'
Warning: could not register server
uboot命令的更多相关文章
- 1.ok6410移植bootloader,移植u-boot,学习u-boot命令
ok6410移植u-boot 既然是移植u-boot当然首先需要u-boot源码,这里的u-boot代码是由国嵌提供的. 一.配置编译u-boot A. 解压 u-boot 压缩文件 B. 进入解压生 ...
- U-Boot命令大全(功能参数及用法)
U-Boot上电启动后,按任意键可以退出自动启动状态,进入命令行. U-Boot 2010.03 (Sep 25 2011 - 16:18:50) DRAM: 64 MB Flash: ...
- uboot命令分析+实现【转】
转自:http://xouou.iteye.com/blog/2150061 先贴一个重要结构,位于uboot/include/command.h,这个结构代表每个uboot命令 struct cmd ...
- 编译u-boot命令和u-boot常用命令
一.编译u-boot命令 1.配置开发板 #make TQ2440_config 2.编译 #make all 3.交叉编译器是crosstools_3.4.5_softfloat” 使用4.3.3版 ...
- bootargs中的环境变量说明和一些常用的uboot命令
bootargs中的环境变量说明和一些常用的uboot命令 一些常见的uboot命令:Help [command]在屏幕上打印命令的说明Boom [addr]启动在内存储器的内核Tftpboot通过t ...
- Uboot mmc命令解析&NAND flash uboot命令详解
转载:http://blog.csdn.net/simonjay2007/article/details/43198353 一:mmc的命令如下: 1:对mmc读操作 mmc read addr bl ...
- securecrt中进入uboot命令行时,出现无法键入任何指令的问题解决方法
securecrt中进入uboot命令行时,出现无法键入任何指令的问题解决方法 可能出现以下几种情况 1.securecrt在创建连接时,忘记取消勾选流控: 2.usb转串口线坏了3.uboot有问题 ...
- uboot命令(1):mmc命令
版权声明 更新:2017-06-07博主:LuckyAlan联系:liuwenvip163@163.com声明:吃水不忘挖井人,转载请注明出处! 1 文章介绍 今天在进行Android分区修改的时候发 ...
- Uboot命令U_BOOT_CMD分析
其中U_BOOT_CMD命令格式如下: U_BOOT_CMD(name,maxargs,repeatable,command,"usage","help") 各 ...
- Uboot 命令行 介绍
背景 基本上,本文转载自:<ARM板移植Linux系统启动(五)Uboot命令行> 上次说到uboot的启动方式,最后会使用autoboot(自主模式)尝试引导kernel,如果失败或者被 ...
随机推荐
- poj1323-Game Prediction(贪心思想)
贪心的思想:尽量的从最大值找起.然后在剩余之中,再从最大值找起. 一,题意: M个人,每人N张牌,每轮比较谁出的牌大,最大者为胜.现在给定M和N,以及你的牌,要求输出你至少能确保获得几轮的胜利 从&q ...
- C#.NET中数组、ArrayList和List三者的区别
数组在C#.NET中是最早出现的,在内存中是顺序连续存储的,所以它的索引速度非常快,赋值与修改元素也很简单:但是,也正因为数组是顺序连续存储的,在两个数据间插入数据是很不方便的,而且在声明数组的时候必 ...
- windows核心编程 - 线程同步机制
线程同步机制 常用的线程同步机制有很多种,主要分为用户模式和内核对象两类:其中 用户模式包括:原子操作.关键代码段 内核对象包括:时间内核对象(Event).等待定时器内核对象(WaitableTim ...
- lnmp配置Yii2规则
nginx配置: 参考地址:http://www.cnblogs.com/grimm/p/5389970.html location / { try_files $uri $uri/ /index.p ...
- 《项目经验》--通过js获取前台数据向一般处理程序传递Json数据,并解析Json数据,将前台传来的Json数据写入数据库表中
先看一下我要实现的功能界面: 这个界面的功能在图中已有展现,课程分配(教师教授哪门课程)在之前的页面中已做好.这个页面主要实现的是授课,即给老师教授的课程分配学生.此页面实现功能的步骤已在页面 ...
- C#实现对远程服务器的内存和CPU监控
C#实现对远程服务器的内存和CPU监控小记 1. 主要使用到的组件有System.Management.dll 2. 主要类为 :ManagementScope 连接远程服务器示例代码: priv ...
- LeetCode Paint House
原题链接在这里:https://leetcode.com/problems/paint-house/ 题目: There are a row of n houses, each house can b ...
- Oracle --获取绑定变量的值.
SELECT * FROM DBA_HIST_SQLBIND WHERE SNAP_ID>67073 AND SNAP_ID<=67079 AND SQL_ID='3DR3410F086P ...
- Jmeter学习(三十三)调试工具Debug Sampler
一.Debug Sampler介绍: 使用Jmeter开发脚本时,难免需要调试,这时可以使用Jmeter的Debug Sampler,它有三个选项:JMeter properties,JMeter v ...
- Python基础、异常处理
一.概述 错误与异常概念 异常也是对象, 基于Exception类.内置异常 异常处理.流程 try/except/else 处理python或你触发的异常 try/fianlly 不管有没有异 ...