Fix CRAMFS failure to compile if CFG_NO_FLASH.
PATCH 1/1 Fix CRAMFS failure to compile if CFG_NO_FLASH.
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.
Signature · 4 lines
/-\ | How I wish, how I wish you were |@/ Debian GNU/Linux Developer | here. \- | -------------- next part --------------
fs/cramfs/cramfs.c +26 -0
@@ -29,6 +29,8 @@ #include <malloc.h>#if (CONFIG_COMMANDS &CFG_CMD_JFFS2 ) +#ifndef CFG_NO_FLASH +#include <asm/byteorder.h> #include <linux/stat.h> #include <jffs2/jffs2.h>
@@ -344,4 +346,28 @@ int cramfs_check (struct part_info *inforeturn 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 */