From owner-freebsd-arm@freebsd.org Sat Feb 4 21:02:11 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3627CCE9AA for ; Sat, 4 Feb 2017 21:02:11 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-72.reflexion.net [208.70.210.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 940E0123F for ; Sat, 4 Feb 2017 21:02:10 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 13016 invoked from network); 4 Feb 2017 21:03:54 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 4 Feb 2017 21:03:54 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.30.0) with SMTP; Sat, 04 Feb 2017 16:02:04 -0500 (EST) Received: (qmail 20343 invoked from network); 4 Feb 2017 21:02:04 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 4 Feb 2017 21:02:04 -0000 Received: from [192.168.1.111] (c-67-170-167-181.hsd1.or.comcast.net [67.170.167.181]) by iron2.pdx.net (Postfix) with ESMTPSA id 94131EC7E21; Sat, 4 Feb 2017 13:02:03 -0800 (PST) From: Mark Millard Message-Id: <1892E365-966E-4DFA-8DE0-9BAD584754A1@dsl-only.net> Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: NanoBSD config script for RPI2 Date: Sat, 4 Feb 2017 13:02:02 -0800 In-Reply-To: Cc: "freebsd-arm@freebsd.org" To: Karl Denninger References: <69c5a012-c1e7-c887-cd3b-ffcf78d8175e@denninger.net> <506d5c30-93f7-048e-2cde-d76bfaf76a8f@denninger.net> X-Mailer: Apple Mail (2.3259) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 21:02:11 -0000 On 2017-Feb-4, at 10:56 AM, Karl Denninger = wrote: > On 2/4/2017 10:38, Warner Losh wrote: >> On Sat, Feb 4, 2017 at 5:55 AM, Karl Denninger wrote: >>> It fails here during image create.... >>>=20 >>> Populating `/pics/CrossBuild/embedded/rpi2/_.s2' >>> Image `/pics/CrossBuild/embedded/rpi2/_.s2' complete >>> + [ -n s1 ] >>> + eval 's1=3Dfat16b' >>> + s1=3Dfat16b >>> + out=3D/pics/CrossBuild/embedded/images/_.disk.image.HD-MCP >>> + mkimg -a 3 -s mbr -p 'fat16b:=3D/pics/CrossBuild/embedded/rpi2/_.s1'= -p >>> 'freebsd >>> :=3D/pics/CrossBuild/embedded/rpi2/_.s2' -p >>> 'freebsd:=3D/pics/CrossBuild/embedded/rp >>> i2/_.s3' -o /pics/CrossBuild/embedded/images/_.disk.image.HD-MCP >>> mkimg: invalid option -- a >>> mkimg: error: unknown option >>>=20 >>> usage: mkimg >>> options: >>> --formats - list image formats >>> --schemes - list partition schemes >>> --version - show version information >>>=20 >>> -b - file containing boot code >>> -c - capacity (in bytes) of the disk >>> -f >>> -o - file to write image into >>> -p >>> -s >>> -v - increase verbosity >>> -y - [developers] enable unit test >>> -H - number of heads to simulate >>> -P - physical sector size >>> -S - logical sector size >>> -T - number of tracks to simulate >>>=20 >>> formats: >>> qcow - QEMU Copy-On-Write, version 1 >>> qcow2 - QEMU Copy-On-Write, version 2 >>> raw - Raw Disk >>> vhd - Virtual Hard Disk >>> vhdf - Fixed Virtual Hard Disk >>> vmdk - Virtual Machine Disk >>>=20 >>> schemes: >>> apm - Apple Partition Map >>> bsd - BSD disk label >>> ebr - Extended Boot Record >>> gpt - GUID Partition Table >>> mbr - Master Boot Record >>> pc98 - PC-9800 disk partitions >>> vtoc8 - SMI VTOC8 disk labels >>>=20 >>> Is the "-a" flag attempting to set the active partition? It appears >>> there's no option to do that in mkimg... >> Install a newer mkimg: >>=20 >> Revision 307550 - (view) (download) (annotate) - [select for diffs] https://svnweb.freebsd.org/base/?pathrev=3D312669 = shows that -r3125699 is from head. Looking around: stable/11 has not been updated for its mkimg. only head has -a added at this point. >> Modified Tue Oct 18 05:43:12 2016 UTC (3 months, 2 weeks ago) by imp >> File length: 3730 byte(s) >> Diff to previous 307544 >>=20 >> Add a new flag to mkimg (-a num) to specify the active partition for >> those partitioning schemes that have this concept. Implement it as an >> override for mbr's setting 0x80 in the flags for the first partition >> when we have boot code. >>=20 >> Differential Revision: https://reviews.freebsd.org/D4403 >>=20 >> Though maybe I should try to add it to the bootstrap tools so I can >> use a new one after the build. >>=20 >> Warner >>=20 > root@NewFS:/disk/karl # uname -v > FreeBSD 11.0-STABLE #15 r312669M: Mon Jan 23 14:01:03 CST 2017 =20 https://svnweb.freebsd.org/base/?pathrev=3D312669 = shows that -r3125699 is from head, not from stable/11 . If you have a mix of head and stable/11 materials with mkimg from stable/11 then -a will not be present for mkimg. > karl@NewFS.denninger.net:/usr/obj/usr/src/sys/KSD-SMP > root@NewFS:/disk/karl # which mkimg > /usr/bin/mkimg > root@NewFS:/disk/karl # pkg install mkimg > Updating FreeBSD repository catalogue... > FreeBSD repository is up-to-date. > All repositories are up-to-date. > pkg: No packages available to install matching 'mkimg' have been found > in the repositories > root@NewFS:/disk/karl # >=20 > So.... it's part of base and there is no obvious package (a check for > ports in */*mkimg* fails too); my system is current as of Jan 23.... >=20 > (As an aside I think if I remove the -a it may work on the Pi, since = the > Pi will try to boot the first partition which happens to be DOS -- I > think. I'll try it.) >=20 > --=20 > Karl Denninger > karl@denninger.net > /The Market Ticker/ > /[S/MIME encrypted email preferred]/ =3D=3D=3D Mark Millard markmi at dsl-only.net