brcm63xx: work around boot failures with squashfs on BCM6368
authorJonas Gorski <[email protected]>
Wed, 4 Nov 2015 11:33:22 +0000 (11:33 +0000)
committerJonas Gorski <[email protected]>
Wed, 4 Nov 2015 11:33:22 +0000 (11:33 +0000)
Due to the LWL/LWR SMP issue on BCM6368, booting with squash might fail
if the rootfs is not word aligned. As a quick fix, work around it by
ensuring this condition is always true.

Reported-by: Álvaro Fernández Rojas <[email protected]>
Signed-off-by: Jonas Gorski <[email protected]>
SVN-Revision: 47380

tools/firmware-utils/src/imagetag.c

index 6a46a7ebd995a95822ffa7acc63f668e95b9e6e0..90fb7a4c7392a0ecdc59afb79a703b0dcc11505f 100644 (file)
@@ -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);