Commit graph

19 commits

Author SHA1 Message Date
Tom Cherry
6ad4d0a601 Remove EXCLUDE_FS_CONFIG_STRUCTURES
Long overdue clean up; there is no reason to include fs_config.h in
android_filesystem_config.h, and the fact that it causes problems if
it's done, necessitating EXCLUDE_FS_CONFIG_STRUCTURES to exist, is a
good reason to fix it.

Bug: 149785767
Test: build
Change-Id: I5ba2541cd1045c22486140649c90db39163081fd
2020-03-04 15:34:09 -08:00
Dan Willemsen
3f439a7a88 Switch from dist-for-goals to dist in Android.bp
Removes a few more Android.mk files.

Test: check for adb, mkbootfs, and fastboot in the build artifacts
Change-Id: Ie4e50a363a734d0b9207f0d0098c54719f038e76
2018-11-19 23:06:12 -08:00
Dan Willemsen
3e963f9df7 Convert more modules to Android.bp
Test: cd system/core; mma
Test: check for mkbootfs in build artifacts
Test: out/host/linux-x86/nativetest64/libcrypto_utils_test/libcrypto_utils_test
Test: out/host/linux-x86/nativetest64/libnativebridge-tests/*_test
Change-Id: I71141bd85f052d5d86763a8b79b219cc4c46aafb
2018-10-31 21:53:37 -07:00
Mikhail Lappo
26464914fe Possible null pointer miss on realloc
Realloc can return null pointer which
will cause a crash then. Patch introduces
check for controlled 'die' in case memory is
not available

Change-Id: I279028339b1fe756d8a511834e164e59d4cab110
2017-03-23 22:41:14 +01:00
Tao Bao
3b5fbd8331 mkbootfs: Fix the default st_mode for root directory.
CL in [1] fixed the wrong mode for the root directory from 0644 to 0755.
However it only handles the path by calling mkbootfs with canned
fs_config (i.e. with -f flag). When calling mkbootfs without -f flag, it
still treats the root directory as a file. This renders the generated
boot/recovery images w/ and w/o -f being different, and leads to the
incorrect checksums in /system/bin/install-recovery.sh.

[1] commit aa8f2f65a030f71506277e2a8d64d83a099e9feb.

Bug: 31988535
Test: `make dist` and verify the checksums in /system/bin/install-recovery.sh.

Change-Id: Ib50fadb23367da0b46944ae0579093da21412593
2016-10-07 16:14:27 -07:00
Thierry Strudel
df33ffadd2 fs_config: replace getenv('OUT') by new fs_config parameter
Using a getenv('OUT') in such a deep down function is a wrong design
choice. Replacing with explicit parameter that may be NULL in case
device specific files can be accessed from /.
Since TARGET_COPY_OUT_SYSTEM may be defined to something different than
system we also ensure that we use a path relative to TARGET_OUT to
compute path to fs_config_* files.

Bug: 21989305
Bug: 22048934
Change-Id: Id91bc183b29beac7379d1117ad83bd3346e6897b
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2015-07-09 21:47:07 -07:00
Mark Salyzyn
bc7828eb42 makebootfs: use libcutils shared libraries
- move to libcutils.so as shared now that they are
  in DISTTOOL.
- liblog dependency is part of libcutils, and need not be
  called out explicitly now. liblog is in DISTTOOL.
- libcutils fs_config has the right to add Android logging

Bug: 19908228
Change-Id: I915503f64389b59075620578601f98fc0756bd7a
2015-04-15 10:32:19 -07:00
Mark Salyzyn
d5cd3778cd mkbootfs: move fs_config to libcutils
Bug: 19908228

Change-Id: Ic843b32f575825dc89cd9fa15dc0619bc397ce82
2015-04-02 10:19:43 -07:00
Mark Salyzyn
5ce757518b cpio: Turn on -Werror
- Solve st_mode is uint16_t on MAC
- Turn on -Werror

Change-Id: I67b62424245545099ed283c56dae544153b85425
2014-05-23 09:48:09 -07:00
Elliott Hughes
14e28d39f7 Fix a bunch of small system/core bugs.
Missing frees in:
  adb/file_sync_client.c
  fastboot/fastboot.c
  libsparse/output_file.c

Missing closedirs in:
  adb/file_sync_service.c
  cpio/mkbootfs.c
  libcutils/dir_hash.c

Potential buffer overrun in:
  gpttool/gpttool.c

Incorrect NULL check in:
  libsparse/backed_block.c

Bug: https://code.google.com/p/android/issues/detail?id=61564
Change-Id: If97838a9e73a77aef7f416c31c237ce1fca4ce21
2013-10-29 14:12:46 -07:00
Nick Kralevich
e9e74f3c88 Add support for filesystem capabilities.
Modify android_filesystem_config.h and add a capabilities
field. This field can be used to add filesystem capabilities
to a particular file.

Change-Id: If8953a322457ea7275aa6df75660b714e6dc678a
2013-02-20 12:51:28 -08:00
Doug Zongker
a865f6d85a fix mkbootfs for systems that lack PATH_MAX
Change-Id: I1b841bde6de6c8e762c5fba35e6d6d701f18bb05
2012-05-04 16:45:35 -07:00
Doug Zongker
f2c3a8331c add -f option to mkbootfs to load file perms from file
mkbootfs uses the compiled in fs_config() function to set the mode
(but not the uid or gid) of the files in the filesystem it is
building.  Give it an optional "-f filename" flag to allow loading the
list of file permissions from a file, so we can continue to accurately
recreate old filesystems even when the current fs_config() has changed.

Bug: 6435132
Change-Id: Ife6b25e989301e78e22c34a544738436c96caf6f
2012-05-04 16:00:23 -07:00
Ying Wang
1c061b9ea9 dist for dist_files
Change-Id: I665572a2212f1239b02b7816e37ada210afbdb48
2010-12-09 10:33:27 -08:00
The Android Open Source Project
dd7bc3319d auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
The Android Open Source Project
e54eebbf1a auto import from //depot/cupcake/@135843 2009-03-03 18:29:04 -08:00
The Android Open Source Project
8ac3a13816 auto import from //branches/cupcake/...@127101 2009-01-20 14:04:01 -08:00
The Android Open Source Project
35237d1358 Code drop from //branches/cupcake/...@124589 2008-12-17 18:08:08 -08:00
The Android Open Source Project
4f6e8d7a00 Initial Contribution 2008-10-21 07:00:00 -07:00