History log of /freebsd-10.1-release/usr.bin/mkimg/ebr.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 272030 23-Sep-2014 marcel

MFC 271881: Fix partition alignment and image rounding when any of
-P (block size), -T (track size) or -H (number of heads) is given.

Approved by: re@ (gjb)


# 268161 02-Jul-2014 marcel

MFC mkimg(1) -- revisions 268159, 268134, 266556, 266514, 266513,
266512, 266511, 266510, 266509, 266176, 265468, 265467,
265462, 265170, 263926, 263924, 263923, 263919 and 263918.

Revision 267182 changed mkimg.1 alongside other unrelated manpages.
The change to mkimg.1 has been applied without registering a merge
of the revision. This allows a future merge of r267182 to happen.

Relnotes: yes


# 263918 29-Mar-2014 marcel

Add mkimg, a utility for making disk images from raw partition contents.
The partitioning scheme can be one of the schemes supported by gpart.

Reviewed by: sjg
Obtained from: Juniper Networks, Inc.


# 263896 29-Mar-2014 marcel

Fix build on i386 w/ clang.


# 263854 27-Mar-2014 marcel

Partitions start on track boundaries.


# 263843 27-Mar-2014 marcel

Remove trksz, which was hardcoded to 1, and replace it by secs, which
can be set on the command line.


# 263700 25-Mar-2014 marcel

Allow schemes to specify a maximum sector size. The minimum is fixed
at 512. This allows checking of the sector size up-front when given
on the command line.


# 263674 23-Mar-2014 marcel

Implement the EBR scheme. Use a function for filling in the CHS fields.
For now, put 0xff in each field. This needs to be revisited when we
have proper geometry. Note that even without proper CHS values, it's
already accepted by the kernel.


# 263653 22-Mar-2014 marcel

Revamp:
1. Make secsz globally visible.
2. Have all code use the global secsz and nparts, rather than passing
them around.
3. Introduce lba_t as the type to use when talking about block addresses.
4. Work on LBAs instead of offsets. There's just too much division with
the sector size and there's really no value to use by offsets other
than that is what lseek() wants. For that we now have mkimg_seek().

The bigger picture is that geometry (cylinders, heads, sectors/track) and
also a possible physical sector size are to be globals that can be used
from anyway. We really don't want to pass all that stuff as arguments to
functions and then add __unused for most of them...


# 263537 21-Mar-2014 marcel

Handle the -b option for specifying boot code that lives in the
partitioning scheme's meta data. Implement it for GPT.


# 263487 21-Mar-2014 marcel

Add more partition types (mostly just the FreeBSD ones) to GPT.
Avoid having schemes use literal strings by introducing an enum
as the intermediate representation (see geom_part).


# 263442 20-Mar-2014 marcel

Add a scheme-specific write callback to write the metadata.
While here:
1. Move FreeBSD-specific headers to a more centralized place, so that
it's easier to port mkimg.
2. Remove inclusion of <uuid.h> where we don't need it (copy-pasted).
3. Check the partition data given on the command line before we do any
I/O.
4. Add scheme_round() for rounding the partition size.
5. Have scheme_write call the scheme-specific write callback and have
it propagate errors back to the caller.


# 263440 20-Mar-2014 marcel

Replace *_get_leader() and *_get_trailer() with a single *_metadata().
This single function takes a where argument to indicate the kind of
metadata to "size". This way we can also get rid of the "padding"
field in the scheme structure.
This should make it a little more understandable what's going on.


# 263409 19-Mar-2014 marcel

Use linker sets to provide build-time selection of the schemes
that need to be supported. Each scheme provides data and callbacks
for handling the scheme-specifics.
To this end, put each scheme in its own source file.