summaryrefslogtreecommitdiff
path: root/usr.bin/mkimg/scheme.h
Commit message (Collapse)AuthorAgeFilesLines
* Add the ability to specify absolute and relative offsets to size partitions.Benno Rice2018-04-121-4/+5
| | | | | | | | | | | | | | | | | To create hybrid boot media we want to specify a partition at a known location. This extends the syntax of size partitions to include an optional offset that can be absolute or relative. It also introduces validation to make sure that this hasn't resulted in overlapping partitions. I haven't added this to the file and process partition specifications yet but the mechanics are designed such that if someone comes up with a good way of specifying the offset it will be fairly easy to add in. Reviewed by: imp Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D14916 Notes: svn path=/head/; revision=332436
* Replace the use of linker sets with constructors for both theMarcel Moolenaar2016-09-251-4/+6
| | | | | | | | formats and schemes. Formats and schemes are registered at runtime now, rather than collected at link time. Notes: svn path=/head/; revision=306325
* Add ppcboot FAT type. Needed to create a bootable powerpc image.Warner Losh2015-12-111-0/+1
| | | | | | | Differential Review: https://reviews.freebsd.org/D4407 Notes: svn path=/head/; revision=292082
* mkimg: support fat16b partitions (MBR type 06h)Ed Maste2015-10-151-0/+1
| | | | | | | | | Reviewed by: marcel Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3894 Notes: svn path=/head/; revision=289349
* Add the ntfs alias and support it with the MBR and GPT schemesMarcel Moolenaar2015-06-271-0/+1
| | | | | | | as DOSPTYP_NTFS and GPT_ENT_TYPE_MS_BASIC_DATA (resp). Notes: svn path=/head/; revision=284883
* Fix partition alignment and image rounding when any of -P (block size),Marcel Moolenaar2014-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -T (track size) or -H (number of heads) is given: o scheme_metadata() always rounded to the block size. This is not always valid (e.g. vtoc8 that must have partitions start at cylinder boundaries). o The bsd and vtoc8 schemes "resized" the image to make it match the geometry, but since the geometry is an approximation and the size of the image computed from cylinders * heads * sectors is always smaller than the original image size, the partition information ran out of bounds. The fix is to have scheme_metadata() simply pass it's arguments to the per-scheme metadata callback, so that schemes not only know where the metadata is to go, but also what the current block address is. It's now up to the per-scheme callback to reserve room for metadata and to make sure alignment and rounding is applied. The BSD scheme now has the most elaborate alignment and rounding. Just to make the point: partitions are aligned on block boundaries, but the image is rounded to the next cyclinder boundary. vtoc8 now properly has all partitions aligned (and rounded) to the cyclinder boundary. Obtained from: Juniper Networks, Inc. MFC after: 3 days Notes: svn path=/head/; revision=271881
* MFuser/marcel/mkimg:Marcel Moolenaar2014-05-151-2/+2
| | | | | | | | | | | Add support for different output formats: 1. The output file that was previously written is now called the raw format. 2. Add the vmdk output format to create VMDK images. When the format is not given, the raw output format is assumed. Notes: svn path=/head/; revision=266176
* Add mkimg, a utility for making disk images from raw partition contents.Marcel Moolenaar2014-03-291-0/+90
The partitioning scheme can be one of the schemes supported by gpart. Reviewed by: sjg Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=263918