aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/otrx/src
Commit message (Collapse)AuthorAgeFilesLines
* otrx: fix memory leak in otrx_create_append_zerosRafał Miłecki2017-11-171-0/+3
| | | | | | A "free" call was missing after allocating a buffer. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* otrx: bump buffer size in otrx_create_append_fileRafał Miłecki2017-11-171-1/+1
| | | | | | | | Usually this function is called for appending some small files only (like fs marks) but let's just make it more generic and capable of handling bigger files easily. Increasing buffer to 1 KiB shouldn't hurt. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* otrx: drop unused otrx_create_parse_options functionRafał Miłecki2017-11-171-6/+0
| | | | | | | | It was there in case of adding some "create" command options that should be parsed before actually creating the output image. It seems we don't need any at this point so let's drop this function for now. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* otrx: always align image to 0x1000Rafał Miłecki2017-11-161-1/+7
| | | | | | | This seems to match what the original trx tool and mjn3's replacement do. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* otrx: add support for -A (append) and -a (align) optionsRafał Miłecki2017-11-141-1/+24
| | | | | | They are inspired and compatible with the original and mjn3's trx tool. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* otrx: optimize memory usage when creating TRX imageRafał Miłecki2017-11-141-14/+7
| | | | | | | | There is no need to allocate buffer as big as the whole image in order to calculate CRC32. It's enough to use small buffer and just read file content block by block. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* otrx: use helper function when checking image's CRC32Rafał Miłecki2017-11-141-7/+3
| | | | | | | | This requires changing this helper to accept initial/current CRC32 value as argument but it allows dropping duplicated (complex?) code calculating the CRC32. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* otrx: add extra compilation check before using __BYTE_ORDERRafał Miłecki2015-06-221-0/+4
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 46106
* otrx: include endian.h to make __BYTE_ORDER work with muslRafał Miłecki2015-06-221-0/+1
| | | | | | | | | | | | Without this the condition if __BYTE_ORDER == __BIG_ENDIAN was always true. Thanks Szabolcs. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 46105
* otrx: optimize memory usage by function checking TRX CRCRafał Miłecki2015-06-201-16/+18
| | | | | | | | Allocating huge buffer for the whole TRX wasn't too optimal. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 46078
* otrx: make crc32 table global for further optimizationsRafał Miłecki2015-06-201-67/+68
| | | | | | | | | | So far we got only one generic function accessing this table, but implementing optimizations will require calculating crc32 in other code parts as well. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 46077
* otrx: support for creating simple TRX filesRafał Miłecki2015-04-141-0/+185
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45444
* otrx: change command line API to start with a modeRafał Miłecki2015-04-142-56/+70
| | | | | | | | This will allow adding more modes without options conflict. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45443
* otrx: use %zd to fix printf format warningsRafał Miłecki2015-04-141-2/+2
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45436
* otrx: check TRX length read from header to avoid Segmentation faultRafał Miłecki2015-04-141-0/+6
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45433
* otrx: include byteswap.h to fix compilation with muslRafał Miłecki2015-04-141-0/+1
| | | | | | | | Fixes #19470 Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45430
* otrx: support for extracting partitionsRafał Miłecki2015-04-121-1/+127
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45390
* otrx: new package with tiny app verifying TRX imagesRafał Miłecki2015-04-092-0/+244
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45315