织梦CMS - 轻松建站从此开始!

罗索

u-boot-1.1.6及Linux-2.6.22到arm platform(s3c2440)

jackyhwei 发布于 2010-11-12 14:27 点击:次 
更新u-boot 为了更新u-boot,需要启动tftp服务器.需要设置PC机的网关,IP等. 如下: 在Federo 4.0中点击运用程序-系统设置-网络, 点击设备Tab,双击Ethernet,选择静态设置IP
TAG:

  • 更新u-boot

为了更新u-boot,需要启动tftp服务器.需要设置PC机的网关,IP等. 如下:

在Federo 4.0中点击运用程序->系统设置->网络,点击设备Tab,双击Ethernet,选择静态设置IP,设定
        IP: 192.168.1.2
       掩码: 255.255.255.0
        网关: 192.168.1.1
保存后,则点击激活,则在u-boot下可以ping通192.168.1.2

         [ makethyme@localhost.com ]# ping 192.168.1.2
          testid = 57
          rBWSCON 0x22111110
          rBWSCON 0x2211D110
          rBANKCON3 0x00001F7C
         testid = 630e
         host 192.168.1.2 is alive

先将u-boot下载到RAM中:

        [ makethyme@localhost.com ]# tftp 0x33000000 u-boot.bin
         testid = 630e
        rBWSCON 0x2211D110
        rBWSCON 0x2211D110
        rBANKCON3 0x00001F7C
        testid = 630e
       TFTP from server 192.168.1.2; our IP address is 192.168.1.8
       Filename 'u-boot.bin'.
       Load address: 0x33000000
       Loading: #########################
      done
      Bytes transferred = 125156 (1e8e4 hex)

再使用nand erase/nand write将u-boot烧写到flash中。

      [ makethyme@localhost.com ]# nand erase 0x0 0x20000
      in do_nand
      NAND erase: device 0 offset 0, size 131072 ...
      OK

     [ makethyme@localhost.com ]# nand write 0x33000000 0x0 0x20000
      in do_nand
      addr = 33000000, off = 0, size = 20000

      NAND write: device 0 offset 0, size 131072 ...
      using nand_legacy_rw
      131072 bytes written: OK

      [ makethyme@localhost.com ]# reset

  • 环境变量的修改及保存

[ makethyme@localhost.com ]# setenv bootargs "console=ttySAC0 initrd=0x30800000,0x440000 root=/dev/ram init=/"

[ makethyme@localhost.com ]# saveenv
Saving Environment to NAND...
begin erase...
Erasing Nand...Writing to Nand... done

[ makethyme@localhost.com ]# reset

[ makethyme@localhost.com ]# printenv bootargs
bootargs=console=ttySAC0 initrd=0x30800000,0x440000 root=/dev/ram init=/linuxrc

  • 下载Linux Image及ramdisk

当移植完毕Linux后,将zImage拷贝到u-boot/tools下,使用工具用工具mkimage生成uImage

mkimage -A arm -O linux -T kernel -C none -a 30008000 -e 30008000 -n linux-2.6.22 -d zImage uImage

然后将zImage拷贝到tftp的制定目录/tftpboot下

[ makethyme@localhost.com ]# tftp 0x33000000 uImage

 rBWSCON 0x22111110
 rBWSCON 0x2211D110
rBANKCON3 0x00001F7C
testid = 630e
TFTP from server 192.168.1.2; our IP address is 192.168.1.8
Filename 'uImage_7_29'.
Load address: 0x33000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################################################
done
Bytes transferred = 1591068 (18471c hex)

[ makethyme@localhost.com ]# tftp 0x30800000 ramdisk.gz

 rBWSCON 0x2211D110
 rBWSCON 0x2211D110
rBANKCON3 0x00001F7C
testid = 630e
TFTP from server 192.168.1.2; our IP address is 192.168.1.8
Filename 'ramdisk.gz'.
Load address: 0x30800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #############################
done
Bytes transferred = 1476961 (168961 hex)

  • 运行linux

[ makethyme@localhost.com ]# bootm 0x33000000
## Booting image at 33000000 ...
   Image Name:   linux-2.6.22
   Created:      2008-08-25  15:30:43 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1590612 Bytes =  1.5 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
OK
No initrd
## Transferring control to Linux (at address 30008000) ...

Starting kernel ...

We already in linux
Uncompressing Linux.....................................................................we  are in  start_kernel
Linux version 2.6.22.5 (root@localhost.localdomain) (gcc version 3.4.5) #77 PREEMPT Mon8CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists.  Total pages: 16256
Kernel command line: console=ttySAC0 initrd=0x30800000,0x440000 root=/dev/ram init=/lincirq: clearing pending ext status 00000200
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 57216KB available (2792K code, 376K data, 124K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C2440: Clock Support, DVS off
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 4352K
NetWinder Floating Point Emulator V0.97 (double precision)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
s3c2410-lcd s3c2410-lcd: invalid bpp 16
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: module loaded
nbd: registered device at major 43
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=3, 30ns Twrph0=7 70ns, Twrph1=3 30ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00100000 : "bootloader"
mtd: Giving out device 0 to bootloader
0x00100000-0x00400000 : "kernel"
mtd: Giving out device 1 to kernel
0x00400000-0x02c00000 : "root"
mtd: Giving out device 2 to root
0x02c00000-0x04000000 : "user"
mtd: Giving out device 3 to user
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 390 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 124K
Bummer, could not run '/etc/init.d/rcS': No such file or directory

Please press Enter to activate this console.
/ $

/ $ cd bin
/ $ cd bin
/bin $ ls
addgroup       dmesg          iplink         mt             sh
adduser        dumpkmap       iproute        mv             sleep
ash            echo           iptunnel       netstat        stat
bbconfig       ed             kill           nice           stty
busybox        egrep          lash           pidof          su
cat            false          linux32        ping           sync
catv           fdflush        linux64        ping6          tar
chgrp          fgrep          ln             pipe_progress  touch
chmod          getopt         login          printenv       true
chown          grep           ls             ps             umount
cp             gunzip         mkdir          pwd            uname
cpio           gzip           mknod          rm             uncompress
date           hostname       mktemp         rmdir          usleep
dd             hush           more           rpm            vi
delgroup       ip             mount          run-parts      watch
deluser        ipaddr         mountpoint     sed            zcat
df             ipcalc         msh            setarch
/bin $df                  ipcalc         msh            setarch
/bin $

(makethyme)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/201011/10454.html]
本文出处:CSDN博客 作者:makethyme
顶一下
(1)
100%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容