板上有烧好的U-BOOT,开起电源打印以下信息:
Texas Instruments X-Loader 1.44 (Jun 24 2010 - 15:48:14)
Starting OS Bootloader...
U-Boot 2009.11 ( 9月 29 2010 - 14:33:05)
OMAP34xx/35xx-GP ES1.0, CPU-OPP2 L3-165MHz
AM3517EVM Board + LPDDR/NAND
I2C: ready
DRAM: 256 MB
NAND: 512 MiB
In: serial
Out: serial
Err: serial
Die ID #0dcc0000000000000155dc1402014022
Net: davinci_emac_initialize
Ethernet PHY: GENERIC @ 0x00
DaVinci EMAC
Hit any key to stop autoboot: 0
AM3517_EVM #
证明U-BOOT已经启来了,为了适合我的要求,修改了一些参数,看看修改后的参数:
AM3517_EVM # print
baudrate=115200
bootfile=uImage
loadaddr=0x82000000|115200 8N1 | NOR | Minicom 2.3 | VT102 | 离线 console=ttyS2,115200n8
mmcargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
nandargs=setenv bootargs console=${console} root=/dev/mtdblock4 rw rootfstype=jffs2
loadbootscript=fatload mmc 0 ${loadaddr} boot.scr
bootscript=echo Running bootscript from mmc ...; source ${loadaddr}
loaduimage=fatload mmc 0 ${loadaddr} uImage
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${loadaddr}
nandboot=echo Booting from nand ...; run nandargs; nand read ${loadaddr} 280000 400000; bootm ${loadaddr}
dieid#=0dcc0000000000000155dc1402014022
ethact=DaVinci EMAC
old_bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandi
rootpath=/work/rootfs
ethaddr=92:EF:10:78:87:BA
gateway=192.168.0.1
myboot=setenv bootargs root=/dev/nfs rw nfsroot=192.168.0.101:/work/rootfs ip=192.168.0.102:192.168.0.101:192.168.0.1:255.255.255.0:::off console=ttyS2,11528
mybootcmd=run mryboot;nand read 0x82000000 280000 400000;bootm 0x82000000
bootargs=noinitrd init=/linuxrc root=/dev/nfs rw nfsroot=192.168.0.1:/home/mry/nfs/fs ip=192.168.0.2:192.168.0.1:255.255.255.0 console=ttyS2,115200n8
filesize=B
fileaddr=82000000
netmask=255.255.255.0
mrybootcmd=run mryboot;tftp 0x82000000 uImage;bootm 0x82000000
bootcmd=run mrybootcmd
bootdelay=4
gatewayip=192.168.1.1
ipaddr=192.168.1.11
serverip=192.168.1.5
mryboot=setenv bootargs noinitrd init=/linuxrc root=/dev/nfs rw nfsroot=192.168.1.5:/home/mry/nfs/fs ip=192.168.1.11:192.168.1.5:192.168.1.1:255.255.255.0 c8
stdin=serial
stdout=serial
stderr=serial
Environment size: 1693/131068 bytes
本人用的是minicom,参数显示不全,大概意思是:
bootcmd=run mrybootcmd
mrybootcmd=run mryboot;tftp 0x82000000 uImage;bootm 0x82000000
mryboot=setenv bootargs noinitrd init=/linuxrc root=/dev/nfs rw nfsroot=192.168.1.5:/home/mry/nfs/fs ip=192.168.1.11:192.168.1.5:192.168.1.1:255.255.255.0 c8
通过tftp协议从主机(192.168.1.5)下载内核景象(uImage)到ARM以总线地址0x82000000为开始的地方(RAM),并从该地方启动LINUX,当然,这些是需要在主机方的TFTP服务端的支持的(把uImage放在tftp文件夹下)
设置linux的启动参数为nfs挂载文件系统,这也需要在主机上开启NFS服务,和放置好文件系统;文件系统放在/home/mry/nfs/fs下
看看启动过程吧:
AM3517_EVM # boot
Using DaVinci EMAC device
TFTP from server 192.168.1.5; our IP address is 192.168.1.11
Filename 'uImage'.
Load address: 0x82000000
Loading: T T #################################################################
#################################################################
#####################################T #####T #######################
#################################################################
#####################################################T ############
#################################################################
#################################################################
#################################################################
#####
done
Bytes transferred = 2683740 (28f35c hex)
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-2.6.32
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2683676 Bytes = 2.6 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux..........................................................................................................................................
Linux version 2.6.32 (root@seed) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #189 Tue Dec 7 12:48:33 CST 2010
CPU: ARMv7 Processor [411fc087] revision 7 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OMAP3517/AM3517 EVM
Memory policy: ECC disabled, Data cache writeback
AM3517 ES1.0 (l2cache iva sgx neon isp )
SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x100000
Reserving 4194304 bytes SDRAM for VRAM
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
Kernel command line: noinitrd init=/linuxrc root=/dev/nfs rw nfsroot=192.168.1.5:/home/mry/nfs/fs ip=192.168.1.11:192.168.1.5:192.168.1.1:255.255.255.0 cons8
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 249984KB available (4844K code, 441K data, 168K init, 0K highmem)
Hierarchical RCU implementation.
NR_IRQS:368
Clocking rate (Crystal/Core/MPU): 26.0/332/500 MHz
GPMC revision 5.0
IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
OMAP GPIO hardware version 2.5
OMAP clockevent source: GPTIMER1 at 32768 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 499.92 BogoMIPS (lpj=1949696)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
mux: Could not set signal i2c2_scl
mux: Could not set signal i2c2_sda
mux: Could not set signal i2c3_scl
mux: Could not set signal i2c3_sda
Display option not selected
OMAP DMA hardware revision 4.0
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c_omap i2c_omap.1: bus 1 rev3.12 at 400 kHz
regulator: VDCDC1: 1200 mV normal
regulator: VDCDC2: 3300 mV normal
regulator: VDCDC3: 1800 mV normal
regulator: LDO1: 1800 mV normal
regulator: LDO2: 3300 mV normal
i2c_omap i2c_omap.2: bus 2 rev3.12 at 400 kHz
pca953x 2-0021: failed reading register
pca953x: probe of 2-0021 failed with error -5
i2c_omap i2c_omap.3: bus 3 rev3.12 at 400 kHz
tca6416-keypad 3-0020: failed reading register
tca6416-keypad: probe of 3-0020 failed with error -5
pca953x 3-0021: failed reading register
pca953x: probe of 3-0021 failed with error -5
Switching to clocksource 32k_counter
musb_hdrc: version 6.0, cppi4.1-dma, otg (peripheral+host), debug=0
AM3517 OTG revision 4ea41001, PHY f0036a2, control 00
musb_hdrc: USB OTG mode controller at d0810000 using DMA, IRQ 71
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
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 udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
AM3517 Linux PSP version 03.00.01.06 (AM3517EVM)
NetWinder Floating Point Emulator V0.97 (double precision)
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
yaffs Dec 7 2010 12:39:13 Installing.
msgmni has been set to 488
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
OMAP DSS rev 2.0
OMAP DISPC rev 3.0
OMAP VENC rev 2
OMAP DSI rev 1.0
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
serial8250.2: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
console [ttyS2] enabled
brd: module loaded
loop: module loaded
omap2-nand driver initializing
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung omap2-nand.0)
NAND bus width 16 instead 8 bit
No NAND device found!!!
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
Creating 5 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000080000 : "xloader-nand"
0x000000080000-0x000000240000 : "uboot-nand"
0x000000240000-0x000000280000 : "params-nand"
0x000000280000-0x000000780000 : "linux-nand"
0x000000780000-0x000020000000 : "jffs2-nand"
vcan: Virtual CAN interface driver
CAN device driver interface
TI High End CAN Controller Driver 0.7
failed to get can_stb
ti_hecc ti_hecc.1: device registered (reg_base=d0870000, irq=24)
usbcore: registered new interface driver hwa-rc
usbmon: debugfs is not available
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
~~~~~~~~~~~~~~~~~~~~~0!!!!!!!!!!!~~~~~~~~~`
~~~~~~~~~~~~~~~~~~~~~1!!!!!!!!!!!~~~~~~~~~`
ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
usbcore: registered new interface driver hwa-hc
usbcore: registered new interface driver wusb-cbaf
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC ea:cf:26:63:88:88
usb0: HOST MAC 0a:70:15:63:dc:18
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
mice: PS/2 mouse device common for all mice
tsc2003 init
tsc2003 probe
tsc2003 begin
GPIO176 irqqq :336
input: tsc2003 as /class/input/input0
tsc2003 x:3056 y:3200 z:2096 bate:4080
rtc-s35390a 1-0030: error resetting chip
rtc-s35390a: probe of 1-0030 failed with error -5
Linux video capture interface: v2.00
vpfe_init
vpfe-capture vpfe-capture: v4l2 device registered
vpfe-capture vpfe-capture: video device registered
tvp514x 3-005c: tvp514x 3-005c decoder driver registered !!
vpfe-capture vpfe-capture: v4l2 sub device tvp5146 registered
vpfe_register_ccdc_device: DM6446 CCDC
DM6446 CCDC is registered with vpfe.
OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
mmci-omap-hs mmci-omap-hs.1: err -16 configuring card detect
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI AD73311
Asahi Kasei AK4104 ALSA SoC Codec Driver
No device for DAI AK4535
Cirrus Logic CS4270 ALSA SoC Codec Driver
No device for DAI PCM3008 HiFi
No device for DAI SSM2602
No device for DAI tlv320aic23
No device for DAI tlv320aic3x
No device for DAI UDA134X
No device for DAI WM8510 HiFi
No device for DAI WM8728
No device for DAI WM8750
No device for DAI WM8971
usb 1-1: new high speed USB device using ehci-omap and address 2
No device for DAI WM8990 ADC/DAC Primary
No device for DAI omap-mcbsp-dai-0
No device for DAI omap-mcbsp-dai-1
No device for DAI omap-mcbsp-dai-2
No device for DAI omap-mcbsp-dai-3
No device for DAI omap-mcbsp-dai-4
OMAP3517 / AM3517 EVM SoC init
asoc: tlv320aic3x <-> omap-mcbsp-dai-0 mapping ok
Failed to add route IN1L->LINE1L
dapm: tlv320aic3x: configuring unknown pin Line Out
ALSA device list:
#0: am3517evm (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
Power Management for TI OMAP3.
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
Console: switching to colour frame buffer device 100x30
omapdss DPI: Could not find exact pixel clock. Requested 35087 kHz, got 35086 kHz
davinci_emac_probe: using random MAC addr: 6e:16:26:a8:2e:4b
emac-mii: probed
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
omapdss DPI error: display already enabled
omap_vout omap_vout: 'lcd' Display already enabled
omapdss DPI error: display already enabled
omap_vout omap_vout: 'lcd' Display already enabled
omap_vout omap_vout: Buffer Size = 3686400
omap_vout omap_vout: : registered and initialized video device 1
omap_vout omap_vout: Buffer Size = 3686400
omap_vout omap_vout: : registered and initialized video device 2
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, id=22161a)
Sending DHCP and RARP requests .
PHY: ffffffff:00 - Link is Up - 100/Full
.., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.1.8
IP-Config: Complete:
device=eth0, addr=192.168.1.8, mask=255.255.255.0, gw=192.168.1.1,
host=192.168.1.8, domain=, nis-domain=(none),
bootserver=0.0.0.0, rootserver=192.168.1.5, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.5
Looking up port of RPC 100005/1 on 192.168.1.5
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 168K
Please press Enter to activate this console.
[root@MY2440 /]#
正如我们期望的的,系统启动起来了,虽然在下载uImage的时候不是一封风顺,但是总会成功的,呵呵
看一些系统的基本信息:
[root@MY2440 /proc]# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 9.4G 6.3G 2.6G 71% /
none 122.2M 0 122.2M 0% /tmp
none 122.2M 0 122.2M 0% /var
[root@MY2440 /proc]# cat cpuinfo
Processor : ARMv7 Processor rev 7 (v7l)
BogoMIPS : 499.92
Features : swp half thumb fastmult vfp edsp neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x1
CPU part : 0xc08
CPU revision : 7
Hardware : OMAP3517/AM3517 EVM
Revision : 0020
Serial : 0000000000000000
[root@MY2440 /proc]# uname -a
Linux MY2440 2.6.32 #189 Tue Dec 7 12:48:33 CST 2010 armv7l GNU/Linux
总结:不做BSP(在次厂家已做好了这些),系统的启动还是比较容易的,如果要自己搞bsp,那么难度就不是这么一点了,并不是说只有作bsp的人牛逼,术业有专攻,合理分配而已