Commit graph

56085 commits

Author SHA1 Message Date
David Anderson
5924eeb4a4 Merge "overlayfs: Refactor how the scratch device is deduced, again."
am: 81fbcbdbd4

Change-Id: I9799652b1286b20bab8d3ed084da48293146915e
2019-12-30 17:01:22 -08:00
David Anderson
81fbcbdbd4 Merge "overlayfs: Refactor how the scratch device is deduced, again." 2019-12-31 00:24:35 +00:00
David Anderson
23243497fd fastboot: Mount /metadata before overlayfs teardown.
fs_mgr_overlayfs needs access to /metadata to tell whether or not the
scratch partition exists on /data.

Bug: 134949511
Test: adb remount, fastboot flash system
Change-Id: I3a09aae495d691e9c1a1e25a8fb3514e355ecd05
2019-12-30 13:42:57 -08:00
Automerger Merge Worker
59f77a6178 Merge "Reset sys.shutdown.requested property" am: e6a32d5d90 am: 0a1908cdf3
Change-Id: I320c1b3817ed6e3566f15748b184a41f182ecfa8
2019-12-30 20:22:19 +00:00
Nikita Ioffe
0a1908cdf3 Merge "Reset sys.shutdown.requested property"
am: e6a32d5d90

Change-Id: I750dd7e95b0ca5611a347c13b8aa57d628da0dbb
2019-12-30 12:03:21 -08:00
Treehugger Robot
e6a32d5d90 Merge "Reset sys.shutdown.requested property" 2019-12-30 19:53:52 +00:00
Nikita Ioffe
1131a211dc Reset sys.shutdown.requested property
Otherwise, if userspace reboot is triggered from the framework, it will
end up in userspace reboot loop until watchdog kicks in triggers full
reboot.

Bug: 135984674
Test: adb shell svc power reboot userspace
Change-Id: I0de451aad4ea236a3ff1c20b317b01c6529b6231
2019-12-30 16:06:35 +00:00
Kiyoung Kim
3b2dbe9d75 Update linkerconfig to target out directory
Current linkerconfig targets for specific output file. However,
linkerconfig will generate more than 1 file based on APEX modules, so it
should take argument for target directory rather than target file. This
change updates linkerconfig's argument to point output directory.

Bug: 146993126
Test: m -j passed & Cuttlefish succeeded to boot
Change-Id: I3a720a047077688582436aabd307adafeafc5398
2019-12-30 18:44:41 +09:00
Automerger Merge Worker
a031248932 Merge "libfiemap: delete unuseful check" am: d8a8988c6e am: 61051f6fcc
Change-Id: I02d9939fb8b7e2babfc98466b0e87e9c1d9d876c
2019-12-28 03:11:48 +00:00
Yifan Hong
61051f6fcc Merge "libfiemap: delete unuseful check"
am: d8a8988c6e

Change-Id: I0b714504d8576bdd7a991d613be31417734116c5
2019-12-27 18:57:58 -08:00
Treehugger Robot
d8a8988c6e Merge "libfiemap: delete unuseful check" 2019-12-28 02:55:38 +00:00
Yifan Hong
0ede9b43e5 libfiemap: delete unuseful check
Just let fallocate fails. It also doesn't check for the delta between
the old file and the new file.

Test: unit tests
Change-Id: I05e12b097a973d9fe7fe696cc472bd7ec2d180c7
2019-12-27 15:36:41 -08:00
Automerger Merge Worker
0019007173 Merge "libmodprobe: parse kernel command line for module options" am: d1e9812217 am: 6d46873127
Change-Id: I6a989741798a302a78ded6c9dcd4cd9700d9107c
2019-12-27 23:15:28 +00:00
Ruchir Rastogi
5dbcae5020 Expose libstatssocket as a stable C API
We create a .map.txt file that lists all the stable entry points into
libstatssocket. This should allow other APEXes to link to libstatssocket
without having to copy the library within the APEX.

Test: m -j libstatssocket
Bug: 146377784
Change-Id: I9f77a0c380b6884d9ca60807a8974380420cfe0a
2019-12-27 15:04:54 -08:00
Steve Muckle
6d46873127 Merge "libmodprobe: parse kernel command line for module options"
am: d1e9812217

Change-Id: I4b9c9aba8229497de7054f7d60aa61f860951fc1
2019-12-27 15:01:52 -08:00
Treehugger Robot
d1e9812217 Merge "libmodprobe: parse kernel command line for module options" 2019-12-27 22:53:32 +00:00
Automerger Merge Worker
b78eb12dc2 Merge "liblog: don't destroy global mutexes" am: 0962561c9b am: ffb8945e59
Change-Id: I255d3293ceeb42c3b5fd255f3bf5b65f655a7df6
2019-12-27 22:26:46 +00:00
Automerger Merge Worker
4ffe3472e1 Merge "init: Use ImageManager for DSUs." am: bdaa9afbf2 am: e790acd6cd
Change-Id: I755008dee477528490578e264802faa3f5dd769a
2019-12-27 22:26:34 +00:00
Automerger Merge Worker
94a74c2fde Merge "libfiemap: Add a MapAllImages() helper." am: 4e5b505751 am: caad1ad495
Change-Id: Iaa09d77552ff97492f3a80211f57f01a04a6db3b
2019-12-27 22:26:31 +00:00
Automerger Merge Worker
600c0ad321 Merge "libfiemap: Add a way to get the block device path of a mapped image." am: 31a35038a0 am: fa61f9172a
Change-Id: Iab24daf0240a93c6826f76e52155c71a4fc96805
2019-12-27 22:24:10 +00:00
Tom Cherry
ffb8945e59 Merge "liblog: don't destroy global mutexes"
am: 0962561c9b

Change-Id: I3c579a0ebf27f2b552d3fbb07957811fb5fcd447
2019-12-27 14:06:35 -08:00
David Anderson
e790acd6cd Merge "init: Use ImageManager for DSUs."
am: bdaa9afbf2

Change-Id: I22777271ed2d85694154c6d577ddb25718a00549
2019-12-27 14:06:02 -08:00
David Anderson
caad1ad495 Merge "libfiemap: Add a MapAllImages() helper."
am: 4e5b505751

Change-Id: Ie9d838b6b91e6d0aeb289d075a76f626c9c0901f
2019-12-27 14:05:58 -08:00
David Anderson
fa61f9172a Merge "libfiemap: Add a way to get the block device path of a mapped image."
am: 31a35038a0

Change-Id: I143bcfe24cb22e1f36db3b47260ecdc895eb6b5e
2019-12-27 14:05:10 -08:00
Tom Cherry
0962561c9b Merge "liblog: don't destroy global mutexes" 2019-12-27 21:55:59 +00:00
Steve Muckle
373a3cadd7 libmodprobe: parse kernel command line for module options
Bug: 145808811
Test: atest libmodprobe_tests, verify on flame
Change-Id: I0b41b1610fe13ae526d38f029da888f6f0d8a02d
2019-12-27 13:39:23 -08:00
Automerger Merge Worker
9d910f980a Merge "libfiemap: Add helpers to remove images from recovery." am: 8edafa2393 am: 7208d546ef
Change-Id: I47eb95360eea05f79a099eb5c54b31f2c5e2e8cf
2019-12-27 21:26:53 +00:00
David Anderson
bdaa9afbf2 Merge "init: Use ImageManager for DSUs." 2019-12-27 21:13:51 +00:00
David Anderson
4e5b505751 Merge "libfiemap: Add a MapAllImages() helper." 2019-12-27 21:13:51 +00:00
David Anderson
31a35038a0 Merge "libfiemap: Add a way to get the block device path of a mapped image." 2019-12-27 21:13:33 +00:00
David Anderson
7208d546ef Merge "libfiemap: Add helpers to remove images from recovery."
am: 8edafa2393

Change-Id: Ib6d6237baee5c211869f1b2273f683e4a7ad77b0
2019-12-27 13:01:21 -08:00
David Anderson
8edafa2393 Merge "libfiemap: Add helpers to remove images from recovery." 2019-12-27 20:28:48 +00:00
Automerger Merge Worker
6e66597cf6 Merge "trusty: storageproxyd: Fix rebase of UFS support" am: 369dff24da am: e6282d9d33
Change-Id: I8878ee2da3fe3e1afad7079490162cdfe0487327
2019-12-27 01:15:52 +00:00
Matthew Maurer
e6282d9d33 Merge "trusty: storageproxyd: Fix rebase of UFS support"
am: 369dff24da

Change-Id: I0b85cdb6542efd6ca634a110c45d100b39445b6e
2019-12-26 17:00:51 -08:00
Matthew Maurer
369dff24da Merge "trusty: storageproxyd: Fix rebase of UFS support" 2019-12-27 00:39:32 +00:00
Automerger Merge Worker
799f3fe12a Merge "Use generated linker config only" am: 3c0e06d829 am: eafc79a135
Change-Id: Icf62bc33c37580201f7838feb4897697982e6812
2019-12-27 00:25:04 +00:00
Kiyoung Kim
eafc79a135 Merge "Use generated linker config only"
am: 3c0e06d829

Change-Id: I79c3cdb2f34e82e3bdc83b0ea1dfa87735072c04
2019-12-26 16:11:06 -08:00
Kiyoung Kim
3c0e06d829 Merge "Use generated linker config only" 2019-12-27 00:08:06 +00:00
Matthew Maurer
17785fd185 trusty: storageproxyd: Fix rebase of UFS support
The UFS support got rebased on top of the RPMB socket support
improperly. As a result, RPMB socket support was broken due to an
unconditional rmpb_fd = rc which would set the rpmb_fd to be connect()'s
error code in the case of an RPMB socket.

Bug: 146903427
Test: Boot Trusty+Android with the rpmb_dev mock, check for liveness
Change-Id: Ib1220dc49392f1a10369eed7716e44680bd83a66
2019-12-26 15:03:45 -08:00
David Anderson
69def12f08 overlayfs: Refactor how the scratch device is deduced, again.
The previous refactoring did not uncover the full breadth of issues that
arise when trying to use /data for adb remount. In fact, there are a few
distinct use cases for the scratch device, and one function cannot
sensibly provide them all.

(1) First-stage init needs to know if there are dependent devices. This
    would be userdata, super_<other>, or system_<other>. This knowledge
    is dependent on the state in /metadata, fstab, and the kernel
    command-line.

(2) First-stage init and fastbootd need to know where the scratch
    partition is. If it's not in super_<other> or system_<other>, and
    there is no indicator on /metadata, then it might be in a dynamic
    partition.

(3) "adb remount" needs to find a place to put scratch, which
    effectively amounts to the first writable space it can find.
    However, for Virtual A/B, devices, scratch wants to be stored in
    /data, which requires more complex checks and binder calls.

Trying to encapsulate all of this into one function is too difficult, so
instead, this patch breaks GetScratchStrategy into separate functions:
one to return a physical location if a candidate exists, and another to
deduce the "boot" scratch device.

"adb remount" no longer calls GetScratchDevice, since it only needs to
know whether or not a physical candidate was possible.

fs_mgr_overlayfs_teardown calls GetBootScratchDevice, but now only
attempts to make a dynamic "scratch" partition if one definitely exists.
This makes the functionality clearer and reduces fastbootd uart spam.

Bug: 134949511
Test: adb_remount_test.sh on coral
      adb_remount_test.sh on crosshatch
      adb_remount_test.sh on walleye
Change-Id: I5f6a3677bc6adcaaf54c8ab3594643e4f285c04e
2019-12-25 22:32:31 -08:00
David Anderson
d5745cce70 libfiemap: Add a MapAllImages() helper.
This adds a helper for first-stage init to easily map partitions backed
by /data. This can be used for the scratch partition as well as DSU
partitions.

Bug: 134949511
Test: fiemap_image_test
Change-Id: I46246b41ce19442d1476b9959e34df0e1bff58c3
2019-12-25 22:32:31 -08:00
Kiyoung Kim
32082a7e28 Use generated linker config only
Remove prebuilt ld.config.txt to use linker config from generator only,
including legacy and vndk_lite case.

Bug: 139638519
Test: m -j passed

Change-Id: I043d51daca8cde1977236f9fbda919176a18618d
2019-12-24 14:18:53 +09:00
Automerger Merge Worker
13bfe6a0ee Merge "fs_mgr: Move libfiemap into libfs_mgr, and introduce libfs_mgr_binder." am: e1c879c816 am: 88d4cf28b3
Change-Id: I5f11cedad15e6d5945b24e26abf0d96aa87f874f
2019-12-24 05:18:18 +00:00
David Anderson
88d4cf28b3 Merge "fs_mgr: Move libfiemap into libfs_mgr, and introduce libfs_mgr_binder."
am: e1c879c816

Change-Id: I1abee7835186287fc660c024068b315b9f3b5f3c
2019-12-23 21:01:58 -08:00
David Anderson
e1c879c816 Merge "fs_mgr: Move libfiemap into libfs_mgr, and introduce libfs_mgr_binder." 2019-12-24 04:37:05 +00:00
Automerger Merge Worker
a9508eb591 Merge "Add storageproxyd UFS support" am: e4d95b77d5 am: fe553d0f11
Change-Id: I73cd94356d43ce732d4b82392601dde62fa504b2
2019-12-22 22:16:58 +00:00
Wenhao Wang
fe553d0f11 Merge "Add storageproxyd UFS support"
am: e4d95b77d5

Change-Id: Ib3fc9b2f20e207985c4580c6779361cfbaf73bbc
2019-12-22 14:07:42 -08:00
Wenhao Wang
e4d95b77d5 Merge "Add storageproxyd UFS support" 2019-12-22 22:01:35 +00:00
Automerger Merge Worker
54f54b1375 Merge "fs_mgr: Fix return in error case" am: 5821125694 am: b9b2ba3550
Change-Id: Ib904c4ea62197c507218859024edda94ee6766dc
2019-12-21 07:16:49 +00:00
Greg Kaiser
b9b2ba3550 Merge "fs_mgr: Fix return in error case"
am: 5821125694

Change-Id: I5d164abcdb3185bc9fe416b00e91a1e6ccb1f2eb
2019-12-20 23:03:24 -08:00