Name

ablefis — Flash Information Services (FIS) tool for ABLE.

Synopsis

ablefis

Description

ABLE supports the use of Flash Information Services (FIS) partitions placed in the NOR flash of some Simtec Electronics boards. The ablefis tool allows the user to manipulate these tables and arrange the flash in any way they choose.

Warning

The ABLE boot loader partition must never be removed or altered. Moving or altering this partition will corrupt the boot loader and the system will no longer start (see Simtec Electronics website for details on recovering such systems).

Example 19.1. Starting ABLE FIS

>(tftpboot)ablefis
ABLE RedBoot FIS Partition Tool, V0.20
(c) 2003 Simtec Electronics

Machine is BAST
Flash: SST 39LF160 [0x00BF, 0x2782]
read valid RedBoot FIS table
Partitions (3 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker
 02: 0x00080000 -> 001ff000: Namedspace

Free space:

commands:
         p - print current table
         d - delete partition
         e - edit partition
         x - extend table (add new partititon)
         s - shorten table (remove last partition)
         w - write table to flash
         q - quit
main>

When executed the ABLE FIS tool prints its introduction banner including its version number.

ABLE RedBoot FIS Partition Tool, V0.20
(c) 2003 Simtec Electronics

This is followed by a brief summary of the flash device in use and the system name.

Machine is BAST
Flash: SST 39LF160 [0x00BF, 0x2782]

The current FIS table is displayed showing the partition numbers, sizes and any free space.

Partitions (3 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker
 02: 0x00080000 -> 001ff000: Namedspace

Free space:

Finally a brief list of possible commands is shown followed by the command prompt.

commands:
         p - print current table
         d - delete partition
         e - edit partition
         x - extend table (add new partititon)
         s - shorten table (remove last partition)
         w - write table to flash
         q - quit
main>

The command prompt shows which menu is currently active within the tool and allows easy navigation. If there is no valid FIS table already configured the tool will create a default.

Example 19.2. ABLE FIS creating a default FIS table

ABLE RedBoot FIS Partition Tool, V0.20
(c) 2003 Simtec Electronics

Machine is BAST
Flash: SST 39LF160 [0x00BF, 0x2782]
did not find valid RedBoot FIS table on device, creating new
Created default table
Partitions (2 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker

Free space:
  0x00080000 -> 0x001ff000 (0x0017f000 bytes)

commands:
         p - print current table
         d - delete partition
         e - edit partition
         x - extend table (add new partititon)
         s - shorten table (remove last partition)
         w - write table to flash
         q - quit
main>

Warning

It is essential to realise that the system will no longer boot if the ABLE partition is altered or written to.

Main Menu

The main menu

commands:
         p - print current table
         d - delete partition
         e - edit partition
         x - extend table (add new partititon)
         s - shorten table (remove last partition)
         w - write table to flash
         q - quit

is the root for all other operations.

This menu is indicated by its "main>" prompt. As on all menus the "h" will redisplay all the commands available.

The "q" command will quit the program and return to ABLE.

The "p" command will print the current table, this table will not be written to the flash device until the "w" command is used.

The "d" command will prompt for a partition number and remove it from the table, this command returns to the main menu.

Example 19.3. Removing a partition from a FIS table

main> p
Partitions (3 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker
 02: 0x00080000 -> 00080000: Unused 2

Free space:
  0x00080000 -> 0x001ff000 (0x0017f000 bytes)
main> d
Which partition to delete (0-2) ?2
free_space: could not find allocated area 0x00080000->0x00080000
Deleted entry
main> p
Partitions (3 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker
 02: 0x00000000 -> 00000000: Unused 2

Free space:
  0x00080000 -> 0x001ff000 (0x0017f000 bytes)
main>

The "e" command will prompt for a partition number to edit and change to the the section called “Edit Menu”

Example 19.4. Adding and Editing a FIS table partition

main> x
Adding partition 2
main> p
Partitions (3 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker
 02: 0x00080000 -> 00080000: Unused 2

Free space:
  0x00080000 -> 0x001ff000 (0x0017f000 bytes)
main> e
Which partition to edit (0-2) ?2
Partition 2:
         Name                 = Unused 2
         Flash Address        = 0x00080000
         Flash Length         = 0x00000000
         Data Execution Base  = 0x00000000
         Data Execution Entry = 0x00000000
         Data Length          = 0x00000000

Edit commands:

         n - edit name
         p - edit position in flash
         d - edit data-length
         b - edit execution base
         e - edit execution address
         r - return to main menu
         s - show parition information again
         h - print this help message
edit 2>

The "x" command will add a new partition in the next available numerical partition number.

Example 19.5. Adding partition to FIS table

main> p
Partitions (2 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker

Free space:
  0x00080000 -> 0x001ff000 (0x0017f000 bytes)
main> x
Adding partition 2
main> p
Partitions (3 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker
 02: 0x00080000 -> 00080000: Unused 2

Free space:
  0x00080000 -> 0x001ff000 (0x0017f000 bytes)
main>

The "s" command will remove the last partition in the table.

Example 19.6. Shortening a FIS table

main> p
Partitions (3 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker
 02: 0x00000000 -> 00000000: Unused 2

Free space:
  0x00080000 -> 0x001ff000 (0x0017f000 bytes)
main> s
free_space: could not find allocated area 0x00000000->0x00000000
main> p
Partitions (2 of 16):
 00: 0x00000000 -> 00080000: ABLE
 01: 0x00000000 -> 00000000: Partition Marker

Free space:
  0x00080000 -> 0x001ff000 (0x0017f000 bytes)
main>

The "w" will write the current partition table to the flash. ABLE will not re-read these changes until the system is reset.

Example 19.7. Writing current FIS partition table

main> w
Writing new FIS table to flash
Erasing device: . done
Writing data: . done
Verifying data: . done
Done. Changes will not take effect until next reset
main>

Edit Menu

The edit menu

Edit commands:
         n - edit name
         p - edit position in flash
         d - edit data-length
         b - edit execution base
         e - edit execution address
         r - return to main menu
         s - show parition information again
         h - print this help message

allows for the manipulation of a specific FIS partition. The number after the "edit" prompt indicates which partition is being edited. The "h" command wil redisplay the available commands and the "q" command will return to the main menu.

The "n" command will edit the name of the partition up to a maximum length of 15 characters.

Example 19.8. Editing the name of a FIS partition

edit 2> s
Partition 2:
         Name                 = Unused 2
         Flash Address        = 0x00080000
         Flash Length         = 0x00000000
         Data Execution Base  = 0x00000000
         Data Execution Entry = 0x00000000
         Data Length          = 0x00000000

edit 2> n
Enter new name for parititon (max 15 characters): BootSpace
edit 2> s
Partition 2:
         Name                 = BootSpace
         Flash Address        = 0x00080000
         Flash Length         = 0x00000000
         Data Execution Base  = 0x00000000
         Data Execution Entry = 0x00000000
         Data Length          = 0x00000000

edit 2>

The "p" command changes the starting position and length of the partition within the flash.

Example 19.9. Changing the length of a partition.

edit 2> s
Partition 2:
         Name                 = BootSpace
         Flash Address        = 0x00080000
         Flash Length         = 0x00000000
         Data Execution Base  = 0x00000000
         Data Execution Entry = 0x00000000
         Data Length          = 0x00000000

edit 2> p
Free space:
  0x00080000 -> 0x001ff000 (0x0017f000 bytes)
Current position is 0x00080000 -> 00080000 (0 bytes)
New value for start position in flash (0x00080000) ?
New value for length in flash (0x00000000) ?17f000
edit 2> s
Partition 2:
         Name                 = BootSpace
         Flash Address        = 0x00080000
         Flash Length         = 0x0017f000
         Data Execution Base  = 0x00000000
         Data Execution Entry = 0x00000000
         Data Length          = 0x00000000

edit 2>

The d option changes the data length of the partition
The b option changes the data execution base of the partition
The e option changes the data execution address of the partition
The s option shows information on the partition being edited.