I'd like comments on the following patch series because it affects bcm47xx which I do not have a device to test with. Any objections to the patches?
They modify the 'fixtrx' related functions so that:
fixtrx patches the CRC in the image header so that the router no longer
complains of a CRC error on boot (caused by routers that check the CRC
on every boot, which therefore notice the changes caused by the jffs2).
a) Compile occurs correctly whether the functions are defined or not on
a given platform (weak references)
b) The functions are defined in a platform-specific file (so for
brcm63xx the functions are defined in imagetag.c and for brcm47xx in
trx.c) which is only compiled for that platform.
c) All use of the functions first check that they are defined. If the
function is not defined it is not used. If it is the correct function
for the platform is used (that is the only function that was compiled
on that platform)
d) Adds the appropriate functions for brcm63xx and executes mtd fixtrx
linux on first boot for devices known to be affected by the CRC problem.
Daniel Dickinson (5):
mtd: Changed mtd_fixtrx and related functions to be weak references.
The weak references only lead to actual functions for brcm47xx
mtd flashmap: Switched to calculating the rootfs size rather than
depending on being given the size in the imagetag. This is because
solving the problem of second boot CRC errors requires changeing
the rootfs size in the image to zero.
mtd: Added fixtrx for brcm63xx imagetag. This allows brcm63xx boards
which experience a CRC on second boot due to the JFFS2 creation /
DEADC0DE deletion to work correctly when mtd fixtrx is run on first
boot
base-files: Added uci-defaults script to run mtd fixtrx on firstboot
for devices that need it.
mtd: Added trx_fixup for brcm63xx imagetag, and made references to
fix_trx use the weak reference rather than the brcm47xx ifdef. This
fixes a bug in which sysupgrade failed due to changing bad CRC on
reboot.
package/mtd/src/Makefile | 1 +
package/mtd/src/bcm_tag.h | 1 +
package/mtd/src/imagetag.c | 315
++++++++++++++++++++
package/mtd/src/jffs2.c | 12 +-
package/mtd/src/mtd.c | 129 ++-------
package/mtd/src/mtd.h | 8 +-
package/mtd/src/trx.c | 98
++++++- .../base-files/etc/uci-defaults/brcm63xx_fixcrc.sh | 20
++ .../patches-2.6.35/040-bcm963xx_flashmap.patch | 57 ++++- 9
files changed, 515 insertions(+), 126 deletions(-) create mode 120000
package/mtd/src/bcm_tag.h create mode 100644 package/mtd/src/imagetag.c
signature.asc
Description: PGP signature
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
