[SLOF] sloffs: tool to read and write SLOF images
Adrian Reber
adrian at lisas.de
Wed Jun 15 18:29:47 AEST 2016
This brings the sloffs code to read, copy and append files to an existing
boot_rom.bin from my repository at https://lisas.de/~adrian/slof/slof.git/ .
This code was written in 2008 and all patches have been cherry-picked
without modifications. Only the last patch (13/13) updates the code
to work with today's compilers.
I was able to test that the code still does what it is supposed to do:
$ ./sloffs -l ../boot_rom.bin
Offset File Name Size Flags
===================================================================
0x00000000 header 0000136 (0x000088) 0x00000000
0x000000d8 stage1 0049832 (0x00c2a8) 0x00000001
0x0000c3b0 xvect 0016128 (0x003f00) 0x00000000
$ ./sloffs ../boot_rom.bin -a sloffs -o new.bin
$ ./sloffs -d new.bin
Magic : magic123
Platform : qemu0
Version : adrian
Build Date : 2016-06-15 09:15
Modify Date : 2016-06-15 10:16
Image Length: 906216 (0xdd3e8) bytes
Revision : 1
Header CRC : 0x0000000060a8d884 CRC check: [OK]
Image CRC : 0x00000000fbacd40d CRC check: [OK]
Files : 50
Adrian Reber (13):
tools: added initial version of sloffs
tools: remove unused parts from the Makefile
tools: added sloffs to Makefile
tools: fixed compiler warnings
tools: describe the options in the help printout
tools: added function to dump header
romfs: factored out crc code, to make it usable from other locations
tools: use crc checking code from romfs/tools
tools: added file append functionality
tools: added support to sloffs to read from /dev/slof_flash
tools: removed a cpu_to_be64() in CRC calculation
tools: add copy functionality
sloffs: fix compiler warnings
romfs/tools/Makefile | 2 +-
romfs/tools/crclib.c | 260 +++++++++++++++
romfs/tools/crclib.h | 23 ++
romfs/tools/create_crc.c | 263 +--------------
tools/.gitignore | 1 +
tools/Makefile | 21 +-
tools/sloffs.c | 740 +++++++++++++++++++++++++++++++++++++++++++
7 files changed, 1039 insertions(+), 271 deletions(-)
More information about the SLOF
mailing list