mirror of
https://github.com/beyondx/Notes.git
synced 2026-06-18 01:19:18 +08:00
add uboot and vanet
This commit is contained in:
268
Zim/Research/vanet/MPC8315E-RDB启动输出.txt
Normal file
268
Zim/Research/vanet/MPC8315E-RDB启动输出.txt
Normal file
@@ -0,0 +1,268 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-06-25T19:48:32+08:00
|
||||
|
||||
====== MPC8315E-RDB启动输出 ======
|
||||
Created Monday 25 June 2012
|
||||
|
||||
|
||||
U-Boot 2009.03-rc2 (Aug 04 2012 - 17:31:28) MPC83XX
|
||||
|
||||
Reset Status:
|
||||
|
||||
CPU: e300c3, MPC8315, Rev: 1.2 at 400 MHz, CSB: 133.333 MHz
|
||||
Board: Freescale MPC8315ERDB Rev <unknown>
|
||||
I2C: ready
|
||||
DRAM: 512 MB
|
||||
FLASH: 8 MB
|
||||
NAND: 32 MiB
|
||||
PCIE0: No link
|
||||
PCIE1: No link
|
||||
In: serial
|
||||
Out: serial
|
||||
Err: serial
|
||||
Net: eTSEC0
|
||||
Hit any key to stop autoboot: 0
|
||||
=> tftp 1000000 uImage
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.102; our IP address is 192.168.2.33
|
||||
Filename 'uImage'.
|
||||
Load address: 0x1000000
|
||||
Loading: #################################################################
|
||||
#################################################################
|
||||
done
|
||||
Bytes transferred = 1902018 (1d05c2 hex)
|
||||
=> tftp 2000000 rootfs.ext2.gz.uboot
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.102; our IP address is 192.168.2.33
|
||||
Filename 'rootfs.ext2.gz.uboot'.
|
||||
Load address: 0x2000000
|
||||
Loading: #################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#########
|
||||
done
|
||||
Bytes transferred = 7761685 (766f15 hex)
|
||||
=> tftp c00000 mpc8315.dtb
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.102; our IP address is 192.168.2.33
|
||||
Filename 'mpc8315.dtb'.
|
||||
Load address: 0xc00000
|
||||
Loading: ##
|
||||
done
|
||||
Bytes transferred = 20000 (4e20 hex)
|
||||
=> bootm 1000000 2000000 c00000
|
||||
## Booting kernel from Legacy Image at 01000000 ...
|
||||
Image Name: Linux-3.2.4-g390c4dd
|
||||
Created: 2012-08-08 8:44:26 UTC
|
||||
Image Type: PowerPC Linux Kernel Image (gzip compressed)
|
||||
Data Size: 1901954 Bytes = 1.8 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
## Loading init Ramdisk from Legacy Image at 02000000 ...
|
||||
Image Name: uboot ext2 ramdisk rootfs
|
||||
Created: 2012-08-08 9:29:42 UTC
|
||||
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
|
||||
Data Size: 7761621 Bytes = 7.4 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
## Flattened Device Tree blob at 00c00000
|
||||
Booting using the fdt blob at 0xc00000
|
||||
Uncompressing Kernel Image ... OK
|
||||
Loading Ramdisk to 1f7c2000, end 1ff28ed5 ... OK
|
||||
Loading Device Tree to 007f8000, end 007ffe1f ... OK
|
||||
Using MPC831x RDB machine description
|
||||
Cannot reserve gpages without hugetlb enabled
|
||||
Linux version 3.2.4-g390c4dd (geekard@kb310) (gcc version 4.7.1 (GCC) ) #2 Wed Aug 8 16:44:25 CST 2012
|
||||
Found initrd at 0xdf7c2000:0xdff28ed5
|
||||
bootconsole [udbg0] enabled
|
||||
setup_arch: bootmem
|
||||
mpc831x_rdb_setup_arch()
|
||||
Found FSL PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->0
|
||||
PCI host bridge /pci@e0008500 (primary) ranges:
|
||||
MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000
|
||||
MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
|
||||
IO 0x00000000e0300000..0x00000000e03fffff -> 0x0000000000000000
|
||||
arch: exit
|
||||
Zone PFN ranges:
|
||||
DMA 0x00000000 -> 0x00020000
|
||||
Normal empty
|
||||
Movable zone start PFN for each node
|
||||
early_node_map[1] active PFN ranges
|
||||
0: 0x00000000 -> 0x00020000
|
||||
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
|
||||
Kernel command line: root=/dev/ram rw console=ttyS0,115200 ramdisk_size=22242
|
||||
PID hash table entries: 2048 (order: 1, 8192 bytes)
|
||||
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
|
||||
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
|
||||
Memory: 508204k/524288k available (3692k kernel code, 16084k reserved, 136k data, 80k bss, 164k init)
|
||||
Kernel virtual memory layout:
|
||||
* 0xfffdf000..0xfffff000 : fixmap
|
||||
* 0xfdefb000..0xfe000000 : early ioremap
|
||||
* 0xe1000000..0xfdefb000 : vmalloc & ioremap
|
||||
NR_IRQS:512 nr_irqs:512 16
|
||||
IPIC (128 IRQ sources) at e1000700
|
||||
clocksource: timebase mult[7800001] shift[22] registered
|
||||
pid_max: default: 32768 minimum: 301
|
||||
Mount-cache hash table entries: 512
|
||||
NET: Registered protocol family 16
|
||||
|
||||
PCI: Probing PCI hardware
|
||||
bio: create slab <bio-0> at 0
|
||||
vgaarb: loaded
|
||||
SCSI subsystem initialized
|
||||
Switching to clocksource timebase
|
||||
NET: Registered protocol family 2
|
||||
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
|
||||
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
|
||||
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
|
||||
TCP: Hash tables configured (established 16384 bind 16384)
|
||||
TCP reno registered
|
||||
UDP hash table entries: 256 (order: 0, 4096 bytes)
|
||||
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
|
||||
NET: Registered protocol family 1
|
||||
RPC: Registered named UNIX socket transport module.
|
||||
RPC: Registered udp transport module.
|
||||
RPC: Registered tcp transport module.
|
||||
RPC: Registered tcp NFSv4.1 backchannel transport module.
|
||||
Trying to unpack rootfs image as initramfs...
|
||||
rootfs image is not initramfs (no cpio magic); looks like an initrd
|
||||
Freeing initrd memory: 7580k freed
|
||||
WDT driver for MPC8xxx initialized. mode:reset timeout=65535 (32 seconds)
|
||||
JFFS2 version 2.2. (NAND) <20>© 2001-2006 Red Hat, Inc.
|
||||
msgmni has been set to 1007
|
||||
io scheduler noop registered
|
||||
io scheduler deadline registered
|
||||
io scheduler cfq registered (default)
|
||||
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
|
||||
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16) is a 16550A
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17) is a 16550A
|
||||
brd: module loaded
|
||||
loop: module loaded
|
||||
fsl-sata e0018000.sata: Sata FSL Platform/CSB Driver init
|
||||
scsi0 : sata_fsl
|
||||
ata1: SATA max UDMA/133 irq 44
|
||||
fsl-sata e0019000.sata: Sata FSL Platform/CSB Driver init
|
||||
scsi1 : sata_fsl
|
||||
ata2: SATA max UDMA/133 irq 45
|
||||
fe000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x000c01
|
||||
Amd/Fujitsu Extended Query Table at 0x0040
|
||||
Amd/Fujitsu Extended Query version 1.3.
|
||||
number of CFI chips: 1
|
||||
4 ofpart partitions found on MTD device fe000000.flash
|
||||
Creating 4 MTD partitions on "fe000000.flash":
|
||||
0x000000000000-0x000000100000 : "u-boot"
|
||||
0x000000100000-0x000000500000 : "fs"
|
||||
0x000000500000-0x000000700000 : "kernel"
|
||||
0x000000700000-0x000000800000 : "dtb"
|
||||
NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
|
||||
Bad block table found at page 65504, version 0x01
|
||||
Bad block table found at page 65472, version 0x01
|
||||
nand_read_bbt: bad block at 0x0000000a8000
|
||||
nand_read_bbt: bad block at 0x0000000ac000
|
||||
nand_read_bbt: bad block at 0x0000000b0000
|
||||
nand_read_bbt: bad block at 0x0000000b4000
|
||||
6 ofpart partitions found on MTD device e0600000.flash
|
||||
Creating 6 MTD partitions on "e0600000.flash":
|
||||
0x000000000000-0x000000100000 : "U-Boot-NAND"
|
||||
0x000000100000-0x000000900000 : "JFFS2-NAND"
|
||||
0x000000900000-0x000000d00000 : "Ramdisk-NAND"
|
||||
0x000000d00000-0x000001d00000 : "Reserved-NAND"
|
||||
0x000001d00000-0x000001f00000 : "Kernel-NAND"
|
||||
0x000001f00000-0x000002000000 : "DTB-NAND"
|
||||
eLBC NAND device at 0xe0600000, bank 1
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
mdio_bus mdio@e0024520: error probing PHY at address 0
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
fsl-gianfar e0024000.ethernet: eth0: mac: 04:00:00:00:00:0a
|
||||
fsl-gianfar e0024000.ethernet: eth0: Running with NAPI enabled
|
||||
fsl-gianfar e0024000.ethernet: eth0: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0024000.ethernet: eth0: TX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: mac: 04:00:00:00:00:0b
|
||||
fsl-gianfar e0025000.ethernet: eth1: Running with NAPI enabled
|
||||
fsl-gianfar e0025000.ethernet: eth1: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: TX BD ring size for Q[0]: 256
|
||||
i2c /dev entries driver
|
||||
mpc-i2c e0003000.i2c: timeout 1000000 us
|
||||
rtc-ds1307 0-0068: SET TIME!
|
||||
rtc-ds1307 0-0068: rtc core: registered ds1339 as rtc0
|
||||
TCP cubic registered
|
||||
NET: Registered protocol family 17
|
||||
Registering the dns_resolver key type
|
||||
rtc-ds1307 0-0068: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
|
||||
ata1: No Device OR PHYRDY change,Hstatus = 0xa0000000
|
||||
ata1: SATA link down (SStatus 0 SControl 300)
|
||||
ata2: No Device OR PHYRDY change,Hstatus = 0xa0000000
|
||||
ata2: SATA link down (SStatus 0 SControl 300)
|
||||
RAMDISK: gzip image found at block 0
|
||||
VFS: Mounted root (ext2 filesystem) on device 1:0.
|
||||
Freeing unused kernel memory: 164k freed
|
||||
Mounting /proc and /sys
|
||||
Starting the hotplug events dispatcher udevd
|
||||
Synthesizing initial hotplug eveudevd (859): /proc/859/oom_adj is deprecated, please use /proc/859/oom_score_adj instead.
|
||||
nts
|
||||
cfg80211: Calling CRDA to update world regulatory domain
|
||||
cfg80211: World regulatory domain updated:
|
||||
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
|
||||
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
ath5k 0000:00:0e.0: registered as 'phy0'
|
||||
ath5k channel bandwidth setting 10MHz default
|
||||
VANET-debug: ieee80211_register_hw
|
||||
VANET-debug: ieee80211_rate_control_ops_get select minstrel_ht
|
||||
VANET-debug: register vanet network interface
|
||||
VANET-debug: ieee80211_if_add, name: ath5k%d
|
||||
ath5k phy0: Atheros AR5414 chip found (MAC: 0xa5, PHY: 0x61)
|
||||
cfg80211: Calling CRDA for country: US
|
||||
cfg80211: Regulatory domain changed to country: US
|
||||
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
|
||||
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
|
||||
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
|
||||
cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
|
||||
Setting the hostname to mpc8315erdb
|
||||
Mounting filesystems
|
||||
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
|
||||
Starting syslogd and klogd
|
||||
Running sysctl
|
||||
Setting up networking on loopback device:
|
||||
|
||||
Warning: no IPADDR is set, please set this from the ltib
|
||||
config screen, or directly in /etc/rc.d/rc.conf.
|
||||
IP address setup bypassed
|
||||
|
||||
Setting up networking on eth1:
|
||||
Starting inetd:
|
||||
|
||||
|
||||
Welcome to the LTIB Embedded Linux Environment
|
||||
|
||||
!!!!! WARNING !!!!!!!
|
||||
|
||||
The default password for the root account is: root
|
||||
please change this password using the 'passwd' command
|
||||
and then edit this message (/etc/issue) to remove this message
|
||||
|
||||
mpc8315erdb login: PHY: mdio@e0024520:01 - Link is Up - 100/Full
|
||||
root
|
||||
Password:
|
||||
[root@mpc8315erdb root]# uname -a
|
||||
Linux mpc8315erdb 3.2.4-g390c4dd #2 Wed Aug 8 16:44:25 CST 2012 ppc GNU/Linux
|
||||
[root@mpc8315erdb root]#
|
||||
85
Zim/Research/vanet/uboot打印的板子信息.txt
Normal file
85
Zim/Research/vanet/uboot打印的板子信息.txt
Normal file
@@ -0,0 +1,85 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-10T13:58:44+08:00
|
||||
|
||||
====== uboot打印的板子信息 ======
|
||||
Created Friday 10 August 2012
|
||||
|
||||
**=> clocks**
|
||||
Clock configuration:
|
||||
Core: 400 MHz
|
||||
Coherent System Bus: 133.333 MHz
|
||||
Local Bus Controller:133.333 MHz
|
||||
Local Bus: 66.667 MHz
|
||||
DDR: 266.667 MHz
|
||||
SEC: 133.333 MHz
|
||||
I2C1: 133.333 MHz
|
||||
I2C2: 133.333 MHz
|
||||
TDM: 133.333 MHz
|
||||
TSEC1: 133.333 MHz
|
||||
TSEC2: 133.333 MHz
|
||||
USB DR: 133.333 MHz
|
||||
SATA: 133.333 MHz
|
||||
=>
|
||||
**=> coninfo**
|
||||
List of available devices:
|
||||
serial 80000003 SIO stdin stdout stderr
|
||||
=>
|
||||
|
||||
**=> flinfo #NOR flash信息**
|
||||
|
||||
Bank # 1: CFI conformant FLASH (16 x 16) Size: 8 MB in 128 Sectors
|
||||
AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E
|
||||
Erase timeout: 16384 ms, write timeout: 2 ms
|
||||
Buffer write timeout: 5 ms, buffer size: 32 bytes
|
||||
|
||||
Sector Start Addresses:
|
||||
FE000000 RO FE010000 RO FE020000 RO FE030000 RO FE040000 RO
|
||||
FE050000 FE060000 RO FE070000 FE080000 FE090000
|
||||
FE0A0000 FE0B0000 FE0C0000 FE0D0000 FE0E0000
|
||||
FE0F0000 FE100000 FE110000 FE120000 FE130000
|
||||
FE140000 FE150000 FE160000 FE170000 FE180000
|
||||
FE190000 FE1A0000 FE1B0000 FE1C0000 FE1D0000
|
||||
FE1E0000 FE1F0000 FE200000 FE210000 FE220000
|
||||
FE230000 FE240000 FE250000 FE260000 FE270000
|
||||
FE280000 FE290000 FE2A0000 FE2B0000 FE2C0000
|
||||
FE2D0000 FE2E0000 FE2F0000 FE300000 FE310000
|
||||
FE320000 FE330000 FE340000 FE350000 FE360000
|
||||
FE370000 FE380000 FE390000 FE3A0000 FE3B0000
|
||||
FE3C0000 FE3D0000 FE3E0000 FE3F0000 FE400000
|
||||
FE410000 FE420000 FE430000 FE440000 FE450000
|
||||
FE460000 FE470000 FE480000 FE490000 FE4A0000
|
||||
FE4B0000 FE4C0000 FE4D0000 FE4E0000 FE4F0000
|
||||
FE500000 FE510000 FE520000 FE530000 FE540000
|
||||
FE550000 FE560000 FE570000 FE580000 FE590000
|
||||
FE5A0000 FE5B0000 FE5C0000 FE5D0000 FE5E0000
|
||||
FE5F0000 FE600000 FE610000 FE620000 FE630000
|
||||
FE640000 FE650000 FE660000 FE670000 FE680000
|
||||
FE690000 FE6A0000 FE6B0000 FE6C0000 FE6D0000
|
||||
FE6E0000 FE6F0000 FE700000 FE710000 FE720000
|
||||
FE730000 FE740000 FE750000 FE760000 FE770000
|
||||
FE780000 FE790000 FE7A0000 FE7B0000 FE7C0000
|
||||
FE7D0000 FE7E0000 FE7F0000
|
||||
=>
|
||||
**=> tftp 1000000 uImage**
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.101; our IP address is 192.168.2.33
|
||||
Filename 'uImage'.
|
||||
Load address: 0x1000000
|
||||
Loading: #################################################################
|
||||
#################################################################
|
||||
done
|
||||
Bytes transferred = 1902018 (1d05c2 hex)
|
||||
**=> iminfo 1000000 #查看Image的header info。**
|
||||
|
||||
## Checking Image at 01000000 ...
|
||||
Legacy image found
|
||||
Image Name: Linux-3.2.4-g390c4dd
|
||||
Created: 2012-08-08 8:44:26 UTC
|
||||
Image Type: PowerPC Linux Kernel Image (gzip compressed)
|
||||
Data Size: 1901954 Bytes = 1.8 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
=>
|
||||
10
Zim/Research/vanet/从nor自动启动.txt
Normal file
10
Zim/Research/vanet/从nor自动启动.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T18:06:55+08:00
|
||||
|
||||
====== 从nor自动启动 ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
从NOR Flash启动的话,需要将uboot, uImage,rootfs和dtb分别烧写到flash中。
|
||||
启动时,只需将后面三者在flash中的起始地址传给bootm即可。具体过程如下:
|
||||
|
||||
16
Zim/Research/vanet/使用minicom向uboot下载文件.txt
Normal file
16
Zim/Research/vanet/使用minicom向uboot下载文件.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-10T14:24:46+08:00
|
||||
|
||||
====== 使用minicom向uboot下载文件 ======
|
||||
Created Friday 10 August 2012
|
||||
|
||||
1. 设置好minicom的环境,如[[../../Error_Notes/下载错误/minicom乱码.txt]]
|
||||
2. 复位开发板,启动uboot,在命令行界面输入loady命令,这是uboot处于文件下载等待状态。注意,必须先在minicom环境中与uboot相连而且使uboot处于
|
||||
等待状态后才进行第三步.
|
||||
3. 如下配置minicom的文件传输:
|
||||
a. Ctrl + a进入minicom的配置环境。
|
||||
b. 按s, 进入send file配置界面。
|
||||
c. 选择列表中的ymodem协议模式
|
||||
d. 这时出现“待上传的文件选择列表”菜单,使用上下键在目录项中移动,按两次空格进入光标所在的目录,然后按一次空格选中文件,确保[Okey]被选中
|
||||
然后按回车。 这时会出现文件上传的进度窗口。
|
||||
91
Zim/Research/vanet/制作jffs2根文件系统.txt
Normal file
91
Zim/Research/vanet/制作jffs2根文件系统.txt
Normal file
@@ -0,0 +1,91 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T18:43:56+08:00
|
||||
|
||||
====== 制作jffs2根文件系统 ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
http://www.embedu.org/Column/Column17.htm
|
||||
|
||||
JFFS2是Flash上应用最广的一个日志结构文件系统。它提供的垃圾回收机制,不需要马上对擦写越界的块进行擦写,而只需要将其设置一个标志,标明为脏块,当可用的块数不足时,垃圾回收机制才开始回收这些节点。同时,由于JFFS2基于日志结构,在意外掉电后仍然可以保持数据的完整性,而不会丢失数据。
|
||||
|
||||
本文阐述如何在nand flash上实现JFFS2根文件文件系统。实验环境是:FS2410开发平台及ubantu7.04主机环境。
|
||||
|
||||
**1.下载MTD工具包**
|
||||
制作jffs2根文件系统需要使用__mtd-utils__软件包提供的**mkfs.jffs2**命令,所以先要安装该软件包。完成此步骤后,系统中就有了mkfs.jffs2的工具。注意:这个工具不同于mkfs.ext2工具,它只能制作相应的JFFS2文件系统的镜像,__而不具有进行格式化的功能__,而mkfs.ext2具备这以上两种功能。然后用这个工具就可以制作JFFS2文件系统的镜像了。
|
||||
|
||||
**2、制作JFFS2文件镜像**
|
||||
|
||||
实验平台用到的nand flash 是K9F1208,在制作镜像过程添加的参数需要和它对应。
|
||||
|
||||
farsight#mkfs.jffs2 -r /source/rootfs -o rootfs.jffs2 **-e 0x4000** **--pad=0x800000** -n
|
||||
|
||||
这样就会生成一个8M大小的rootfs.jffs2的镜像,它也正是JFFS2文件系统的镜像,关于这个命令行里的选项的内容,可以用man a mkfs.jffs2命令来查看内容。
|
||||
也可以参考:[[../../Error_Notes/jffs2_scan_eraseblock()_Magic_bitmask_0x1985_not_found_at.txt]]
|
||||
|
||||
JFFS2 维护了几个链表来管理擦写块,根据擦写块上的内容,一个擦写块会在不同的链表上。具体来说,当一个擦写块上都是合法(valid)的节点时,它会在 clean_list 上;当一个擦写块包含至少一个过时(obsolete)的节点时,它会在 dirty_list 上;当一个擦写块被擦写完毕,并被写入 CLEANMARKER 节点后,它会在 free_list 上。而当你在挂载这个文件系统的时候,如果出现CLEANMARKER node found at 0x0042c000 has totlen 0xc != normal 0x0的警告的时候,可以加一个“-n”的选项,这个主要是由于针对Nand Flash不需要在每个擦除块的开始写入CLEANMARKER 节点。
|
||||
|
||||
**3、设置内核启动参数**
|
||||
|
||||
本处用的bootloader是U-BOOT.所以在U-BOOT的命令终端设置如下:
|
||||
|
||||
FS2410#setenv bootargs __root=/dev/mtdblock2 rootfstype=jffs2__ rw console=ttySAC0,115200
|
||||
|
||||
__注意:bootargs参数是传给kernel的启动参数,设备分区mtdblock2所对应的flash空间是通过设备树文件指定的,在内核启动前要通过uboot等工具将制作的__
|
||||
__jffs2文件系统映像烧写到该空间中。__
|
||||
|
||||
|
||||
**4、配置内核支持JFFS2文件系统**
|
||||
|
||||
File systems ---> Miscellaneous filesystems --->
|
||||
|
||||
<*>JournallingFlash File System v2 (JFFS2) support
|
||||
|
||||
[*]JFFS2write-bufferingsupport
|
||||
|
||||
[*]AdvancedcompressionoptionsforJFFS2
|
||||
|
||||
[*]JFFS2ZLIBcompressionsupport
|
||||
|
||||
[*]JFFS2RTIMEcompressionsupport
|
||||
|
||||
[*] JFFS2 RUBIN compression support
|
||||
|
||||
**5、下载rootfs.jffs2镜像**
|
||||
|
||||
通过uboot命令行,将jffs2映像__下载到Nand Flash第二个分区(Flash分区情况是由dtb文件指明的)__。
|
||||
|
||||
FS2410#nand erase 200000 800000
|
||||
|
||||
FS2410#nand write.jffs2 300008000 200000 800000
|
||||
|
||||
这里说明下关于nand flash操作的几个常用命令的含义
|
||||
|
||||
nand write:向Nand Flash写入数据,如果NandFlash相应的区域有坏块,则直接报错。
|
||||
nand write.jffs2:向Nand Flash写入数据,如果NandFlash相应的区域有坏块,可以跳过坏块。
|
||||
nand read:读取Nand Flash相应区域的数据,如果NandFlash相应的区域有坏块,则直接报错。
|
||||
nand read.jffs2s:读取Nand Flash相应区域的数据,如果NandFlash相应的区域有坏块,将对应坏块区域的缓冲填充0xff,然后跳过此坏块继续读取。
|
||||
nand read.jffs2:读取Nand Flash相应区域的数据,如果NandFlash相应的区域有坏块,直接跳过坏块。
|
||||
|
||||
具体的参考代码参看U-BOOT源码:common/cmd_nand.c文件。
|
||||
|
||||
下载完JFFS2文件系统镜像后,需要把Linux内核NandFlash的驱动关于第二个分区的大小改为8M(和镜像一样大,__对于MPC8315而言,由于使用了设备树文件,所以不需要修改内核__),否则会出现类似如下错误:
|
||||
|
||||
Freeing init memory: 124K
|
||||
Warning: unable to open an initial console.
|
||||
Argh. Special inode #171 with mode 0xa1ff had more than one node
|
||||
Kernel panic: No init found. Try passing init= option to kernel.
|
||||
Argh. Specia inode #63 with mode 0xa1ff had more than one node
|
||||
Returned error for crccheck of ino #63. Expect badness...
|
||||
Argh. Special inode #67 with mode 0xa1ff had more than one node
|
||||
Returned error for crccheck of ino #67. Expect badness...
|
||||
Argh. Special inode #68 with mode 0xa1ff had more than one node
|
||||
|
||||
到此,一个JFFS2文件系统的镜像制作成功。可以启动系统并测试JFFS2的性能了。还有一种制作JFFS2文件系统镜像的方法,在制作镜像的参数中可以不加—pad选项,过程如下:
|
||||
|
||||
farsight#mkfs.jffs2 -r /source/rootfs -o rootfs.jffs2 -e 0x4000 -n
|
||||
|
||||
启动开发板烧写rootfs.jffs2镜像
|
||||
|
||||
FS2410#**nand erase 200000 800000/**/(注意把整个存放文件系统的分区全部给擦除)。
|
||||
FS2410#**nand write.jffs2 30008000 200000 31a28c**//(必须是rootfs.jffs2的实际大小。如果是你写成了4M,那么分区的其余部分JFFS2文件系统将无法识别)。
|
||||
334
Zim/Research/vanet/制作jffs2根文件系统并将其烧写到flash中.txt
Normal file
334
Zim/Research/vanet/制作jffs2根文件系统并将其烧写到flash中.txt
Normal file
@@ -0,0 +1,334 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T19:45:03+08:00
|
||||
|
||||
====== 制作jffs2根文件系统并将其烧写到flash中 ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
1. **配置ltib**,指定生成的目标文件系统映像类型为__jffs2__,同时__erase block 大小与Flash datasheet上指定的一致__(这里为16KB):
|
||||
--- Choose your root filesystem image type │ │
|
||||
│ │ Target image: __(jffs2)__ ---> │ │
|
||||
│ │ [ ] Run a command after building the target image │ │
|
||||
│ │ __(16)__ jffs2 erase block size in KB │ │
|
||||
│ │ [ ] read-only root filesystem │ │
|
||||
│ │ (512k) tmpfs size │ │
|
||||
│ │ (/tmp /var) Place these dirs in writable RAM │ │
|
||||
│ │ () rootfs target directory
|
||||
|
||||
2. **复位开发板,进入uboot命令行状态**
|
||||
|
||||
**3. 将生成的rootfs.jffs2映像下载到内存中**
|
||||
|
||||
=> tftp 1000000 rootfs.jffs2
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.105; our IP address is 192.168.2.100
|
||||
Filename 'rootfs.jffs2'.
|
||||
Load address: 0x1000000
|
||||
Loading: #################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
##################################
|
||||
done
|
||||
Bytes transferred = 4308992 (41c000 hex)
|
||||
|
||||
**4.按照dtb中的Flash分区配置,擦出将要保存rootfs.jffs2文件的flash存储区域**
|
||||
例如对于mpc8315dtb-defaults.dts中的配置如下:
|
||||
flash@0,0 { #NOR flash
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
compatible = "cfi-flash";
|
||||
reg = <0x0 0x0 0x800000>;
|
||||
bank-width = <0x2>;
|
||||
device-width = <0x1>;
|
||||
|
||||
u-boot@0 {
|
||||
reg = <0x0 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
fs@100000 {
|
||||
reg = <0x100000 0x400000>;
|
||||
};
|
||||
|
||||
kernel@500000 {
|
||||
reg = <0x500000 0x200000>;
|
||||
};
|
||||
|
||||
dtb@700000 {
|
||||
reg = <0x700000 0x100000>;
|
||||
};
|
||||
};
|
||||
|
||||
nand@1,0 {
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
compatible = "fsl,mpc8315-fcm-nand", "fsl,elbc-fcm-nand";
|
||||
reg = <0x1 0x0 0x2000>;
|
||||
|
||||
u-boot@0 {
|
||||
reg = <0x0 0x100000>;
|
||||
read-only;
|
||||
label = "U-Boot-NAND";
|
||||
};
|
||||
|
||||
__jffs2@100000 {__
|
||||
reg = <0x100000 0x800000>;
|
||||
label = "JFFS2-NAND";
|
||||
};
|
||||
|
||||
ramdisk@900000 {
|
||||
reg = <0x900000 0x400000>;
|
||||
label = "Ramdisk-NAND";
|
||||
};
|
||||
|
||||
reserved@d00000 {
|
||||
reg = <0xd00000 0x1000000>;
|
||||
label = "Reserved-NAND";
|
||||
};
|
||||
|
||||
kernel@1d00000 {
|
||||
reg = <0x1d00000 0x200000>;
|
||||
read-only;
|
||||
label = "Kernel-NAND";
|
||||
};
|
||||
|
||||
dtb@1f00000 {
|
||||
reg = <0x1f00000 0x100000>;
|
||||
read-only;
|
||||
label = "DTB-NAND";
|
||||
};
|
||||
};
|
||||
当我们想将rootfs.jffs2烧写到label为"JFFS2-NAND"的NAND Flash区域时,可以使用下列的擦出命令:
|
||||
**=> nand erase 100000 800000**
|
||||
|
||||
NAND erase: device 0 offset 0x100000, size 0x800000
|
||||
Bad block table found at page 65504, version 0x01
|
||||
Bad block table found at page 65472, version 0x01
|
||||
nand_read_bbt: Bad block at 0x000a8000
|
||||
nand_read_bbt: Bad block at 0x000ac000
|
||||
nand_read_bbt: Bad block at 0x000b0000
|
||||
nand_read_bbt: Bad block at 0x000b4000
|
||||
Erasing at 0x8fc000 -- 100% complete.
|
||||
OK
|
||||
=>
|
||||
|
||||
5. **将下载到内存0x1000000开始的大小为$filesize的rootfs.jffs2文件烧写到NAND Flash 0x100000开始的地方。**
|
||||
=> nand write 1000000 100000 $filesize
|
||||
|
||||
NAND write: device 0 offset 0x100000, size 0x41c000
|
||||
4308992 bytes written: OK
|
||||
=>
|
||||
|
||||
6. **设置kernel命令行参数,指定root为刚才烧写到的nand partition。**
|
||||
=> setenv bootargs __root=/dev/mtdblock5 rw rootfstype=jffs2__ console=ttyS0,115200
|
||||
|
||||
7. **设置uboot自动启动时的bootcmd参数,注意fe500000和fe700000两个flash内存区域事先已经用uboot命令行写入了uImage和mpc8315.dtb文件。**
|
||||
=> setenv bootcmd bootm fe500000 - fe700000
|
||||
=> saveenv __#这样下次启动时,如果过了6秒时间uboot会按照bootcmd环境变量的值启动。__
|
||||
=>boot
|
||||
## Booting kernel from Legacy Image at fe500000 ...
|
||||
Image Name: Linux-3.2.4-gfd2812f
|
||||
Created: 2012-08-10 7:58:18 UTC
|
||||
Image Type: PowerPC Linux Kernel Image (gzip compressed)
|
||||
Data Size: 1551548 Bytes = 1.5 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
## Flattened Device Tree blob at fe700000
|
||||
Booting using the fdt blob at 0xfe700000
|
||||
Uncompressing Kernel Image ... OK
|
||||
Loading Device Tree to 007f8000, end 007ffe1f ... OK
|
||||
Using MPC831x RDB machine description
|
||||
Cannot reserve gpages without hugetlb enabled
|
||||
Linux version 3.2.4-gfd2812f (geekard@kb310) (gcc version 4.7.1 (GCC) ) #4 Fri Aug 10 15:58:17 CST 2012
|
||||
bootconsole [udbg0] enabled
|
||||
setup_arch: bootmem
|
||||
mpc831x_rdb_setup_arch()
|
||||
Found FSL PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->0
|
||||
PCI host bridge /pci@e0008500 (primary) ranges:
|
||||
MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000
|
||||
MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
|
||||
IO 0x00000000e0300000..0x00000000e03fffff -> 0x0000000000000000
|
||||
arch: exit
|
||||
Zone PFN ranges:
|
||||
DMA 0x00000000 -> 0x00020000
|
||||
Normal empty
|
||||
Movable zone start PFN for each node
|
||||
early_node_map[1] active PFN ranges
|
||||
0: 0x00000000 -> 0x00020000
|
||||
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
|
||||
Kernel command line: root=/dev/mtdblock5 rw rootfstype=jffs2 console=ttyS0,115200
|
||||
PID hash table entries: 2048 (order: 1, 8192 bytes)
|
||||
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
|
||||
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
|
||||
Memory: 516520k/524288k available (2992k kernel code, 7768k reserved, 124k data, 59k bss, 152k init)
|
||||
Kernel virtual memory layout:
|
||||
* 0xfffdf000..0xfffff000 : fixmap
|
||||
* 0xfdefb000..0xfe000000 : early ioremap
|
||||
* 0xe1000000..0xfdefb000 : vmalloc & ioremap
|
||||
NR_IRQS:512 nr_irqs:512 16
|
||||
IPIC (128 IRQ sources) at e1000700
|
||||
clocksource: timebase mult[7800001] shift[22] registered
|
||||
pid_max: default: 32768 minimum: 301
|
||||
Mount-cache hash table entries: 512
|
||||
NET: Registered protocol family 16
|
||||
|
||||
PCI: Probing PCI hardware
|
||||
bio: create slab <bio-0> at 0
|
||||
vgaarb: loaded
|
||||
SCSI subsystem initialized
|
||||
Switching to clocksource timebase
|
||||
NET: Registered protocol family 2
|
||||
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
|
||||
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
|
||||
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
|
||||
TCP: Hash tables configured (established 16384 bind 16384)
|
||||
TCP reno registered
|
||||
UDP hash table entries: 256 (order: 0, 4096 bytes)
|
||||
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
|
||||
NET: Registered protocol family 1
|
||||
WDT driver for MPC8xxx initialized. mode:reset timeout=65535 (32 seconds)
|
||||
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
|
||||
msgmni has been set to 1008
|
||||
io scheduler noop registered
|
||||
io scheduler deadline registered
|
||||
io scheduler cfq registered (default)
|
||||
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
|
||||
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16) is a 16550A
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17) is a 16550A
|
||||
brd: module loaded
|
||||
loop: module loaded
|
||||
fe000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x000c01
|
||||
Amd/Fujitsu Extended Query Table at 0x0040
|
||||
Amd/Fujitsu Extended Query version 1.3.
|
||||
number of CFI chips: 1
|
||||
__4 ofpart partitions found on MTD device fe000000.flash #NOR Flash和NAND Flash中的分区情况是由dtb文件配置的。这只是一个指示,该分区是否含有jffs2文件系统映像则不确定(需要实现用上面的步骤烧入)。下面的分区标号从mtdblock0开始。__
|
||||
__Creating 4 MTD partitions on "fe000000.flash":__
|
||||
0x000000000000-0x000000100000 : "u-boot"
|
||||
0x000000100000-0x000000500000 : "fs"
|
||||
0x000000500000-0x000000700000 : "kernel"
|
||||
0x000000700000-0x000000800000 : "dtb"
|
||||
|
||||
NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
|
||||
Bad block table found at page 65504, version 0x01
|
||||
Bad block table found at page 65472, version 0x01
|
||||
nand_read_bbt: bad block at 0x0000000a8000
|
||||
nand_read_bbt: bad block at 0x0000000ac000
|
||||
nand_read_bbt: bad block at 0x0000000b0000
|
||||
nand_read_bbt: bad block at 0x0000000b4000
|
||||
6 ofpart partitions found on MTD device e0600000.flash
|
||||
Creating 6 MTD partitions on "e0600000.flash":
|
||||
0x000000000000-0x000000100000 : "U-Boot-NAND"
|
||||
0x000000100000-0x000000900000 : __"JFFS2-NAND" #对应的是mtdblock5__
|
||||
0x000000900000-0x000000d00000 : "Ramdisk-NAND"
|
||||
0x000000d00000-0x000001d00000 : "Reserved-NAND"
|
||||
0x000001d00000-0x000001f00000 : "Kernel-NAND"
|
||||
0x000001f00000-0x000002000000 : "DTB-NAND"
|
||||
eLBC NAND device at 0xe0600000, bank 1
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
mdio_bus mdio@e0024520: error probing PHY at address 0
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
fsl-gianfar e0024000.ethernet: eth0: mac: 04:00:00:00:00:0a
|
||||
fsl-gianfar e0024000.ethernet: eth0: Running with NAPI enabled
|
||||
fsl-gianfar e0024000.ethernet: eth0: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0024000.ethernet: eth0: TX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: mac: 04:00:00:00:00:0b
|
||||
fsl-gianfar e0025000.ethernet: eth1: Running with NAPI enabled
|
||||
fsl-gianfar e0025000.ethernet: eth1: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: TX BD ring size for Q[0]: 256
|
||||
i2c /dev entries driver
|
||||
mpc-i2c e0003000.i2c: timeout 1000000 us
|
||||
rtc-ds1307 0-0068: SET TIME!
|
||||
rtc-ds1307 0-0068: rtc core: registered ds1339 as rtc0
|
||||
TCP cubic registered
|
||||
NET: Registered protocol family 17
|
||||
Registering the dns_resolver key type
|
||||
rtc-ds1307 0-0068: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
|
||||
__VFS: Mounted root (jffs2 filesystem) on device 31:5. #可以看到正确地挂载了mtdblock5设备为root。__
|
||||
Freeing unused kernel memory: 152k freed
|
||||
Mounting /proc and /sys
|
||||
Starting the hotplug events dispatcher mdev
|
||||
Setting the hostname to mpc8315erdb
|
||||
Mounting filesystems
|
||||
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
|
||||
Starting syslogd and klogd
|
||||
Running sysctl
|
||||
Setting up networking on loopback device:
|
||||
|
||||
Warning: no IPADDR is set, please set this from the ltib
|
||||
config screen, or directly in /etc/rc.d/rc.conf.
|
||||
IP address setup bypassed
|
||||
|
||||
Setting up networking on eth1:
|
||||
|
||||
|
||||
Welcome to the LTIB Embedded Linux Environment
|
||||
|
||||
!!!!! WARNING !!!!!!!
|
||||
|
||||
The default password for the root account is: root
|
||||
please change this password using the 'passwd' command
|
||||
and then edit this message (/etc/issue) to remove this message
|
||||
|
||||
mpc8315erdb login: PHY: mdio@e0024520:01 - Link is Up - 100/Full
|
||||
|
||||
|
||||
Welcome to the LTIB Embedded Linux Environment
|
||||
|
||||
!!!!! WARNING !!!!!!!
|
||||
|
||||
The default password for the root account is: root
|
||||
please change this password using the 'passwd' command
|
||||
and then edit this message (/etc/issue) to remove this message
|
||||
|
||||
mpc8315erdb login: root
|
||||
Password:
|
||||
[root@mpc8315erdb /root]#
|
||||
[root@mpc8315erdb /root]# __ls /dev/mtd __
|
||||
mtd0 mtd2ro mtd5 mtd7ro mtdblock0 mtdblock5
|
||||
mtd0ro mtd3 mtd5ro mtd8 mtdblock1 mtdblock6
|
||||
mtd1 mtd3ro mtd6 mtd8ro mtdblock2 mtdblock7
|
||||
mtd1ro mtd4 mtd6ro mtd9 mtdblock3 mtdblock8
|
||||
mtd2 mtd4ro mtd7 mtd9ro mtdblock4 mtdblock9
|
||||
[root@mpc8315erdb /root]# cat [[/proc/mtd]] __#查看系统中所有的mtd分区情况__
|
||||
dev: size erasesize name
|
||||
mtd0: 00100000 00010000 "u-boot" __#name和size是在dtb文件中配置的而eraseize是在制作jffs2映像时用-e参数指定的(LTIB有相应的配置选项)。__
|
||||
mtd1: 00400000 00010000 "fs"
|
||||
mtd2: 00200000 00010000 "kernel"
|
||||
mtd3: 00100000 00010000 "dtb"
|
||||
mtd4: 00100000 00004000 "U-Boot-NAND"
|
||||
__mtd5__: 00800000 __00004000__ "JFFS2-NAND" #注意,这里的erasesize并不准确,实际大小由相应的jffs2映像决定。
|
||||
mtd6: 00400000 00004000 "Ramdisk-NAND"
|
||||
mtd7: 01000000 00004000 "Reserved-NAND"
|
||||
mtd8: 00200000 00004000 "Kernel-NAND"
|
||||
mtd9: 00100000 00004000 "DTB-NAND"
|
||||
[root@mpc8315erdb /root]# cat /proc/filesystems
|
||||
nodev sysfs
|
||||
nodev rootfs
|
||||
nodev bdev
|
||||
nodev proc
|
||||
nodev tmpfs
|
||||
nodev sockfs
|
||||
nodev pipefs
|
||||
nodev anon_inodefs
|
||||
nodev devpts
|
||||
ext2
|
||||
nodev ramfs
|
||||
vfat
|
||||
msdos
|
||||
iso9660
|
||||
__nodev jffs2 #内核的确支持jffs2文件系统__
|
||||
__nodev mtd_inodefs__
|
||||
[root@mpc8315erdb /root]#
|
||||
[root@mpc8315erdb /root]# mkdir jffs2
|
||||
[root@mpc8315erdb /root]# mount -t jffs2 /dev/mtdblock5 jffs2/ __#将jffs2分区挂载到文件系统中。__
|
||||
[root@mpc8315erdb /root]# ls jffs2/ __#可见列出的内容即为我们制作的root分区。__
|
||||
bin etc lib mnt proc sbin sys usr
|
||||
dev home linuxrc opt root smbshare tmp var
|
||||
[root@mpc8315erdb /root]#
|
||||
|
||||
然后就可以项jffs2目录中读写文件了,在掉电后这些文件的更改并不会丢失。
|
||||
390
Zim/Research/vanet/烧写固件到NAND然后启动时读取.txt
Normal file
390
Zim/Research/vanet/烧写固件到NAND然后启动时读取.txt
Normal file
@@ -0,0 +1,390 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T18:10:24+08:00
|
||||
|
||||
====== 烧写固件到NAND然后启动时读取 ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
经过实验,板子的NOR Flash可以正常启动,但是从NAND Flash中启动失败。但是NAND Flash可以正常工作。
|
||||
所以,可以将NOR Flash作为启动设备,只保留uboot(或再加上uImage),而将其余的固件内容放到NAND中,
|
||||
由uboot启动时读取到内存中。具体步骤如下:
|
||||
|
||||
1. **查看uboot提供的nand命令语法**
|
||||
=> help nand
|
||||
nand info - show available NAND devices
|
||||
nand device [dev] - show or set current device
|
||||
nand read - addr off|partition size
|
||||
nand write - addr off|partition size
|
||||
read/write 'size' bytes starting at offset 'off'
|
||||
to/from memory address 'addr', skipping bad blocks.
|
||||
nand erase [clean] [off size] - erase 'size' bytes from
|
||||
offset 'off' (entire device if not specified)
|
||||
nand bad - show bad blocks
|
||||
nand dump[.oob] off - dump page
|
||||
nand scrub - really clean NAND erasing bad blocks (UNSAFE)
|
||||
nand markbad off - mark bad block at offset (UNSAFE)
|
||||
nand biterr off - make a bit error at offset (UNSAFE)
|
||||
|
||||
**=> nand info** #查看nand设备信息
|
||||
Device 0: NAND 32MiB 3,3V 8-bit, sector size 16 KiB
|
||||
|
||||
**=> nand erase #擦出整个设备(也可以指定擦出范围)**
|
||||
NAND erase: device 0 whole chip
|
||||
Bad block table found at page 65504, version 0x01
|
||||
Bad block table found at page 65472, version 0x01
|
||||
nand_read_bbt: Bad block at 0x000a8000
|
||||
nand_read_bbt: Bad block at 0x000ac000
|
||||
nand_read_bbt: Bad block at 0x000b0000
|
||||
nand_read_bbt: Bad block at 0x000b4000
|
||||
Skipping bad block at 0x000a8000
|
||||
Skipping bad block at 0x000ac000
|
||||
Skipping bad block at 0x000b0000
|
||||
Skipping bad block at 0x000b4000
|
||||
Skipping bad block at 0x01ff0000
|
||||
Skipping bad block at 0x01ff4000
|
||||
Skipping bad block at 0x01ff8000
|
||||
Skipping bad block at 0x01ffc000
|
||||
|
||||
OK
|
||||
**=> nand dump 0 #dump第一个page(512Bytes)的内容,确认全为1.**
|
||||
Page 00000000 dump:
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
OOB:
|
||||
ff ff ff ff ff ff ff ff
|
||||
ff ff ff ff ff ff ff ff
|
||||
**=> tftp 1000000 uImage #将**__内核__**下载到内存中**
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.101; our IP address is 192.168.2.100
|
||||
Filename 'uImage'.
|
||||
Load address: 0x1000000
|
||||
Loading: #################################################################
|
||||
#########################################
|
||||
done
|
||||
**Bytes transferred = 1551612 (17acfc hex)**
|
||||
|
||||
**=> nand write 1000000 0 $filesize #写flash前必须要对相应区域擦出过,最后一个参数指定写入的**__字节数__**。**
|
||||
|
||||
NAND write: device 0 offset 0x0, size 0x17acfc
|
||||
Attempt to write __non page aligned data #Flash写入时以page为单位(即512Bytes为单位)所以写入的大小不是页对齐时会出错。__
|
||||
1551612 bytes written: ERROR
|
||||
|
||||
**=> nand write 1000000 0 200000** **#指定一个比实际要写的内容稍大(可由tftp命令的最后一行输出指示)且页对齐的大小。**
|
||||
NAND write: device 0 offset 0x0, size 0x200000
|
||||
Skip bad block 0x000a8000
|
||||
Skip bad block 0x000ac000
|
||||
Skip bad block 0x000b0000
|
||||
Skip bad block 0x000b4000
|
||||
2097152 bytes written: OK
|
||||
|
||||
=> tftp 2000000 rootfs.ext2.gz.uboot **#将根文件系统ramdisk下载到内存中**
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.101; our IP address is 192.168.2.100
|
||||
Filename 'rootfs.ext2.gz.uboot'.
|
||||
Load address: 0x2000000
|
||||
Loading: #################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
########################################
|
||||
done
|
||||
Bytes transferred = **3447604** (349b34 hex)
|
||||
|
||||
**=> nand write 2000000 300000 400000**
|
||||
NAND write: device 0 offset 0x300000, size 0x400000
|
||||
4194304 bytes written: OK
|
||||
|
||||
**=> tftp c00000 mpc8315.dtb #设备树下载到内存中**
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.101; our IP address is 192.168.2.100
|
||||
Filename 'mpc8315.dtb'.
|
||||
Load address: 0xc00000
|
||||
Loading: ##
|
||||
done
|
||||
Bytes transferred = 20000 (4e20 hex)
|
||||
=> nand write c00000 800000 100000
|
||||
|
||||
NAND write: device 0 offset 0x800000, size 0x100000
|
||||
1048576 bytes written: OK
|
||||
|
||||
=> setenv bootcmd nand read 1000000 0 200000;nand read 2000000 300000 400000;nand read c00000 800000 100000;bootm 1000000 2000000 c00000
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=>
|
||||
=>
|
||||
=> printenv
|
||||
ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtr
|
||||
nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfr
|
||||
bootdelay=6
|
||||
baudrate=115200
|
||||
loads_echo=1
|
||||
ethaddr=04:00:00:00:00:0A
|
||||
eth1addr=04:00:00:00:00:0B
|
||||
loadaddr=500000
|
||||
netdev=eth0
|
||||
consoledev=ttyS0
|
||||
ramdiskaddr=1000000
|
||||
ramdiskfile=ramfs.83xx
|
||||
fdtaddr=400000
|
||||
fdtfile=mpc8315erdb.dtb
|
||||
pciconfighost=yes
|
||||
ethact=eTSEC0
|
||||
bootargs=root=/dev/ram rw console=ttyS0,115200 ramdisk_size=65535
|
||||
stdin=serial
|
||||
stdout=serial
|
||||
stderr=serial
|
||||
filesize=4E20
|
||||
fileaddr=C00000
|
||||
ipaddr=192.168.2.100
|
||||
serverip=192.168.2.101
|
||||
bootcmd=nand read 1000000 0 2
|
||||
|
||||
Environment size: 915/8188 bytes
|
||||
=> setenv bootcmd nand read 1000000 0 200000;nand read 2000000 300000 400000;nand read c00000 800000 100000;bootm 1000000 2000000 c00000
|
||||
|
||||
NAND read: device 0 offset 0x300000, size 0x400000
|
||||
4194304 bytes read: OK
|
||||
|
||||
NAND read: device 0 offset 0x800000, size 0x100000
|
||||
1048576 bytes read: OK
|
||||
## Booting kernel from Legacy Image at 01000000 ...
|
||||
Image Name: Linux-3.2.4-gfd2812f
|
||||
Created: 2012-08-10 7:58:18 UTC
|
||||
Image Type: PowerPC Linux Kernel Image (gzip compressed)
|
||||
Data Size: 1551548 Bytes = 1.5 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
## Loading init Ramdisk from Legacy Image at 02000000 ...
|
||||
Image Name: uboot ext2 ramdisk rootfs
|
||||
Created: 2012-08-11 8:00:23 UTC
|
||||
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
|
||||
Data Size: 3447540 Bytes = 3.3 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
## Flattened Device Tree blob at 00c00000
|
||||
Booting using the fdt blob at 0xc00000
|
||||
Uncompressing Kernel Image ... OK
|
||||
Loading Ramdisk to 1fbdf000, end 1ff28af4 ... OK
|
||||
Loading Device Tree to 007f8000, end 007ffe1f ... OK
|
||||
Using MPC831x RDB machine description
|
||||
Cannot reserve gpages without hugetlb enabled
|
||||
Linux version 3.2.4-gfd2812f (geekard@kb310) (gcc version 4.7.1 (GCC) ) #4 Fri Aug 10 15:58:17 CST 2012
|
||||
Found initrd at 0xdfbdf000:0xdff28af4
|
||||
bootconsole [udbg0] enabled
|
||||
setup_arch: bootmem
|
||||
mpc831x_rdb_setup_arch()
|
||||
Found FSL PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->0
|
||||
PCI host bridge /pci@e0008500 (primary) ranges:
|
||||
MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000
|
||||
MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
|
||||
IO 0x00000000e0300000..0x00000000e03fffff -> 0x0000000000000000
|
||||
arch: exit
|
||||
Zone PFN ranges:
|
||||
DMA 0x00000000 -> 0x00020000
|
||||
Normal empty
|
||||
Movable zone start PFN for each node
|
||||
early_node_map[1] active PFN ranges
|
||||
0: 0x00000000 -> 0x00020000
|
||||
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
|
||||
Kernel command line: root=/dev/ram rw console=ttyS0,115200 ramdisk_size=65535
|
||||
PID hash table entries: 2048 (order: 1, 8192 bytes)
|
||||
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
|
||||
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
|
||||
Memory: 513152k/524288k available (2992k kernel code, 11136k reserved, 124k data, 59k bss, 152k init)
|
||||
Kernel virtual memory layout:
|
||||
* 0xfffdf000..0xfffff000 : fixmap
|
||||
* 0xfdefb000..0xfe000000 : early ioremap
|
||||
* 0xe1000000..0xfdefb000 : vmalloc & ioremap
|
||||
NR_IRQS:512 nr_irqs:512 16
|
||||
IPIC (128 IRQ sources) at e1000700
|
||||
clocksource: timebase mult[7800001] shift[22] registered
|
||||
pid_max: default: 32768 minimum: 301
|
||||
Mount-cache hash table entries: 512
|
||||
NET: Registered protocol family 16
|
||||
|
||||
PCI: Probing PCI hardware
|
||||
bio: create slab <bio-0> at 0
|
||||
vgaarb: loaded
|
||||
SCSI subsystem initialized
|
||||
Switching to clocksource timebase
|
||||
NET: Registered protocol family 2
|
||||
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
|
||||
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
|
||||
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
|
||||
TCP: Hash tables configured (established 16384 bind 16384)
|
||||
TCP reno registered
|
||||
UDP hash table entries: 256 (order: 0, 4096 bytes)
|
||||
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
|
||||
NET: Registered protocol family 1
|
||||
Trying to unpack rootfs image as initramfs...
|
||||
rootfs image is not initramfs (no cpio magic); looks like an initrd
|
||||
Freeing initrd memory: 3368k freed
|
||||
WDT driver for MPC8xxx initialized. mode:reset timeout=65535 (32 seconds)
|
||||
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
|
||||
msgmni has been set to 1008
|
||||
io scheduler noop registered
|
||||
io scheduler deadline registered
|
||||
io scheduler cfq registered (default)
|
||||
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
|
||||
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16) is a 16550A
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17) is a 16550A
|
||||
brd: module loaded
|
||||
loop: module loaded
|
||||
fe000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x000c01
|
||||
Amd/Fujitsu Extended Query Table at 0x0040
|
||||
Amd/Fujitsu Extended Query version 1.3.
|
||||
number of CFI chips: 1
|
||||
4 ofpart partitions found on MTD device fe000000.flash
|
||||
Creating 4 MTD partitions on "fe000000.flash":
|
||||
0x000000000000-0x000000100000 : "u-boot"
|
||||
0x000000100000-0x000000500000 : "fs"
|
||||
0x000000500000-0x000000700000 : "kernel"
|
||||
0x000000700000-0x000000800000 : "dtb"
|
||||
NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
|
||||
Bad block table found at page 65504, version 0x01
|
||||
Bad block table found at page 65472, version 0x01
|
||||
nand_read_bbt: bad block at 0x0000000a8000
|
||||
nand_read_bbt: bad block at 0x0000000ac000
|
||||
nand_read_bbt: bad block at 0x0000000b0000
|
||||
nand_read_bbt: bad block at 0x0000000b4000
|
||||
6 ofpart partitions found on MTD device e0600000.flash
|
||||
Creating 6 MTD partitions on "e0600000.flash":
|
||||
0x000000000000-0x000000100000 : "U-Boot-NAND"
|
||||
0x000000100000-0x000000900000 : "JFFS2-NAND"
|
||||
0x000000900000-0x000000d00000 : "Ramdisk-NAND"
|
||||
0x000000d00000-0x000001d00000 : "Reserved-NAND"
|
||||
0x000001d00000-0x000001f00000 : "Kernel-NAND"
|
||||
0x000001f00000-0x000002000000 : "DTB-NAND"
|
||||
eLBC NAND device at 0xe0600000, bank 1
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
mdio_bus mdio@e0024520: error probing PHY at address 0
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
fsl-gianfar e0024000.ethernet: eth0: mac: 04:00:00:00:00:0a
|
||||
fsl-gianfar e0024000.ethernet: eth0: Running with NAPI enabled
|
||||
fsl-gianfar e0024000.ethernet: eth0: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0024000.ethernet: eth0: TX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: mac: 04:00:00:00:00:0b
|
||||
fsl-gianfar e0025000.ethernet: eth1: Running with NAPI enabled
|
||||
fsl-gianfar e0025000.ethernet: eth1: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: TX BD ring size for Q[0]: 256
|
||||
i2c /dev entries driver
|
||||
mpc-i2c e0003000.i2c: timeout 1000000 us
|
||||
rtc-ds1307 0-0068: rtc core: registered ds1339 as rtc0
|
||||
TCP cubic registered
|
||||
NET: Registered protocol family 17
|
||||
Registering the dns_resolver key type
|
||||
rtc-ds1307 0-0068: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
|
||||
RAMDISK: gzip image found at block 0
|
||||
VFS: Mounted root (ext2 filesystem) on device 1:0.
|
||||
Freeing unused kernel memory: 152k freed
|
||||
Mounting /proc and /sys
|
||||
Starting the hotplug events dispatcher mdev
|
||||
Setting the hostname to mpc8315erdb
|
||||
Mounting filesystems
|
||||
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
|
||||
Starting syslogd and klogd
|
||||
Running sysctl
|
||||
Setting up networking on loopback device:
|
||||
|
||||
7
Zim/Research/vanet/部署.txt
Normal file
7
Zim/Research/vanet/部署.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T21:48:28+08:00
|
||||
|
||||
====== 部署 ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
7
Zim/Research/vanet/部署/jffs2_flash方式.txt
Normal file
7
Zim/Research/vanet/部署/jffs2_flash方式.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T21:48:46+08:00
|
||||
|
||||
====== jffs2 flash方式 ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
7
Zim/Research/vanet/部署/jffs2_flash方式/jffs2部署.txt
Normal file
7
Zim/Research/vanet/部署/jffs2_flash方式/jffs2部署.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T21:47:58+08:00
|
||||
|
||||
====== jffs2部署 ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
7
Zim/Research/vanet/部署/ramdisk方式.txt
Normal file
7
Zim/Research/vanet/部署/ramdisk方式.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T21:48:35+08:00
|
||||
|
||||
====== ramdisk方式 ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
369
Zim/Research/vanet/部署/ramdisk方式/ramdisk部署--通过flash.txt
Normal file
369
Zim/Research/vanet/部署/ramdisk方式/ramdisk部署--通过flash.txt
Normal file
@@ -0,0 +1,369 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T21:21:44+08:00
|
||||
|
||||
====== ramdisk部署--通过flash ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
一、NOR Flash方式:
|
||||
这种部署方式是将ramdisk格式的根文件系统、内核、设备树烧写到flash中,然后复位后摘bootcmd中指定三个文件在flash中起始地址即可。适合与较小的固件。
|
||||
|
||||
首先要规划NOR Flash的空间安排,在mpc8315dtb-default.dts文件中,安排如下:
|
||||
flash@0,0 {
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x1>;
|
||||
compatible = "cfi-flash";
|
||||
reg = <0x0 0x0 0x800000>;
|
||||
bank-width = <0x2>;
|
||||
device-width = <0x1>;
|
||||
|
||||
u-boot@0 {
|
||||
reg = <0x0 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
fs@100000 {
|
||||
reg = <0x100000 0x400000>;
|
||||
};
|
||||
|
||||
kernel@500000 {
|
||||
reg = <0x500000 0x200000>;
|
||||
};
|
||||
|
||||
dtb@700000 {
|
||||
reg = <0x700000 0x100000>;
|
||||
};
|
||||
};
|
||||
由于MPC831ERDB上的NOR Flash只有8MB空间,因此三个文件的大小加起来不能超过8MB。由于使用ramdisk方式时,是使用SDRAM作为根文件系统,所以
|
||||
实际为这三个文件分配空间时可以任意,只要够用就行。
|
||||
|
||||
二、 NAND Flash方式:
|
||||
当固件较大时,可以将其烧写到容量较大的NAND Flash中,然后启动时将这三个文件读取到内存中(通过nand read命令)启动。__注意如果是NOR Flash则bootm的三个参数可以直接是文件在NOR Flash中烧写的首地址,因为NOR Flash支持在芯片执行(XIP).__
|
||||
|
||||
可以将NOR Flash和NAND Flash烧写相结合的方式启动,如将较小的uImage和dtb烧写到NOR中,将较大的rootfs烧写到NAND中,然后在bootm前将NAND 中的文件读到内存中即可。
|
||||
|
||||
**=> help nand**
|
||||
nand info - show available NAND devices
|
||||
nand device [dev] - show or set current device
|
||||
nand read - addr off|partition size
|
||||
nand write - addr off|partition size
|
||||
read/write 'size' bytes starting at offset 'off'
|
||||
to/from memory address 'addr', skipping bad blocks.
|
||||
nand erase [clean] [off size] - erase 'size' bytes from
|
||||
offset 'off' (entire device if not specified)
|
||||
nand bad - show bad blocks
|
||||
nand dump[.oob] off - dump page
|
||||
nand scrub - really clean NAND erasing bad blocks (UNSAFE)
|
||||
nand markbad off - mark bad block at offset (UNSAFE)
|
||||
nand biterr off - make a bit error at offset (UNSAFE)
|
||||
|
||||
**=> nand erase #擦出整个NAND Flash**
|
||||
|
||||
NAND erase: device 0 whole chip
|
||||
Bad block table found at page 65504, version 0x01
|
||||
Bad block table found at page 65472, version 0x01
|
||||
nand_read_bbt: Bad block at 0x000a8000
|
||||
nand_read_bbt: Bad block at 0x000ac000
|
||||
nand_read_bbt: Bad block at 0x000b0000
|
||||
nand_read_bbt: Bad block at 0x000b4000
|
||||
Skipping bad block at 0x000a8000
|
||||
Skipping bad block at 0x000ac000
|
||||
Skipping bad block at 0x000b0000
|
||||
Skipping bad block at 0x000b4000
|
||||
Skipping bad block at 0x01ff0000
|
||||
Skipping bad block at 0x01ff4000
|
||||
Skipping bad block at 0x01ff8000
|
||||
Skipping bad block at 0x01ffc000
|
||||
|
||||
OK
|
||||
**=> nand write 1000000 0 $filesize**
|
||||
|
||||
NAND write: device 0 offset 0x0, size 0x17acfc
|
||||
Attempt to write __non page aligned data #K9F5608的page大小为512Bytes__
|
||||
1551612 bytes written: ERROR
|
||||
|
||||
**=> nand write 1000000 0 200000**
|
||||
|
||||
NAND write: '$200000' is not a number
|
||||
=> nand write 1000000 0 200000
|
||||
|
||||
NAND write: device 0 offset 0x0, size 0x200000
|
||||
Skip bad block 0x000a8000
|
||||
Skip bad block 0x000ac000
|
||||
Skip bad block 0x000b0000
|
||||
Skip bad block 0x000b4000
|
||||
2097152 bytes written: OK
|
||||
**=> tftp 2000000 rootfs.ext2.gz.uboot**
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.105; our IP address is 192.168.2.100
|
||||
Filename 'rootfs.ext2.gz.uboot'.
|
||||
Load address: 0x2000000
|
||||
Loading: #################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
####################################
|
||||
done
|
||||
Bytes transferred = 6252712 (5f68a8 hex)
|
||||
**=> nand write 2000000 300000 700000**
|
||||
|
||||
NAND write: device 0 offset 0x300000, size 0x700000
|
||||
7340032 bytes written: OK
|
||||
**=> tftp c00000 mpc8315.dtb**
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.105; our IP address is 192.168.2.100
|
||||
Filename 'mpc8315.dtb'.
|
||||
Load address: 0xc00000
|
||||
Loading: ##
|
||||
done
|
||||
Bytes transferred = 20000 (4e20 hex)
|
||||
**=> nand write c00000 a00000 100000**
|
||||
|
||||
NAND write: device 0 offset 0xa00000, size 0x100000
|
||||
1048576 bytes written: OK
|
||||
**=> setenv bootargs root=/dev/ram rw console=ttyS0,115200 ramdisk_size=19034**
|
||||
**=> setenv bootcmd "nand read 1000000 0 200000;nand read 2000000 300000 700000;nand read c00000 a00000 100000;bootm 1000000 2000000 c00000" #设置环境变量bootcmd的参数,注意前后的引号和命令间的分号。**
|
||||
**=> saveenv #将环境变量保存,这样下次重启时6秒后将自动自行bootcmd环境变量对应的命令**
|
||||
Saving Environment to Flash...
|
||||
. done
|
||||
Un-Protected 1 sectors
|
||||
Erasing Flash...
|
||||
. done
|
||||
Erased 1 sectors
|
||||
Writing to Flash... done
|
||||
. done
|
||||
Protected 1 sectors
|
||||
=>
|
||||
__=> boot__
|
||||
|
||||
NAND read: device 0 offset 0x0, size 0x200000
|
||||
Bad block table found at page 65504, version 0x01
|
||||
Bad block table found at page 65472, version 0x01
|
||||
nand_read_bbt: Bad block at 0x000a8000
|
||||
nand_read_bbt: Bad block at 0x000ac000
|
||||
nand_read_bbt: Bad block at 0x000b0000
|
||||
nand_read_bbt: Bad block at 0x000b4000
|
||||
Skipping bad block 0x000a8000
|
||||
Skipping bad block 0x000ac000
|
||||
Skipping bad block 0x000b0000
|
||||
Skipping bad block 0x000b4000
|
||||
2097152 bytes read: OK
|
||||
|
||||
NAND read: device 0 offset 0x300000, size 0x700000
|
||||
7340032 bytes read: OK
|
||||
|
||||
NAND read: device 0 offset 0xa00000, size 0x100000
|
||||
1048576 bytes read: OK
|
||||
## Booting kernel from Legacy Image at 01000000 ...
|
||||
Image Name: Linux-3.2.4-gfd2812f
|
||||
Created: 2012-08-10 7:58:18 UTC
|
||||
Image Type: PowerPC Linux Kernel Image (gzip compressed)
|
||||
Data Size: 1551548 Bytes = 1.5 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
## Loading init Ramdisk from Legacy Image at 02000000 ...
|
||||
Image Name: uboot ext2 ramdisk rootfs
|
||||
Created: 2012-08-11 12:56:37 UTC
|
||||
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
|
||||
Data Size: 6252648 Bytes = 6 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
## Flattened Device Tree blob at 00c00000
|
||||
Booting using the fdt blob at 0xc00000
|
||||
Uncompressing Kernel Image ... OK
|
||||
Loading Ramdisk to 1f932000, end 1ff28868 ... OK
|
||||
Loading Device Tree to 007f8000, end 007ffe1f ... OK
|
||||
Using MPC831x RDB machine description
|
||||
Cannot reserve gpages without hugetlb enabled
|
||||
Linux version 3.2.4-gfd2812f (geekard@kb310) (gcc version 4.7.1 (GCC) ) #4 Fri Aug 10 15:58:17 CST 2012
|
||||
Found initrd at 0xdf932000:0xdff28868
|
||||
bootconsole [udbg0] enabled
|
||||
setup_arch: bootmem
|
||||
mpc831x_rdb_setup_arch()
|
||||
Found FSL PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->0
|
||||
PCI host bridge /pci@e0008500 (primary) ranges:
|
||||
MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000
|
||||
MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
|
||||
IO 0x00000000e0300000..0x00000000e03fffff -> 0x0000000000000000
|
||||
arch: exit
|
||||
Zone PFN ranges:
|
||||
DMA 0x00000000 -> 0x00020000
|
||||
Normal empty
|
||||
Movable zone start PFN for each node
|
||||
early_node_map[1] active PFN ranges
|
||||
0: 0x00000000 -> 0x00020000
|
||||
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
|
||||
Kernel command line: root=/dev/ram rw console=ttyS0,115200 ramdisk_size=19034
|
||||
PID hash table entries: 2048 (order: 1, 8192 bytes)
|
||||
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
|
||||
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
|
||||
Memory: 510412k/524288k available (2992k kernel code, 13876k reserved, 124k data, 59k bss, 152k init)
|
||||
Kernel virtual memory layout:
|
||||
* 0xfffdf000..0xfffff000 : fixmap
|
||||
* 0xfdefb000..0xfe000000 : early ioremap
|
||||
* 0xe1000000..0xfdefb000 : vmalloc & ioremap
|
||||
NR_IRQS:512 nr_irqs:512 16
|
||||
IPIC (128 IRQ sources) at e1000700
|
||||
clocksource: timebase mult[7800001] shift[22] registered
|
||||
pid_max: default: 32768 minimum: 301
|
||||
Mount-cache hash table entries: 512
|
||||
NET: Registered protocol family 16
|
||||
|
||||
PCI: Probing PCI hardware
|
||||
bio: create slab <bio-0> at 0
|
||||
vgaarb: loaded
|
||||
SCSI subsystem initialized
|
||||
Switching to clocksource timebase
|
||||
NET: Registered protocol family 2
|
||||
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
|
||||
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
|
||||
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
|
||||
TCP: Hash tables configured (established 16384 bind 16384)
|
||||
TCP reno registered
|
||||
UDP hash table entries: 256 (order: 0, 4096 bytes)
|
||||
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
|
||||
NET: Registered protocol family 1
|
||||
Trying to unpack rootfs image as initramfs...
|
||||
rootfs image is not initramfs (no cpio magic); looks like an initrd
|
||||
Freeing initrd memory: 6108k freed
|
||||
WDT driver for MPC8xxx initialized. mode:reset timeout=65535 (32 seconds)
|
||||
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
|
||||
msgmni has been set to 1008
|
||||
io scheduler noop registered
|
||||
io scheduler deadline registered
|
||||
io scheduler cfq registered (default)
|
||||
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
|
||||
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16) is a 16550A
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17) is a 16550A
|
||||
brd: module loaded
|
||||
loop: module loaded
|
||||
fe000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x000c01
|
||||
Amd/Fujitsu Extended Query Table at 0x0040
|
||||
Amd/Fujitsu Extended Query version 1.3.
|
||||
number of CFI chips: 1
|
||||
4 ofpart partitions found on MTD device fe000000.flash
|
||||
Creating 4 MTD partitions on "fe000000.flash":
|
||||
0x000000000000-0x000000100000 : "u-boot"
|
||||
0x000000100000-0x000000500000 : "fs"
|
||||
0x000000500000-0x000000700000 : "kernel"
|
||||
0x000000700000-0x000000800000 : "dtb"
|
||||
NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
|
||||
Bad block table found at page 65504, version 0x01
|
||||
Bad block table found at page 65472, version 0x01
|
||||
nand_read_bbt: bad block at 0x0000000a8000
|
||||
nand_read_bbt: bad block at 0x0000000ac000
|
||||
nand_read_bbt: bad block at 0x0000000b0000
|
||||
nand_read_bbt: bad block at 0x0000000b4000
|
||||
6 ofpart partitions found on MTD device e0600000.flash
|
||||
Creating 6 MTD partitions on "e0600000.flash":
|
||||
0x000000000000-0x000000100000 : "U-Boot-NAND"
|
||||
0x000000100000-0x000000900000 : "JFFS2-NAND"
|
||||
0x000000900000-0x000000d00000 : "Ramdisk-NAND"
|
||||
0x000000d00000-0x000001d00000 : "Reserved-NAND"
|
||||
0x000001d00000-0x000001f00000 : "Kernel-NAND"
|
||||
0x000001f00000-0x000002000000 : "DTB-NAND"
|
||||
eLBC NAND device at 0xe0600000, bank 1
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
mdio_bus mdio@e0024520: error probing PHY at address 0
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
fsl-gianfar e0024000.ethernet: eth0: mac: 04:00:00:00:00:0a
|
||||
fsl-gianfar e0024000.ethernet: eth0: Running with NAPI enabled
|
||||
fsl-gianfar e0024000.ethernet: eth0: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0024000.ethernet: eth0: TX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: mac: 04:00:00:00:00:0b
|
||||
fsl-gianfar e0025000.ethernet: eth1: Running with NAPI enabled
|
||||
fsl-gianfar e0025000.ethernet: eth1: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: TX BD ring size for Q[0]: 256
|
||||
i2c /dev entries driver
|
||||
mpc-i2c e0003000.i2c: timeout 1000000 us
|
||||
rtc-ds1307 0-0068: rtc core: registered ds1339 as rtc0
|
||||
TCP cubic registered
|
||||
NET: Registered protocol family 17
|
||||
Registering the dns_resolver key type
|
||||
rtc-ds1307 0-0068: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
|
||||
RAMDISK: gzip image found at block 0
|
||||
VFS: Mounted root (ext2 filesystem) on device 1:0.
|
||||
Freeing unused kernel memory: 152k freed
|
||||
Mounting /proc and /sys
|
||||
Starting the hotplug events dispatcher udevd
|
||||
Synthesizing initial hotplug eveudevd (807): /proc/807/oom_adj is deprecated, please use /proc/807/oom_score_adj instead.
|
||||
nts
|
||||
cfg80211: Calling CRDA to update world regulatory domain
|
||||
cfg80211: World regulatory domain updated:
|
||||
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
|
||||
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
ath5k 0000:00:0e.0: registered as 'phy0'
|
||||
ath5k channel bandwidth setting 10MHz default
|
||||
VANET-debug: ieee80211_register_hw
|
||||
VANET-debug: ieee80211_rate_control_ops_get select minstrel_ht
|
||||
VANET-debug: register vanet network interface
|
||||
VANET-debug: ieee80211_if_add, name: ath5k%d
|
||||
ath5k phy0: Atheros AR5414 chip found (MAC: 0xa5, PHY: 0x61)
|
||||
cfg80211: Calling CRDA for country: US
|
||||
cfg80211: Regulatory domain changed to country: US
|
||||
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
|
||||
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
|
||||
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
|
||||
cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
|
||||
Setting the hostname to mpc8315erdb
|
||||
Mounting filesystems
|
||||
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
|
||||
Starting syslogd and klogd
|
||||
Running sysctl
|
||||
Setting up networking on loopback device:
|
||||
|
||||
Warning: no IPADDR is set, please set this from the ltib
|
||||
config screen, or directly in /etc/rc.d/rc.conf.
|
||||
IP address setup bypassed
|
||||
|
||||
Setting up networking on eth1:
|
||||
|
||||
|
||||
Welcome to the LTIB Embedded Linux Environment
|
||||
|
||||
!!!!! WARNING !!!!!!!
|
||||
|
||||
The default password for the root account is: root
|
||||
please change this password using the 'passwd' command
|
||||
and then edit this message (/etc/issue) to remove this message
|
||||
|
||||
mpc8315erdb login: PHY: mdio@e0024520:01 - Link is Up - 100/Full
|
||||
|
||||
|
||||
Welcome to the LTIB Embedded Linux Environment
|
||||
|
||||
!!!!! WARNING !!!!!!!
|
||||
|
||||
The default password for the root account is: root
|
||||
please change this password using the 'passwd' command
|
||||
and then edit this message (/etc/issue) to remove this message
|
||||
|
||||
mpc8315erdb login: root
|
||||
Password:
|
||||
root
|
||||
Login incorrect
|
||||
mpc8315erdb login: root
|
||||
Password:
|
||||
[root@mpc8315erdb root]# uname -a
|
||||
Linux mpc8315erdb 3.2.4-gfd2812f #4 Fri Aug 10 15:58:17 CST 2012 ppc GNU/Linux
|
||||
[root@mpc8315erdb root]#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
267
Zim/Research/vanet/部署/ramdisk方式/ramdisk部署--通过tftp.txt
Normal file
267
Zim/Research/vanet/部署/ramdisk方式/ramdisk部署--通过tftp.txt
Normal file
@@ -0,0 +1,267 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2012-08-11T21:16:50+08:00
|
||||
|
||||
====== ramdisk部署--通过tftp ======
|
||||
Created Saturday 11 August 2012
|
||||
|
||||
这种部署方式适合开发环境,通过tftp将内核、根文件系统和设备树下载到内存中,然后使用bootm命令从内存中启动。
|
||||
步骤如下:
|
||||
|
||||
U-Boot 2009.03-rc2 (Aug 11 2012 - 13:22:34) MPC83XX
|
||||
|
||||
Reset Status:
|
||||
|
||||
CPU: e300c3, MPC8315, Rev: 1.2 at 400 MHz, CSB: 133.333 MHz
|
||||
Board: Freescale MPC8315ERDB Rev <unknown>
|
||||
I2C: ready
|
||||
DRAM: 512 MB
|
||||
FLASH: 8 MB
|
||||
NAND: 32 MiB
|
||||
PCIE0: No link
|
||||
PCIE1: No link
|
||||
In: serial
|
||||
Out: serial
|
||||
Err: serial
|
||||
Net: eTSEC0
|
||||
Hit any key to stop autoboot: 0
|
||||
=> setenv **serverip** 192.168.2.105
|
||||
=> setenv **ipaddr** 192.168.2.100
|
||||
**=> setenv bootargs **__root=/dev/ram__** rw console=ttyS0,115200 **__ramdisk_size=19034 #注意ramdisk_size要与ltib的输出一致。__
|
||||
**=> tftp 1000000 uImage**
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.105; our IP address is 192.168.2.100
|
||||
Filename 'uImage'.
|
||||
Load address: 0x1000000
|
||||
Loading: #################################################################
|
||||
#########################################
|
||||
done
|
||||
Bytes transferred = 1551612 (17acfc hex)
|
||||
**=> tftp 2000000 rootfs.ext2.gz.uboot**
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.105; our IP address is 192.168.2.100
|
||||
Filename 'rootfs.ext2.gz.uboot'.
|
||||
Load address: 0x2000000
|
||||
Loading: #################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
####################################
|
||||
done
|
||||
Bytes transferred = 6252712 (5f68a8 hex)
|
||||
**=> tftp c00000 mpc8315.dtb**
|
||||
Speed: 100, full duplex
|
||||
Using eTSEC0 device
|
||||
TFTP from server 192.168.2.105; our IP address is 192.168.2.100
|
||||
Filename 'mpc8315.dtb'.
|
||||
Load address: 0xc00000
|
||||
Loading: ##
|
||||
done
|
||||
Bytes transferred = 20000 (4e20 hex)
|
||||
**=> bootm 1000000 2000000 c00000**
|
||||
|
||||
## Booting kernel from Legacy Image at 01000000 ...
|
||||
Image Name: Linux-3.2.4-gfd2812f
|
||||
Created: 2012-08-10 7:58:18 UTC
|
||||
Image Type: PowerPC Linux Kernel Image (gzip compressed)
|
||||
Data Size: 1551548 Bytes = 1.5 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
## Loading init Ramdisk from Legacy Image at 02000000 ...
|
||||
Image Name: uboot ext2 ramdisk rootfs
|
||||
Created: 2012-08-11 12:56:37 UTC
|
||||
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
|
||||
Data Size: 6252648 Bytes = 6 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
## Flattened Device Tree blob at 00c00000
|
||||
Booting using the fdt blob at 0xc00000
|
||||
Uncompressing Kernel Image ... OK
|
||||
Loading Ramdisk to 1f933000, end 1ff29868 ... OK
|
||||
Loading Device Tree to 007f8000, end 007ffe1f ... OK
|
||||
Using MPC831x RDB machine description
|
||||
Cannot reserve gpages without hugetlb enabled
|
||||
Linux version 3.2.4-gfd2812f (geekard@kb310) (gcc version 4.7.1 (GCC) ) #4 Fri Aug 10 15:58:17 CST 2012
|
||||
Found initrd at 0xdf933000:0xdff29868
|
||||
bootconsole [udbg0] enabled
|
||||
setup_arch: bootmem
|
||||
mpc831x_rdb_setup_arch()
|
||||
Found FSL PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->0
|
||||
PCI host bridge /pci@e0008500 (primary) ranges:
|
||||
MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000
|
||||
MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
|
||||
IO 0x00000000e0300000..0x00000000e03fffff -> 0x0000000000000000
|
||||
arch: exit
|
||||
Zone PFN ranges:
|
||||
DMA 0x00000000 -> 0x00020000
|
||||
Normal empty
|
||||
Movable zone start PFN for each node
|
||||
early_node_map[1] active PFN ranges
|
||||
0: 0x00000000 -> 0x00020000
|
||||
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
|
||||
Kernel command line: root=/dev/ram rw console=ttyS0,115200 ramdisk_size=19034
|
||||
PID hash table entries: 2048 (order: 1, 8192 bytes)
|
||||
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
|
||||
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
|
||||
Memory: 510412k/524288k available (2992k kernel code, 13876k reserved, 124k data, 59k bss, 152k init)
|
||||
Kernel virtual memory layout:
|
||||
* 0xfffdf000..0xfffff000 : fixmap
|
||||
* 0xfdefb000..0xfe000000 : early ioremap
|
||||
* 0xe1000000..0xfdefb000 : vmalloc & ioremap
|
||||
NR_IRQS:512 nr_irqs:512 16
|
||||
IPIC (128 IRQ sources) at e1000700
|
||||
clocksource: timebase mult[7800001] shift[22] registered
|
||||
pid_max: default: 32768 minimum: 301
|
||||
Mount-cache hash table entries: 512
|
||||
NET: Registered protocol family 16
|
||||
|
||||
PCI: Probing PCI hardware
|
||||
bio: create slab <bio-0> at 0
|
||||
vgaarb: loaded
|
||||
SCSI subsystem initialized
|
||||
Switching to clocksource timebase
|
||||
NET: Registered protocol family 2
|
||||
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
|
||||
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
|
||||
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
|
||||
TCP: Hash tables configured (established 16384 bind 16384)
|
||||
TCP reno registered
|
||||
UDP hash table entries: 256 (order: 0, 4096 bytes)
|
||||
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
|
||||
NET: Registered protocol family 1
|
||||
Trying to unpack rootfs image as initramfs...
|
||||
rootfs image is not initramfs (no cpio magic); looks like an initrd
|
||||
Freeing initrd memory: 6108k freed
|
||||
WDT driver for MPC8xxx initialized. mode:reset timeout=65535 (32 seconds)
|
||||
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
|
||||
msgmni has been set to 1008
|
||||
io scheduler noop registered
|
||||
io scheduler deadline registered
|
||||
io scheduler cfq registered (default)
|
||||
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
|
||||
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16) is a 16550A
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
console [ttyS0] enabled, bootconsole disabled
|
||||
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17) is a 16550A
|
||||
brd: module loaded
|
||||
loop: module loaded
|
||||
fe000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x000c01
|
||||
Amd/Fujitsu Extended Query Table at 0x0040
|
||||
Amd/Fujitsu Extended Query version 1.3.
|
||||
number of CFI chips: 1
|
||||
4 ofpart partitions found on MTD device fe000000.flash
|
||||
Creating 4 MTD partitions on "fe000000.flash":
|
||||
0x000000000000-0x000000100000 : "u-boot"
|
||||
0x000000100000-0x000000500000 : "fs"
|
||||
0x000000500000-0x000000700000 : "kernel"
|
||||
0x000000700000-0x000000800000 : "dtb"
|
||||
NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
|
||||
Bad block table found at page 65504, version 0x01
|
||||
Bad block table found at page 65472, version 0x01
|
||||
nand_read_bbt: bad block at 0x0000000a8000
|
||||
nand_read_bbt: bad block at 0x0000000ac000
|
||||
nand_read_bbt: bad block at 0x0000000b0000
|
||||
nand_read_bbt: bad block at 0x0000000b4000
|
||||
6 ofpart partitions found on MTD device e0600000.flash
|
||||
Creating 6 MTD partitions on "e0600000.flash":
|
||||
0x000000000000-0x000000100000 : "U-Boot-NAND"
|
||||
0x000000100000-0x000000900000 : "JFFS2-NAND"
|
||||
0x000000900000-0x000000d00000 : "Ramdisk-NAND"
|
||||
0x000000d00000-0x000001d00000 : "Reserved-NAND"
|
||||
0x000001d00000-0x000001f00000 : "Kernel-NAND"
|
||||
0x000001f00000-0x000002000000 : "DTB-NAND"
|
||||
eLBC NAND device at 0xe0600000, bank 1
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
mdio_bus mdio@e0024520: error probing PHY at address 0
|
||||
Freescale PowerQUICC MII Bus: probed
|
||||
fsl-gianfar e0024000.ethernet: eth0: mac: 04:00:00:00:00:0a
|
||||
fsl-gianfar e0024000.ethernet: eth0: Running with NAPI enabled
|
||||
fsl-gianfar e0024000.ethernet: eth0: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0024000.ethernet: eth0: TX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: mac: 04:00:00:00:00:0b
|
||||
fsl-gianfar e0025000.ethernet: eth1: Running with NAPI enabled
|
||||
fsl-gianfar e0025000.ethernet: eth1: RX BD ring size for Q[0]: 256
|
||||
fsl-gianfar e0025000.ethernet: eth1: TX BD ring size for Q[0]: 256
|
||||
i2c /dev entries driver
|
||||
mpc-i2c e0003000.i2c: timeout 1000000 us
|
||||
rtc-ds1307 0-0068: rtc core: registered ds1339 as rtc0
|
||||
TCP cubic registered
|
||||
NET: Registered protocol family 17
|
||||
Registering the dns_resolver key type
|
||||
rtc-ds1307 0-0068: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
|
||||
RAMDISK: gzip image found at block 0
|
||||
VFS: Mounted root (ext2 filesystem) on device 1:0.
|
||||
Freeing unused kernel memory: 152k freed
|
||||
Mounting /proc and /sys
|
||||
Starting the hotplug events dispatcher udevd
|
||||
Synthesizing initial hotplug events
|
||||
udevd (807): /proc/807/oom_adj is deprecated, please use /proc/807/oom_score_adj instead.
|
||||
cfg80211: Calling CRDA to update world regulatory domain
|
||||
cfg80211: World regulatory domain updated:
|
||||
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
|
||||
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
ath5k 0000:00:0e.0: registered as 'phy0'
|
||||
ath5k channel bandwidth setting 10MHz default
|
||||
VANET-debug: ieee80211_register_hw
|
||||
VANET-debug: ieee80211_rate_control_ops_get select minstrel_ht
|
||||
VANET-debug: register vanet network interface
|
||||
VANET-debug: ieee80211_if_add, name: ath5k%d
|
||||
ath5k phy0: Atheros AR5414 chip found (MAC: 0xa5, PHY: 0x61)
|
||||
cfg80211: Calling CRDA for country: US
|
||||
cfg80211: Regulatory domain changed to country: US
|
||||
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
|
||||
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
|
||||
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
|
||||
cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
|
||||
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
|
||||
Setting the hostname to mpc8315erdb
|
||||
Mounting filesystems
|
||||
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
|
||||
Starting syslogd and klogd
|
||||
Running sysctl
|
||||
Setting up networking on loopback device:
|
||||
|
||||
Warning: no IPADDR is set, please set this from the ltib
|
||||
config screen, or directly in /etc/rc.d/rc.conf.
|
||||
IP address setup bypassed
|
||||
|
||||
Setting up networking on eth1:
|
||||
|
||||
|
||||
Welcome to the LTIB Embedded Linux Environment
|
||||
|
||||
!!!!! WARNING !!!!!!!
|
||||
|
||||
The default password for the root account is: root
|
||||
please change this password using the 'passwd' command
|
||||
and then edit this message (/etc/issue) to remove this message
|
||||
|
||||
mpc8315erdb login: PHY: mdio@e0024520:01 - Link is Up - 100/Full
|
||||
|
||||
|
||||
Welcome to the LTIB Embedded Linux Environment
|
||||
|
||||
!!!!! WARNING !!!!!!!
|
||||
|
||||
The default password for the root account is: root
|
||||
please change this password using the 'passwd' command
|
||||
and then edit this message (/etc/issue) to remove this message
|
||||
|
||||
mpc8315erdb login: root
|
||||
Password:
|
||||
[root@mpc8315erdb root]# ls
|
||||
diskinit-1.1.sh recv setIPv6Addr
|
||||
joinvanet send xath5k
|
||||
[root@mpc8315erdb root]#
|
||||
Reference in New Issue
Block a user