Modern version of elf2vkp written in Go
This program:
- Converts each .elf section into a V-Klay patch string.
- Adds old patch data if a fullflash path is specified.
- Supports ELF files produced by IAR and arm-none-eabi-gcc toolchains.
- Supports BABE/CXC/RAW firmware formats.
- Windows: download .exe in Releases.
- Build from sources:
go install github.com/farid1991/elf2vkp-go@latest
- Added support for BABE, CXC, and RAW firmware formats.
- Supports multiple firmware inputs and generates separate VKP outputs per firmware.
- Insert ";pAtChFiLe=/boot/.cxc" header for CXC firmware automatically.
- Fill old bytes with 0xFF for BABE firmware, 0x00 otherwise.
- Handles overlapping firmware sections correctly in emitVKP.
- Preserves user-provided headers and headers from files.
$ elf2vkp-go -i <patch.elf> [options]
Options:
-i <file> Input ELF patch (required)
-f <file> Firmware file (BABE/CXC/RAW),
can be repeated for multiple firmwares
-b <addr> Firmware base address (default: 0)
-o <file> Output VKP file (default: stdout)
If multiple firmwares are specified,
outputs will be split automatically per firmware file.
--header <text> Add header line (repeatable)
--header-from-file <file> Read header lines from a file
--section-names Show ELF section names in output
--chunk-size <n> Number of bytes per line (default: 16)
-v, --version Show version
-h, --help Show this help message$ elf2vkp-go -i patch.elf -o patch.vkp -f U10_R7AA071.bin -b 0x14000000$ elf2vkp-go -i patch.elf -o patch.vkp -f U10_R7AA071/phone_app.cxc$ elf2vkp-go -i patch.elf -o patch.vkp$ elf2vkp-go -i patch.elfelf2vkp-go -i patch.elf -f phone_emp_app.cxc -f phone_app.cxc -o patch.vkp
# Outputs: patch_phone_emp.vkp and patch_phone_app.vkp