Commit Graph

9 Commits (7eeb254cc49c4e9f837c980826ec112b9404f341)

Author SHA1 Message Date
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Rafał Miłecki df8ca9a5c4 mtd: add -c option for specifying amount of data to be used for checksum
So far fixtrx was calculating checksum over amount of data matching
partition erase size. It was mostly a workaround of checksum problem
after changing anything in initial TRX content (e.g. formatting JFFS2).
Its main purpose was to make bootloader accept modified TRX. This didn't
provide much protection of flash data against corruption.

This new option lets caller request calculating checksum over a bigger
amount of data. It may be used e.g. to include whole kernel data for
checksum and hopefully make bootloader go info failsafe mode if
something goes wrong.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki 2dd125048d mtd: trx: use separated buffer for TRX header
We plan to adjust usage of the main buffer to allow reading custom
amount of data for CRC32. This means we need another buffer that will be
always block aligned.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
8 years ago
Rafał Miłecki b5c41ad28c mtd: detect image format when writing
Recently TRX checking code was changed to detect Seama format and don't
abort whole writing operation because of it. This isn't a good long-term
solution. It's a poor idea to teach every format handler recognizing all
possible formats. Instead it should be handled in a generic code which
should run check depending on the detected format.

This will also allow further improvements like fixing formats other than
TRX after replacing JFFS2.

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

SVN-Revision: 48639
8 years ago
Rafał Miłecki b4468a0d61 mtd: allow writing Seama files to "firmware" on Broadcom targets
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48534
8 years ago
Felix Fietkau 9e233fb241 mtd: add missing <endian.h> include
trx.c in mtd would not include endian.h, so on systems that do not have
this header implicitly included from the other headers (like musl), both
__BYTE_ORDER and __BIG_ENDIAN would be undefined and thus 0, leading to
it always presuming a big-endian system. this would lead to issues when
running mtd fixtrx on little-endian systems, as it would never recognize
the TRX magic as result of the broken STORE32_LE() macro.

Signed-off-by: Shiz <hi@shiz.me>
Tested-by: Shiz <hi@shiz.me>

SVN-Revision: 45896
9 years ago
Felix Fietkau 833c5aab7e mtd: disable trx_check() for ar71xx, fixes a regression introduced in r42403
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42405
10 years ago
Felix Fietkau 766dff7445 mtd: Fix trx check after partition rename ("linux" to "firmware")
On brcm47xx (Huawei E970), I noticed that sysupgrade now tries to flash trx images which don't fit into the flash, resulting in non-booting system.

I found that mtd does trx size checking only when flashing to a partition called "linux". This patch changes this to be "firmware".

This matches the following patch which changed partition name in bcm47xxpart.c driver to "firmware":

commit 86b4d5ef68ca77ff6724ebb9bddd6b93239c87fc
Author: hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
 Date:   Sun Dec 1 16:32:32 2013 +0000

    brcm47xx: use "firmware" partition name
    ...
    Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

    SVN-Revision: 38973

Signed-off-by: Mathias Adam <m.adam--openwrt@adamis.de>

SVN-Revision: 42403
10 years ago
John Crispin 4ebf19b48f packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37007
11 years ago