Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Feb 2017 09:38:42 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Karl Denninger <karl@denninger.net>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: NanoBSD config script for RPI2
Message-ID:  <CANCZdfoBYi_9TKpkq9SnBN6k-gWBo5-CAkTLfS5qdsKgfHLU8A@mail.gmail.com>
In-Reply-To: <506d5c30-93f7-048e-2cde-d76bfaf76a8f@denninger.net>
References:  <69c5a012-c1e7-c887-cd3b-ffcf78d8175e@denninger.net> <CANCZdfqSMbygO47LYt7Yxi8m6OAawgta4swnv4WyVFzeD4D0vg@mail.gmail.com> <506d5c30-93f7-048e-2cde-d76bfaf76a8f@denninger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 4, 2017 at 5:55 AM, Karl Denninger <karl@denninger.net> wrote:
> It fails here during image create....
>
> Populating `/pics/CrossBuild/embedded/rpi2/_.s2'
> Image `/pics/CrossBuild/embedded/rpi2/_.s2' complete
> + [ -n s1 ]
> + eval 's1=fat16b'
> + s1=fat16b
> + out=/pics/CrossBuild/embedded/images/_.disk.image.HD-MCP
> + mkimg -a 3 -s mbr -p 'fat16b:=/pics/CrossBuild/embedded/rpi2/_.s1' -p
> 'freebsd
> :=/pics/CrossBuild/embedded/rpi2/_.s2' -p
> 'freebsd:=/pics/CrossBuild/embedded/rp
> i2/_.s3' -o /pics/CrossBuild/embedded/images/_.disk.image.HD-MCP
> mkimg: invalid option -- a
> mkimg: error: unknown option
>
> usage: mkimg <options>
>     options:
>         --formats       -  list image formats
>         --schemes       -  list partition schemes
>         --version       -  show version information
>
>         -b <file>       -  file containing boot code
>         -c <num>        -  capacity (in bytes) of the disk
>         -f <format>
>         -o <file>       -  file to write image into
>         -p <partition>
>         -s <scheme>
>         -v              -  increase verbosity
>         -y              -  [developers] enable unit test
>         -H <num>        -  number of heads to simulate
>         -P <num>        -  physical sector size
>         -S <num>        -  logical sector size
>         -T <num>        -  number of tracks to simulate
>
>     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
>
>     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
>
> 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:

Revision 307550 - (view) (download) (annotate) - [select for diffs]
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

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.

Differential Revision: https://reviews.freebsd.org/D4403

Though maybe I should try to add it to the bootstrap tools so I can
use a new one after the build.

Warner


> On 2/3/2017 14:21, Warner Losh wrote:
>> I've used tools/tools/nanobsd/embedded/rpi2.cfg in the past to create
>> images for my rpi2. It has been a while, but I don't think anything
>> should have broken it...
>>
>> Warner
>>
>> On Fri, Feb 3, 2017 at 11:19 AM, Karl Denninger <karl@denninger.net> wrote:
>>> Anyone got a working one?  Having some trouble getting usable output
>>> from it...
>>>
>>> For reference I have sources in /pics/CrossBuild and the "mk" script to
>>> crossbuild which *does* work; after doing an "install" (into nfsroot) I
>>> can then rsync that to a running unit and the update is successful.  I'd
>>> like to be able to build off the same source tree since it's already
>>> there and distinct from my x86 stuff.
>>>
>>>
>>> --
>>> Karl Denninger
>>> karl@denninger.net <mailto:karl@denninger.net>
>>> /The Market Ticker/
>>> /[S/MIME encrypted email preferred]/
>
> --
> Karl Denninger
> karl@denninger.net <mailto:karl@denninger.net>
> /The Market Ticker/
> /[S/MIME encrypted email preferred]/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoBYi_9TKpkq9SnBN6k-gWBo5-CAkTLfS5qdsKgfHLU8A>