From owner-svn-src-all@FreeBSD.ORG Tue Apr 12 18:18:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85526106564A; Tue, 12 Apr 2011 18:18:41 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B065C8FC20; Tue, 12 Apr 2011 18:18:40 +0000 (UTC) Received: by wyf23 with SMTP id 23so6813235wyf.13 for ; Tue, 12 Apr 2011 11:18:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.1.102 with SMTP id 38mr2377476wbe.109.1302632319338; Tue, 12 Apr 2011 11:18:39 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.227.138.139 with HTTP; Tue, 12 Apr 2011 11:18:39 -0700 (PDT) In-Reply-To: <201104120810.p3C8AQs0014704@svn.freebsd.org> References: <201104120810.p3C8AQs0014704@svn.freebsd.org> Date: Wed, 13 Apr 2011 06:18:39 +1200 X-Google-Sender-Auth: NQj6sEshReounJ7OjI-6mamEn6Q Message-ID: From: Andrew Thompson To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220559 - in head/sys: conf geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2011 18:18:41 -0000 On 12 April 2011 20:10, Adrian Chadd wrote: > Author: adrian > Date: Tue Apr 12 08:10:25 2011 > New Revision: 220559 > URL: http://svn.freebsd.org/changeset/base/220559 > > Log: > =A0Introduce geom_map, a GEOM provider designed for use by > =A0embedded flash stores. > > =A0Some devices - notably those with uboot - don't have an > =A0explicit partition table (eg like Redboot's FIS.) > =A0geom_map thus provides an easy way to export the hard-coded > =A0flash layout as geom providers for use by filesystems and > =A0other tools. > > =A0It also includes a "search" function which allows for > =A0dynamic creation of partition layouts where the device only > =A0has a single hard-coded partition. For example, if > =A0there is a "kernel+rootfs" partition, a single image can > =A0be created which appends the rootfs after the kernel with > =A0an appropriate search string. geom_map can be told to > =A0search for said search string and create a partition > =A0beginning after it. > > =A0Submitted by: Aleksandr Rybalko > > Added: > =A0head/sys/geom/geom_map.c =A0 (contents, props changed) > Modified: > =A0head/sys/conf/files > > Added: head/sys/geom/geom_map.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null =A0 00:00:00 1970 =A0 (empty, because file is newly added) > +++ head/sys/geom/geom_map.c =A0 =A0Tue Apr 12 08:10:25 2011 =A0 =A0 =A0 = =A0(r220559) > @@ -0,0 +1,356 @@ > + > +#define MAP_CLASS_NAME "MAP" > + > +struct map_desc { > + =A0 =A0 =A0 uint8_t =A0 =A0 =A0 =A0 name =A0 [16]; =A0 =A0/* null-termi= nated name */ > + =A0 =A0 =A0 uint32_t =A0 =A0 =A0 =A0offset; /* offset in flash */ > + =A0 =A0 =A0 uint32_t =A0 =A0 =A0 =A0addr; =A0 /* address in memory */ > + =A0 =A0 =A0 uint32_t =A0 =A0 =A0 =A0size; =A0 /* image size in bytes */ > + =A0 =A0 =A0 uint32_t =A0 =A0 =A0 =A0entry; =A0/* offset in image for en= try point */ > + =A0 =A0 =A0 uint32_t =A0 =A0 =A0 =A0dsize; =A0/* data size in bytes */ > +}; It could at some point be used on larger storage, perhaps get rid of the 4G limit now? Andrew