WRT54G no space on jffs2

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

WRT54G no space on jffs2

Paul Hilton
I built the WRT54G ewrt with owfs (Christan's source) by building ewrt,
patching & rebuilding. It seems to work fine, 1-wire directory and
devices all working etc. The image is about 3.3MB.

I am running this on a WRT54G v3.0.

There is no space on the jffs2 (/opt) partition, it shows as being
mounted but 100% full, total size about 300k. There are no files
in /opt.

If I build ewrt alone (image about 2.9MB) then the total size shown for
the jffs2 is 832k, 39% full, 324k used with /opt empty. I don't what is
using this space.

How much space are other people seeing as being available in /opt?

Paul Hilton



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: WRT54G no space on jffs2

Christian Magnusson

Oops... I'm so sorry for missing a patch to the kernel that I made.
ewrt works good with the current settings, but since my patches add
some more binaries to the flash-memory, there are much less memory
left for the jffs2 file-system.

To solve the problem I patched
ewrt-0.3/src/linux/linux/fs/jffs2/nodelist.h
and decreased the number of reserved blocks for the system. There
_might_ be a problem if many processes write to the /opt directory
at the same time, but otherwise it should work just fine.

Download the patch from:
http://home.mag.cx/uclinux/wrt54g/source/jffs2_diff.txt

You might need to clean the kernel-directory, or perhaps only
linux/fs/jffs2/*.o, or perhaps the dependencies will recompile
the necessary files automatically after the patch. I'm not sure...

I will add this patch in the next source-tar-file... Thanks for
pointing it out for me... :)

/Christian


On Wed, 2005-06-15 at 18:10, Paul Hilton wrote:

> I built the WRT54G ewrt with owfs (Christan's source) by building ewrt,
> patching & rebuilding. It seems to work fine, 1-wire directory and
> devices all working etc. The image is about 3.3MB.
>
> I am running this on a WRT54G v3.0.
>
> There is no space on the jffs2 (/opt) partition, it shows as being
> mounted but 100% full, total size about 300k. There are no files
> in /opt.
>
> If I build ewrt alone (image about 2.9MB) then the total size shown for
> the jffs2 is 832k, 39% full, 324k used with /opt empty. I don't what is
> using this space.
>
> How much space are other people seeing as being available in /opt?
>
> Paul Hilton
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

WRT54G for LINUX dumbkoff

Gus S Calabrese
Amazon is offering a good price on the WRT54G.
What is the simplest path for a LINUX dumbkoff
to get owfs working ?  I have never compiled Linux
source.





Gus Salvatore Calabrese 720.222.1309  GSC
www.omegadogs.com   Denver, CO




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: WRT54G for LINUX dumbkoff

Paul Hilton
The simplest path is to use a regular PC,

for a WRT54G:
There are no guarantees here, you will certainly void any warranties,
you may end up with a WRT54G that is unresponsive and requires more
complex operations to recover it, if at all. However it worked for me,
and seems to have worked for many others.

Assuming you are familiar with the normal operation of such a router via
it's web interface:

Acquire a WRT54G

Buy a 1-wire interface board from David Lissiuk ( [hidden email] ) at
Springbok Digitronics, ready built.

The hardest part: Mount the 1 wire interface board and socket in the
WRT54G box

Download Christian Magnusson's binary operating system and software from
http://prdownloads.sourceforge.net/owfs/owfs_wrt54g-firmware-1.1.tar.gz
extract it, read the instructions and send the binary to the router via
the 'upgrade' tab on the router's web interface.

Good luck, let us know how it goes.

Paul Hilton

On Wed, 2005-06-15 at 18:56 -0600, Gus Salavatore Calabrese wrote:

> Amazon is offering a good price on the WRT54G.
> What is the simplest path for a LINUX dumbkoff
> to get owfs working ?  I have never compiled Linux
> source.
>
>
>
>
>
> Gus Salvatore Calabrese 720.222.1309  GSC
> www.omegadogs.com   Denver, CO
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: WRT54G no space on jffs2

Paul Hilton
In reply to this post by Christian Magnusson
Christian,

thanks for the patch, it does the job just fine, /opt now shows 188 1k
blocks available.

What size blocks does JFFS2_RESERVED_BLOCKS_... refer to though? The
patch reduces it from 3 to 1, or 5 to 2 to allow a write, but that still
results in df showing 132 1k blocks as used.

Paul Hilton

On Wed, 2005-06-15 at 23:29 +0200, Christian Magnusson wrote:

> Oops... I'm so sorry for missing a patch to the kernel that I made.
> ewrt works good with the current settings, but since my patches add
> some more binaries to the flash-memory, there are much less memory
> left for the jffs2 file-system.
>
> To solve the problem I patched
> ewrt-0.3/src/linux/linux/fs/jffs2/nodelist.h
> and decreased the number of reserved blocks for the system. There
> _might_ be a problem if many processes write to the /opt directory
> at the same time, but otherwise it should work just fine.
>
> Download the patch from:
> http://home.mag.cx/uclinux/wrt54g/source/jffs2_diff.txt
>
> You might need to clean the kernel-directory, or perhaps only
> linux/fs/jffs2/*.o, or perhaps the dependencies will recompile
> the necessary files automatically after the patch. I'm not sure...
>
> I will add this patch in the next source-tar-file... Thanks for
> pointing it out for me... :)
>
> /Christian
>
>




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: WRT54G no space on jffs2

Christian Magnusson

If you look in /proc/mtd, you see that the flash-erase-size is
detected to 0x10000 = 64kb for the mtd4 area.

ewrt ~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                 2816      2816         0 100% /
/dev/mtdblock/4            320       132       188  41% /opt

ewrt ~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "pmon"
mtd1: 003b0000 00010000 "linux"
mtd2: 002b439e 00010000 "rootfs"
mtd3: 00010000 00010000 "nvram"
mtd4: 00050000 00010000 "jffs2"

When you are going to write something to the jffs2 filesystem, then
you should have some reserved blocks to write your changes, and
when the operation is done the old block is erased.

Normally a flash contains more than 64 separate erase-blocks,
and in that case it's no bid deal if 3-5 blocks are reserved to
for write-changes.
But in this case there are only 5 blocks left (0x50000 bytes) in the
flash for the jffs2-filesystem, and then we have to tweek those
reserved blocks to make it possible to have a filesystem at all.

128kb is always marked used since they are reserved according
to the nodelist.h. (2 blocks)
(If you have a 8Mb flash with two erase-blocks (I don't know if it
exists), it will be 100% full after creating a jffs2-filesystem.)

If you add more binaries to the root-filesystem, mtd2 will grow and
sooner or latest you will only have 0x40000 bytes available for your
jffs2-filesystem, and only 128kb free when empty.

/Christian


On Thu, 2005-06-16 at 13:00 -0400, Paul Hilton wrote:

> Christian,
>
> thanks for the patch, it does the job just fine, /opt now shows 188 1k
> blocks available.
>
> What size blocks does JFFS2_RESERVED_BLOCKS_... refer to though? The
> patch reduces it from 3 to 1, or 5 to 2 to allow a write, but that still
> results in df showing 132 1k blocks as used.
>
> Paul Hilton
>
> On Wed, 2005-06-15 at 23:29 +0200, Christian Magnusson wrote:
> > Oops... I'm so sorry for missing a patch to the kernel that I made.
> > ewrt works good with the current settings, but since my patches add
> > some more binaries to the flash-memory, there are much less memory
> > left for the jffs2 file-system.
> >
> > To solve the problem I patched
> > ewrt-0.3/src/linux/linux/fs/jffs2/nodelist.h
> > and decreased the number of reserved blocks for the system. There
> > _might_ be a problem if many processes write to the /opt directory
> > at the same time, but otherwise it should work just fine.
> >
> > Download the patch from:
> > http://home.mag.cx/uclinux/wrt54g/source/jffs2_diff.txt
> >
> > You might need to clean the kernel-directory, or perhaps only
> > linux/fs/jffs2/*.o, or perhaps the dependencies will recompile
> > the necessary files automatically after the patch. I'm not sure...
> >
> > I will add this patch in the next source-tar-file... Thanks for
> > pointing it out for me... :)
> >
> > /Christian
> >
> >
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
--
Christian Magnusson <[hidden email]>



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers