请选择 进入手机版 | 继续访问电脑版

海思笔记论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 15768|回复: 2901

OK6410-A开发板成功烧写Linux3.0.1系统

[复制链接]

43

主题

64

帖子

3282

积分

超级版主

Rank: 8Rank: 8

积分
3282
发表于 2014-4-23 21:01:32 | 显示全部楼层 |阅读模式
本帖最后由 hisnote 于 2014-4-23 21:29 编辑

简要步骤如下:
(1)准备好SD卡,在PC上用SD_Writer.exe烧写mmc.bin,这个用于从SD卡启动,这个mnc.bin应该是包含BL1和BL2。
         然后把u-boot.bin(bootloader,这个用于从NAND Flash启动)、zImage(Linux3.0.1系统内核)、rootfs.yaffs2(根文件系统)拷贝到SD卡。
(2)连接开发板的COM1到PC机串口,然后随便选用一个串口软件打开串口;
         建议最好用USB转串口线(在PC机上安装好驱动),然后接上连上一个连接到PC机的USB hub上,这样就不用担心串口线不够长了。
(3)拨动开发板的拨码开关,选择从SD卡启动系统;
(4)启动时,第一时间按空格键终止自动启动,因为要先擦除整个NAND Flash(因为之前安装的是WinCE 6.0),可根据提示进行,按1键是擦写;
(5)再次重启,会自动烧写u-boot.bin(bootloader,即BL2)、zImage(Linux3.0.1系统内核)、rootfs.yaffs2(根文件系统)拷贝到Flash上(1G Bytes);
(6)拨动开发板的拨码开关,选择从NAND Flash启动系统;
(7)第一次启动会提示屏幕校准,用触摸笔按提示点5下就OK了,很快就启动好了,是图形界面哦;
(8)用网线把开发板连接到路由器,设置好IP地址,然后就可以telnet到开发板了,用串口也能调试,但用网口不是更好吗;
(9)开发板已开启WEB、FTP服务,可以连上去看看;

系统启动的打印如下:
U-Boot 1.1.6 (Sep 25 2012 - 10:09:14) for SMDK6410

****************************************
**    u-boot 1.1.6                    **
**    Updated for OK6410  TE6410 Board  **
**    Version (2012-09-23)          **
**    OEM: Forlinx Embedded           **
**    Web: http://www.witech.com.cn   **
****************************************

CPU:     S3C6410 @532MHz
         Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz, Serial = CLKUART (SYNC Mode)
Board:   SMDK6410
DRAM:    256 MB
Flash:   0 kB
NAND:    1024 MB
In:      serial
Out:     serial
Err:     serial
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x200000, size 0x500000
5242880 bytes read: OK
Boot with zImage

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 3.0.1 (root@forlinx) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #439 Sun Sep 23 13:36:30 CST 2012
S3C24XX Clocks, Copyright 2004 Simtec Electronics
camera: no parent clock specified
S3C64XX: PLL settings, A=532000000, M=532000000, E=24000000
S3C64XX: HCLK2=266000000, HCLK=133000000, PCLK=66500000
mout_apll: source is fout_apll (1), rate is 532000000
mout_epll: source is epll (1), rate is 24000000
mout_mpll: source is mpll (1), rate is 532000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
usb-bus-host: source is clk_48m (0), rate is 48000000
uclk1: source is dout_mpll (1), rate is 66500000
spi-bus: source is mout_epll (0), rate is 24000000
spi-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
irda-bus: source is mout_epll (0), rate is 24000000
camera: no parent clock specified
Kernel command line: root=/dev/mtdblock2 rootfstype=yaffs2 init=/linuxrc console=ttySAC0,115200
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: 197612k/197612k available, 64532k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xff600000 - 0xffe00000   (   8 MB)
    vmalloc : 0xd0800000 - 0xf4000000   ( 568 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc0034000   ( 176 kB)
      .text : 0xc0034000 - 0xc0702094   (6969 kB)
      .data : 0xc0704000 - 0xc0746390   ( 265 kB)
       .bss : 0xc07463b4 - 0xc07c3d40   ( 503 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:246 nr_irqs:246 246
VIC @f4000000: id 0x00041192, vendor 0x41
VIC @f4010000: id 0x00041192, vendor 0x41
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 528.79 BogoMIPS (lpj=2643968)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
hw perfevents: enabled with v6 PMU driver, 3 counters available
devtmpfs: initialized
NET: Registered protocol family 16
hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
s3c64xx_dma_init: Registering DMA channels
PL080: IRQ 73, at d0804000, channels 0..8
PL080: IRQ 74, at d0806000, channels 8..16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x58/0x124()
---[ end trace da227214a82491b7 ]---
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c.0: slave address 0x10
s3c-i2c s3c2440-i2c.0: bus frequency set to 64 KHz
s3c-i2c s3c2440-i2c.0: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.23.
cfg80211: Calling CRDA to update world regulatory domain
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 named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
audit: initializing netlink socket (disabled)
type=2000 audit(0.270:1): initialized
msgmni has been set to 385
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
LCD TYPE :: LTE480WV will be initialized
Console: switching to colour frame buffer device 60x34
fb0: s3cfb frame buffer device
fb1: s3cfb frame buffer device
fb2: s3cfb frame buffer device
fb3: s3cfb frame buffer device
s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 16) is a S3C6400/10
s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 20) is a S3C6400/10
s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 24) is a S3C6400/10
s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 28) is a S3C6400/10
Hello, world
NAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron NAND 2GiB 1,8V 8-bit)
Creating 4 MTD partitions on "NAND 2GiB 1,8V 8-bit":
0x000000000000-0x000000200000 : "Bootloader"
0x000000200000-0x000000700000 : "Kernel"
0x000000700000-0x00000cf00000 : "User"
0x00000cf00000-0x000040000000 : "File System"
vcan: Virtual CAN interface driver
slcan: serial line CAN interface driver
slcan: 10 dynamic interface channels.
CAN device driver interface
mcp251x: setup gpio pins CS and External Int
mcp2515 spi1.0: MCP251x didn't enter in conf mode after reset
mcp2515 spi1.0: Probe failed
mcp2515 spi1.0: probe failed
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
dm9000 Ethernet Driver, V1.31
eth0: dm9000a at d081c000,d0c00004 IRQ 108 MAC: 08:90:00:a0:90:90 (platform data)
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
usbcore: registered new interface driver rt73usb
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 79, io mem 0x74300000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 3.0.1 ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
dummy_hcd dummy_hcd: USB Host+Gadget Emulator, driver 02 May 2005
dummy_hcd dummy_hcd: Dummy host controller
dummy_hcd dummy_hcd: new USB bus registered, assigned bus number 2
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: Dummy host controller
usb usb2: Manufacturer: Linux 3.0.1 dummy_hcd
usb usb2: SerialNumber: dummy_hcd
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
input: s3c-keypad as /devices/platform/s3c-keypad/input/input1
S3C Touchscreen driver, (c) 2008 Samsung Electronics
S3C TouchScreen got loaded successfully : 12 bits
input: S3C TouchScreen as /devices/virtual/input/input2
s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling
s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc0
s3c-rtc s3c64xx-rtc: warning: invalid RTC value so initializing it
i2c /dev entries driver
Linux video capture interface: v2.00
gspca: main v2.10.0 registered
usbcore: registered new interface driver benq
benq: registered
usbcore: registered new interface driver conex
conex: registered
usbcore: registered new interface driver cpia1
cpia1: registered
usbcore: registered new interface driver etoms
etoms: registered
usbcore: registered new interface driver finepix
finepix: registered
usbcore: registered new interface driver jeilinj
jeilinj: registered
usbcore: registered new interface driver mars
mars: registered
usbcore: registered new interface driver mr97310a
mr97310a: registered
usbcore: registered new interface driver ov519
ov519: registered
usbcore: registered new interface driver ov534
ov534: registered
usbcore: registered new interface driver ov534_9
ov534_9: registered
usbcore: registered new interface driver pac207
pac207: registered
usbcore: registered new interface driver pac7302
pac7302: registered
usbcore: registered new interface driver pac7311
pac7311: registered
usbcore: registered new interface driver sn9c2028
sn9c2028: registered
usbcore: registered new interface driver sn9c20x
sn9c20x: registered
usbcore: registered new interface driver sonixb
sonixb: registered
usbcore: registered new interface driver sonixj
sonixj: registered
usbcore: registered new interface driver spca500
spca500: registered
usbcore: registered new interface driver spca501
spca501: registered
usbcore: registered new interface driver spca505
spca505: registered
usbcore: registered new interface driver spca506
spca506: registered
usbcore: registered new interface driver spca508
spca508: registered
usbcore: registered new interface driver spca561
spca561: registered
usbcore: registered new interface driver spca1528
spca1528: registered
usbcore: registered new interface driver sq905
sq905: registered
usbcore: registered new interface driver sq905c
sq905c: registered
usbcore: registered new interface driver sq930x
sq930x: registered
usbcore: registered new interface driver sunplus
sunplus: registered
usbcore: registered new interface driver stk014
stk014: registered
usbcore: registered new interface driver stv0680
stv0680: registered
usbcore: registered new interface driver t613
t613: registered
usbcore: registered new interface driver tv8532
tv8532: registered
usbcore: registered new interface driver vc032x
vc032x: registered
usbcore: registered new interface driver zc3xx
zc3xx: registered
usbcore: registered new interface driver ALi m5602
ALi m5602: registered
usbcore: registered new interface driver STV06xx
STV06xx: registered
gspca_gl860: driver startup - version 0.9d10
usbcore: registered new interface driver gspca_gl860
gspca_gl860: driver registered
s3c-fimc: controller 0 registered successfully
s3c-fimc: controller 1 registered successfully
s3c-fimc: info ov965x_init
cym s3c_mfc_mememap: addr:5daf9000 size:1138688
S3C6400 MFC Driver, (c) 2007 Samsung Electronics
S3C PostProcessor Driver v3.12, (c) 2009 Samsung Electronics
S3C6410 TV encoder Driver, (c) 2008 Samsung Electronics
S3C6410 TV scaler Driver, (c) 2008 Samsung Electronics
S3C Rotator Driver, (c) 2008 Samsung Electronics
s3c_rotator_probe called
S3C JPEG Driver, (c) 2007 Samsung Electronics
s3c_g2d_probe called
s3c_g2d_probe Success
S3C G3D Driver, (c) 2007-2009 Samsung Electronics
S3C CMM Driver, (c) 2008 Samsung Electronics
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: mmc_bus (24000000 Hz)
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 2: mmc_bus (24000000 Hz)
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
asoc: wm9713-hifi <-> samsung-ac97 mapping ok
ALSA device list:
  #0: smdk6410
TCP cubic registered
NET: Registered protocol family 17
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)
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
s3c-rtc s3c64xx-rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem) on device 31:2.
devtmpfs: mounted
Freeing init memory: 176K
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
Try to bring eth0 interface up......dm9000 dm9000.0: eth0: link down
Done
                                 
Starting Qtopia2, please waiting...
Please press Enter to activate this console. touch...
[root@FORLINX6410]# ls
bin         lib         mnt         proc        sdcard      udisk
dev         linuxrc     nfs.txt     root        sys         usr
etc         lost+found  opt         sbin        tmp         var
[root@FORLINX6410]# mount
rootfs on / type rootfs (rw)
/dev/root on / type yaffs2 (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=98804k,nr_inodes=24701,mode=755)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
none on /dev type ramfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=622)
tmpfs on /dev/shm type tmpfs (rw,relatime)
none on /tmp type ramfs (rw,relatime)
none on /var type ramfs (rw,relatime)
/dev/mtdblock3 on /mnt type yaffs2 (rw,relatime)
[root@FORLINX6410]# df -h
Filesystem                Size      Used Available UseMounted on
/dev/root               200.0M    124.5M     75.5M  62/
tmpfs                    96.6M         0     96.6M   0/dev/shm
/dev/mtdblock3          817.0M      5.0M    812.0M   1/mnt
[root@FORLINX6410]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00080000 "Bootloader"
mtd1: 00500000 00080000 "Kernel"
mtd2: 0c800000 00080000 "User"
mtd3: 33100000 00080000 "File System"    // 这里名字和mtd2的搞反了
[root@FORLINX6410]# cat /proc/partitions
major minor  #blocks  name
  31        0       2048 mtdblock0
  31        1       5120 mtdblock1
  31        2     204800 mtdblock2
  31        3     836608 mtdblock3
[root@FORLINX6410]#

可以看出,NandFlash被划分成四个分区,mtdblock0是Bootloader(存放u-boot.bin),mtdblock1是Kernel(存放zImage),mtdblock2是File System(存放rootfs.yaffs2),mtdblock2实际最后是被mount成/文件系统。剩下的mtdblock3分区被mount成/mnt,可以看出还有817M空间可用。

但flash老写会影响使用寿命,网络可用后,可以采用NFS和SFTP来调试Kernel、文件系统和应用程序,速度也比写到flash上快,这个今后再发帖。
这个帖就到这,上个图,板子Linux3.0.1系统起来后就是这个样子:
IMG_20140418_231330.jpg
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|海思笔记论坛 ( 苏ICP备13021400号|申请友链

GMT+8, 2018-5-26 06:29 , Processed in 0.291853 second(s), 31 queries .

Powered by Discuz! X3.1

© 2014 海思笔记论坛.

快速回复 返回顶部 返回列表