RealTek1073方案采用集成了MIPS处理单元和多媒体解码单元的1073DD处理器,使用linux作为其OS,构成了一个完整的嵌入式应用系统。
本人购入MP800H已有数月,从工艺水平来看,MP800H还是不错的,打开机盖(小心你的保修标贴*_*)可以看到PCB布局合理,印刷质量好,主芯片1073DD处理器覆有铝片散热,整个内部空间气流通畅。
在主板上可以看到一个6针接口,接口旁标有“GND RX0 TX0 RX1 TX1 3V3”字样。其中:
“GND”是接地
“RX0”是接收端0
“TX0”是发送端0
“RX1”是接收端1
“TX1”是发送端1
“3V3”是3.3V电源供电接口
鉴于一般的嵌入式系统只有“GND TX RX VCC”四个接口,所以MP800H的第二组数据接口“TX1 RX1”应当是空置的(后文已证实)。
先普及一下串口通讯的基本知识:
通常情况下,嵌入式系统采用TTL接口和计算机的串口进行通讯。计算机的串口信号电平取决于电源电平,一般是+12V和-12V,分别表示“1”和“0”;而嵌入式系统的TTL接口一般是±5V或±3.3V,为了能使计算机和嵌入式系统进行通讯,必须将计算机串口输出的
高电平信号拉低为TTL接口可以接收的低电平信号。为此,可以使用MAX232系列转换芯片来完成电压的匹配工作,232系列芯片常用的有232、
3232和3243。MP800H的TTL电平是3.3V,也就是说,“3V3”接口将提供3.3V电源供电(即给你的转换电路供电),“RX0”和
“TX0”也将使用3.3V电平信号进行数据通讯。
本文面向的是一般高清用户,所以我不会教你如何制作串口转TTL电路。为了实现计算机和MP800H高清播放器的通讯,你需要从网上购买一根串口转TTL线(或者USB转TTL线,本文以串口转TTL线为例重点讲解。USB转TTL线的注意事项在本文末尾)。具体的网店链接我就不发了,以免有广告嫌疑,呵呵。
购买串口转TTL线的时候请注意:
1、TTL电平必须是3.3V,否则可能会烧毁你的播放器的1073DD芯片。
MAX3232和MAX3243芯片的特点就是驱动输入电压是多少,信号输出电压就是多少,因此,使用MAX3232或MAX3243芯片的串口转TTL
线是可以放心购买的。使用其他芯片的串口转TTL线在购买的时候一定要问明TTL端的电平是多少,是否兼容3.3V电平信号,切不可使用TTL端是5V电
平的串口转TTL线。
2、串口转TTL线的TTL端一定不要买组合插针的,要买独立插针的,也就是1P的,因为你买到的串口转TTL线的接头线序和MP800H的TTL接头线序肯定不一样。
3、MP800H的6针TTL插槽的间距是小间距,可不是2.54MM的间距!如果你不幸买到了拥有2.54MM间距的杜邦插头的串口转TTL线,那你可有的忙了,你得把杜邦头一个个拆下来,然后用胶带或者热缩管对母型插针进行绝缘处理!
典型的串口转TTL线的外观如下(图片来源于淘宝):
这是一根使用MAX3232芯片的RS232电平转换连接线,一端为DB-9的插头,可直接与PC机的串口相连接;另一端为TTL电平(±5V
或±3.3V)的杜邦插头,四根线分别是:VCC、TXD、RXD、GND,对应接入MP800H的“3V3 RX0 TX0 GND”。
请注意:一定要在播放器断电关机的情况下接线!VCC接3V3、GND接GND、TXD接RX0、RXD接TX0,插头接错有烧机的风险!
串口转TTL线接好播放器后,将DB-9的插头与PC机的串口相连接(如果你要接笔记本,那得看你的笔记本有没有串口,现在的笔记本都没有串口)。接下来的操作在PC机上进行:
执行“开始-->所有程序-->附件-->通讯-->超级终端”,你会看到如下窗口:
输入你的区号,点击“确定”,然后会出现如下窗口:
为你的连接起个名字,例如“MP800H”,之后点击“确定”,会出现下面的窗口,选择你的COM口:
选择好COM口之后点击“确定”,接下来是设置串口属性,请按下图所示进行设置:
点击“确定”之后,将显示超级终端的主窗口界面,此时连接已建立,如下图所示:
现在请将MP800H播放器加电,你将在超级终端窗口中看到ROM Monitor的启动信息(请注意,2秒内按下“ESC”将进入ROM Monitor模式):
- ?hello world!
- 5280 wai5t280 waiA
- REALTEK ROM Monitor, Revision 0000.0202.0012.
- Copyright (c) Realtek Semiconductor Corp. - All Rights Reserved.
- For a list of available commands, type 'help'.
- Compilation time /version= May 22 2009 13:44:54 /0000.0202.0012
- MAC address = 00.1a.95.c7.b8.f0
- Processor Company ID/options = 0x01 (MIPS Technologies, Inc.) / 0x00
- Processor ID/revision = 0x93 / 0x78
- Endianness = Little
- Flash memory size = 16 MByte
- SDRAM size = 128 MByte
- First free SDRAM address = 0x800fc000
- Press 'ESC' to Monitor mode
- OS kernel in FLASH 0xbed00120 , to 0xa1000000, size=0xf13df
- PAL logo
- OS kernel in memory 0xa1000000, to 0xa0100000, size=0xf13df
- lzma finished
- OS kernel in FLASH 0xbedf14ff, to 0x81b00000, size=0xc29b0
- lzma finished
- OS kernel in FLASH 0xbeeb3eaf, to 0x81d80000, size=0x9a84f
- lzma finished
- 5280Go 5280Go linux param = go 803bc000 rootfstype=squashfs root=31:01 mtdparts=
- go 80100000 rootfstype=squashfs root=31:01 mtdparts=VenusSFC:4696k,10024k,384k,1280k
- Reset Ethernet Mac.
- Address = 0x80100000
- Realtek LINUX (DC ALIAS) started...
- Venus setting:
- ROSs have 2621440 bytes RAM.
- System CPU has 2 UARTs.
- System CPU uses external timer interrupt.
- Bootloader version: 0000.0202.0012. This version string is of new format.
- The information of this board: Company ID:0x0 CPU ID: 0x12 Board ID: 0x202
- Ethernet Mac address: 00.1A.95.C7.B8.F0
- Model Config length=0
- Config serial console: console=ttyS0,115200n8r
- prom_flashsize = 0x01000000
- Linux version 2.6.12.6-VENUS (root@138_korsen) (gcc version 3.4.4 mipssde-6.03.01-20051114) #4 Mon Sep 21 15:11:30 CST 2009
- audio addr: 1b00000
- CPU revision is: 00019378
- Determined physical RAM map:
- memory: 00100000 @ 00000000 (usable)
- memory: 0047a000 @ 00100000 (reserved)
- memory: 01586000 @ 0057a000 (usable)
- memory: 00500000 @ 01b00000 (reserved)
- memory: 06000000 @ 02000000 (usable)
- show info: max_low_pfn:32768
- show info: min_low_pfn:1402
- Built 1 zonelists
- Kernel command line: rootfstype=squashfs root=31:01
mtdparts=VenusSFC:4696k,10024k,384k,1280k console=ttyS0,115200n8r
ip=192.168.0.9::192.168.0.254:255.0.0.0:::
- Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
- Primary data cache 32kB, 4-way, linesize 32 bytes.
- Synthesized TLB refill handler (20 instructions).
- Synthesized TLB load handler fastpath (32 instructions).
- Synthesized TLB store handler fastpath (32 instructions).
- Synthesized TLB modify handler fastpath (31 instructions).
- Cache parity protection disabled
- PID hash table entries: 256 (order: 8, 4096 bytes)
- Estimate value: CPU frequency 405.02 MHz
- Using 27.000 MHz high precision timer.
- Console: colour dummy device 80x25
- Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
- Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
- Memory: 119192k/121368k available (3257k kernel code, 2112k reserved, 554k data, 144k init, 0k highmem)
- Warning! Unknown board id.
- ==================== Warning! The calculated loops_per_jiffy is not similar to the default one. ====================
- Mount-cache hash table entries: 512
- Checking for 'wait' instruction... available.
- ========== board id: 202 ==========
- [INFO] neptune mode...
- boot_param value: bfcff800
- mode: 1
- size: 1809
- color1: 0x808010
- color2: 0x8080eb
- color3: 0xb34a9c
- color4: 0x3f8e6a
- NET: Registered protocol family 16
- SCSI subsystem initialized
- usbcore: registered new driver usbfs
- usbcore: registered new driver hub
- se init module major number = 254
- size of RPC_POLL_Dev 52 and RPC_INTR_Dev 52...
- Hello, Realtek TLB Mapper
- squashfs: version 3.1 (2006/08/19) Phillip Lougher
- devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
- devfs: boot_options: 0x1
- JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
- YAFFS Driver Rev:168240 (2009-03-05)
- YAFFS Driver is successfully installing.
- Initializing Cryptographic API
- Generic RTC Driver v1.07
- Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
- ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
- ttyS1 at MMIO 0x0 (irq = 3) is a 16550A
- io scheduler noop registered
- RAMDISK driver initialized: 1 RAM disks of 128K size 1024 blocksize
- loop: loaded (max 8 devices)
- this MARS eth RX_OFFSET = 0x0
- 8139cplus: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)
- MAC address = 0x00.1A.95.C7.B8.F0
- eth0: RTL-8139C+ at 0xb8016000, 00:1a:95:c7:b8:f0, IRQ 2
- VenusSFC MTD init
- VenusSFC MTD: MXIC MX25L12805 detected.
- VenusSFC MTD: Enable VenusSFC MD PP callback function.
- cp_hotplug
- 4 cmdlinepart partitions found on MTD device VenusSFC
- Venus SFC: using dynamic partition <5>Creating 4 MTD partitions on "VenusSFC":
- 0x00000000-0x00496000 : "Partition_000"
- mtd: partition "Partition_000" doesn't end on an erase block -- force read-only
- 0x00496000-0x00e60000 : "Partition_001"
- mtd: partition "Partition_001" doesn't start on an erase block boundary -- force read-only
- 0x00e60000-0x00ec0000 : "Partition_002"
- 0x00ec0000-0x01000000 : "Partition_003"
- 0x00000000-0x01000000 : "disc"
- Venus SFC: (for SST/SPANSION/MXIC SPI Flash)
- physmap flash device: 1000000 at 1ed00000
- Realtek NAND Flash Driver Rev:257157 (2009-07-30)
- NAND Flash Controller detects 4 dies
- Warning: Lookup Table do not have this nand flash !!
- rtk_nand_profile: Error, cannot do nand_scan(on-board)
- Initializing USB Mass Storage driver...
- usbcore: registered new driver usb-storage
- USB Mass Storage support registered.
- i2c /dev entries driver
- =========================
- = VER : 1.8
- =========================
- = PHY : 0
- = MODE: MARS
- = SPD : 1
- = SAR : 0x024 (7 bits)
- = TX FIFO DEPTH : 8
- = RX FIFO DEPTH : 8
- = FIFO THRESHOLD: 4
- = BUS JAM RECORVER : ON
- = NON STOP WRITE : ON
- = SP PROTECT : ON
- =========================
- FATAL : I2C 1 pins have been occupied by PCI
- Trying to free free IRQ3
- NET: Registered protocol family 2
- IP: routing cache hash table of 1024 buckets, 8Kbytes
- 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)
- NET: Registered protocol family 1
- NET: Registered protocol family 17
- Realtek Venus Power Management, (c) 2006 Realtek Semiconductor Corp.
- cp_open
- alloc rings cp->rxdesc_buf =0xa07c9000 , cp->ring_dma=0x7c9000
- init_hw
- init_hw finished
- IP-Config: Complete:
- device=eth0, addr=192.168.0.9, mask=255.0.0.0, gw=192.168.0.254,
- host=192.168.0.9, domain=, nis-domain=(none),
- bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
- VFS: Mounted root (squashfs filesystem) readonly.
- Mounted devfs on /dev
- Freeing prom memory: 0kb freed
- Reclaim bootloader memory from 80020000 to 80100000
- Freeing unused kernel memory: 144k freed
- RTK rtc cannot work.
- Welcome to Realtek Linux
- Please press Enter to activate this console. ------flush priority: 10
- flush_page_cache: do flush...
- ------flush priority: 10
- flush_page_cache: do flush...
- ------flush priority: 10
- flush_page_cache: do flush...
- ------flush priority: 10
- flush_page_cache: do flush...
- Starting INET services....
- ------flush priority: 10
- flush_page_cache: do flush...
- libata version 1.12 loaded.
- sata driver initial...2009/09/03
- sata dma reset
- Running dvdplayer with RootApp
- RootApp AVHDD version...
- enter 2nd case...
- ================================================
- ================================================
- root execute DvdPlayer...
- ================================================
- ================================================
- ............
复制代码 危险:在ROM Monitor模式下的操作失误,往往会对播放器造成致命的伤害,此方面的更多尝试尚未进行,请谨慎操作!
默认情况下,ROM Monitor会对LINUX进行引导。以上是启动信息的前353行,事实上,完整的启动信息有将近1900行,启动完成后,串口终端将持续提示如下信息:
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
- watchdog test pid 152, threshold: 50
复制代码至此,系统进入待机状态,等候遥控器的输入信号。
有了串口终端,就可以进行正常更新失败后的“刷砖机”(即文中所说的强制刷机)工作了。强制刷机需要BootLoader的参与,1073方案是有公开的源代码可以参考的。本文参考的是“CM3PVRxx_2.00.004_Bootcode.tar.gz”源代码,找到其中涉及到“Rescue Linux”的配置部分,如下:
- # ********************************************************************
- # Rescue Linux attribute
- # ********************************************************************
- # flag value
- # ********************************************************************
- ##Rescue Linux included modules will be configured by Linux Makeconfig,
- ##not by boot config. If rescue is included into flash image,
- ##user must specify Rescue_Flash_File_Name to identify which
- ##rescue should be merged into flash image
- ##Rescue_Source = [FLASH | NULL]
- Rescue_Source = FLASH
- ##Rescue_Install_Key = [0x09(TAB) | 0x20(SPACE) | GPIO]
- ## if GPIO is set, please also set below 'Rescue_Install_GPIO value
- Rescue_Install_Key = 0x09
- ##Rescue_Install_With_GPIO_Address = [value]
- ##Rescue_Install_With_GPIO_Mask = [value]
- ##Rescue_Install_With_GPIO = 0x00000100
- ##Rescue_Install_With_GPIO_Value = [value]
- ##Rescue_Loader_Param = [rescue loading parameters]
- Rescue_Loader_Param = ""
- ##Rescue_File_Name = [rescue loading parameters]
- Rescue_File_Name = vmlinux.rescue.bin.lzma.1261_avhdd
复制代码
可以看到,“##Rescue_Install_Key = [0x09(TAB) | 0x20(SPACE) |
GPIO]”即是可选的刷机键,在此源代码中定义的是“Rescue_Install_Key =
0x09”,即“TAB”键。好了,到此为止,强制刷机所需要明确的信息都已经完备了。
下面开始讲解正常更新失败后的强制刷机方法:
1、播放器断电
2、将install.img文件复制到U盘根目录,并将U盘连接至播放器。
3、将串口转TTL线连接至计算机和播放器
4、打开超级终端,配置并进入连接状态
5、按住键盘的“TAB”键,将播放器加电
6、当看到超级终端出现“Rescue kernel in FLASH,...”信息后,松开“TAB”键(如果你的眼睛跟不上超级终端的信息显示速度,播放器加电2秒后松开“TAB”键即可)
至此,系统进入强制升级过程,整个过程不需要人工干预。
以下是串口终端输出的前67行:
- ?hello world!
- 5280 w5ai28t0 waiA
- REALTEK ROM Monitor, Revision 0000.0202.0012.
- Copyright (c) Realtek Semiconductor Corp. - All Rights Reserved.
- For a list of available commands, type 'help'.
- Compilation time /version= May 22 2009 13:44:54 /0000.0202.0012
- MAC address = 00.1a.95.c7.b8.f0
- Processor Company ID/options = 0x01 (MIPS Technologies, Inc.) / 0x00
- Processor ID/revision = 0x93 / 0x78
- Endianness = Little
- Flash memory size = 16 MByte
- SDRAM size = 128 MByte
- First free SDRAM address = 0x800fc000
- Press 'ESC' to Monitor mode
- Rescue kernel in FLASH, total size = 0xea2f4
- seg.1 addr 0xbfc3a000, size = 0xc5000
- seg.2 addr 0xbfbca000, size = 0x252f4
- copy rescue0: from bfc3a000 to a1000000, len = c5000
- copy rescue1: from bfbca000 to a10c5000, len = 252f4
- decompressing rescue: from a1000000 to a0100000: size = ea2f4
- lzma finished
- decompressing rescue done
- PAL logo
- Reset Ethernet Mac.
- Address = 0x80100000
- Realtek LINUX (DC ALIAS) started...
- Venus setting:
- ROSs have 2621440 bytes RAM.
- System CPU has 1 UART.
- System CPU uses external timer interrupt.
- Bootloader version: 0000.0202.0012. This version string is of new format.
- The information of this board: Company ID:0x0 CPU ID: 0x12 Board ID: 0x202
- Ethernet Mac address: 00.1A.95.C7.B8.F0
- Model Config length=0
- Config serial console: console=ttyS0,115200n8r
- prom_flashsize = 0x01000000
- Linux version 2.6.12.6-VENUS (alan@localhost.localdomain) (gcc
version 3.4.4 mipssde-6.03.01-20051114) #159 Mon Apr 20 15:26:28 CST
2009
复制代码升级完毕后,系统将自行重启,以下是重启前的最后36行终端输出(重启后串口终端将重新输出启动过程):
- .Install completed
- release address: 8053a460
- release address: 807ee9c0
- release address: 87000000
- release address: 87400000
- clear pli setting....
- [total time] t=186.440
- In my system...
- Starting pid 430, console /dev/console: '/bin/umount'
- BusyBox v1.1.3 (2009.04.20-07:25+0000) multi-call binary
- Usage: umount [flags] FILESYSTEM|DIRECTORY
- The system is going down NOW !!
- The system is going down NOW !!
- Sending SIGTERM to all processes.
- Sending SIGTERM to all processes.
- Sending SIGKILL to all processes.
- Sending SIGKILL to all processes.
- Please stand by while rebooting the system.
- Please stand by while rebooting the system.
- Restarting system.
复制代码整个过程根据你的U盘速度可持续3-5分钟,在这里,我升级用了“[total time] t=186.440”三分钟。
至此,串口刷机结束。
下面是USB转TTL线的使用方法:
现在的笔记本是没有串口的,若想用笔记本进行刷机,一个可行的方法是采用USB转TTL线。
请注意采用USB转TTL线的时候,有几个非常重要的注意事项:
1、USB转TTL线(内含USB转TTL电路)使用电脑USB接口的+5V供电,不需要从播放器的VCC端口取电!所以切勿连接播放器的VCC端口!否则会烧毁USB转TTL线。
2、需要设置信号输出电平为3.3V!因为播放器的TTL电平是3.3V的。这需要你的USB转TTL线本身支持3.3V和5V电平信号的切换!典型情况下是通过跳线设置。
总之,USB转TTL线的VCC端不要接播放器的VCC端;USB转TTL线必须跳线至3.3V电平信号。切记!
关于驱动程序和COM口号:USB转TTL线是需要驱动的,你的卖家会给你提供驱动。驱动的安装非常简单,安装完毕建议重启计算机。USB转TTL线有一个特点,根据你插入的USB口不同,它映射成的串口号也不同,可能是COM1/COM2/COM3/COM4/COM5等等,可以在设备管理器中看到。在超级终端中选择相应串口即可。
根据目前的实验结果,USB转TTL线在兼容性上存在一定问题,这是由其驱动引起的,主要表现在:
1、对接线顺序敏感。有的USB转TTL线必须先连接USB端,再连接TTL端,才可正常通讯;有的则不必。
2、不同驱动版本表现不同。有些驱动版本无法建立通讯连接;有些驱动版本虽可建立通讯连接,但是超级终端无任何回显。
正是因为USB转TTL线的方式注意事项多、风险稍大、兼容性不完美,所以目前不推荐使用USB转TTL线的方式进行刷机。
阅读(4035) | 评论(0) | 转发(0) |