Commit Graph

24 Commits (4a6795409d1520fd3da3e909a8bcf9d7fd0927bb)

Author SHA1 Message Date
Adrian Schmutzler 8fe5ad5d33 brcm47xx: rename target to bcm47xx
This change makes the names of Broadcom targets consistent by using
the common notation based on SoC/CPU ID (which is used internally
anyway), bcmXXXX instead of brcmXXXX.
This is even used for target TITLE in make menuconfig already,
only the short target name used brcm so far.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Jo-Philipp Wich 74739c4228 treewide: fix syntax errors exposed after kconfig update
After commit e82a4d9cfb ("config: regenerate *_shipped sources") the mconf
parser became more strict as a side effect and started to spew a series of
warnings when evaluating our generated kconfig sources:

  tmp/.config-package.in:705:warning: ignoring unsupported character '@'

The root cause of these warnings is a wrong use of the @SYMBOL dependency
syntax in various Makefile. Fix the corresponding Makefiles by turning
`@SYM||@SYM2` expressions into the proper `@(SYM||SYM2)` form.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Rafał Miłecki 36a92274a8 otrx: fix memory leak in otrx_create_append_zeros
A "free" call was missing after allocating a buffer.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 70837168ef otrx: bump buffer size in otrx_create_append_file
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>
7 years ago
Rafał Miłecki ab8f20c18d otrx: drop unused otrx_create_parse_options function
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>
7 years ago
Rafał Miłecki b15c563929 otrx: always align image to 0x1000
This seems to match what the original trx tool and mjn3's replacement
do.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 3f96e57aed otrx: add support for -A (append) and -a (align) options
They are inspired and compatible with the original and mjn3's trx tool.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki 6d283b8029 otrx: optimize memory usage when creating TRX image
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>
7 years ago
Rafał Miłecki c6761e7c8e otrx: use helper function when checking image's CRC32
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>
7 years ago
Alexandru Ardelean ce2c6e5d24 utils/otrx: drop Build/Prepare rule in favor of default one
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Jo-Philipp Wich 07bdd30906 package: remove duplicate lines from otrx and nvram makefiles
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich b04a25491f package: flag further target specific packages as nonshared
Add nonshared flag to package depending on specific targets or subtargets as
there's no guarantee otherwise that they'll be available in the shared repo.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 69ccef03f9 package: mark nvram and otrx nonshared as they're target specific
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Rafał Miłecki e0a3d9d115 otrx: add extra compilation check before using __BYTE_ORDER
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46106
9 years ago
Rafał Miłecki 0e5c445df6 otrx: include endian.h to make __BYTE_ORDER work with musl
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
9 years ago
Rafał Miłecki 1e6643ff15 otrx: optimize memory usage by function checking TRX CRC
Allocating huge buffer for the whole TRX wasn't too optimal.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46078
9 years ago
Rafał Miłecki c13dede6b1 otrx: make crc32 table global for further optimizations
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
9 years ago
Rafał Miłecki 8b1b857948 otrx: support for creating simple TRX files
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45444
9 years ago
Rafał Miłecki 3cb8bf44e6 otrx: change command line API to start with a mode
This will allow adding more modes without options conflict.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45443
9 years ago
Rafał Miłecki 0bd2710512 otrx: use %zd to fix printf format warnings
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45436
9 years ago
Rafał Miłecki 834e60c4f1 otrx: check TRX length read from header to avoid Segmentation fault
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45433
9 years ago
Rafał Miłecki cd4fd05648 otrx: include byteswap.h to fix compilation with musl
Fixes #19470

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45430
9 years ago
Rafał Miłecki ab6462dd56 otrx: support for extracting partitions
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45390
9 years ago
Rafał Miłecki 71e6325ab8 otrx: new package with tiny app verifying TRX images
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45315
9 years ago