Skip to main content.

6. Programming the Target

Beware that many commercial tools will not handle the Linux zImage correctly. They often ignore the and sections (containing the compressed kernel and initial ram disk images respectively), because these sections aren't marked with the 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 and jumping to the first byte to enter the kernel loader.

If you want your debugger to have access to kernel symbols, use the conventional 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 program it on your board using Background Debug Mode (BDM), described later under 18. Debugging. BDM isn't the fastest method, but it's by far the easiest.

6.2. TFTP

If your ROM monitor supports Trivial File Transfer Protocol (TFTP), this is the fastest and easiest way to download code to your target during development.

A program that will hack the headers such that the VxWorks? TFTP loader would load the zImage is available at: ftp://ftp.mvista.com/pub/Area51/ppc-8xx/vxhack.c

6.3. Flash/EPROM Programmers

You will need socketed flash to make this viable. There are sockets available 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 and leave them off.

Some commercial EPROM programming units only support Windows, which may be a problem if you have access only 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 DOS binary should be able to be used from DOSEMU. There are some options to allow direct parport access to RTFM on DOSEMU. VMWare hosting one of these should be no problem at all.

Once you have a basic kernel booting on your board, you can use a flash driver to reflash a new kernel quickly. You need to be confident that the new one will boot though, or have some alternative method of recovering if it doesn't, like socketed ROMs or a BDM flash programmer.

5. Compiler Toolset 1. Introduction 7. Boot Sequence
Prev Home Next