diff options
Diffstat (limited to 'meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-cramfs_but_no_jffs2.patch')
-rw-r--r-- | meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-cramfs_but_no_jffs2.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-cramfs_but_no_jffs2.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-cramfs_but_no_jffs2.patch new file mode 100644 index 0000000000..349b83697e --- /dev/null +++ b/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-cramfs_but_no_jffs2.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Fix building with CRAMFS but not JFFS2 support | ||
2 | |||
3 | Signed-off-by: Harald Welte <laforge@openmoko.org> | ||
4 | |||
5 | Index: u-boot/fs/cramfs/cramfs.c | ||
6 | =================================================================== | ||
7 | --- u-boot.orig/fs/cramfs/cramfs.c 2007-02-17 11:46:26.000000000 +0100 | ||
8 | +++ u-boot/fs/cramfs/cramfs.c 2007-02-17 11:54:36.000000000 +0100 | ||
9 | @@ -27,7 +27,7 @@ | ||
10 | #include <common.h> | ||
11 | #include <malloc.h> | ||
12 | |||
13 | -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) | ||
14 | +#if (CONFIG_COMMANDS & CFG_CMD_CRAMFS) | ||
15 | |||
16 | #include <asm/byteorder.h> | ||
17 | #include <linux/stat.h> | ||
18 | Index: u-boot/common/cmd_jffs2.c | ||
19 | =================================================================== | ||
20 | --- u-boot.orig/common/cmd_jffs2.c 2007-02-17 11:47:51.000000000 +0100 | ||
21 | +++ u-boot/common/cmd_jffs2.c 2007-02-17 14:08:25.000000000 +0100 | ||
22 | @@ -170,10 +170,19 @@ | ||
23 | static struct mtd_device *current_dev = NULL; | ||
24 | static u8 current_partnum = 0; | ||
25 | |||
26 | +#ifdef CFG_CMD_CRAMFS | ||
27 | extern int cramfs_check (struct part_info *info); | ||
28 | extern int cramfs_load (char *loadoffset, struct part_info *info, char *filename); | ||
29 | extern int cramfs_ls (struct part_info *info, char *filename); | ||
30 | extern int cramfs_info (struct part_info *info); | ||
31 | +#else | ||
32 | +/* defining empty macros for function names is ugly but avoids ifdef clutter | ||
33 | + * all over the code */ | ||
34 | +#define cramfs_check(x) (0) | ||
35 | +#define cramfs_load(x,y,z) (-1) | ||
36 | +#define cramfs_ls(x,y) (0) | ||
37 | +#define cramfs_info(x) (0) | ||
38 | +#endif | ||
39 | |||
40 | static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int part_num); | ||
41 | |||