1 Building boards that have JFFS2 support enabled will fail when using
2 U-Boot's builtin GCC library, for example like this:
4 USE_PRIVATE_LIBGCC=yes ./MAKEALL omap3_evm
6 fs/jffs2/libjffs2.o: In function `jffs2_1pass_build_lists':
7 fs/jffs2/jffs2_1pass.c:1441: undefined reference to `__aeabi_uldivmod'
9 This is caused by a u64 / u32 division in jffs2_1pass.c; the problem
10 can be avoided by using do_div() instead of plain division.
12 Signed-off-by: Wolfgang Denk <wd@denx.de>
13 Reported-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
14 Cc: Chris Ruehl <chris.ruehl@gtsys.com.hk>
17 fs/jffs2/jffs2_1pass.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
20 diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
21 index c856983..a7dbe79 100644
22 --- a/fs/jffs2/jffs2_1pass.c
23 +++ b/fs/jffs2/jffs2_1pass.c
24 @@ -1438,7 +1438,7 @@ jffs2_1pass_build_lists(struct part_info * part)
27 struct jffs2_unknown_node *node;
28 - u32 nr_sectors = part->size/part->sector_size;
29 + u32 nr_sectors = do_div(part->size, part->sector_size);