DENX . DULG . DiskOnChip |
eraseall
command
can be used to completely erase the whole drive. Please note that
eraseall
operates on the MTD character device.
In the second step the nftl_format
command is used
to write the necessary administrative information and (optionally) to
reserve a certain amount of the DOC drive as binary partition - the
size is given as third argument to the nftl_format
command.
The next step is to create standard partitions on the DOC drive; as
with normal harddisk drives the fdisk
command is
called for this purpose. In most cases you will create only a single
(primary) partition on the DOC drive.
Note: Included topic DULGData_canyonlands.LinuxDocFormat? does not exist yet
Now we have to create a filesystem on the DOC partition, and populate
it with the files necessary for a Linux root filesystem. We use the
mke2fs
command to create a standard
SELF
package: first we use tftp
to download the image
from our TFTP server, then we skip the 64 bytes U-Boot header with a
dd
command with the appropriate options and
uncompress the image with gunzip
, writing the
output into one of the Linux ramdisk devices
(/dev/ram1
). Then we mount both the ramdisk and
the DOC drive, and copy the contents with a combination of
find
and cpio
commands:
Note: Included topic DULGData_canyonlands.LinuxDocPopulate? does not exist yet
After unmounting the filesystems (don't forget this!), we can reboot
the system and verify in U-Boot that our new format is present. This
can be done with the doc info
:
Note: Included topic DULGData_canyonlands.UBootDocMisc? does not exist yet
Now we are ready to store a Linux kernel image in the binary
partition of the DOC drive. First we make sure that the binary
partition is empty using the doc erase
command,
then we TFTP a kernel image from the TFTP server, and store it on the
DOC drive using the doc write
command.
For our convenience later we also define a new environment variable
"docargs" which sets kernel boot arguments to mount the root
filesystem from the DOC drive, and save it to the persistent storage:
Note: Included topic DULGData_canyonlands.UBootDocInstall? does not exist yet
Finally, we demonstrate how to boot from the DOC drive: with
docboot
we load the Linux kernel drom the DOC
device, then we initialize the bootargs
environment variable by running the commands stored in the "docargs"
(set root device) and "addip" (append network configuration)
variables, before we boot the kernel with bootm
:
Note: Included topic DULGData_canyonlands.UBootDocBoot? does not exist yet
----- Revision r1.3 - 09 May 2008 - 15:55 - Main.www-data
|