[Previous] [Contents] [Next]

mkcis

Create a Card Information Structure (QNX)

Syntax:

mkcis [-2] [-f outfile] [-o outfile] [-q] [-w level] file

Options:

-2
Output level 2 tuples only.
Note: Don't use the -2 option if you're using Efsys.file. Efsys.file can't read the level 2 structures.

-f outfile
Generate an image of the Flash device in outfile.
-o outfile
Output the CIS to this file (default is standard output).
-q
Be quiet.
-w level
Set the warning level.

Description:

The mkcis utility reads a file containing a text description of the memory regions and partitions that make up an EFS socket. The utility attempts to find the optimal placement of partitions and creates a CIS containing this information. An Initial Program Loader (IPL) may precede the CIS on embedded filesystems used for booting.

The input file is made up of a sequence of sections. A section can be a description either of the geometry of a memory device or of a region. A region section may contain any number of partition sections. You determine the placement of each partition by assigning various attributes to it. These attributes tell mkcis the types of accesses that will be made and the alignment restrictions that the partition must conform to.

The input file consists of lines in this format:

[spaces/tabs] keyword [value]...

Prefix every comment with the # character, which causes all input to the end of line to be ignored.

You can specify numbers in decimal (the default) or in hex by prefixing them with 0x. A number can have M or K suffixes to signify multiplication by 1024*1024 or by 1024. The case of these suffixes doesn't matter.

Card Information Structure

Here's the file structure:

jedec
    id number
    type [dram|sram|flash|eprom|eeprom]
    size number
    write_disrupt number
    erase_disrupt number
    erase number
    write number

region
    jedec number
    size number
    offset number
    interleave number
    boot_file "filename"
    partition
       type [efs|image]
          file "filename"
          size number
          attribute [erase|write|execute|write_align|
                     erase_align|largest]*

jedec section

The jedec section defines the type and geometry of a memory device used in the EFS. Standard device definitions can be found in the file /etc/jedecs and are read by mkcis at startup. You can specify the following attributes:

id
Memory devices are identified by a 16-bit jedec number. ROM, DRAM, and SRAM devices don't need jedec information.
type
The type of memory device, which can be one of dram, sram, flash, eeprom or eprom.
size
The size of the device in bytes.
write_disrupt
When a memory device is performing a write operation, access to other memory locations may be disrupted until the write has completed. For SRAM devices this value is usually 1, meaning that only the location being written to is inaccessible. For many Flash devices the entire chip is unavailable for reads until the write has completed. For example, the Intel 28F008 chip has a write_disrupt value of 1M.
erase_disrupt
Same as above but for erase operations. For example, the Intel 28F008 chip has an erase_disrupt value of 1M.
erase
The minimum number of bytes that can be erased in a single operation (the erase block size).
write
The minimum number of bytes that can be written in a single operation.

region section

A region section must be defined for each region in the EFS. Each section contains the following attributes:

jedec
The jedec number of the memory devices in the region.
size
The size of the region in bytes.
offset
The offset in bytes of the start address of the region from the start of the EFS (default is 0).
interleave
The number of devices that the region is interleaved across.
boot_file
The name of a binary file containing an IPL. The IPL code is placed before the CIS on the EFS.

Each partition in a region has the following attributes:

type
The partition type, which can be efs or image.
file
The name of a binary file containing an image to be placed in the partition. Usually generated by mkffs or romqnx.
size
The size of the partition in bytes.
attribute
The functional attributes of the partition, including:
write
The partition will be written to.
erase
The partition will have erase operations.
write_align
The partition must be aligned on a write block boundary.
erase_align
The partition must be aligned on an erase block boundary.
xip_align
The partition should be aligned on a 4K boundary.
largest
The partition should take up the largest free area in the region.

Note: When specifying an embedded filesystem with a file directive, attribute largest and size are ignored and shouldn't be specified.

Examples:

Create a card information structure (CIS) from input file exm2a.info and write the CIS to raw device /dev/skt1:

mkcis -o /dev/skt1 -f exm2a.img exm2a.info

Here's a sample CIS information file for an Octagon 5025A system with a single EFS consisting of Intel 28F020 Flash memory devices. The EFS is configured to contain only a bootable image partition.

#
# Configure CIS for Octagon 5025A
#
jedec
    id 0x89bd
    type flash
    write_disrupt 256k
    erase_disrupt 256k
    erase 256k
    write 1
    size 256k

region
    size 256K
    interleave 1
    jedec 0x89bd
    boot_file "/boot/sys/boot.5025a"

partition
    type image
    attribute largest

partition
    type ffs
    file "ffs.img"

This input file creates a CIS suitable for an Intel EXPLR2 board:

#
# Sample configuration for EXPLR2
#
region
    size 2M
    jedec 0x89A0
    boot_file "/boot/rom.explr2"

partition
    type image
    file "nto.image"

See also:

mkffs, mkipl, romqnx


[Previous] [Contents] [Next]