| 1 | % FUTILITY(1) Version 1.0 | Futility GBB Documentation |
| 2 | |
| 3 | NAME |
| 4 | ==== |
| 5 | |
| 6 | **futility gbb** - allows for the printing and manipulation of GBB flag state. |
| 7 | |
| 8 | SYNOPSIS |
| 9 | ======== |
| 10 | |
| 11 | - **futility gbb** \[**\--help**] |
| 12 | - **futility gbb** \[**-g**|**--get**] \[GET mode options] \[image_file] |
| 13 | - **futility gbb** \[**-s**|**--set**] \[SET mode options] \[image_file] \[output_file] |
| 14 | - **futility gbb** \[**-c**|**--create**] \[CREATE mode options] |
| 15 | - **futility gbb** \[**-g**|**-s**] \[**\--flash**] \[GET|SET mode options] \[FLASH options] |
| 16 | |
| 17 | DESCRIPTION |
| 18 | =========== |
| 19 | |
| 20 | The GBB sub-command allows for the printing and manipulation of the GBB flag state. |
| 21 | |
| 22 | Options |
| 23 | ------- |
| 24 | |
| 25 | \--help |
| 26 | |
| 27 | : Prints brief usage information. |
| 28 | |
| 29 | -g, \--get |
| 30 | |
| 31 | : Puts the GBB command into GET mode. (default) |
| 32 | |
| 33 | -s, \--set |
| 34 | |
| 35 | : Puts the GBB command into SET mode. |
| 36 | |
| 37 | -c, \--create=hwid_size,rootkey_size,bmpfv_size,recoverykey_size |
| 38 | |
| 39 | : Puts the GBB command into CREATE mode. Create a GBB blob by given size list. |
| 40 | |
| 41 | GET Mode Options |
| 42 | ---------------- |
| 43 | |
| 44 | Get (read) from image_file or flash, with following options: |
| 45 | |
| 46 | \--flash |
| 47 | |
| 48 | : Read from and write to flash, ignore file arguments. |
| 49 | |
| 50 | ### Report Fields |
| 51 | |
| 52 | The following options are available for reporting different types of information |
| 53 | from image_file or flash. The default is returning hwid. There could be multiple |
| 54 | fields to be reported at one time. |
| 55 | |
| 56 | \--hwid |
| 57 | |
| 58 | : Report hardware id (default). |
| 59 | |
| 60 | hardware_id: EXAMPLE |
| 61 | |
| 62 | \--flags |
| 63 | |
| 64 | : Report header flags. |
| 65 | |
| 66 | flags: 0x00000000 |
| 67 | |
| 68 | \--digest |
| 69 | |
| 70 | : Report digest of hwid (>= v1.2) |
| 71 | |
| 72 | digest: DIGEST_STRING |
| 73 | |
| 74 | -e, \--explicit |
| 75 | |
| 76 | : Report header flags by name. This implies **\--flags**. |
| 77 | |
| 78 | flags: 0x00000000 |
| 79 | VB2_GBB_FLAG_FLAG_A |
| 80 | VB2_GBB_FLAG_FLAG_B |
| 81 | |
| 82 | ### File Names to Export |
| 83 | |
| 84 | -k, \--rootkey=FILE |
| 85 | |
| 86 | : File name to export Root Key. |
| 87 | |
| 88 | -b, \--bmpfv=FILE |
| 89 | |
| 90 | : File name to export Bitmap FV. |
| 91 | |
| 92 | -r, \--recoverykey=FILE |
| 93 | |
| 94 | : File name to export Recovery Key. |
| 95 | |
| 96 | SET Mode Options |
| 97 | ---------------- |
| 98 | |
| 99 | Set (write) to flash or file, with following options: |
| 100 | |
| 101 | \--flash |
| 102 | |
| 103 | : Read from and write to flash, ignore file arguments. |
| 104 | |
| 105 | -o, \--output=FILE |
| 106 | |
| 107 | : New file name for ouptput. |
| 108 | |
| 109 | If no output file is specified, futility gbb will write back to image_file. |
| 110 | |
| 111 | ### Values to be Changed |
| 112 | |
| 113 | There could be multiple values to be changed at one time. |
| 114 | |
| 115 | \--hwid=HWID |
| 116 | |
| 117 | : The new hardware id to be changed. |
| 118 | |
| 119 | \--flags=FLAGS |
| 120 | |
| 121 | : The new (numeric) flags value or +/- diff value. |
| 122 | |
| 123 | ### New File Names of Output |
| 124 | |
| 125 | -k, \--rootkey=FILE |
| 126 | |
| 127 | : File name of new Root Key. |
| 128 | |
| 129 | -b, \--bmpfv=FILE |
| 130 | |
| 131 | : File name of new Bitmap FV. |
| 132 | |
| 133 | -r \--recoverykey=FILE |
| 134 | |
| 135 | : File name of new Recovery Key. |
| 136 | |
| 137 | FLASH Options |
| 138 | ------------- |
| 139 | |
| 140 | In GET and SET mode, the following options modify the behaviour of flashing. |
| 141 | Presence of any of these implies \--flash. |
| 142 | |
| 143 | -p, \--programmer=PRG |
| 144 | |
| 145 | : Change AP (host) flashrom programmer |
| 146 | |
| 147 | \--ccd_without_servod |
| 148 | |
| 149 | : Flash via Case Closed Debugging (CCD) without servod (similar to |
| 150 | `--fast --force --wp=0 -p=raiden_debug_spi`). Note this |
| 151 | may be unsafe on some boards, and using `--servo` is preferred whenever |
| 152 | possible. |
| 153 | |
| 154 | \--emulate=FILE |
| 155 | |
| 156 | : Emulate system firmware using file |
| 157 | |
| 158 | \--servo |
| 159 | |
| 160 | : Flash using Servo (v2, v4, micro, ...) |
| 161 | |
| 162 | \--servo_port=PRT |
| 163 | |
| 164 | : Override servod port, implies \--servo |
| 165 | |
| 166 | EXAMPLES |
| 167 | ======== |
| 168 | |
| 169 | Get information from $FILE |
| 170 | |
| 171 | futility gbb --get $FILE |
| 172 | futility gbb --get --hwid $FILE |
| 173 | futility gbb --get --flags $FILE |
| 174 | futility gbb --get --digest $FILE |
| 175 | futility gbb --get --hwid --flags --digest $FILE |
| 176 | |
| 177 | Get the names of GBB flags |
| 178 | |
| 179 | futility gbb --get -e $FILE |
| 180 | |
| 181 | Get information from host flash |
| 182 | |
| 183 | futility gbb --get --flash |
| 184 | futility gbb --get --hwid --flash |
| 185 | futility gbb --get --flags --flash |
| 186 | futility gbb --get --digest --flash |
| 187 | |
| 188 | Get information from flash using servo |
| 189 | |
| 190 | futility gbb --get --servo |
| 191 | futility gbb --get --flash --servo |
| 192 | |
| 193 | Export the rootkey from $FILE to $ROOTKEY_FILE |
| 194 | |
| 195 | futility gbb --rootkey=$ROOTKEY_FILE $FILE |
| 196 | |
| 197 | Set values from $FILE and overwrite it |
| 198 | |
| 199 | futility gbb --set --flags=$FLAGS $FILE |
| 200 | futility gbb --set --hwid=$HWID $FILE |
| 201 | futility gbb --set --flags=$FLAGS $FILE --hwid=$HWID $FILE |
| 202 | |
| 203 | Set values from $FILE to $OUT_FILE |
| 204 | |
| 205 | futility gbb --set --flags=$FLAGS $FILE $OUT_FILE |
| 206 | futility gbb --set --flags=$FLAGS $FILE -o $OUT_FILE |
| 207 | |
| 208 | Read from flash and write back new values using host flash |
| 209 | |
| 210 | futility gbb --set --flags=$FLAGS --flash |
| 211 | |
| 212 | Read from servo and write back new values using servo |
| 213 | |
| 214 | futility gbb --set --flags=$FLAGS --servo |
| 215 | |
| 216 | Create a GBB blob |
| 217 | |
| 218 | futility gbb --create $HWIDSIZE,$ROOTKEYSIZE,$BMPFVSIZE,$RECOVERYKEYSIZE |