Author: nbd
Date: 2014-09-02 19:14:24 +0200 (Tue, 02 Sep 2014)
New Revision: 42404

Modified:
   branches/barrier_breaker/package/system/mtd/src/trx.c
Log:
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?\197?\130 Mi?\197?\130ecki <[email protected]>

    Backport of r38973

Signed-off-by: Mathias Adam <[email protected]>

Backport of r42403

Modified: branches/barrier_breaker/package/system/mtd/src/trx.c
===================================================================
--- branches/barrier_breaker/package/system/mtd/src/trx.c       2014-09-02 
17:13:42 UTC (rev 42403)
+++ branches/barrier_breaker/package/system/mtd/src/trx.c       2014-09-02 
17:14:24 UTC (rev 42404)
@@ -107,7 +107,7 @@
        const struct trx_header *trx = (const struct trx_header *) buf;
        int fd;
 
-       if (strcmp(mtd, "linux") != 0)
+       if (strcmp(mtd, "firmware") != 0)
                return 1;
 
        *len = read(imagefd, buf, 32);
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to