From owner-freebsd-hackers@FreeBSD.ORG Thu May 22 21:24:00 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73464C3F; Thu, 22 May 2014 21:24:00 +0000 (UTC) Received: from mail-qc0-x235.google.com (mail-qc0-x235.google.com [IPv6:2607:f8b0:400d:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 204892D40; Thu, 22 May 2014 21:24:00 +0000 (UTC) Received: by mail-qc0-f181.google.com with SMTP id m20so6726244qcx.40 for ; Thu, 22 May 2014 14:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=xThoOUqXK2Qg/TSKFL5GXw8APmcTh8fIw2Va84OZSz4=; b=jXwc6fUBIVCPe09p3QpevrgyJ9LO+aPrKTO7ZNVWcr9C97/E96POtiK/+9ORpqmiYo /EnKRD60oLsxunCAZEO9ZiuVkhUr69IuiucFzcngpT9ZTQMEalvjREtl+OM2qe0JNyTE yuYJmKlY/jOaGErbUqhKkrNQ8NvrvnhxrahK+P7mkM7ELKi8c0MIdJKoy6Y7b91CHbxy 54fh4B5gtvmMchOJvWQNkB+DS/m6OeY55aE+T5ClDOQ2I+D/oGb0lcGe2x1CnPjXAL6o vz1kqLPIRAb0tjPlKetwI4amFYcIX0FX441Hu75oQX0Vi9SXqgdlscROdVxxSX9CzEC1 HfkQ== MIME-Version: 1.0 X-Received: by 10.140.48.161 with SMTP id o30mr633475qga.68.1400793839035; Thu, 22 May 2014 14:23:59 -0700 (PDT) Received: by 10.96.84.232 with HTTP; Thu, 22 May 2014 14:23:58 -0700 (PDT) In-Reply-To: References: Date: Thu, 22 May 2014 15:23:58 -0600 Message-ID: Subject: Re: Patch to tech mkimg about the TMPDIR variable From: Dan McGregor To: Marcel Moolenaar Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-hackers@freebsd.org" , Alan Somers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 21:24:00 -0000 On 22 May 2014 14:45, Marcel Moolenaar wrote: > On 5/22/14, 1:33 PM, "Dan McGregor" wrote: > >>On 22 May 2014 14:27, Marcel Moolenaar wrote: >>> On 5/22/14, 1:18 PM, "Marcel Moolenaar" wrote: >>>>> >>>>>The next itch I want to scratch is a way to set the active partition >>>>>on an MBR image. >>>> >>>>I thought I made the first partition active by default. >>>>I guess not=E2=80=A6 >>> >>> Yes, I did! >>> >>> The gotcha is that mkimg only does that if you give it >>> a boot code file. Try that... >> >>Also, while I'm thinking about it, the other thing I wanted was a way >>to specify the origin of a partition. So as an example (units are >>sectors): >> >>0: MBR table >>2-63: empty >>64-2047: first partition data >>2048-$end: second partition data >> >>The use case for this is some other boards (Wandboard for me) puts >>u-boot as raw data 1K into the image. > > There are 2 ways to do that already: > 1. Set the physical sector size. The mkimg will align > partitions to physical sector boundaries. A 1K or > 4K physical sector size is not weird. This works > well with GPT, APM, etc. > 2. Set the number of sectors/track. The MBR scheme > will align partitions to track boundaries. This > works well with MBR & EBR. > > HTH, Thanks, that works. It's even documented. I don't know how I missed that. Now all that's needed is the ability to stuff random non-partition data into an image, but dd works as well as anything for that ;) Dan