UtilitiesProject Map
BCOS "Make Boot Image" Utility Documentation
 

Contents

1                Overview
2                Command Line Syntax
3                List File Syntax
3.1                Directory Entry Descriptors
3.2                File Entry Descriptors


Listings

Listing 2.1      Command Line Example
Listing 3.1      Directory Entry Descriptor Example
Listing 3.2      File Entry Descriptor Example



1   Overview

The "make boot image" (mk_bimg) utility parses a "list file" and creates a boot image containing the directory entries and files described in the list file.


2   Command Line Syntax

With no command line arguments the utility will display it's help, which just lists command line arguments.

To create a boot image the command line must consist of (in order):

    
Any of these options (in any order):
"-f" to force the utility to update the output file
"-v" to enable verbose mode
The file name of the list file
The file name for the boot image to create

Normally the utility compares the modification times on all input files and the boot image file, and if the boot image file is newer than any input file it assumes that the boot image is already up-to-date and doesn't create it again. This behaviour can be overridden with the "-f" command line option.

An example of using the utility to create a boot image is shown in Listing 2.1: Command Line Example.

./mk_bimg -f -v listfile.lst image.bin
Listing 2.1 - Command Line Example


3   List File Syntax

The list file contains lines of text, where each line of text may be:

    
whitespace
a comment, where the first non-whitespace character on the line is a ';' character
a directory entry descriptor
a file entry descriptor

Whitespace and comments are ignored by the parser.

For all directory entry descriptors (except for the "/" directory) and all file entry descriptors, there must be a directory entry descriptor for the parent directory. For example, you can't have an entry for the file "/foo/bar.txt" without also having an entry for the directory "/foo".


3.1   Directory Entry Descriptors

A directory entry descriptor must consist of (in order):

    
The directory owner, which must be one of:
OWNER_ANON (the directory owner is an anonymous/guest user)
OWNER_SYSOWNER (the directory owner is the cluster owner)
OWNER_OS (the directory owner is system software)
None or more permission flags, which may be one of:
R_OWNER (the directory owner has read permission)
R_GRP_ADMIN (anyone in the administration group has read permission)
R_GRP_MAINT (anyone in the maintenance group has read permission)
R_ANON (everyone has read permission)
XW_OWNER (the directory owner has write permission)
XW_GRP_ADMIN (anyone in the administration group has write permission)
XW_GRP_MAINT (anyone in the maintenance group has write permission)
XW_ANON (everyone has write permission)
The directory name to use in the boot image

All of these things are separated by whitespace. The directory entry descriptor may be followed by a comment.

An example directory entry descriptor is shown in Listing 3.1: Directory Entry Descriptor Example.

OWNER_OS R_OWNER R_GRP_ADMIN XW_OWNER XW_GRP_ADMIN    /sys/80x86  ;A comment
Listing 3.1 - Directory Entry Descriptor Example


3.2   File Entry Descriptors

A file entry descriptor must consist of (in order):

    
The file owner, which must be one of:
OWNER_ANON (the file owner is an anonymous/guest user)
OWNER_SYSOWNER (the file owner is the cluster owner)
OWNER_OS (the file owner is system software)
None or more permission flags, which may be one of:
R_OWNER (the file owner has read permission)
R_GRP_ADMIN (anyone in the administration group has read permission)
R_GRP_MAINT (anyone in the maintenance group has read permission)
R_ANON (everyone has read permission)
XW_OWNER (the file owner has execute permission)
XW_GRP_ADMIN (anyone in the administration group has execute permission)
XW_GRP_MAINT (anyone in the maintenance group has execute permission)
XW_ANON (everyone has execute permission)
The file name to use in the boot image
The name of the file to copy into the boot image

All of these things are separated by whitespace. The file entry descriptor may be followed by a comment.

An example file entry descriptor is shown in Listing 3.2: File Entry Descriptor Example.

OWNER_OS R_OWNER R_GRP_ADMIN  /sys/80x86/boot/loader/bootflop.bin 80x86/sys_src/bin/bootflop.bin      ;A comment
Listing 3.2 - File Entry Descriptor Example


Generated on Sat Aug 1 16:05:47 2009