From owner-freebsd-small@FreeBSD.ORG Mon Sep 18 18:09:39 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 F303616A4CE for ; Mon, 18 Sep 2006 18:09:38 +0000 (UTC) (envelope-from simestd@netexpress.com) Received: from steelhead.netexpress.com (steelhead.netexpress.com [209.112.194.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39C9543DE8 for ; Mon, 18 Sep 2006 18:08:38 +0000 (GMT) (envelope-from simestd@netexpress.com) Received: from vger.acsalaska.net (localhost [127.0.0.1]) by steelhead.netexpress.com (8.13.6/8.13.6) with SMTP id k8II8V68068921 for ; Mon, 18 Sep 2006 10:08:31 -0800 (AKDT) (envelope-from simestd@netexpress.com) Date: Mon, 18 Sep 2006 10:08:31 -0800 From: Tom Simes To: freebsd-small@freebsd.org Message-Id: <20060918100831.4102a6a9.simestd@netexpress.com> In-Reply-To: <450ED7F0.3030203@no-wire.net> References: <6C0CF58A187DA5479245E0830AF84F421D1234@poweredge.attiksystem.ch> <450ED7F0.3030203@no-wire.net> Organization: NetExpress X-Mailer: Sylpheed version 1.0.5 (GTK+ 1.2.10; i386-portbld-freebsd4.10) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Nanobsd & CF geometry 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: Mon, 18 Sep 2006 18:09:39 -0000 On Mon, 18 Sep 2006 10:31:28 -0700 Phill Hocking wrote: > Philippe Lang wrote: > > Hi, > > > > I'm trying to flash Nanobsd on a Compact Flash which is not listed > > in /usr/src/tools/tools/nanobsd/FlashDevice.sub. > > > > Does anyone know how to calculate NANO_MEDIASIZE, NANO_HEADS and > > NANO_SECTS for a specific CF, in my case a Transcend 512 MB CF? > > > > I found a datasheet, but I'm not sure what do do with it: > > http://www.transcendusa.com/Support/DLCenter/Datasheet/TSXMCF80.pdf I don't see any specs on number of cylinders, heads or sectors/track in that datasheet. Presuming you have a flash reader, an easy way to get the information is just to get the info from the flash itself with fdisk. Here's what a 128M card I have handy looks like # fdisk da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=122 heads=64 sectors/track=32 (2048 blks/cyl) .... In this case capacity would equal cyl*head*sectors*512 or 122 * 64 * 32 * 512 = 127926272 and a corresponding FlashDevice.sub for my device might look like: pny) case $a2 in 122|122mb) NANO_MEDIASIZE=`expr 127926272 / 512` NANO_HEADS=64 NANO_SECTS=32 ;; *) echo "Unknown Memory Corp Flash capacity" exit 2 ;; esac ;; And in my nanobsd conf file I would refer to it as: FlashDevice pny 122mb Tom ====================================================================== "Z-80 system stack overflow. Shut 'er down Scotty, the system's sucking mud" - Error message on TRS 80 Model-16B Tom Simes simestd@netexpress.com ======================================================================