[U-Boot-Users] [PATCH] Fix building with CRAMFS but no JFFS2 support

Grant Likely grant.likely at secretlab.ca
Sat Feb 17 08:01:06 CET 2007


On 2/16/07, Harald Welte <laforge at openmoko.org> wrote:
> Hi!
>
> Fix building with CRAMFS but not JFFS2 support
>
> Signed-off-by: Harald Welte <laforge at openmoko.org>
>
> Index: u-boot.git/fs/cramfs/cramfs.c
> ===================================================================
> --- u-boot.git.orig/fs/cramfs/cramfs.c  2007-02-07 16:47:39.000000000 +0100
> +++ u-boot.git/fs/cramfs/cramfs.c       2007-02-07 16:48:01.000000000 +0100
> @@ -27,7 +27,7 @@
>  #include <common.h>
>  #include <malloc.h>
>
> -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
> +#if (CONFIG_COMMANDS & CFG_CMD_CRAMFS)
<<<original code>>>
> +#else
<<<bunch of empty stubs>>>
>  #endif /* CFG_FS_CRAMFS */
> +

Hmmm...

This code will cause cramfs_* functions to be generated and linked
into all u-boot images, for all boards (even if they are just empty
stubs).  I don't think this is what is wanted.

AFAICS, JFFS2 is the only external user, so the empty stubs should be
conditional on CONFIG_FS_JFFS2.  Alternately, the jffs2 code should be
audited to see if it's reasonable to modify it to only generate calls
to cramfs_* if cramfs is actually configured in.

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195




More information about the U-Boot mailing list