~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff

ACSBaby

Parse Amlogic ACS settings

Usage

$ acsbaby [-f c|readable] [-t acs|bl2|u-boot] [-o offset] file

Options

-f fmt

  • Sets the format to be used to either c or readable. When set to c it generates C files, while when it's set to readable it prints out data parsed from the ACS binary in a human-readable way.

-t type

  • Sets the image type. Can be either acs, bl2, or u-boot. When unset ACSBaby will try to detect which type to use.

-o offset

  • Sets the offset where the ACS footer is to be found. Mainly useful when dealing with signed U-Boot binaries. A small script is provided too for finding the offset to use.

Examples

Parse an ACS binary embedded in a signed U-Boot binary

$ utils/find_acs_offset.sh u-boot.bin # find ACS footer offset
ACS footer found at offset 0x0000a4e0
$ acsbaby -o 0x0000a4e0 u-boot.bin

Parse a standalone ACS binary

$ acsbaby acs.bin

Parse an ACS binary embedded in a BL2 binary

$ acsbaby bl2.bin

Compile

Modify Makefile to fit your needs, then run:

$ make

TODO

  • Support other ACS versions
  • Parse ACS structures (ddrt_, ddrs_, pll__)

Known issues

  • Endianness: Little endian byte order is assumed in the code, thus running on big endian hosts may cause unpredictable misbehaviour.

  • Usefulness: While it should work (with a little bit of effort) on any ACS binary, this is only really useful on Amlogic S905 ACS binaries, because, unlike other SoCs, BL2 isn't encrypted, and so it is possible to parse ACS binaries found on eMMC backups of consumer set-top boxes, for example.