diff -Nur linux-mips-cvs/Documentation/Configure.help linux-mips/Documentation/Configure.help --- linux-mips-cvs/Documentation/Configure.help 2005-01-20 03:19:21.000000000 +0100 +++ linux-mips/Documentation/Configure.help 2005-02-07 05:08:35.000000000 +0100 @@ -17528,6 +17528,32 @@ If reporting bugs, please try to have available a full dump of the messages at debug level 1 while the misbehaviour was occurring. +ARMLIB compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_ARMLIB + This enables ARMLIB support for BBC. + +LZO1X-* compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_LZO + This enables LZO1X-1 and LZO1X-999 support for BBC. (fast & good + compressor, beats ZLIB in everything) + +LZARI compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_LZARI + This enables LempelZiv-Storer-Szymanski compression for BBC with + additional arithmetic coding (damn slow, but best compresor). + +LZHD compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_LZHD + This enables LempelZiv-Storer-Szymanski compression for BBC with + additional dynamic Huffman coding (a little faster than LZARI, and + it's compression ratio is a little worse than LZARI's) + +LZSS compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_LZSS + This enables simple LempelZiv-Storer-Szymanski compression for BBC + (faster than LZHD, and, and has a not-so-good compression ratio, + was included just for testing) + JFFS stats available in /proc filesystem CONFIG_JFFS_PROC_FS Enabling this option will cause statistics from mounted JFFS file systems diff -Nur linux-mips-cvs/fs/Config.in linux-mips/fs/Config.in --- linux-mips-cvs/fs/Config.in 2004-11-19 01:28:47.000000000 +0100 +++ linux-mips/fs/Config.in 2005-02-07 05:08:34.000000000 +0100 @@ -50,6 +50,12 @@ if [ "$CONFIG_JFFS2_FS" = "y" -o "$CONFIG_JFFS2_FS" = "m" ] ; then int 'JFFS2 debugging verbosity (0 = quiet, 2 = noisy)' CONFIG_JFFS2_FS_DEBUG 0 fi +dep_mbool ' ARMLIB compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_ARMLIB $CONFIG_JFFS2_FS +dep_mbool ' LZO1X-* compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_LZO $CONFIG_JFFS2_FS +dep_mbool ' LZARI compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_LZARI $CONFIG_JFFS2_FS +dep_mbool ' LZHD compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_LZHD $CONFIG_JFFS2_FS +dep_mbool ' LZSS compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_LZSS $CONFIG_JFFS2_FS + tristate 'Compressed ROM file system support' CONFIG_CRAMFS bool 'Virtual memory file system support (former shm fs)' CONFIG_TMPFS define_bool CONFIG_RAMFS y diff -Nur linux-mips-cvs/fs/jffs2/Config.in.bbc.inc linux-mips/fs/jffs2/Config.in.bbc.inc --- linux-mips-cvs/fs/jffs2/Config.in.bbc.inc 1970-01-01 01:00:00.000000000 +0100 +++ linux-mips/fs/jffs2/Config.in.bbc.inc 2005-02-07 05:08:34.000000000 +0100 @@ -0,0 +1,5 @@ +dep_mbool ' ARMLIB compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_ARMLIB $CONFIG_JFFS2_FS +dep_mbool ' LZO1X-* compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_LZO $CONFIG_JFFS2_FS +dep_mbool ' LZARI compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_LZARI $CONFIG_JFFS2_FS +dep_mbool ' LZHD compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_LZHD $CONFIG_JFFS2_FS +dep_mbool ' LZSS compression support for BBC (EXPERIMENTAL)' CONFIG_JFFS2_BBC_LZSS $CONFIG_JFFS2_FS diff -Nur linux-mips-cvs/fs/jffs2/Configure.help.bbc.inc linux-mips/fs/jffs2/Configure.help.bbc.inc --- linux-mips-cvs/fs/jffs2/Configure.help.bbc.inc 1970-01-01 01:00:00.000000000 +0100 +++ linux-mips/fs/jffs2/Configure.help.bbc.inc 2005-02-07 05:08:34.000000000 +0100 @@ -0,0 +1,25 @@ +ARMLIB compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_ARMLIB + This enables ARMLIB support for BBC. + +LZO1X-* compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_LZO + This enables LZO1X-1 and LZO1X-999 support for BBC. (fast & good + compressor, beats ZLIB in everything) + +LZARI compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_LZARI + This enables LempelZiv-Storer-Szymanski compression for BBC with + additional arithmetic coding (damn slow, but best compresor). + +LZHD compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_LZHD + This enables LempelZiv-Storer-Szymanski compression for BBC with + additional dynamic Huffman coding (a little faster than LZARI, and + it's compression ratio is a little worse than LZARI's) + +LZSS compression support for BBC (EXPERIMENTAL) +CONFIG_JFFS2_BBC_LZSS + This enables simple LempelZiv-Storer-Szymanski compression for BBC + (faster than LZHD, and, and has a not-so-good compression ratio, + was included just for testing) diff -Nur linux-mips-cvs/fs/jffs2/Kconfig.bbc.inc linux-mips/fs/jffs2/Kconfig.bbc.inc --- linux-mips-cvs/fs/jffs2/Kconfig.bbc.inc 1970-01-01 01:00:00.000000000 +0100 +++ linux-mips/fs/jffs2/Kconfig.bbc.inc 2005-02-07 05:08:34.000000000 +0100 @@ -0,0 +1,40 @@ +config JFFS2_BBC_ARMLIB + bool "ARMLIB compression support for BBC (EXPERIMENTAL)" + depends on JFFS2_FS && EXPERIMENTAL + default y + help + This enables ARMLIB support for BBC. + +config JFFS2_BBC_LZO + bool "LZO1X-* compression support for BBC (EXPERIMENTAL)" + depends on JFFS2_FS && EXPERIMENTAL + default y + help + This enables LZO1X-1 and LZO1X-999 support for BBC. (fast & good + compressor) + +config JFFS2_BBC_LZARI + bool "LZARI compression support for BBC (EXPERIMENTAL)" + depends on JFFS2_FS && EXPERIMENTAL + default y + help + This enables LempelZiv-Storer-Szymanski compression for BBC with + additional arithmetic coding (damn slow, but best compresor). + +config JFFS2_BBC_LZHD + bool "LZHD compression support for BBC (EXPERIMENTAL)" + depends on JFFS2_FS && EXPERIMENTAL + default y + help + This enables LempelZiv-Storer-Szymanski compression for BBC with + additional dynamic Huffman coding (a little faster than LZARI, and + it's compression ratio is a little worse than LZARI's) + +config JFFS2_BBC_LZSS + bool "LZSS compression support for BBC (EXPERIMENTAL)" + depends on JFFS2_FS && EXPERIMENTAL + default y + help + This enables simple LempelZiv-Storer-Szymanski compression for BBC + (faster than LZHD, and, and has a not-so-good compression ratio, + was included just for testing) diff -Nur linux-mips-cvs/fs/jffs2/Makefile linux-mips/fs/jffs2/Makefile --- linux-mips-cvs/fs/jffs2/Makefile 2003-08-13 19:19:25.000000000 +0200 +++ linux-mips/fs/jffs2/Makefile 2005-02-07 05:08:34.000000000 +0100 @@ -10,9 +10,23 @@ # Note 2! The CFLAGS definitions are now in the main makefile... +JFFS2_BBC_KERNEL_OBJS-y = jffs2_bbc_framework.o jffs2_bbc_fs.o + +JFFS2_BBC_KERNEL_OBJS-$(CONFIG_JFFS2_BBC_ARMLIB) += jffs2_bbc_armlib_comp.o +JFFS2_BBC_KERNEL_OBJS-$(CONFIG_JFFS2_BBC_LZO) += jffs2_bbc_lzo_comp.o +JFFS2_BBC_KERNEL_OBJS-$(CONFIG_JFFS2_BBC_LZSS) += jffs2_bbc_lzss_comp.o +JFFS2_BBC_KERNEL_OBJS-$(CONFIG_JFFS2_BBC_LZARI) += jffs2_bbc_lzari_comp.o +JFFS2_BBC_KERNEL_OBJS-$(CONFIG_JFFS2_BBC_LZHD) += jffs2_bbc_lzhd_comp.o + +JFFS2_BBC_KERN
From: Alexey Brodkin <abrodkin@synopsys.com>
Subject: openwrt: arc - add OWRTDTB section
This change allows OpenWRT to patch resulting kernel binary with
external .dtb.
That allows us to re-use exactky the same vmlinux on different boards
given its ARC core configurations match (at least cache line sizes etc).
""patch-dtb" searches for ASCII "OWRTDTB:" strign and copies external
.dtb right after it, keeping the string in place.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
arch/arc/kernel/head.S | 10 ++++++++++
arch/arc/kernel/setup.c | 4 +++-
arch/arc/kernel/vmlinux.lds.S | 13 +++++++++++++
3 files changed, 26 insertions(+), 1 deletion(-)
--- a/arch/arc/kernel/head.S
+++ b/arch/arc/kernel/head.S
@@ -49,6 +49,16 @@
1:
.endm
+; Here "patch-dtb" will embed external .dtb
+; Note "patch-dtb" searches for ASCII "OWRTDTB:" string
+; and pastes .dtb right after it, hense the string precedes
+; __image_dtb symbol.
+ .section .owrt, "aw",@progbits
+ .ascii "OWRTDTB:"
+ENTRY(__image_dtb)
+ .fill 0x4000
+END(__image_dtb)
+
.section .init.text, "ax",@progbits
;----------------------------------------------------------------
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -388,6 +388,8 @@ static inline int is_kernel(unsigned lon
return 0;
}
+extern struct boot_param_header __image_dtb;
+
void __init setup_arch(char **cmdline_p)
{
#ifdef CONFIG_ARC_UBOOT_SUPPORT
@@ -401,7 +403,7 @@ void __init setup_arch(char **cmdline_p)
#endif
{
/* No, so try the embedded one */
- machine_desc = setup_machine_fdt(__dtb_start);
+ machine_desc = setup_machine_fdt(&__image_dtb);
if (!machine_desc)
panic("Embedded DT invalid\n");
--- a/arch/arc/kernel/vmlinux.lds.S
+++ b/arch/arc/kernel/vmlinux.lds.S
@@ -30,6 +30,19 @@ SECTIONS
. = CONFIG_LINUX_LINK_BASE;
+ /*
+ * In OpenWRT we want to patch built binary embedding .dtb of choice.
+ * This is implemented with "patch-dtb" utility which searches for
+ * "OWRTDTB:" string in first 16k of image and if it is found
+ * copies .dtb right after mentioned string.
+ *
+ * Note: "OWRTDTB:" won't be overwritten with .dtb, .dtb will follow it.
+ */
+ .owrt : {
+ *(.owrt)
+ . = ALIGN(PAGE_SIZE);
+ }
+
_int_vec_base_lds = .;
.vector : {
*(.vector)