Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Nov 2010 15:58:10 +0200
From:      Aleksandr Rybalko <ray@ddteam.net>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: First RSPRO deployed !
Message-ID:  <20101121155810.e615d4ad.ray@ddteam.net>
In-Reply-To: <AANLkTim3s5oW=w3%2ByWFn6BwKq=UoCROnyfS4kgBm8-aD@mail.gmail.com>
References:  <D74327E9-0A8A-4B46-B4DD-16D0FAF8E3BB@gmail.com> <CBBB7D88-210F-4706-A8FD-83FDA7EBA914@gmail.com> <AANLkTimAWM2UszxUsbnPkt0hra2pj0RqmbqhYMm7eCPv@mail.gmail.com> <201011191201.47230.freebsd-mips@dino.sk> <AANLkTi=58UpFdeGybZqeA0eTugq-B6ebPQ7McPET1QMc@mail.gmail.com> <AANLkTim3s5oW=w3%2ByWFn6BwKq=UoCROnyfS4kgBm8-aD@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Sun, 21 Nov 2010 15:18:45 +0800
Adrian Chadd <adrian@freebsd.org> wrote:

> Nah, the problem is:
> 
> * the large, fixed blocksize that the current flash code has;
> * ffs isn't really optimised for this kind of flash;
> * this kind of flash is will not like constant 4k erase cycles, which
> is unfortunately what you'll end up with.
> 
> My current path forward is:
> 
> * aim to get geom_ulzma into the base :-)
No problem to add geom_ulzma into base, problem with lzma.
LZMA decoder currently stored in geom_ulzma.c, this one has style(9)
problems.
Another one decoder live in libarchive, this one inaccessible by
kernel.
So we need something middle, like zlib in kernel code (why it in net
subdir, but uses with many parts)

> * modify it a bit so it exports two GEOM devices - a read-only device
> with the lzma'ed FS in it, and a read-write'able "rest";
For what?
flash splited by parts by geom_map (old name geom_mtd, loos@ name
geom_flash IIRC), that parts rw, parts where stored ulzma compressed
data handled by GEOM_ULZMA, that RO.

I also use small hack enabled writing for overlapped parts.
Biggest part named "upgrade" overlapped with "kernel" part and "rootfs",
so we can upgrade box when "kernel" and "rootfs" are opened.

> * modify GEOM to pass through disk parameters from the provider, so
> the flash device can export attributes (read size, write sizes, etc);
> * modify the flash driver to have a small default block size (say, 128
> bytes) so small transactions don't require huge amounts of SPI bus
> access;
I use BS=4, since I know many devices that map their FS not to block
boundary.

> * experiment with a simple append-only flash FS, which mounts on top
> of a read-only base filesystem.
> 
> This mirrors what the flash device/fs stuff in linux does to some
> extent. The "rootfs" partition has a read only bit. Any filesystem
> modifications happen in the read-write part -after- that. If the user
> wants, they can simply erase the rootfs part -after- the read-only
> lzma'ed FFS partition, giving them a clean "default" system.
> 
> If someone else wants to give this a go, be my guest. :-)
> 
> 
> Adrian
> 
> On 19 November 2010 19:06, Monthadar Al Jaberi <monthadar@gmail.com>
> wrote:
> > On Fri, Nov 19, 2010 at 12:01 PM, Milan Obuch
> > <freebsd-mips@dino.sk> wrote:
> >> On Thursday 18 November 2010 13:43:51 Monthadar Al Jaberi wrote:
> >>> OMG, thank you Luiz for the file.... Adrian forgot to mention
> >>> that you need to add kern_memstart field to the fw_layout_data
> >>> structure!!!
> >>>
> >>> Its works...so I guess to boot from flash we need to play with the
> >>> flash driver and ffs... thats a totally different story though :P
> >>>
> >>
> >> Well, with mkfwimage it is possible to write FreeBSD into flash on
> >> RSPRO and boot from it. I just verified this. Using it the way
> >> it's used in mkflash script has one drawback, I think - your setup
> >> is static and you are not using whole flash to its best potential
> >> as well. Actually, with patches you are able to read flash
> >> (verified) and probably write to it, too, so the 'only' remaining
> >> part is ffs tuned to use it...
> >
> > mm, as I understood it it should be easy for ffs2 to work, just need
> > to fix some macros so that the code that probes for the superblock
> > work...
> > reading/writting to flash with correct sectorsize is no problem....
> >
> >>
> >> Regards,
> >> Milan
> >>
> >
> >
> >
> > --
> > //Monthadar Al Jaberi
> > _______________________________________________
> > freebsd-mips@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> > To unsubscribe, send any mail to
> > "freebsd-mips-unsubscribe@freebsd.org"
> >
> _______________________________________________
> freebsd-mips@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to
> "freebsd-mips-unsubscribe@freebsd.org"


-- 
Aleksandr Rybalko <ray@ddteam.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101121155810.e615d4ad.ray>