From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan McDowell Date: Tue, 6 Jun 2006 21:13:56 +0100 Subject: [U-Boot-Users] [PATCH] Fix CRAMFS failure to compile if CFG_NO_FLASH. Message-ID: <20060606201355.GW14634@earth.li> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de I'm working on u-boot support for the Amstrad Delta (E3) video phone. Currently this is running with NAND but not NOR support. However when JFFS2 support is compiled into u-boot this pulls in CRAMFS, which fails to compile if CFG_NO_FLASH is set. The attached patch fixes this by adding stub cramfs functions in the case when this is set, which allows JFFS2 support to build and run. Patch is against current git. J. -- /-\ | How I wish, how I wish you were |@/ Debian GNU/Linux Developer | here. \- | -------------- next part -------------- diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c index 48e7f63..12476f2 100644 --- a/fs/cramfs/cramfs.c +++ b/fs/cramfs/cramfs.c @@ -29,6 +29,8 @@ #include #if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#ifndef CFG_NO_FLASH + #include #include #include @@ -344,4 +346,28 @@ int cramfs_check (struct part_info *info return 1; } +#else /* CFG_NO_FLASH */ + +int cramfs_check(struct part_info *info) +{ + return 0; +} + +int cramfs_info (struct part_info *info) +{ + return 0; +} + +int cramfs_load (char *loadoffset, struct part_info *info, char *filename) +{ + return -1; +} + +int cramfs_ls (struct part_info *info, char *filename) +{ + return -1; +} + +#endif /*CFG_NO_FLASH */ + #endif /* CFG_FS_CRAMFS */