aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2023-03-28Fix remaining typos in various foldersThomas Huth2-2/+2
Found with the "codespell" utility Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2021-10-01js2x: Fix compile and cleanupAlexey Kardashevskiy1-1/+1
This moves shared symbols out from the header file and leaves only the minimum in bmc.h. This fixes a "while (...); {" bug spotted by the modern gcc. This fixes cleanup as otherwise the board-js2x/Makefile's "clean" tries cleaning "rtas" which tries cleaning all libs (not just the ones it uses) and that in turn triggers generation of lib/libtpm/Makefile.dep which fails due to missing ./board-js2x/include/version.h. This fixes create_reloc_table.sh to build with newer toolchains which otherwise fail with: ld: cannot use executable file 'reloc_table.o' as input to a link This adds js2x compile to the travis script to know when it breaks again. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2019-11-11sloffs: Fix -Wunused-result gcc warnings in read/writeAlexey Kardashevskiy1-5/+31
This fixes these: sloffs.c:466:2: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] read(fd, data, header_len); ^~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> --- Changes: v2: * size_t -> ssize_t * %ld for size_t -> %zd * changed error handling in sloffs_header() - now it frees sloffs->name
2016-08-16Fix remaining compiler warnings in sloffs.cThomas Huth1-21/+15
With my version of GCC (v4.8.5 - Advance-Toolchain 7.0) there are currently two warnings when compiling sloffs.c: sloffs.c: In function 'sloffs_dump': sloffs.c:437:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] printf("%04x", be16_to_cpu(*(uint16_t *)(header->date + 2))); ^ sloffs.c:449:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] printf("%04x", be16_to_cpu(*(uint16_t *)(header->mdate + 2))); ^ These can be easily fixed by accessing the memory byte by byte instead of casting the pointer to (uint16_t *). And while we're at it, let's also simplify the code a little bit by consolidating the date print code into a separate function which can be used by the two spots that print a date. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-07-27tools: add copy functionalityAdrian Reber1-1/+63
sloffs can now copy a SLOF flash image from one file to another. This is especially useful when the input is not a regular file, but the slof_flash device. The -c, --copy parameter copies only the actual SLOF flash image instead of the whole device. This should result in a file, which is identical to the file from the SLOF build process. (cherry picked from commit 587eb035ac1fb17c3b8ab236bb06e793f08bb3ea) Cherry picked from https://lisas.de/~adrian/slof/slof.git/ Signed-off-by: Adrian Reber <adrian@lisas.de> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-07-27tools: added support to sloffs to read from /dev/slof_flashAdrian Reber1-48/+216
Rewrote all code accessing the input file to not mmap it anymore, because the crappy slof_flash driver does not support mmap but only read/lseek. Using read/lseek sloffs can now operate on a flash file image or directly use the slof_flash device using the same code. (cherry picked from commit 23fa80154b22b14147467160bd33ebc23b9275d1) Cherry picked from https://lisas.de/~adrian/slof/slof.git/ Signed-off-by: Adrian Reber <adrian@lisas.de> [aik: squashed f2aa0523c] Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-07-27tools: added file append functionalityAdrian Reber1-9/+219
The -a, --append can now be used to append any file to flash image filesystem. It is required that -o, --output specifies an output file name. (cherry picked from commit 339c6f4d17cae84526c7cba63928bf7769de5abe) Cherry picked from https://lisas.de/~adrian/slof/slof.git/ Signed-off-by: Adrian Reber <adrian@lisas.de> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-07-27tools: use crc checking code from romfs/toolsAdrian Reber2-3/+21
Added CRC check of the header and complete image when dumping the header. (cherry picked from commit 645bc2cbd550829d43b460663b998b9d4685a2d2) Cherry picked from https://lisas.de/~adrian/slof/slof.git/ Signed-off-by: Adrian Reber <adrian@lisas.de> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-07-27tools: added initial version of sloffsAdrian Reber3-5/+299
sloffs is a tool to get information about the flash images created by the SLOF build process and it will also be able to modify those flash images (cherry picked from commit ec9f4acc3977a81289704fae0ad8bb62f3a93ab1) Cherry picked from https://lisas.de/~adrian/slof/slof.git/ Signed-off-by: Adrian Reber <adrian@lisas.de> [aik: squashed e1e52adb5, e6369bb10b, 4d6f40c47d, 82532ec08; fixed warnings] Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-07-27tools: remove unused parts from the MakefileAdrian Reber1-4/+1
(cherry picked from commit 56b5525adf5473195f890b2e932f39f0d17fed49) Cherry picked from https://lisas.de/~adrian/slof/slof.git/ Signed-off-by: Adrian Reber <adrian@lisas.de> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2013-01-04Spelling fixes in comments and debug messagesStefan Weil1-1/+1
Most of these errors were found by codespell: controler -> controller appropiate -> appropriate devide -> divide comming -> coming seperate -> separate reponsible -> responsible initialization -> initialization successfull -> successful whithin -> within recieve -> receive wich -> which occurence -> occurrence beggining -> beginning accessable -> accessible proccess -> process succesfuly -> successfully immediatly -> immediately prefered -> preferred avaliable -> available threshhold -> threshold statistsics -> statistics endianess -> endianness positon -> position writen -> written occurence -> occurrence upto -> up to overwriten -> overwritten availabe -> available enviroment -> environment intruction -> instruction thru -> through substract -> subtract occured -> occurred begining -> beginning lenght -> length atributes -> attributes preceeding -> preceding defintion -> definition decriptor -> descriptor Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2012-10-17Update .gitignore filesDavid Gibson1-0/+1
This updates a number of .gitignore files to ignore generated targets of various sorts. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2010-12-01Initial import of slof-JX-1.7.0-4Benjamin Herrenschmidt3-0/+188
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>