BCT
Boot Configuration Table
What is it and how to get it
The boot configuration table contains information about which bootloader to boot. On the Surface RT it is stored on the SPI flash. Go to SPI flash, to dump it directly from SPI. Or do it with nvflash (recommended): sudo ./utils/nvflash_v1.13.87205 --getbct --bct surfacert.bin --configfile ./utils/flash.cfg
Decompiling and Compiling
Decompiling
To decompile your BCT into a configuration file, use the tool bct_dump.
Usage: bct_dump <your-bct-file>
Tip you can add > <output-file>
to reroute the output to a file.
Compiling
Compiling configuration file
You can compile your bct.cfg file by using the tool cbootimage.
Usage: cbootimage -s tegra30 -t 30 -gbct <input-bct-configuration-file> <output-bct-file>
Example: cbootimage -s tegra30 -t 30 -gbct surfacert-custom.bct.cfg surfacert-custom.bct
Adding a Bootloader to BCT
To generate a image file with your BCT and provided bootloader, again use cbootimage.
Usage: cbootimage -d -s tegra30 -t 30 <input-config-file> <output-image-file>
Example: cbootimage -d -s tegra30 -t 30 surfacert.config surfacert.output
<input-config-file> is a file controlling how the .img file should be created. It has the following structure:
Example:
Doing this will create a image file of your BCT and the bootloader you provided. The BCT will automatically updated with the correct sizes and hashes.
Last updated