From owner-freebsd-small@FreeBSD.ORG Thu May 18 09:16:33 2006 Return-Path: X-Original-To: freebsd-small@freebsd.org Delivered-To: freebsd-small@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43DDF16A403; Thu, 18 May 2006 09:16:33 +0000 (UTC) (envelope-from jim@netgate.com) Received: from netgate.com (mail.netgate.com [64.62.194.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 008F643D49; Thu, 18 May 2006 09:16:32 +0000 (GMT) (envelope-from jim@netgate.com) Received: from [192.168.2.192] (rrcs-67-52-77-54.west.biz.rr.com [67.52.77.54]) by netgate.com (Postfix) with ESMTP id 46C2F280056; Thu, 18 May 2006 02:16:32 -0700 (PDT) In-Reply-To: <446C2380.6020000@FreeBSD.org> References: <446BBE65.50104@FreeBSD.org> <9f7850090605171746p5ff4dbefq46211ce93aafc116@mail.gmail.com> <446C2380.6020000@FreeBSD.org> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Jim Thompson Date: Wed, 17 May 2006 23:16:22 -1000 To: Benno Rice X-Mailer: Apple Mail (2.750) Cc: gnn@freebsd.org, freebsd-small@freebsd.org Subject: Re: Flash File Systems or Translation Layers? X-BeenThere: freebsd-small@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2006 09:16:33 -0000 On May 17, 2006, at 9:34 PM, Benno Rice wrote: > marty fouts wrote: >> On 5/17/06, Benno Rice wrote: >>> gnn@freebsd.org wrote: >>> > Howdy, >>> > >>> > So, a few of us have talked off list of the need for a flash file >>> > system or translation layer for FreeBSD in order to better >>> target the >>> > kind of boards we want to support. The one lead I had was to a >>> poorly >>> > written, binary only solution with nasty licensing. That is, >>> it was >>> > a dead end. Does anyone know of anything that exists now that we >>> > might coopt or have the knowledge to do this right/well? >>> >>> I thought about doing a port of jffs2. Probably a rewrite >>> actually, so >>> we can have a non-GPL version. It's waiting on me getting to the >>> point >>> where I need it though. =) >>> >> You probably don't want jffs2, because it has, um, interesting, >> performance characteristics. I also vaguely recall reading that the >> authors had stopped development on jffs3. > > It depends on what we're doing with it. If all we're doing is > booting off it and then switching to something else, What are you going to switch to? There is only so much space available on most embedded systems. > it's not really an issue IMO so long as it can keep up with the > boot process. "keep up?" Could you explain what you mean by this? > It's also supported by things like U-Boot which is helpful. > >> Also, jffs requires MTD, and it's debatable whether a rewrite of MTD >> would be a good thing or not. See discussions on the yaffs mailing >> list and, IIRC, one of the NetBSD mailing lists on this recently. >> It's not clear to me that "flash" is a good dividing point for making >> a file system. It seems a lot more likely that NOR and NAND flash are >> enough different that they would require their own file systems, or, >> at the least, their own address translation layers. > > That may be the case, but I'm not so much interested in the > "perfect" solution, I'm just after one that works and that requires > the least amount of dinking with the bootloader that ships with the > hardware I'm working on. In my current case (Gumstix Connex 400xm- > bt, Intel XScale PXA255) the board has U-Boot and the shipped Linux > image uses jffs2. I think the U-Boot on the board supports FAT and > jffs2, so one of those is my preference. JFFS2 doesn't >require< mtd, mtd is mostly just a way to identify and 'partition' flash. There is at least one 'other' important bootloader for this work: 'redboot'. (But redboot supports (or can be made to support) jffs2. Still having a bootloader that knows how to 'read' the filesystem isn't that important, as long as you can store the kernel somewhere other than >in< the filesystem. No "dinking" needed. (are you aware that 'dink' is also a bootloader (for ppc)?) So lets not go all cart-before-horse on this one. We >do< want a FTL or FFS, it doesn't >have< to be JFFS2, but JFFS2 has many nice features (on the fly compression, wear-leveling, etc.) so its worth studying, at least. Its unlikely that the FreeBSD kernel maintainers will accept GPL code in freebsd though, so a re-write (or fresh code under a BSD license) would be a "good thing".