Archive for May 6th, 2012
Orange Pi Development Boards

Editing AllWinner A10 Board Configuration Files (script.bin)

May 6th, 2012 14 comments

AllWinner A10 based devices all have board configuration files in binary format, sometimes refereed to as script.bin, evb.bin, sys_config.{product_nane}.bin store in the FAT partition with the kernel. You may want to decode those binary files to configure your hardware and/or disable/enable peripherals. For the Ubuntu image provided for the Mele A1000 set-top box, the file is called evb.bin and the two other files (mele.bin and sys_config1.mele_mod.bin) are not used.

The filename can change since it is configurable in u-boot e.g.:

load1=fatload mmc 0 43000000 evb.bin
bootcmd=run load1 boot_mmc

If you want to decrypt the binary files into text format (fex), you can retrieve bin2fex tool:

git clone

Build it:

cd sunxi-tools

This will compile both bin2fex (binary to fex text files) and fex2bin (fex files to bin), but the later does not seem to work right now. fex2bin also works now. If you want to decrypt a configuration files type this command line:

./bin2fex evb.bin > evb.fex

The resulting evb.fex will shows the keys and values in text format:

; bin2fex: version: 0.1.2
; bin2fex: size: 42052 (74 sections)
version = “1.0”
machine = “A10-EVB-V1.2”

boot_clock      = 1008
dcdc2_vol       = 1400
dcdc3_vol       = 1250
ldo2_vol        = 3000
ldo3_vol        = 2800
ldo4_vol        = 2800

The text above is just an extract, to see what a full fex file looks like, check out Mele A1000 sys_config1.fex.
There a file called crane_fex_guide.doc which will explain (in Chinese) the meaning of each keys. If you would like to get this documentation, you can download A10 SDK Document (password: ainol).

Once you’ve modified the fex file, it would be good to convert it back to binary to use it in your hardware. At some point, I assume it will be possible to use fex2bin tool above [Update: it works now]. You can also use script.exe in Windows. To get this tools (and some others), download tools.tar.bz2  download tools.tar (password: ainol),  extract it and you can find the tools in tools/crane-win-v2/pctools/mod_update directory. Start a command prompt in Windows , and run the command:

script.exe evb.fex evb.bin

Now simply copy it back to your SD card or flash to try it out. [Update: there also appears to be a fex to bin utilitily for Linux)

The directory tools\crane-win-v2\eFex\configs has quite a few configs for several A10 devices and boards such as the Aino tablet, AllWinner EVBs and Onda tablets. It may be worth having a look, since there are some good comments in English for each section.