From owner-freebsd-mips@FreeBSD.ORG Thu Feb 11 18:50:08 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 8E99A106566B for ; Thu, 11 Feb 2010 18:50:08 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-fx0-f226.google.com (mail-fx0-f226.google.com [209.85.220.226]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2BE8FC1C for ; Thu, 11 Feb 2010 18:50:07 +0000 (UTC) Received: by fxm26 with SMTP id 26so1624086fxm.13 for ; Thu, 11 Feb 2010 10:50:07 -0800 (PST) Received: by 10.223.26.216 with SMTP id f24mr301151fac.20.1265912437769; Thu, 11 Feb 2010 10:20:37 -0800 (PST) Received: from Inbox (77-226-132-95.pool.ukrtel.net [95.132.226.77]) by mx.google.com with ESMTPS id z10sm4297177fka.30.2010.02.11.10.20.34 (version=SSLv3 cipher=RC4-MD5); Thu, 11 Feb 2010 10:20:36 -0800 (PST) Message-ID: <4b744a74.0a4d5e0a.5191.fffff0b1@mx.google.com> MIME-Version: 1.0 content-class: From: Alex RAY Date: Thu, 11 Feb 2010 20:20:35 +0200 Importance: normal X-Priority: 3 To: "M. Warner Losh" , Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailman-Approved-At: Thu, 11 Feb 2010 19:01:14 +0000 Cc: freebsd-mips@FreeBSD.org Subject: RE: GEOM_MTD 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: Thu, 11 Feb 2010 18:50:08 -0000 -----Original Message----- From: M. Warner Losh Sent: 11 =D0=BB=D1=8E=D1=82=D0=BE=D0=B3=D0=BE 2010 =D1=80. 19:01 To: ray@dlink.ua Cc: freebsd-mips@FreeBSD.org; loos.br@gmail.com Subject: Re: GEOM_MTD In message: <20100211175849.602d08cf.ray@dlink.ua> Alexandr Rybalko writes: : Hi, :=20 : in attachment GEOM module to support MTD partitioning. : All systems in which I have seen support MTD partitions do it via values = in source code. : For more convenient change the partitions, I use hints. > I've seen the MTD stuff also passed in as command line arguments for Linux. Only MTD device name for mount rootfs, like that "rootfs=3D/dev/mtdblock/0" : Example hints file also in attachment. : In this example one of partitions (0x00040000-0x003e0000) split by keywor= d '--PaCkImGs--' into two partitions ("kernel" and : "roots") : Others think things will be clear from the file itself. > This seems a little weird to me... > Must be something I'm not getting about this syntax. Are the characters '-' '-' 'P' 'a' 'C' 'k' 'I' 'm' 'G' 's' '-' '-' at the start of one of the partitions? Yes. D-Link DIR-320 (cpu BCM5354) load kernel and rootfs in single file whi= ch have: 1. image header (image magic, size, CRC etc.) 2. Kernel 3. keyword '--PaCkImGs--' as a delimeter between kernel and rootfs 4. And rootfs In different firmware different size of kernel and different rootfs offset. Warner