diff options
author | Rod Whitby <rod@whitby.id.au> | 2006-01-04 15:26:19 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-01-04 15:26:19 +0000 |
commit | 9c895c20853b999e4cc4de2c71e06746261d4321 (patch) | |
tree | 8cbe5e411560f931e212fec0e38a16a9432ff678 /packages | |
parent | 5eccfb8fa47f3bb6a55252bbe4cc7e108f9c410d (diff) |
nslu2-kernel (and friends): Added the jffs2-endian-config patch to allow the JFFS2 endianness to be selected in .config for little-endian kernels with big-endian filesystems. Replaces the jffs2-force-be patch which could not be pushed upsteam. The MTD maintainer has agreed to consider the new patch.
Diffstat (limited to 'packages')
12 files changed, 219 insertions, 45 deletions
diff --git a/packages/linux/ixp4xx-kernel/2.6.15/15-jffs2-endian-config.patch b/packages/linux/ixp4xx-kernel/2.6.15/15-jffs2-endian-config.patch new file mode 100644 index 0000000000..fdebb652a7 --- /dev/null +++ b/packages/linux/ixp4xx-kernel/2.6.15/15-jffs2-endian-config.patch @@ -0,0 +1,68 @@ +--- linux-2.6.15/fs/Kconfig~ 2006-01-03 13:51:10.000000000 +1030 ++++ linux-2.6.15/fs/Kconfig 2006-01-05 01:35:36.000000000 +1030 +@@ -1132,6 +1132,31 @@ config JFFS2_CMODE_SIZE + + endchoice + ++choice ++ prompt "JFFS2 endianness" ++ default JFFS2_NATIVE_ENDIAN ++ depends on JFFS2_FS ++ help ++ You can set here the default endianness of JFFS2 from ++ the available options. Don't touch if unsure. ++ ++config JFFS2_NATIVE_ENDIAN ++ bool "native endian" ++ help ++ Uses a native endian bytestream. ++ ++config JFFS2_BIG_ENDIAN ++ bool "big endian" ++ help ++ Uses a big endian bytestream. ++ ++config JFFS2_LITTLE_ENDIAN ++ bool "little endian" ++ help ++ Uses a little endian bytestream. ++ ++endchoice ++ + config CRAMFS + tristate "Compressed ROM file system support (cramfs)" + select ZLIB_INFLATE +--- linux-2.6.15/fs/jffs2/nodelist.h~ 2006-01-05 01:37:06.000000000 +1030 ++++ linux-2.6.15/fs/jffs2/nodelist.h 2006-01-05 01:37:54.000000000 +1030 +@@ -29,12 +29,10 @@ + #include "os-linux.h" + #endif + +-#define JFFS2_NATIVE_ENDIAN +- + /* Note we handle mode bits conversion from JFFS2 (i.e. Linux) to/from + whatever OS we're actually running on here too. */ + +-#if defined(JFFS2_NATIVE_ENDIAN) ++#if defined(CONFIG_JFFS2_NATIVE_ENDIAN) + #define cpu_to_je16(x) ((jint16_t){x}) + #define cpu_to_je32(x) ((jint32_t){x}) + #define cpu_to_jemode(x) ((jmode_t){os_to_jffs2_mode(x)}) +@@ -42,7 +40,7 @@ + #define je16_to_cpu(x) ((x).v16) + #define je32_to_cpu(x) ((x).v32) + #define jemode_to_cpu(x) (jffs2_to_os_mode((x).m)) +-#elif defined(JFFS2_BIG_ENDIAN) ++#elif defined(CONFIG_JFFS2_BIG_ENDIAN) + #define cpu_to_je16(x) ((jint16_t){cpu_to_be16(x)}) + #define cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)}) + #define cpu_to_jemode(x) ((jmode_t){cpu_to_be32(os_to_jffs2_mode(x))}) +@@ -50,7 +48,7 @@ + #define je16_to_cpu(x) (be16_to_cpu(x.v16)) + #define je32_to_cpu(x) (be32_to_cpu(x.v32)) + #define jemode_to_cpu(x) (be32_to_cpu(jffs2_to_os_mode((x).m))) +-#elif defined(JFFS2_LITTLE_ENDIAN) ++#elif defined(CONFIG_JFFS2_LITTLE_ENDIAN) + #define cpu_to_je16(x) ((jint16_t){cpu_to_le16(x)}) + #define cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)}) + #define cpu_to_jemode(x) ((jmode_t){cpu_to_le32(os_to_jffs2_mode(x))}) diff --git a/packages/linux/ixp4xx-kernel/2.6.15/19-jffs2-force-be.patch b/packages/linux/ixp4xx-kernel/2.6.15/19-jffs2-force-be.patch deleted file mode 100644 index 09379031dd..0000000000 --- a/packages/linux/ixp4xx-kernel/2.6.15/19-jffs2-force-be.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- linux-2.6.15/fs/jffs2/nodelist.h 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.15/fs/jffs2/nodelist.h 1970-01-01 00:00:00.000000000 +0000 -@@ -44,7 +44,9 @@ - #define D2(x) - #endif - --#define JFFS2_NATIVE_ENDIAN -+#undef JFFS2_NATIVE_ENDIAN -+#define JFFS2_BIG_ENDIAN 1 -+#undef JFFS2_LITTLE_ENDIAN - - /* Note we handle mode bits conversion from JFFS2 (i.e. Linux) to/from - whatever OS we're actually running on here too. */ diff --git a/packages/linux/ixp4xx-kernel/2.6.15/defconfig b/packages/linux/ixp4xx-kernel/2.6.15/defconfig index 558a2a104a..5e782ba8f3 100644 --- a/packages/linux/ixp4xx-kernel/2.6.15/defconfig +++ b/packages/linux/ixp4xx-kernel/2.6.15/defconfig @@ -1424,6 +1424,9 @@ CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_NATIVE_ENDIAN is not set +CONFIG_JFFS2_BIG_ENDIAN=y +# CONFIG_JFFS2_LITTLE_ENDIAN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set diff --git a/packages/linux/ixp4xx-kernel_2.6.15.bb b/packages/linux/ixp4xx-kernel_2.6.15.bb index 575fcc3384..5b8451a3e0 100644 --- a/packages/linux/ixp4xx-kernel_2.6.15.bb +++ b/packages/linux/ixp4xx-kernel_2.6.15.bb @@ -8,7 +8,7 @@ PR_CONFIG = "0" # Increment the number below (i.e. the digits after PR) when # making changes within this file or for changes to the patches # applied to the kernel. -PR = "r0.${PR_CONFIG}" +PR = "r1.${PR_CONFIG}" include ixp4xx-kernel.inc @@ -22,7 +22,7 @@ include ixp4xx-kernel.inc IXP4XX_PATCHES = "\ file://00-memory-h-page-shift.patch;patch=1 \ file://10-mtdpart-redboot-fis-byteswap.patch;patch=1 \ - file://19-jffs2-force-be.patch;patch=1 \ + file://15-jffs2-endian-config.patch;patch=1 \ file://40-rtc-class.patch;patch=1 \ file://50-nas100d-arch.patch;patch=1 \ file://60-nslu2-beeper.patch;patch=1 \ diff --git a/packages/linux/nas100d-kernel/2.6.15/15-jffs2-endian-config.patch b/packages/linux/nas100d-kernel/2.6.15/15-jffs2-endian-config.patch new file mode 100644 index 0000000000..fdebb652a7 --- /dev/null +++ b/packages/linux/nas100d-kernel/2.6.15/15-jffs2-endian-config.patch @@ -0,0 +1,68 @@ +--- linux-2.6.15/fs/Kconfig~ 2006-01-03 13:51:10.000000000 +1030 ++++ linux-2.6.15/fs/Kconfig 2006-01-05 01:35:36.000000000 +1030 +@@ -1132,6 +1132,31 @@ config JFFS2_CMODE_SIZE + + endchoice + ++choice ++ prompt "JFFS2 endianness" ++ default JFFS2_NATIVE_ENDIAN ++ depends on JFFS2_FS ++ help ++ You can set here the default endianness of JFFS2 from ++ the available options. Don't touch if unsure. ++ ++config JFFS2_NATIVE_ENDIAN ++ bool "native endian" ++ help ++ Uses a native endian bytestream. ++ ++config JFFS2_BIG_ENDIAN ++ bool "big endian" ++ help ++ Uses a big endian bytestream. ++ ++config JFFS2_LITTLE_ENDIAN ++ bool "little endian" ++ help ++ Uses a little endian bytestream. ++ ++endchoice ++ + config CRAMFS + tristate "Compressed ROM file system support (cramfs)" + select ZLIB_INFLATE +--- linux-2.6.15/fs/jffs2/nodelist.h~ 2006-01-05 01:37:06.000000000 +1030 ++++ linux-2.6.15/fs/jffs2/nodelist.h 2006-01-05 01:37:54.000000000 +1030 +@@ -29,12 +29,10 @@ + #include "os-linux.h" + #endif + +-#define JFFS2_NATIVE_ENDIAN +- + /* Note we handle mode bits conversion from JFFS2 (i.e. Linux) to/from + whatever OS we're actually running on here too. */ + +-#if defined(JFFS2_NATIVE_ENDIAN) ++#if defined(CONFIG_JFFS2_NATIVE_ENDIAN) + #define cpu_to_je16(x) ((jint16_t){x}) + #define cpu_to_je32(x) ((jint32_t){x}) + #define cpu_to_jemode(x) ((jmode_t){os_to_jffs2_mode(x)}) +@@ -42,7 +40,7 @@ + #define je16_to_cpu(x) ((x).v16) + #define je32_to_cpu(x) ((x).v32) + #define jemode_to_cpu(x) (jffs2_to_os_mode((x).m)) +-#elif defined(JFFS2_BIG_ENDIAN) ++#elif defined(CONFIG_JFFS2_BIG_ENDIAN) + #define cpu_to_je16(x) ((jint16_t){cpu_to_be16(x)}) + #define cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)}) + #define cpu_to_jemode(x) ((jmode_t){cpu_to_be32(os_to_jffs2_mode(x))}) +@@ -50,7 +48,7 @@ + #define je16_to_cpu(x) (be16_to_cpu(x.v16)) + #define je32_to_cpu(x) (be32_to_cpu(x.v32)) + #define jemode_to_cpu(x) (be32_to_cpu(jffs2_to_os_mode((x).m))) +-#elif defined(JFFS2_LITTLE_ENDIAN) ++#elif defined(CONFIG_JFFS2_LITTLE_ENDIAN) + #define cpu_to_je16(x) ((jint16_t){cpu_to_le16(x)}) + #define cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)}) + #define cpu_to_jemode(x) ((jmode_t){cpu_to_le32(os_to_jffs2_mode(x))}) diff --git a/packages/linux/nas100d-kernel/2.6.15/19-jffs2-force-be.patch b/packages/linux/nas100d-kernel/2.6.15/19-jffs2-force-be.patch deleted file mode 100644 index 09379031dd..0000000000 --- a/packages/linux/nas100d-kernel/2.6.15/19-jffs2-force-be.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- linux-2.6.15/fs/jffs2/nodelist.h 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.15/fs/jffs2/nodelist.h 1970-01-01 00:00:00.000000000 +0000 -@@ -44,7 +44,9 @@ - #define D2(x) - #endif - --#define JFFS2_NATIVE_ENDIAN -+#undef JFFS2_NATIVE_ENDIAN -+#define JFFS2_BIG_ENDIAN 1 -+#undef JFFS2_LITTLE_ENDIAN - - /* Note we handle mode bits conversion from JFFS2 (i.e. Linux) to/from - whatever OS we're actually running on here too. */ diff --git a/packages/linux/nas100d-kernel/2.6.15/defconfig b/packages/linux/nas100d-kernel/2.6.15/defconfig index 46634df1d5..69832a6da5 100644 --- a/packages/linux/nas100d-kernel/2.6.15/defconfig +++ b/packages/linux/nas100d-kernel/2.6.15/defconfig @@ -1440,6 +1440,9 @@ CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_NATIVE_ENDIAN is not set +CONFIG_JFFS2_BIG_ENDIAN=y +# CONFIG_JFFS2_LITTLE_ENDIAN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set diff --git a/packages/linux/nas100d-kernel_2.6.15.bb b/packages/linux/nas100d-kernel_2.6.15.bb index 337763b2d6..092f5ffc31 100644 --- a/packages/linux/nas100d-kernel_2.6.15.bb +++ b/packages/linux/nas100d-kernel_2.6.15.bb @@ -8,7 +8,7 @@ PR_CONFIG = "0" # Increment the number below (i.e. the digits after PR) when # making changes within this file or for changes to the patches # applied to the kernel. -PR = "r1.${PR_CONFIG}" +PR = "r2.${PR_CONFIG}" include nas100d-kernel.inc @@ -16,7 +16,7 @@ include nas100d-kernel.inc N1K_PATCHES = "\ file://00-memory-h-page-shift.patch;patch=1 \ file://10-mtdpart-redboot-fis-byteswap.patch;patch=1 \ - file://19-jffs2-force-be.patch;patch=1 \ + file://15-jffs2-endian-config.patch;patch=1 \ file://40-rtc-class.patch;patch=1 \ file://50-nas100d-arch.patch;patch=1 \ file://60-nas100d-ide.patch;patch=1 \ diff --git a/packages/linux/nslu2-kernel/2.6.15/15-jffs2-endian-config.patch b/packages/linux/nslu2-kernel/2.6.15/15-jffs2-endian-config.patch new file mode 100644 index 0000000000..fdebb652a7 --- /dev/null +++ b/packages/linux/nslu2-kernel/2.6.15/15-jffs2-endian-config.patch @@ -0,0 +1,68 @@ +--- linux-2.6.15/fs/Kconfig~ 2006-01-03 13:51:10.000000000 +1030 ++++ linux-2.6.15/fs/Kconfig 2006-01-05 01:35:36.000000000 +1030 +@@ -1132,6 +1132,31 @@ config JFFS2_CMODE_SIZE + + endchoice + ++choice ++ prompt "JFFS2 endianness" ++ default JFFS2_NATIVE_ENDIAN ++ depends on JFFS2_FS ++ help ++ You can set here the default endianness of JFFS2 from ++ the available options. Don't touch if unsure. ++ ++config JFFS2_NATIVE_ENDIAN ++ bool "native endian" ++ help ++ Uses a native endian bytestream. ++ ++config JFFS2_BIG_ENDIAN ++ bool "big endian" ++ help ++ Uses a big endian bytestream. ++ ++config JFFS2_LITTLE_ENDIAN ++ bool "little endian" ++ help ++ Uses a little endian bytestream. ++ ++endchoice ++ + config CRAMFS + tristate "Compressed ROM file system support (cramfs)" + select ZLIB_INFLATE +--- linux-2.6.15/fs/jffs2/nodelist.h~ 2006-01-05 01:37:06.000000000 +1030 ++++ linux-2.6.15/fs/jffs2/nodelist.h 2006-01-05 01:37:54.000000000 +1030 +@@ -29,12 +29,10 @@ + #include "os-linux.h" + #endif + +-#define JFFS2_NATIVE_ENDIAN +- + /* Note we handle mode bits conversion from JFFS2 (i.e. Linux) to/from + whatever OS we're actually running on here too. */ + +-#if defined(JFFS2_NATIVE_ENDIAN) ++#if defined(CONFIG_JFFS2_NATIVE_ENDIAN) + #define cpu_to_je16(x) ((jint16_t){x}) + #define cpu_to_je32(x) ((jint32_t){x}) + #define cpu_to_jemode(x) ((jmode_t){os_to_jffs2_mode(x)}) +@@ -42,7 +40,7 @@ + #define je16_to_cpu(x) ((x).v16) + #define je32_to_cpu(x) ((x).v32) + #define jemode_to_cpu(x) (jffs2_to_os_mode((x).m)) +-#elif defined(JFFS2_BIG_ENDIAN) ++#elif defined(CONFIG_JFFS2_BIG_ENDIAN) + #define cpu_to_je16(x) ((jint16_t){cpu_to_be16(x)}) + #define cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)}) + #define cpu_to_jemode(x) ((jmode_t){cpu_to_be32(os_to_jffs2_mode(x))}) +@@ -50,7 +48,7 @@ + #define je16_to_cpu(x) (be16_to_cpu(x.v16)) + #define je32_to_cpu(x) (be32_to_cpu(x.v32)) + #define jemode_to_cpu(x) (be32_to_cpu(jffs2_to_os_mode((x).m))) +-#elif defined(JFFS2_LITTLE_ENDIAN) ++#elif defined(CONFIG_JFFS2_LITTLE_ENDIAN) + #define cpu_to_je16(x) ((jint16_t){cpu_to_le16(x)}) + #define cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)}) + #define cpu_to_jemode(x) ((jmode_t){cpu_to_le32(os_to_jffs2_mode(x))}) diff --git a/packages/linux/nslu2-kernel/2.6.15/19-jffs2-force-be.patch b/packages/linux/nslu2-kernel/2.6.15/19-jffs2-force-be.patch deleted file mode 100644 index 09379031dd..0000000000 --- a/packages/linux/nslu2-kernel/2.6.15/19-jffs2-force-be.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- linux-2.6.15/fs/jffs2/nodelist.h 1970-01-01 00:00:00.000000000 +0000 -+++ linux-2.6.15/fs/jffs2/nodelist.h 1970-01-01 00:00:00.000000000 +0000 -@@ -44,7 +44,9 @@ - #define D2(x) - #endif - --#define JFFS2_NATIVE_ENDIAN -+#undef JFFS2_NATIVE_ENDIAN -+#define JFFS2_BIG_ENDIAN 1 -+#undef JFFS2_LITTLE_ENDIAN - - /* Note we handle mode bits conversion from JFFS2 (i.e. Linux) to/from - whatever OS we're actually running on here too. */ diff --git a/packages/linux/nslu2-kernel/2.6.15/defconfig b/packages/linux/nslu2-kernel/2.6.15/defconfig index 883230ce19..218f2cae76 100644 --- a/packages/linux/nslu2-kernel/2.6.15/defconfig +++ b/packages/linux/nslu2-kernel/2.6.15/defconfig @@ -1420,6 +1420,9 @@ CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_NATIVE_ENDIAN is not set +CONFIG_JFFS2_BIG_ENDIAN=y +# CONFIG_JFFS2_LITTLE_ENDIAN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set diff --git a/packages/linux/nslu2-kernel_2.6.15.bb b/packages/linux/nslu2-kernel_2.6.15.bb index 90e52821dd..69f545b78a 100644 --- a/packages/linux/nslu2-kernel_2.6.15.bb +++ b/packages/linux/nslu2-kernel_2.6.15.bb @@ -8,7 +8,7 @@ PR_CONFIG = "0" # Increment the number below (i.e. the digits after PR) when # making changes within this file or for changes to the patches # applied to the kernel. -PR = "r2.${PR_CONFIG}" +PR = "r3.${PR_CONFIG}" include nslu2-kernel.inc @@ -16,7 +16,7 @@ include nslu2-kernel.inc N2K_PATCHES = "\ file://00-memory-h-page-shift.patch;patch=1 \ file://10-mtdpart-redboot-fis-byteswap.patch;patch=1 \ - file://19-jffs2-force-be.patch;patch=1 \ + file://15-jffs2-endian-config.patch;patch=1 \ file://40-rtc-class.patch;patch=1 \ file://40-scsi-idle.patch;patch=1 \ file://60-nslu2-beeper.patch;patch=1 \ |