[SLOF] [PATCH slof 0/7] sloffs: tool to read and write SLOF images
aik at ozlabs.ru
Wed Jul 27 16:19:13 AEST 2016
Here is a rework of "sloffs: tool to read and write SLOF images"
1. reordered patches to have the existing code rework first
2. squashed compiler warning fixes to where the warnings were introduced
3. moved unrelated changes to where they belong to reduce changing
the same lines over again in this patchset
I am still thinking of squashing 4..7 into 3, will this make the patchset
I did not add "big fat comment" about "char date" in "struct stH"
as I do not know what to comment precisely and whether it is really needed.
Please comment. Thanks.
This is the original cover letter.
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 (7):
tools: remove unused parts from the Makefile
romfs: factored out crc code, to make it usable from other locations
tools: added initial version of sloffs
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: add copy functionality
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 | 743 +++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 1042 insertions(+), 271 deletions(-)
create mode 100644 romfs/tools/crclib.c
create mode 100644 romfs/tools/crclib.h
create mode 100644 tools/sloffs.c
More information about the SLOF