tools/firmware-utils: mktplinkfw* fix rootfs offset
[openwrt/openwrt.git] / tools / firmware-utils / src / mktplinkfw2.c
index 892c93f..b6caf8a 100644 (file)
@@ -267,10 +267,10 @@ static int check_options(void)
 
                if (rootfs_align) {
                        kernel_len += sizeof(struct fw_header);
-                       kernel_len = ALIGN(kernel_len, rootfs_align);
+                       rootfs_ofs = ALIGN(kernel_len, rootfs_align);
                        kernel_len -= sizeof(struct fw_header);
 
-                       DBG("kernel length aligned to %u", kernel_len);
+                       DBG("rootfs offset aligned to 0x%u", rootfs_ofs);
 
                        if (kernel_len + rootfs_info.file_size >
                            layout->fw_max_len - sizeof(struct fw_header)) {