Installing the Image or Files onto the DiskOnChip

There are many ways to move the files onto the DiskOnChip. Depending on what hardware you have available, you may have several options:

  • Put all the files on a DOS-formatted floppy disk, boot the box with the DiskOnChip using the floppy, and then copy the files from the floppy to the DiskOnChip.

  • Put all the files on a DOS hard disk partition, boot the box with the DiskOnChip using that partition, and then copy the files from the floppy to the DiskOnChip.

  • Dispense with DOS entirely by recompiling the Linux kernel on the box with the DiskOnChip and a hard drive, including the DiskOnChip drivers from M-Systems. Once you do that, you can copy the files directly from Linux to the DiskOnChip.

  • If your DiskOnChip box doesn’t have a hard disk or floppy disk controller, you’ll have to program the DiskOnChip on another machine, perhaps using the ISA DiskOnChip card from M-Systems. Once the DiskOnChip is programmed, you’ll move it to the destination box.

This appendix assumes that you have available a motherboard with a DiskOnChip socket and an IDE hard drive. We’ll move the files to a bootable DOS partition on the hard drive, and then reboot under DOS. It will then be a simple exercise to copy the files to the DiskOnChip and run syslinux.com to make the kernel bootable from the DiskOnChip.

Using a hard drive with MS-DOS, follow these steps:

1.
Locate all the files you’ll need to install your new embedded Linux application on the DiskOnChip:

  • All the files in the obj/imageroot directory.

  • The syslinux.com file. If you installed the Embedded Linux Workshop in the standard place, it’ll be in this location:

    /usr/local/elw/arch/i386/opt/syslinux/nomedia/syslinux.com. 
    
2.
Install a hard drive with a DOS partition into the machine with the DiskOnChip. Microsoft Windows should also work well, if you prefer. In fact, Microsoft Windows may be easier to use, since you’re going to have to copy files from the obj/imageroot directory onto the DOS partition, and you may want to use the network. If you don’t have access to MS-DOS or Windows, you can use Linux. However, to do so requires that you install the M-Systems drivers into your kernel (or compile them as modules and insmod them).

3.
Boot the machine using DOS.You may have to tweak the BIOS to allow you to boot from the hard drive.

4.
Get the files from your build machine to the local hard drive.

It’s up to you how you do this—anything from FTP to the hard drive shuffle will work. I suggest thinking hard about how you’re going to do this, since you’re probably going to do it many, many times. The less time you spend moving files from point A to point B so you can test, the more time you can spend engineering and debugging. Figure that you’ll probably rebuild the project at least 100 times for anything more than a trivial project.

5.
Determine the drive letter of your DiskOnChip device. The following steps assume that it’s D:, but it could be a different letter for you.

6.
(Optional) Delete all the files on the root of the DiskOnChip. You may not need (or want!) to do this.

7.
copy C:imageroot*.* d: 

Copy all the files in the obj/imageroot to the root of the DiskOnChip drive, using the DOS copy command. This step assumes that the files are in the C:imageroot directory of the hard drive and that the DiskOnChip was assigned drive letter D:.

8.
c:syslinux d: 

Make the DiskOnChip bootable with the syslinux.com command. The command in this step assumes that the syslinux.com program is in the root of drive C:.

9.
Reboot, changing the BIOS so the machine boots from the DiskOnChip.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.81.94