Commit graph

9 commits

Author SHA1 Message Date
Jin Qian
4a335829da fastboot: use filename instead of fd to generate filesystem image
mke2fs tool takes a filename and has its own open function to handle
output file. Change fastboot in preparation to switch from make_ext4
to mke2fs.

Test: fastboot format:ext4 userdata
Bug: 35219933
Change-Id: I7a31cb215f443a4a7cb0bfc23ec28c121a6101e6
2017-05-31 21:23:12 +00:00
Connor O'Brien
ce16a8a940 Fastboot: use flash erase & logical block size for building userdata
If the bootloader provides erase-block-size and logical-block-size
getvar variables, then pass these to libext4_utils when building a new
userdata image. This info is used to tune stride and stripe-width.

Bug: 33243520
Test: Modify fb_getvar to return values for "erase-block-size" and
"logical-block-size" and check that fastboot -w sets userdata
parameters correctly.
Signed-off-by: Connor O'Brien <connoro@google.com>

Change-Id: Id48b7a3ebb9074983a4422a79a64dcb437c0f888
2017-02-08 18:30:40 -08:00
Paul Crowley
8f7f56e25b Add --wipe-and-use-fbe option to fastboot for FBE userdata marker.
With this option, userdata is wiped and recreated with the
"convert_fbe" file in the root, which triggers conversion to FBE.

Bug: 25898323
Change-Id: I9347b7057b6278e7e6437504896b22c82dd01d89
2015-12-03 18:02:25 +00:00
Elliott Hughes
8ab9a32323 Clarify and fix the intent of the partition-type checking code.
Change-Id: I202dab4ee91208b632bc2086d1e5c387a4c29edd
2015-11-02 14:05:57 -08:00
Elliott Hughes
fc79767fc2 Use 64-bit file sizes in fastboot.
Bug: 20110580
Change-Id: I5d3718103ff581ff3b5241c8b0e52b585b4f37e5
2015-08-25 19:11:52 -07:00
Elliott Hughes
253c18d2fb Prepare for switching to libziparchive.
Bug: 19765860
Change-Id: I58249d28fbc4975428d0dcac5107d1994c35676c
2015-03-18 22:47:54 -07:00
Markus Mayer
c335a3500c Fix typo in fs.h
fs.h defined _FH_H_ rather than _FS_H_

Change-Id: I710ef53e88d3601e486fde9957f6d022871d9602
Signed-off-by: Markus Mayer <code@mmayer.net>
2014-07-09 15:27:53 -07:00
JP Abgrall
7e85974fc2 fastboot: support for overriding format fs-type and size
This changes allows overriding the fs-type and size that
are normally returned by the booloader.

This is in preparation for supporting other FSes.

Change-Id: I8d141a0d4d14df9fe84d3b131484e9696fcd8870
Signed-off-by: JP Abgrall <jpa@google.com>
2014-05-06 15:14:15 -07:00
Dmitry Grinberg
e6f3e9bd26 fastboot: allow format on devices with small buffers
Formatting large partitions on devices with small transfer buffers did
not work before since format used a strange path through the code to
send data. It now uses the normal path. Also cleaned up a bit. FS
code now lives in a separate file and the custom path for format is
gone.

Change-Id: If4e01cabc2e250b7c02ca7ce8c268e51d49e1529
2014-05-06 12:28:37 -07:00