firmware-utils/mktplinkfw: fix combined image creation
authorGabor Juhos <juhosg@openwrt.org>
Sat, 3 Dec 2011 16:57:21 +0000 (16:57 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 3 Dec 2011 16:57:21 +0000 (16:57 +0000)
SVN-Revision: 29409

tools/firmware-utils/src/mktplinkfw.c

index 04234fd63d38e06060d8414c9e17d6baf04bde04..a1669cee5a4dc6a29cf831141306e4ce9579b954 100644 (file)
@@ -551,7 +551,7 @@ static int build_fw(void)
        if (ret)
                goto out_free_buf;
 
-       writelen = kernel_info.file_size;
+       writelen = sizeof(struct fw_header) + kernel_info.file_size;
 
        if (!combined) {
                p = buf + rootfs_ofs;