Commit graph

41908 commits

Author SHA1 Message Date
Treehugger Robot
516ec4c257 Merge "libdm: Add helper classes for loop control." 2018-06-25 21:24:07 +00:00
David Anderson
4b52440812 fs_mgr: Use libdm for dm-linear devices.
This removes the custom ioctl code in fs_mgr_dm_linear.cpp in favor of
using libdm.

Bug: 110035986
Test: logical partitions are still created in first-stage init
Change-Id: I941a27ce865aa1bc712b91d8d4c874462e0d11df
2018-06-25 12:56:15 -07:00
David Anderson
2d3e79f5d5 libdm: Add unit tests for dm-linear.
Bug: 110035986
Test: libdm_test gtest
Change-Id: I83fb978931aa36b83880c4d44745cc45ee516fc4
2018-06-25 12:56:14 -07:00
Pirama Arumuga Nainar
a2df1ef441 Do not customize __format__ for Windows/MinGW to gnu_printf
Bug: http://b/69933090
Bug: http://b/69933068

MinGW uses gnu_printf to force C99 printf analysis with GCC, but clang
does not support gnu_printf.  So just use the default that's used for
other platforms.  This also mirrors upstream commit
015e637b4b/.

Test: m native-host-cross with Clang.
Change-Id: I3deb266d70e25296c4ae1d58637afbabc3d949c1
2018-06-25 11:52:54 -07:00
Pirama Arumuga Nainar
8e52362e45 Adapt to switch to Clang for Windows host builds
Bug: http://b/69933068

Bug: http://b/91353691: std::chrono_utils is not available in the
libstdc++ in the mingw/gcc prebuilts.  They can be used once we switch
to using libc++ for Windows host.

Test: m native-host-cross with Clang
Change-Id: If9f0f1f201d5e4e445890075ad64c2d6086b0491
2018-06-25 11:47:52 -07:00
David Anderson
1f428ea054 libdm: Add helper classes for loop control.
This change adds a LoopControl class for interacting with the loop
control device. In addition it provides a LoopDevice class for creating
temporary loop devices. This is aimed at being a building block for libdm
tests, so the current functionality is limited to attaching and
detaching file descriptors and finding free loop devices.

Bug: 110035986
Test: libdm_test gtest
Change-Id: Ice2891e3a44a037aff7b81c63ac793815640d582
2018-06-25 11:37:51 -07:00
Christopher Ferris
eb1fc691c0 Merge "Fix ARM program header values used for exidx."
am: fc1cf90741

Change-Id: I3836909ce4c059ec1cfda217c5b7179f86fb2c8d
2018-06-23 16:36:54 -07:00
Christopher Ferris
fc1cf90741 Merge "Fix ARM program header values used for exidx." 2018-06-23 23:26:57 +00:00
Elliott Hughes
6513d6ae70 Merge "adb: fix obsolete documentation."
am: 409465a241

Change-Id: I2ae594a388b378560f1d4dd672e728f4a02e4f71
2018-06-22 18:06:20 -07:00
Treehugger Robot
409465a241 Merge "adb: fix obsolete documentation." 2018-06-23 00:57:20 +00:00
Josh Gao
5d84579a1f Merge "Revert "adb: detect some spin loops and abort.""
am: b8f4f1422f

Change-Id: Iac8c439af0e8f0d295b28c43979699eb9963510e
2018-06-22 17:10:53 -07:00
David Anderson
6aa16f4eb0 Merge "libdm: Implement GetDmDevicePathByName()."
am: a67b00a322

Change-Id: If7bd99f875375ad1f4e5f2aad996ede3cd0fb40d
2018-06-22 17:08:44 -07:00
Treehugger Robot
b8f4f1422f Merge "Revert "adb: detect some spin loops and abort."" 2018-06-23 00:06:38 +00:00
Treehugger Robot
a67b00a322 Merge "libdm: Implement GetDmDevicePathByName()." 2018-06-23 00:00:51 +00:00
Christopher Ferris
f882a38864 Fix ARM program header values used for exidx.
Before, I was using p_vaddr to get the offset into the elf file where
the exidx frame starts. I changed that to use p_offset since this already
has the load bias offset in it and some elf files do not set p_vaddr
properly.

Also, use p_filesz instead of p_memsz, since again, some elf files do
not set p_memsz to the same as p_filesz.

Bug: 110704153

Test: All libbacktrace/libunwindstack unit tests pass.
Test: Randomly unwind process on a walleye.
Test: Verified that this properly dumps and unwinds the shared
Test: library that sets p_vaddr and p_memsz differently.
Change-Id: Ic7b1e5d07439f4636fa02cd884a8727a5737372b
2018-06-22 16:48:02 -07:00
David Anderson
72e8546026 Merge "liblp: Add unit tests for flashing and readback."
am: 245b03248f

Change-Id: Ibdff80c9a19ffac6a02b1e73ab55c2ddd898ec00
2018-06-22 16:36:59 -07:00
Treehugger Robot
245b03248f Merge "liblp: Add unit tests for flashing and readback." 2018-06-22 23:28:02 +00:00
David Anderson
5e9e74be61 libdm: Implement GetDmDevicePathByName().
This change implements the ability to get the path of a block device
given a device-mapper device name. In addition, dmctl now has a
"getpath" command to perform this query, as a shortcut for searching
through /sys/block/*/dm/name.

Bug: 110035986
Test: N/A
Change-Id: I9ebd824fa800004f591fc02fc1b1950e0c7fba65
2018-06-22 14:23:31 -07:00
David Anderson
628df89e8a Merge "liblp: Add unit tests."
am: 8ddd105545

Change-Id: I1c69cf75c70b56b87dac05c5fc0654c13f1dd9fe
2018-06-22 13:54:10 -07:00
Treehugger Robot
8ddd105545 Merge "liblp: Add unit tests." 2018-06-22 20:47:18 +00:00
Elliott Hughes
4a533ebfaf Merge "Remove pstore case ibc.__pstore_append from CTS"
am: bb7e81238f

Change-Id: Iea20e14c2e791ede36a0691a8320c49c7f64e9cb
2018-06-22 13:26:40 -07:00
Christopher Morin
00ac033d6c Merge "init: Don't set ro.serialno when androidboot.serialno is not set"
am: 27eda482be

Change-Id: I5ea45a03ef91395b43fce85ad6a36a59c4cd3839
2018-06-22 13:26:09 -07:00
Elliott Hughes
bb7e81238f Merge "Remove pstore case ibc.__pstore_append from CTS" 2018-06-22 20:20:29 +00:00
Elliott Hughes
accc95dc6b adb: fix obsolete documentation.
Bug: http://b/110564383 Obsolete adb document, inconsistent with current implementation
Test: N/A
Change-Id: If12ba8546991ee6f2a89ca0ff8036b598742dc11
2018-06-22 13:12:19 -07:00
Christopher Morin
27eda482be Merge "init: Don't set ro.serialno when androidboot.serialno is not set" 2018-06-22 20:10:22 +00:00
Josh Gao
04b9ca8c31 Revert "adb: detect some spin loops and abort."
This seems to be falsely triggering.

This reverts commit 3bbc8164b1.

Test: none
2018-06-22 13:07:22 -07:00
David Anderson
dae1e7915a Merge "libdm: Implement zero and linear targets."
am: d9b581e9b5

Change-Id: Ifd8f9e3c09f993832e4a2eaa96a183fc66102351
2018-06-21 20:31:31 -07:00
David Anderson
efa61bf7ea Merge "libdm: Add DmTargetTypeInfo and a unit test."
am: 2502aa2a12

Change-Id: I9ddf61051c3cb292d351f42d0be5640fadcf9c2f
2018-06-21 20:30:22 -07:00
Chris Morin
39d124b92c init: Don't set ro.serialno when androidboot.serialno is not set
This functionality is useful for improving boottimes on the ARC++
project. Without this change, ro.serialno would be set to the empty
string when androidboot.serialno was unset in the kernel commandline.

Bug: 62039211
Test: boot with androidboot.serialno unset and ensure ro.serialno is
unset

Change-Id: Iaee339dfa3f0c871e5e9c1fc0534347f2b3e8a07
2018-06-21 18:54:28 -07:00
Treehugger Robot
d9b581e9b5 Merge "libdm: Implement zero and linear targets." 2018-06-22 01:06:16 +00:00
Treehugger Robot
2502aa2a12 Merge "libdm: Add DmTargetTypeInfo and a unit test." 2018-06-22 00:36:52 +00:00
chenhg
7d8880e50c Remove pstore case ibc.__pstore_append from CTS
BUG: 110118705
Change-Id: I946c645af0cfb3f3b0e9344c51940da226fd08ce
2018-06-21 16:04:10 -07:00
David Anderson
0a186a834e liblp: Add unit tests for flashing and readback.
These tests check that various aspects of liblp's on-disk management
are functioning as intended. This checks redundancy, metadata slot
management, and metadata update and readback.

Bug: 79173901
Test: liblp_test gtest
Change-Id: Ib780676e0f34f44aa255e8fcfded2ceb71fe3dce
2018-06-21 12:58:34 -07:00
David Anderson
e9619eb6d1 liblp: Add unit tests.
Bug: 79173901
Test: liblp_test gtest
Change-Id: Iba77f0a0886741e459ab65122c28e8bd52ec93e8
2018-06-21 12:58:34 -07:00
David Anderson
bac58aeecf libdm: Implement zero and linear targets.
This change implements DmTargetZero and DmTargetLinear, and integrates
them into dmctl. It also implements DmTarget and DmTable serialization.

Example dmctl invocation:

  dmctl create my-device -ro \
        linear 0 800 /dev/block/by-name/system 0 \
        zero   800 1200                          \
        linear 1200 1500 /dev/block/by-name/system 1200

Bug: 110035986
Test: libdm_test gtest
Change-Id: I7f945c1d9e23cfb78239c23a1aad88e8aef4972b
2018-06-21 12:48:34 -07:00
David Anderson
c7def6849a libdm: Add DmTargetTypeInfo and a unit test.
This change refactors DmTarget. It was satisfying two separate use cases
that have no overlap: (1) as a container for informational queries, and
(2) for specifying table targets.

The kernel's nomenclature for the former is a "target type," so the new
class is named DmTargetTypeInfo.

In addition, this change adds a unit test for
DeviceMapper::GetAvailableTargets that ensures the device has at least a
linear target type (with more TBD).

Bug: 110035986
Test: libdm_test gtest
Change-Id: Icb87976801e8a1e6ec79e48b1d58c308d36279e5
2018-06-21 12:48:34 -07:00
Wei Wang
736d63c7d1 Merge "init: print service name when started waiting"
am: d41a1f9add

Change-Id: I3672fe86c4fb75ca22d4a5862a291d79062822b0
2018-06-21 12:23:54 -07:00
Treehugger Robot
d41a1f9add Merge "init: print service name when started waiting" 2018-06-21 19:17:08 +00:00
David Anderson
a93fdcb061 Merge "libdm: Implement LoadTableAndActivate."
am: 2e98fd23c3

Change-Id: I2fe21372eecc8d4568fa8a6cdf4f93c46c271c28
2018-06-21 12:16:49 -07:00
David Anderson
540ad62834 Merge "libdm: Move includes to a libdm folder."
am: bdc56b046e

Change-Id: Ibd1e51d03302bdf7d0a35dcf43ba1d09b799c96e
2018-06-21 12:16:16 -07:00
Treehugger Robot
2e98fd23c3 Merge "libdm: Implement LoadTableAndActivate." 2018-06-21 19:01:49 +00:00
Treehugger Robot
bdc56b046e Merge "libdm: Move includes to a libdm folder." 2018-06-21 19:01:20 +00:00
Anton Hansson
548d115e97 Merge "Split shell_and_utilities into partition parts."
am: a242a4ba06

Change-Id: Iba9d2fa497fdee31c489657a62c2e0923ae21c60
2018-06-21 00:43:46 -07:00
Anton Hansson
a242a4ba06 Merge "Split shell_and_utilities into partition parts." 2018-06-21 07:32:37 +00:00
Elliott Hughes
6866091079 Merge "shell_and_utilities: update README.md."
am: 73e90463e2

Change-Id: I46ce90f85b60d7f1284703a6da0d6798947fafa2
2018-06-20 17:41:01 -07:00
Treehugger Robot
73e90463e2 Merge "shell_and_utilities: update README.md." 2018-06-21 00:33:00 +00:00
Yifan Hong
6dd458a67c Merge "Revert "init: dummy host_init_verifier for mac""
am: 16bb55cb7b

Change-Id: Ibcb16e6a5b297650687c81bee1a8b86852a51fd5
2018-06-20 16:04:28 -07:00
Yifan Hong
16bb55cb7b Merge "Revert "init: dummy host_init_verifier for mac"" 2018-06-20 22:56:39 +00:00
Wei Wang
2c4ee75b1e init: print service name when started waiting
Bug: 110479595
Test: Boot
Change-Id: I448a64cec4c1cd5b736f8b9d04cd26429067bb71
2018-06-20 15:55:10 -07:00
Yifan Hong
3c4aa11cab Revert "init: dummy host_init_verifier for mac"
This reverts commit f567367584.

Reason for revert: mac build

Change-Id: Icd5d08206c50854d6645e07c4fb29705222bd226
2018-06-20 22:49:48 +00:00