Embedded 版 (精华区)

发信人: he (无情的雨), 信区: Embedded_system
标  题: linux for ppc chapter 6 
发信站: 哈工大紫丁香 (2001年06月04日11:02:27 星期一), 站内信件

----------------------------------------------------------------------------
----
6. Programming the Target
Beware that many commercial tools will not handle the Linux zImage correctly
. They often ignore the .image and .initrd sections (containing the compress
ed kernel and initial ramdisk images respectively), because these sections a
ren't marked with the LOAD attribute. Whether this is a bug in the tools or
in the zImage build process is debatable. Many developers avoid the problem
by simply skipping the 64K ELF header, treating the rest as a binary image a
nd jumping to the first byte to enter the kernel loader.
If you want your debugger to have access to kernel symbols, use the conventi
onal uncompressed vmlinux ELF image rather than zImage.
6.1 BDM/JTAG Downloading
If your board is wired correctly, and you're using Flash memory, you can pro
gram it on your board using BDM, described later under Debugging. This isn't
 the fastest method, but it's by far the easiest.
6.2 TFTP
If your ROM monitor supports TFTP, this is the fastest/easiest way to downlo
ad code to your target during development.
There is a program that will hack the headers such that the VxWorks TFTP loa
der would load the zImage, at: ftp://ftp.mvista.com/pub/Area51/ppc-8xx/vxhac
k.c
6.3 Flash/EPROM Programmers
You will need socketed flash to make this viable. There are sockets availabl
e even for surface mount flash devices which preserve the device footprint,
but they consume extra space on your board, even when you go to production a
nd leave them off.
Some commercial E/PROM programming units only support Windows, which may be
a problem if you only have access to Linux machines.
The Data I/O units have a terminal mode and an onboard floppy so they could
be used from Linux without a problem.
The general consensus is that anything with serial/parallel support and a DO
S binary should be able to be used from DOSEMU. There are some options to al
low direct parport access so RTFM on dosemu. VMWare hosting one of these sho
uld be no problem at all.
Once you have a basic kernel booting on your board, you can use a flash driv
er to quickly reflash a new kernel. You need to be confident that the new on
e will boot though, or have some alternative method of recovering if it does
n't, like socketed ROMs or a BDM flash programmer.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---- 

--

※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.235.250]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.049毫秒