NAME | NAME | FEATURES | DESCRIPTION | OPERANDS | OPTIONS | RETURN VALUES | ERRORS | EXAMPLES | ATTRIBUTES | SEE ALSO
POSIX_SHM
cbfs is a target utility.
The cbfs command can be used to install and manage a ChorusOS boot file system on a disk drive or a flash device. Disk drives must be labeled with the command disklabel(1M). Flash devices are seen by cbfs as raw devices and are not labeled before use. Instead the cbfs command requires extra information about the offset of the boot partition and, optionally, its size.
For each device, a ChorusOS boot partition must be defined and only one boot partition may be defined per disk. The ChorusOS boot file system will occupy this partition.
The cbfs command accepts subcommands that specify which action to perform. The following subcommands are supported:
Remove a bootable system image from the device.
Format and install a boot file system on the boot partition.
Retrieve a boot system image from the device.
List the contents of the partition, including the boot system images on the partition.
The information may be used by bootConfig(1M).
Place a boot system image on the device.
The information may be used by bootConfig.
The following options are supported:
indicates that the system image must be placed at the beginning of the device without taking into account a possible ChorusOS boot file system and destroying it. This option must be used if boot is required directly from device: for example, for execution in place on a flash device.
device indicates the dtree(1M) device associated with the device.
forces get and put subcommands if the file specified by path already exists.
name indicates the name of the file in the cbfs boot file system.
(Flash memory devices only) offset indicates the offset in bytes of the start of the boot partition from the start address (address 0) of the flash memory device. The default value of offset is 1Mb, which corresponds to the maximum size of bootMonitor(1M).
path indicates the full path to the system image in the target file system.
(Flash memory devices only) size indicates the size of the boot partition in bytes. The default value of size is the number of bytes from offset to the end of flash memory.
type indicates the type of device either as disk for IDE disk and CompactFlash devices, or as flash for other flash memory devices.
The following table shows which parameters to use, by subcommand.
SUBCOMMAND | DEVICE | NAME | PATH | TYPE |
---|---|---|---|---|
delete | required | required | required | |
format | required | required | ||
get | required | required or -b | required | required |
list | required | optional | required | |
put | required | required or -b | required | required |
The offset and size related options are only used when handling flash memory devices.
Upon successful completion, cbfs returns 0. Otherwise, -1 is returned and the global variable errno is set to indicate the error.
The following errors are supported.
Device not configured
Cannot allocate memory
File exists
No space left on device
Permission denied
Input/output error
No such file
Bad address
Broken pipe
Resource temporarily unavailable
Invalid argument
File too large
% rsh target mount 1.2.3.4:/export/home/BUILD_DIR/root / % rsh target arun disklabel -w -r hd1 WD64AA2 % rsh target arun disklabel -r hd1 4 partitions: # size offset fstype [fsize bsize cpg] a: 65000 0 MSDOS 1024 4096 0 # (Cyl. 0 - 68*) b: 25000 65000 CHBOOT 1024 4096 0 # (Cyl. 68*- 95*) c: 12594960 0 unused 0 0 # (Cyl. 0 - 13327) d: 12504960 90000 unused 1024 4096 # (Cyl. 95*- 13327*) % rsh target arun cbfs list -t disk -d /raven/vt82c586-ata/1,0 Archive number max : 3 Archive list on /raven/vt82c586-ata/1,0 : 0000> Empty. 0001> Empty. 0002> Empty. % rsh target arun cbfs put -t disk -d /raven/vt82c586-ata/1,0 -n foo -p /chorus.RAM.bmon BOOT CONFIGURATION="DISK /raven/vt82c586-ata/1,0 40007 5496" % rsh target arun cbfs list -t disk -d /raven/vt82c586-ata/1,0 Archive number max : 3 Archive list on /raven/vt82c586-ata/1,0 : 0000> Archive foo | offset 40007 | size 2813952 | 01/01/1970 00:00:01 BOOT CONFIGURATION="DISK /raven/vt82c586-ata/1,0 40007 5496" 0001> Empty. 0002> Empty. % rsh target arun cbfs delete -t disk -d /raven/vt82c586-ata/1,0 -n foo % rsh target arun cbfs list -t disk -d /raven/vt82c586-ata/1,0 Archive number max : 3 Archive list on /raven/vt82c586-ata/1,0 : 0000> Empty. 0001> Empty. 0002> Empty. |
%> rsh mcp750 mount 129.168.1.12:/export/home/BUILD_DIR/root / %> rsh mcp750 arun cbfs format -t flash -d /intel28F400 %> rsh mcp750 arun cbfs list -t flash -d /intel28F400 Archive number max : 1 Archive list on /intel28F400 : 0000> Empty. %> rsh mcp750 arun cbfs put -t disk -d /intel28F400 -n foo -p /chorus.RAM.bmon BOOT CONFIGURATION="FLASH /intel28F400 1049600 2998272" %> rsh mcp750 arun cbfs list -t disk -d /intel28F400 Archive number max : 1 Archive list on /intel28F400 : 0000> Archive toto | offset 1049600 | size 2998272 | 01/01/1970 00:00:01 BOOT CONFIGURATION="FLASH /intel28F400 1049600 2998272" %> rsh mcp750 arun cbfs delete -t disk -d /intel28F400 -n foo %> rsh mcp750 arun cbfs list -t disk -d /intel28F400 Archive number max : 1 Archive list on /intel28F400 : 0000> Empty. |
%> rsh mcp750 mount 129.168.1.12:/export/home/usr0/BUILD_DIR/root %> rsh mcp750 arun cbfs put -t flash -d /intel28F400 -b -p /chorus.ROM |
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | NAME | FEATURES | DESCRIPTION | OPERANDS | OPTIONS | RETURN VALUES | ERRORS | EXAMPLES | ATTRIBUTES | SEE ALSO