History log of /system/extras/ext4_utils/make_ext4fs_main.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bec598e982301bf2714d37b14e312c9845c7cc0c 12-Aug-2014 Doug Zongker <dougz@google.com> add option to make_ext4fs to record blocks for each file

Add the -B option to make_ext4fs, which causes it to record the block
ranges used for each (regular) file in the image. We can use this
information to construct more efficient block-based incremental OTAs.

Bug: 16984795
Change-Id: I2a5325bb89948f63c76e93fdfa84c51f9b050104
/system/extras/ext4_utils/make_ext4fs_main.c
aad1accb587aa708012b329c784332dcc9991de6 16-Jun-2014 Doug Zongker <dougz@google.com> optionally use a canned fs_config when building ext4 fs

In order to accurately re-create old images after changes to
android_filesystem_config.h, we need make_ext4fs and mkuserimg.sh to
be able to take a file containing the desired
uid/gid/mode/capabilities for each path in the filesystem, and use
that instead of the fs_config function that is built in to the binary.

The target_files already contains this file, which is created at the
time of the original build by running the binary fs_config for each
path in the build.

Change-Id: I501dc9544de37a592c1e831b6bf785c086cb6912
/system/extras/ext4_utils/make_ext4fs_main.c
4c003420ce69cb50da94fa1a15a41eb4e2a51c3a 15-Feb-2014 JP Abgrall <jpa@google.com> am d27ada97: Merge "ext4_utils: don\'t leave bad image file in case of error"

* commit 'd27ada97706b61c6e302a94bd845b877121556c3':
ext4_utils: don't leave bad image file in case of error
39ef30bb574a41bba898dd924e081b678365accc 15-Feb-2014 JP Abgrall <jpa@google.com> ext4_utils: don't leave bad image file in case of error

Bug: 13029951
Change-Id: Ibe50a503c2d3988813b362790b7fba83383fb51e
/system/extras/ext4_utils/make_ext4fs_main.c
9526680de97e2bc963a70d1fabffe165a688bb1e 06-Dec-2013 Doug Zongker <dougz@android.com> allow fixing timestamps when building ext4 filesystem

When building an image, make_ext4fs currently sets the timestamps in
the image to the timestamps of the source files. Allow this time to
be overridden with a fixed value provided on the command line, to make
it easier to reproduce bit-identical images from a target_files zip.

Change-Id: I52ddab4575a334ee52404f4d5d1c61b55513c618
/system/extras/ext4_utils/make_ext4fs_main.c
56497f28bd20001dd5f931208e8d948cf2f81b2f 04-Feb-2013 Colin Cross <ccross@android.com> ext4_utils: mark uninitialized inode tables in block groups

Block groups that have no used inodes have their inode table left
uninitialized, unless -t is specified, in which case they are
explicitly zeroed. When they are uninitialized, writing a sparse
ext4 image over existing data can cause e2fsck to confuse the
uninitialized data for lost inodes.

Set the EXT4_BG_INODE_UNINIT flags on block groups that have no
used inodes. This flag requires the block group checksum feature
to be enabled, so also enable the checksum feature in the superblock
and compute the checksum for the block group.

Since zeroing the inode tables is now useless, remove the code for
it and deprecate the -t command line option.

Change-Id: I4927c1d866d051547cf0dadc8c8703ded0163925
/system/extras/ext4_utils/make_ext4fs_main.c
2057370a2db739d8a7d8a475c9a0773efc3d91a0 17-Jan-2013 William Roberts <w.roberts@sta.samsung.com> Add verbose option to make_ext4 command

Enabeling the -v switch will cuase the
make_ext4 command to output the selinux
labeling context for all files.

Change-Id: Ifae8a11eb2c3f4644873d9784affffafb27775bf
/system/extras/ext4_utils/make_ext4fs_main.c
965298695c981ee5a67e86977a8e40a50f7392ab 24-Jan-2013 Colin Cross <ccross@android.com> ext4_utils: reduce exported apis

Remove unnecessary functions from make_ext4fs.h so they are not
exposed to users of libext4_utils.

Requires fixing up some internal places that depended on the
definitions in the external make_ext4fs.h header.

Change-Id: Ied24e0efb648d4fd2ccdd1a5a1b685e9bde9cfd7
/system/extras/ext4_utils/make_ext4fs_main.c
27f830fdfa2c49c25ce1324990afcd6f00eccee3 20-Dec-2012 Colin Cross <ccross@android.com> ext4_utils: fix segfault on error opening output file

error_errno uses longjmp, but the jump target has not been set up
in make_ext4fs_main.c. Use perror instead.

Change-Id: Ic86eeb8af2315d1847d0a6d667e0b4e25eb9bdda
/system/extras/ext4_utils/make_ext4fs_main.c
a4460149a5fadc639dbb708c332a75f9717c12d6 20-Dec-2012 Colin Cross <ccross@android.com> ext4_utils: canonicalize slashes in paths

Simplify handling of slashes between directories in paths by
forcing them to have leading and trailing slashes as appropriate
when passed in to make_ext4fs, and then keeping all directory
paths with a trailing slash.

As a side effect, using "/" as the mountpoint is now supported.

Change-Id: I73fe709c26003a20b0bdf6504db16cc9e39edf9b
/system/extras/ext4_utils/make_ext4fs_main.c
5da2f366f8714eafff0337c32f10c314488cfdef 21-Sep-2012 rpcraig <rpcraig@tycho.ncsc.mil> Add automatic file_contexts handle to make_ext4fs.

Normal make_ext4 use requires a -S option to
pass a correct file_contexts path for labeling.
This becomes impractical under certain conditions
when used on a target device. For instance, with
the creation of ext4 containers for asec images.
This patch will create a proper sehandle only
if the -S option is not used and only when
run on a target device.

Change-Id: I9bdc8659aae7037ccebbf4464500b79b4b2f56af
/system/extras/ext4_utils/make_ext4fs_main.c
723f1c75295ce812dc062a537856cd5a54277895 10-Oct-2012 Kenny Root <kroot@google.com> Remove HAVE_SELINUX guards

Change-Id: Ieda8d8c331e9fccc7dcda228852d408ffc94e98c
/system/extras/ext4_utils/make_ext4fs_main.c
d99bf88cf0604e8ad281bb8dc0596ce8eafb4d56 18-May-2012 Colin Cross <ccross@android.com> make_ext4fs: allow sparse gzip files

libsparse can handle sparse gzipped files, allow -s and -z together.

Change-Id: I32c336269375135af6be5d00a55604f8bf7619a3
/system/extras/ext4_utils/make_ext4fs_main.c
2e5c52322d54d0f98d36b499fcaa31a0e84ca87c 31-Mar-2012 Kenny Root <kroot@google.com> resolved conflicts for merge of 8f9b41d9 to master

Change-Id: I9af02b9bba1176174540c849f905dece8ade54d8
b4eca4b24af9c80ebb2a7fa2ba539a48096b7576 13-Jan-2012 Stephen Smalley <sds@tycho.nsa.gov> Extend make_ext4fs to support setting SELinux security contexts in ext4 images.

Extend make_ext4fs with support for looking up the right security context from
the file_contexts configuration and setting it in the generated image. This is
similar to the existing support for looking up the UID/GID/mode via
android_filesystem_config.h and setting it, but via configuration rather than
defined in a header.

Change-Id: Ief9c44eeaaca4a44100a384b063f40b185469be3
/system/extras/ext4_utils/make_ext4fs_main.c
68e3dfd81ddb9367a0c3e0c72148c23a3227ed48 29-Mar-2012 Kenny Root <kroot@google.com> make_ext4fs: Allow custom filesystem configs

Before we used the "fs_config" function from
android_filesystem_config.h, but we want to use make_ext4fs with ASEC
containers which will not always be mounted in the same place.

Bug: 6258335
Change-Id: Icf62e3c46425f01434bf92a9823f8d542b0fa5b1
/system/extras/ext4_utils/make_ext4fs_main.c
0349bd9f14d252673a7a25767da4a80121aaaaf2 12-Jan-2012 Anatol Pomazau <anatol@google.com> Pass file descriptor instead of file name

Passing a file descriptor to make_ext4fs_internal() is more flexible.
We can use tmpfile() to create a temporary file.
tmpfile() is better than other solutions because it unlinks the file
right after creating it, so closing fd effectively removes temp file.
Thus we don't have to worry about large temp files accidently left
on the filesystem in case of the program crash.

Change-Id: Iba3758a0e13a898920d30d7fa5da696c22daa2b7
/system/extras/ext4_utils/make_ext4fs_main.c
00740cc344cabd6cae6a8cc661c04c9c79b91a71 07-Feb-2012 Anatol Pomazau <anatol@google.com> Replace 8-spaces indentation with tab

8-space indentation looks completely alien here.
One should use either 4-spaces indentation or tab symbol.
Tab is more popular in system projects so use it here as well.

Change-Id: Ibfdb4b2a49996453731fc1e8bbefa158bde49e28
/system/extras/ext4_utils/make_ext4fs_main.c
354350e3a92955e66abd1ea15536f8b6e5e66493 04-Feb-2012 Anatol Pomazau <anatol@google.com> Revert "Pass file descriptor instead of file name"

This reverts commit 89ddaab97e9214cf331baffee2de4595ad14dc79
/system/extras/ext4_utils/make_ext4fs_main.c
89ddaab97e9214cf331baffee2de4595ad14dc79 12-Jan-2012 Anatol Pomazau <anatol@google.com> Pass file descriptor instead of file name

Passing a file descriptor to make_ext4fs_internal() is more flexible.
We can use tmpfile() to create a temporary file.
tmpfile() is better than other solutions because it unlinks the file
right after creating it, so closing fd effectively removes temp file.
Thus we don't have to worry about large temp files accidently left
on the filesystem in case of the program crash.

Change-Id: I44146704572c314e1d6cfca7ce918efa7fb92a7a
/system/extras/ext4_utils/make_ext4fs_main.c
ae4f7dccadfafc36470a3e6f3084c6cf3cc63415 03-Feb-2012 Anatol Pomazau <anatol@google.com> Revert "Pass file descriptor instead of file name"

This reverts commit 93eb1dc9e68d2e9dea94f56d8bce478c1a52b354
/system/extras/ext4_utils/make_ext4fs_main.c
93eb1dc9e68d2e9dea94f56d8bce478c1a52b354 12-Jan-2012 Anatol Pomazau <anatol@google.com> Pass file descriptor instead of file name

Passing a file descriptor to make_ext4fs_internal() is more flexible.
We can use tmpfile() to create a temporary file.
tmpfile() is better than other solutions because it unlinks the file
right after creating it, so closing fd effectively removes temp file.
Thus we don't have to worry about large temp files accidently left
on the filesystem in case of the program crash.

Change-Id: I44109e98854c314e1d6cfca7ce918efa7fb92a7a
/system/extras/ext4_utils/make_ext4fs_main.c
107a9f161babc20daf915311146b0e864d3b4157 30-Jun-2011 Ken Sumrall <ksumrall@android.com> Bug fixes to make_ext4fs

Fix definition of uuid struct.
Properly set the block_group number in each backup copy of the superblock.
Adjust the info.total_inodes field after rounding up the inodes per block group.
Add the option -t to initialize all the inode tables. If also specified with
the -s option, use the CHUNK_TYPE_FILL sparse records to initialize them.

Change-Id: Idd8bcee1b9bde3e82ad8da89ef974fbc12d7a6c6
/system/extras/ext4_utils/make_ext4fs_main.c
c2470654d4b4db09a7052fc5fa108ac21f1b1948 27-Jan-2011 Colin Cross <ccross@android.com> ext4_utils: Add support for wipe option, and wipe by default in recovery

Adds a -w option to make_ext4fs, which will attempt to use the
BLKSECDISCARD ioctl to erase the partition in order to avoid
leaving old data where it could be recovered, and to improve
wear levelling after a reformat.

Also causes factory reset through recovery to do a wipe.

Change-Id: Ibe34bbd84552e526be6bd041024a950806aca6b4
/system/extras/ext4_utils/make_ext4fs_main.c
983fb19d83d2391b19b289fc150495d8642378c4 20-Jan-2011 Ken Sumrall <ksumrall@android.com> Change the API for make_ext4fs() to better match the user's needs

The current make_ext4fs() is renamed make_ext4fs_internal(), and a new
make_ext4fs() has a simplified interface that supports the needs of
recovery and updater packages that call it.

Change-Id: I9e897f1f442c7f5060f8623ea74c3cf6a9c023e4
/system/extras/ext4_utils/make_ext4fs_main.c
757ace516d8e4350616b5fd10da0c982d3d5ec74 29-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Add an optional CRC chunk at the end of sparse files

Change-Id: Ibfcf1cdeab47ca13870350184abf83e530acbc07
/system/extras/ext4_utils/make_ext4fs_main.c
75249edab0b22ea9aae9c7278b9f2c196c7d25d4 14-Aug-2010 Ken Sumrall <ksumrall@android.com> Add support for sparse ext4 image creation.

This adds the -s option to the make_ext4fs tool, which now creates
"sparse" filesystem images, which is very useful for the large 32 Gbyte
filesystems we are now building.
This check-in also fixes make_ext4fs to properly create filesystems
larger thatn 4 Gbytes on 64-bit Linux, 32-bit android and Macs.

Change-Id: Ie5838492fcf944f5c875481693c0dbd7013deae4
/system/extras/ext4_utils/make_ext4fs_main.c
e4b5ae8ab07e698b95f004c9226000b02f853abc 03-Aug-2010 Colin Cross <ccross@android.com> Create a journal by default

Change-Id: I7ab4e502ba4a0f1f3ae85d6d25f3936f4b66e5e8
/system/extras/ext4_utils/make_ext4fs_main.c
263eefd9fb9608432636c903423e43848e69f39d 30-Jun-2010 Doug Zongker <dougz@android.com> add make_ext4fs to the libext4_utils

Move the bulk of make_ext4fs into libext4_utils, leaving a main() that
does only option parsing. Add reset functionality so that
make_ext4fs() can be called multiple times within a process.

Change-Id: Ia09a2385eab32bf3ca9eb9257c4f9df2c85e55be
/system/extras/ext4_utils/make_ext4fs_main.c