X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=tools%2Ffirmware-utils%2Fsrc%2Fimagetag.c;h=90fb7a4c7392a0ecdc59afb79a703b0dcc11505f;hp=6a46a7ebd995a95822ffa7acc63f668e95b9e6e0;hb=008aec391a3f7813ce9584c4bd60e393825a5b3e;hpb=3d1a65adb41db2758827fe81f36d92ab61618ea3 diff --git a/tools/firmware-utils/src/imagetag.c b/tools/firmware-utils/src/imagetag.c index 6a46a7ebd9..90fb7a4c73 100644 --- a/tools/firmware-utils/src/imagetag.c +++ b/tools/firmware-utils/src/imagetag.c @@ -164,6 +164,8 @@ int tagfile(const char *kernel, const char *rootfs, const char *bin, \ /* align the start if requested */ if (args->align_rootfs_flag) rootfsoff = (rootfsoff % block_size) > 0 ? (((rootfsoff / block_size) + 1) * block_size) : rootfsoff; + else + rootfsoff = (rootfsoff % 4) > 0 ? (((rootfsoff / 4) + 1) * 4) : rootfsoff; /* align the end */ rootfsend = rootfsoff + getlen(rootfsfile);