Patch to tech mkimg about the TMPDIR variable
Dan McGregor
danismostlikely at gmail.com
Thu May 22 21:24:00 UTC 2014
On 22 May 2014 14:45, Marcel Moolenaar <marcelm at juniper.net> wrote:
> On 5/22/14, 1:33 PM, "Dan McGregor" <danismostlikely at gmail.com> wrote:
>
>>On 22 May 2014 14:27, Marcel Moolenaar <marcelm at juniper.net> wrote:
>>> On 5/22/14, 1:18 PM, "Marcel Moolenaar" <marcelm at juniper.net> 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…
>>>
>>> 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
More information about the freebsd-hackers
mailing list