summaryrefslogtreecommitdiffstats
path: root/scripts/common.h
Commit message (Collapse)AuthorAgeFilesLines
* scripts/common: Add write_full() and read_full()Sascha Hauer2021-11-101-0/+2
| | | | | | | We have different implementations of read_full() and write_full() in our host tools, use a common implementation for these. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts/common: Add write_file()Sascha Hauer2021-11-011-0/+1
| | | | | | | | write_file() is used once, but can be used in socfpga_mkimage.c as well. Move function to a common place and use it in the SoCFPGA image tool. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: Add common library functionsSascha Hauer2021-11-011-0/+7
Several functions are duplicated in different host tools. This patch starts collecting them in a single C file. We start with read_file() and read_file_2(), others follow in separate commits. It would be great to compile these functions in a separate library, but I don't know how this can be archieved in Kbuild. Instead, the C file is included where needed. Not nice, not beautiful, but at least enough to get something going. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>