Adrian Bunk | 8 Jan 2005 22:47
Picon

[2.6 patch] fs/jffs/: possible cleanups

The patch below contains the following possible cleanups:
- make some needlessly global code static
- #if 0 the following unused functions:
  - intrep.c: jffs_print_file
  - jffs_fm.c: jffs_print_node_ref

diffstat output:
 fs/jffs/inode-v23.c  |   10 +++----
 fs/jffs/intrep.c     |   60 ++++++++++++++++++++++++++++++-------------
 fs/jffs/intrep.h     |   32 +---------------------
 fs/jffs/jffs_fm.c    |   12 ++++++--
 fs/jffs/jffs_fm.h    |    6 +---
 include/linux/jffs.h |    1 
 6 files changed, 61 insertions(+), 60 deletions(-)

Signed-off-by: Adrian Bunk <bunk <at> stusta.de>

--- linux-2.6.10-mm2-full/fs/jffs/inode-v23.c.old	2005-01-08 04:00:49.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/jffs/inode-v23.c	2005-01-08 04:01:36.000000000 +0100
 <at>  <at>  -334,7 +334,7  <at>  <at> 
 } /* jffs_notify_change()  */

 
-struct inode *
+static struct inode *
 jffs_new_inode(const struct inode * dir, struct jffs_raw_inode *raw_inode,
 	       int * err)
 {
 <at>  <at>  -376,7 +376,7  <at>  <at> 
 }
(Continue reading)

Adrian Bunk | 8 Jan 2005 22:51
Picon

[2.6 patch] fs/jffs2/: possible cleanups

The patch below contains the following cleanups:
- make some needlessly global functions static
- remove the following unused global functions:
  - compr.c: jffs2_set_compression_mode
  - compr.c: jffs2_get_compression_mode

diffstat output:
 fs/jffs2/compr.c       |   10 ----------
 fs/jffs2/compr.h       |    3 ---
 fs/jffs2/compr_rtime.c |   12 ++++++++----
 fs/jffs2/erase.c       |    3 ++-
 fs/jffs2/file.c        |   15 +++++++++++----
 fs/jffs2/fs.c          |    3 ++-
 fs/jffs2/nodelist.h    |    1 -
 fs/jffs2/os-linux.h    |    5 -----
 fs/jffs2/wbuf.c        |    2 +-
 9 files changed, 24 insertions(+), 30 deletions(-)

Signed-off-by: Adrian Bunk <bunk <at> stusta.de>

--- linux-2.6.10-mm2-full/fs/jffs2/compr.h.old	2005-01-08 04:16:42.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/jffs2/compr.h	2005-01-08 04:18:40.000000000 +0100
 <at>  <at>  -41,9 +41,6  <at>  <at> 
 #define JFFS2_COMPR_MODE_PRIORITY   1
 #define JFFS2_COMPR_MODE_SIZE       2

-void jffs2_set_compression_mode(int mode);
-int jffs2_get_compression_mode(void);
-
 struct jffs2_compressor {
(Continue reading)

Michael Richardson | 17 Jan 2005 21:01
Picon

updating jffs2 images


I am working on an embedded box that operates as a NAS.
Since it has removeable media, it would be nice to be able to update
the system by inserting some special media (along with some jumpers
being set, naturally).

The kernel and the u-boot is no problem. They have their own flash
partitions. The / jffs image is. I don't want to do this from u-boot.

I wonder if the following might "work".
  a) cp scripts, erase, dd, "reboot" to /tmp
  b) mount -o ro,remount /
  c) erase /dev/mtdblock/4
  d) dd if=newimage of=/dev/mtdblock/4
  e) /tmp/reboot

I don't see how we can pivotroot off of the flash, since /sbin/init
is loaded from it.

--

-- 
] Michael Richardson          Xelerance Corporation, Ottawa, ON |  firewalls  [
] mcr  <at>  xelerance.com           Now doing IPsec training, see   |net architect[
] http://www.sandelman.ca/mcr/    www.xelerance.com/training/   |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [

Alan Cox | 18 Jan 2005 02:04
Picon

Re: updating jffs2 images

On Llu, 2005-01-17 at 20:01, Michael Richardson wrote:
> I don't see how we can pivotroot off of the flash, since /sbin/init
> is loaded from it.

With advanced planning you can make it work I think.

in your init detect and mount update media
exec media/upgrade
in that pivot_root, cd, umount, dd

Since you are now running just an init off the flash media you can
umount the original root I think

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo <at> axis.com

Adrian Bunk | 24 Jan 2005 21:25
Picon

[2.6 patch] fs/jffs2/: misc cleanups

This patch contains the following cleanups:
- make some needlessly global functions static
- remove the following unused global functions:
  - compr.c: jffs2_set_compression_mode
  - compr.c: jffs2_get_compression_mode

Signed-off-by: Adrian Bunk <bunk <at> stusta.de>

---

 fs/jffs2/compr.c       |   10 ----------
 fs/jffs2/compr.h       |    3 ---
 fs/jffs2/compr_rtime.c |   12 ++++++++----
 fs/jffs2/erase.c       |    3 ++-
 fs/jffs2/file.c        |   15 +++++++++++----
 fs/jffs2/fs.c          |    3 ++-
 fs/jffs2/nodelist.h    |    1 -
 fs/jffs2/os-linux.h    |    5 -----
 fs/jffs2/wbuf.c        |    2 +-
 9 files changed, 24 insertions(+), 30 deletions(-)

This patch was already sent on:
- 8 Jan 2005

--- linux-2.6.10-mm2-full/fs/jffs2/compr.h.old	2005-01-08 04:16:42.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/jffs2/compr.h	2005-01-08 04:18:40.000000000 +0100
 <at>  <at>  -41,9 +41,6  <at>  <at> 
 #define JFFS2_COMPR_MODE_PRIORITY   1
 #define JFFS2_COMPR_MODE_SIZE       2

(Continue reading)

Adrian Bunk | 24 Jan 2005 21:25
Picon

[2.6 patch] fs/jffs/: misc cleanups

This patch contains the following cleanups:
- make some needlessly global code static
- #if 0 the following unused functions:
  - intrep.c: jffs_print_file
  - jffs_fm.c: jffs_print_node_ref

Signed-off-by: Adrian Bunk <bunk <at> stusta.de>

---

 fs/jffs/inode-v23.c  |   10 +++----
 fs/jffs/intrep.c     |   60 ++++++++++++++++++++++++++++++-------------
 fs/jffs/intrep.h     |   32 +---------------------
 fs/jffs/jffs_fm.c    |   12 ++++++--
 fs/jffs/jffs_fm.h    |    6 +---
 include/linux/jffs.h |    1 
 6 files changed, 61 insertions(+), 60 deletions(-)

This patch was already sent on:
- 8 Jan 2005

--- linux-2.6.10-mm2-full/fs/jffs/inode-v23.c.old	2005-01-08 04:00:49.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/jffs/inode-v23.c	2005-01-08 04:01:36.000000000 +0100
 <at>  <at>  -334,7 +334,7  <at>  <at> 
 } /* jffs_notify_change()  */

 
-struct inode *
+static struct inode *
 jffs_new_inode(const struct inode * dir, struct jffs_raw_inode *raw_inode,
(Continue reading)


Gmane