From owner-freebsd-mips@FreeBSD.ORG Sun Nov 21 07:18:48 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 425DF106564A for ; Sun, 21 Nov 2010 07:18:48 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id C50968FC14 for ; Sun, 21 Nov 2010 07:18:47 +0000 (UTC) Received: by wwd20 with SMTP id 20so5986538wwd.31 for ; Sat, 20 Nov 2010 23:18:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=ue/CSWqq61wKStPy5yF4v5yTGuW2b5dDRHc1cD4JRhI=; b=PoRrlZ1eWUJSsbffox9+ZGTMG9hLkTK+L1PCEovZ0igyPfJAFqeQwdPmJTtf3K3/B0 kREHkCUGL5VlP2ZIiYi+WDIdpULQYqGR64N4v6NQm7USAmD7TrZsp1vYJCYSWgM7J+f2 nTWGBySz7F9tVPrNPXZSzYc6pvLSYlUWiD4Ss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=bcDJGpdRH56dkz1zRoSyM+4eiLwNfv6QSDywNas0ZZK0a4J2fDfv5thtTsrdBZ1wD3 KkiKB3TjgLno4bBhWKMjkgiJdm04quw+yDIM5su+wNRpRpnZZqDWOgMPXw7ul8hTVpv/ TOpBd2XvCu0dolAuGD9m67CvpUmAHvJibIdzo= MIME-Version: 1.0 Received: by 10.216.46.193 with SMTP id r43mr180770web.20.1290323925940; Sat, 20 Nov 2010 23:18:45 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.65.210 with HTTP; Sat, 20 Nov 2010 23:18:45 -0800 (PST) In-Reply-To: References: <201011191201.47230.freebsd-mips@dino.sk> Date: Sun, 21 Nov 2010 15:18:45 +0800 X-Google-Sender-Auth: xr9-Al-RCOjtO4u8xidf1leYWAE Message-ID: From: Adrian Chadd To: Monthadar Al Jaberi Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org Subject: Re: First RSPRO deployed ! X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2010 07:18:48 -0000 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 :-) * 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"; * 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; * 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 wrote: > On Fri, Nov 19, 2010 at 12:01 PM, Milan Obuch 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" >