Share via


Boot Block in CE Boot (Compact 2013)

3/26/2014

The Boot Block driver is represented by an abstract class, BootBlock_t, that derives from BootDriver_t. This driver allows the boot loader to access a device’s persistent storage inside a logical disk partition, and exposes storage that has binary regions identified by a number (starting at 0). Reserved regions are identified by 16-character names, and partitions are identified by type and ordinal number. After the code opens a region or partition, it can use read, write, and erase commands to work with sectors within the region or partition. This operation is analogous to operations on a file that is opened by the CreateFile function of Windows Embedded Compact 2013.

The driver class of the Boot Block driver is BOOT_DRIVER_CLASS_BLOCK.

The Boot Block driver interface is defined in:

%_WINCEROOT%\Platform\Common\Src\Common\Bldr\Inc\BootBlock.hpp

The IOCTL codes to which a Boot Block driver can respond are listed in the following table.

Boot Block Driver IOCTLs

IOCTL

Description

BOOT_BLOCK_IOCTL_INFO

Gets the following information from the store: Flags that indicate whether binary and reserved regions are supported, the sector size, the number of sectors, and the number of binary regions, reserved regions, and partitions.

BOOT_BLOCK_IOCTL_FORMAT

Formats the store.

BOOT_BLOCK_IOCTL_LOCK_MODE

Sets the store to a specified lock mode.

BOOT_BLOCK_IOCTL_INFO_BINARY

Gets the index and number of sectors in a binary region.

BOOT_BLOCK_IOCTL_INFO_RESERVED

Gets the index, name, and number of sectors in a reserved region.

BOOT_BLOCK_IOCTL_INFO_PARTITION

Gets the index, file system type, file system index, and number of sectors in a partition.

BOOT_BLOCK_IOCTL_OPEN_BINARY

Opens a binary region on the store and returns a handle to it.

BOOT_BLOCK_IOCTL_OPEN_RESERVED

Opens a reserved region on the store and returns a handle to it.

BOOT_BLOCK_IOCTL_OPEN_PARTITION

Opens a partition on the store and returns a handle to it.

BOOT_BLOCK_IOCTL_READ

Reads data from the store.

BOOT_BLOCK_IOCTL_WRITE

Writes data to the store.

BOOT_BLOCK_IOCTL_ERASE

Erases data from the store.

Driver classes that derive from the Boot Block driver class are listed in the following table. Their interfaces are defined in:

%_WINCEROOT%\Platform\Common\Src\Common\Bldr\Block\<Class Name>

BootBlock Driver Derived Function Interface Files

Driver

Class

Description

BIOS

BootBlockBios_t

Provides access to the BIOS of a device.

FAL

BootBlockFal_t

Provides access to the flash abstraction layer (FAL) of a NAND flash device.

Flash

BootBlockFlash_t

Provides access to a flash memory device.

IDE

BootBlockIde_t

Provides access to an Integrated Device Electronics (IDE) device.

See Also

Concepts

Boot Driver Examples