Commit graph

9 commits

Author SHA1 Message Date
Jooyung Han
e606759ddf Make filesystem aware of coverage
filesystem should have coverage variants with coverage-enabled build.
Otherwise, it would fail to collect dependencies.

Bug: 273238141
Test: m nothing (soong tests)
Test: compare the artifacts
 $ SKIP_ABI_CHECKS=true SOONG_COLLECT_JAVA_DEPS=true EMMA_INSTRUMENT=true\
   EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true\
   NATIVE_COVERAGE_PATHS='*' m microdroid
 $ m microdroid
Change-Id: I792458ace00a63b4b5213898fd3209351a6e00be
2023-03-16 13:11:17 +09:00
Jooyung Han
54f780505d Prevent sdk variants from install
Platform variants should be available even when unbundled_build so that
unbundled build of com.android.virt apex can correctly have microdroid
image with system variants.

Bug: 268582372
Test: m (soong test)
Test: banchan com.android.virt aosp_arm64
      UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true m apps_only dist
      (microdroid should have the same contents)
Change-Id: I682e4f1f477f3024f7719dfaa67006ef335e0640
2023-02-22 13:45:49 +09:00
Alice Wang
000e3a396c [avb_footer] Add avb_gen_vbmeta_image to generate vbmeta image
This is the reland of the change aosp/2375848. The build of initrd on
linux-x86 that has incorrect format (b/264940248) is disabled in this
cl.

Bug: 260821553
Test: m microdroid_kernel_signed and inspect the output using `avbtool
    info_image --image <output>`
Change-Id: I3ad2419b7132cde4b2fc34ddfa09ec5ba2166819
2023-01-10 15:38:31 +00:00
Jerry Huang
bc675eb9fa Revert "[avb_footer] Add avb_gen_vbmeta_image to generate vbmeta..."
Revert submission 2375848-initrd_avb_footer

Reason for revert: build break

Reverted changes: /q/submissionid:2375848-initrd_avb_footer

Bug: 264940248
Change-Id: Iab44c187183a5d8eeefc952910e6262fc63627de
2023-01-10 02:52:57 +00:00
Alice Wang
fafe064fe1 [avb_footer] Add avb_gen_vbmeta_image to generate vbmeta image
Bug: 260821553
Test: m microdroid_kernel_signed and inspect the output using `avbtool
    info_image --image <output>`
Change-Id: Iacdf34aca15f5480766b6d4f971704f85f6bf44b
2023-01-09 22:04:16 +00:00
Jiyong Park
bc48548df1 Add props property to add_avb_hash_footer
It is used to provide name:value properties to the footer. Value can be
from a text in *.bp file or a binary file referenced via the `file`
prop. e.g.

```
avb_add_hash_footer {
	...
	props: [
		{
			name: "string_prop",
			value: "string_value",
		},
		{
			name: "binary_prop",
			file: "a_binary_file_name",
		},
	],
}
```

This CL also adds a test for the module type which has been missing.

Bug: 256148237
Test: m nothing
Change-Id: Idf55b308c8ce760387c01a847846b42d1aebe4ea
2022-11-18 12:56:12 +09:00
Jooyung Han
0fbbc2b0d4 android_system_image only packages "system" items
android_system_image filers packaging items installed outside "system"
partition.

Some packaging items install related items to different partitions but
putting them altogether to android_system_image doesn't make sense.
(android_system_image is suppposed to be "system" partition)

To be specific, this filters out "apex" partition items.  "apex"
partition is used by APEX installation to install APEX contents to paths
similar to activated paths on device so that symbol lookup works well
with APEX contents.

Bug: 225121718
Test: atest MicrodroidHostTestCases
Test: debugfs <intermediate>/microdroid.img -R 'ls system'
  shows no "com.android.runtime"
Change-Id: Ibc3d85ead2fda99e231132ce8ab9ccf1cc9317b7
2022-03-29 07:56:02 +09:00
Jiyong Park
fa616137a2 android_system_image that generates linker.config.pb
android_system_image module type is a specialization of the
android_filesystem module type. Currently, it adds a build rule for
creating linker.config.pb from the information about all the other files
in the filesystem and includes linker.config.pb to the filesystem as
well.

To do so, the filesystem module now provides a function pointer which
subtype modules like android_system_image can implement to pass extra
files that they want to package in the filesystem.

In addition, the linkerconfig package is revised to make it possible to
build linker.config.pb file outside of the package.

Bug: 185391776
Test: m microdroid and inspect etc/linker.config.pb in it.

Change-Id: Id89c40b519213062860d7306029b8413d8d36a2d
2021-04-21 09:11:21 +09:00
Jooyung Han
9706cbc1e9 Add filesystem_test.go
It has only one test function as a starting point.

Bug: n/a
Test: m (soong tests)
Change-Id: I785b096805014a40dfd600f7baaf884f4016c23c
2021-04-16 13:20:02 +09:00