[U-Boot-Users] u-boot-1.1.6:Read/Write flash on Montavista Kernel prompt

Binay Kumar binay.kumar14 at gmail.com
Mon Oct 8 13:55:57 CEST 2007


Hi All,

I cross-compiled u-boot-1.1.6 with patch for BMW board(MPC-8245) as
well as Montavista Kernel(linux 2.6.10_mv1401).It's working fine.Now I
want to develop a program for flash read/write on kernel prompt not on
u-boot prompt.Is it possible ?? If yes Pls. help me in this
regard.Waiting for your reply.

--------------Boot Message----------------

U-Boot 1.1.6 (Oct  4 2007 - 17:24:54)

CPU:   MPC8245 Revision 1.4 at 198.002 MHz: 16 kB I-Cache 16 kB D-Cache
Board: BMW MPC8245/KAHLUA2 - CHRP (MAP B)
HELLO BINAY........
Built: Oct  4 2007 at 17:24:57
Local Bus at 99.001 MHz
DRAM:  256 MB
FLASH: 512 kB
In:    serial
Out:   serial
Err:   serial
DOC:   No DiskOnChip found
=>printenv
bootdelay=5
baudrate=9600
ethaddr=00:10:18:82:40:99
bootargs=root=/dev/nfs rw
nfsroot=192.168.11.6:/opt/montavista/pro/devkit/ppc/82xx/target/
nfsaddrs=192.168.11.32:192.168.11.6
filesize=3007b1
fileaddr=200000
netmask=255.255.255.0
ipaddr=192.168.11.32
serverip=192.168.11.6
gatewayip=192.168.11.1
stdin=serial
stdout=serial
stderr=serial

Environment size: 339/2044 bytes.

=>tftp 200000 zImage.ppcboot

Broadcom BCM5703 1000Base-T: bus 0, device 13, function 0: MBAR=0x80100000
BCM570x PCI Memory base address @0x80100000
eth0:Broadcom BCM5703 1000Base-T: 10 Mbps half duplex link up, flow control OFF
eth0: Broadcom BCM5703 1000Base-T @0x80100000,node addr 001018824099
eth0: BCM5700 with Broadcom BCM5703 Integrated Copper transceiver found
eth0: 32-bit PCI 33MHz, MTU: 1500,Rx Checksum OFF
TFTP from server 192.168.11.6; our IP address is 192.168.11.32
Filename 'zImage.ppcboot'.
Load address: 0x200000
Loading: #################################################################
         #################################################################
         #################################################
done
Bytes transferred = 912980 (dee54 hex)

eth0:Broadcom BCM5703 1000Base-T,HALT,POWER DOWN,done - offline.

=>bootm 200000
## Booting image at 00200000 ...
   Image Name:   Broadcom BMW Board
   Created:      2007-10-01   7:20:37 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    912916 Bytes = 891.5 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
Linux version 2.6.10_mvl401-8272ads (root at localhost.localdomain) (gcc
version 37Broadcom BMW CPU card
Built 1 zonelists
Kernel command line: root=/dev/nfs rw
nfsroot=192.168.11.6:/opt/montavista/pro/6OpenPIC Version 1.2 (1 CPUs
and 22 IRQ sources) at fc040000
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 257408k available (1448k kernel code, 368k data, 316k init, 0k highmem)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
spawn_desched_task(00000000)
desched cpu_callback 3/00000000
ksoftirqd started up.
desched cpu_callback 2/00000000
desched thread 0 started up.
NET: Registered protocol family 16
PCI: Probing PCI hardware
PCI: Cannot allocate resource region 1 of device 0000:00:00.0
Generic RTC Driver v1.07
Macintosh non-volatile memory driver v1.1
Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
ttyS0 at MMIO 0x0 (irq = 20) is a 16550A
ttyS1 at MMIO 0x0 (irq = 21) is a 16550A
io scheduler noop registered
io scheduler deadline registered
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
Broadcom Gigabit Ethernet Driver bcm5700 with Broadcom NIC Extension
(NICE) ver)eth0: Broadcom BCM5703 1000Base-T found at mem bfff0000,
IRQ 1, node addr 001019eth0: Broadcom BCM5703 Integrated Copper
transceiver found
eth0: Scatter-gather ON, 64-bit DMA ON, Tx Checksum ON, Rx Checksum
ON, 802.1Q Nelevator: using deadline as default io scheduler
bmw flash device: 200000 at ffe00000
NET: Registered protocol family 2
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 32768)
NET: Registered protocol family 1
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
      device=eth0, addr=192.168.11.32, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.11.32, domain=, nis-domain=(none),
     bootserver=192.168.11.6, rootserver=192.168.11.6, rootpath=
Looking up port of RPC 100003/2 on 192.168.11.6
bcm5700: eth0 NIC Link is UP, 10 Mbps half duplex
Looking up port of RPC 100005/1 on 192.168.11.6
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 316k init
INIT: version 2.85 booting
udev requires hotplug support, not started.
Activating swap...done.
Remounting root filesystem...done.
Calculating module dependencies
Loading modules:
Checking all file systems: fsck
fsck 1.35 (28-Feb-2004)
Mounting local filesystems: mount nothing was mounted
Setting up IP spoofing protection: rp_filter.
Disable TCP/IP Explicit Congestion Notification: done.
Starting network interfaces: /sbin/ifup: interface lo already configured
done.
Kernel hotplug support not enabled.
Starting portmap daemon: portmap.
Cleaning: /tmp /var/lock /var/run done.
Setting pseudo-terminal access permissions...done.
Updating /etc/motd...done.
INIT: Entering runlevel: 3
Starting system log daemon: syslogd klogd.
Starting NFS common utilities: statd lockdlockdsvc: Function not implemented
.
Starting internet superserver: inetd.
Starting MontaVista target tools daemon: mvltdmvltd version 2.1
MontaVista Soft.mvltd[164]: can't send broadcast message: Network is
unreachable
.
MontaVista(R) Linux(R) Professional Edition 4.0.1 (0502020)

192.168.11.32 login: root
Last login: Thu Jan  1 00:00:36 1970 on console
Linux 192.168.11.32 2.6.10_mvl401-8272ads #1 Thu Sep 27 11:15:55 IST
2007 ppc Gx
Welcome to MontaVista(R) Linux(R) Professional Edition 4.0.1 (0502020).

root at 192.168.11.32:~#

My question is:On kernel prompt I want to read/Write flash?Is it
possible?If yes can you all give me some hint?

Thanks In advance
Binay




More information about the U-Boot mailing list