Commit graph

17 commits

Author SHA1 Message Date
Treehugger Robot
b68036f44b Merge "Add LOCAL_LICENSE_KINDS to build/soong" 2021-02-10 07:18:29 +00:00
Bob Badour
02040de891 Add LOCAL_LICENSE_KINDS to build/soong
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  android/Android.bp
  android/soongconfig/Android.bp
  androidmk/Android.bp
  apex/Android.bp
  bazel/Android.bp
  bp2build/Android.bp
  bpf/Android.bp
  bpfix/Android.bp
  cc/Android.bp
  cc/config/Android.bp
  cc/libbuildversion/Android.bp
  cc/libbuildversion/tests/Android.bp
  cc/ndk_api_coverage_parser/Android.bp
  cc/ndkstubgen/Android.bp
  cc/symbolfile/Android.bp
  cmd/dep_fixer/Android.bp
  cmd/diff_target_files/Android.bp
  cmd/extract_apks/Android.bp
  cmd/extract_jar_packages/Android.bp
  cmd/extract_linker/Android.bp
  cmd/fileslist/Android.bp
  cmd/host_bionic_inject/Android.bp
  cmd/javac_wrapper/Android.bp
  cmd/merge_zips/Android.bp
  cmd/multiproduct_kati/Android.bp
  cmd/path_interposer/Android.bp
  cmd/pom2bp/Android.bp
  cmd/pom2mk/Android.bp
  cmd/sbox/Android.bp
  cmd/soong_build/Android.bp
  cmd/soong_env/Android.bp
  cmd/soong_ui/Android.bp
  cmd/zip2zip/Android.bp
  cmd/zipsync/Android.bp
  cuj/Android.bp
  dexpreopt/Android.bp
  dexpreopt/dexpreopt_gen/Android.bp
  env/Android.bp
  etc/Android.bp
  filesystem/Android.bp
  finder/Android.bp
  finder/cmd/Android.bp
  genrule/Android.bp
  jar/Android.bp
  java/Android.bp
  java/config/Android.bp
  kernel/Android.bp
  linkerconfig/Android.bp
  linkerconfig/proto/Android.bp
  makedeps/Android.bp
  partner/Android.bp
  phony/Android.bp
  python/Android.bp
  python/tests/Android.bp
  remoteexec/Android.bp
  rust/Android.bp
  rust/config/Android.bp
  scripts/Android.bp
  sdk/Android.bp
  sh/Android.bp
  shared/Android.bp
  symbol_inject/Android.bp
  symbol_inject/cmd/Android.bp
  sysprop/Android.bp
  tradefed/Android.bp
  ui/build/Android.bp
  ui/logger/Android.bp
  ui/metrics/Android.bp
  ui/metrics/proc/Android.bp
  ui/status/Android.bp
  ui/terminal/Android.bp
  ui/tracer/Android.bp
  xml/Android.bp
  zip/Android.bp
  zip/cmd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  finder/fs/Android.bp
  third_party/zip/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ia47ca14f16b8c9f84f9d533a07e5b00e2c04e8d4
2021-02-06 04:23:21 +00:00
Treehugger Robot
b3f9025b6e Merge "Support uncompressed cpio" 2021-02-05 15:57:22 +00:00
Treehugger Robot
364da36115 Merge changes I6a5357e9,I199f070e
* changes:
  Install ko to /lib/modules
  android_filesystem is OutputFileProducer
2021-02-05 03:39:51 +00:00
Jiyong Park
837cdb2212 Support uncompressed cpio
Bug: 178978059
Test: atest VirtualizationHostTestCases
Change-Id: I1f69af40f10d14ec2f3de6111d12b3a9c5d6c75c
2021-02-05 00:29:47 +09:00
Jiyong Park
940dfd4db2 android_filesystem is OutputFileProducer
... to be able to reference the module in data property of test modules.

Bug: N/A
Test: m VirtualizationHostTestCases
Change-Id: I199f070e811011cea6189ef24c0b2d8a683f79d0
2021-02-05 00:29:47 +09:00
Inseob Kim
cc8e536a15 Add file_contexts property to filesystem
Filesystems like ext4 can store file contexts itself. This supports
passing file_contexts file to build_image.

Bug: 178993690
Test: boot and see selinux denials are gone
Change-Id: I97d4a981e4b9c89434ea2f1303173ae91cce94e3
2021-02-04 13:28:20 +09:00
Jiyong Park
1f7b93e976 Add bootimg module type
The new module type is to build the boot partition images. Boot
partition image consists of kernel, ramdisk, dtb, etc. which are
processed by the mkbootimg tool. There are two flavors of boot
partition: boot and vendor_boot. The choice is configured via the
'vendor_boot' property. Currently, only `vendor_boot: true` case is
supported.

But: 178978059
Test: m cf_bootimg-5.10
Change-Id: Iee689d9d666e8e6e5af7db02a76dd39d1e4d0e3a
2021-02-02 00:41:57 +09:00
Jiyong Park
11a65979d8 android_filesystem supports compressed cpio format
The format is used to create ramdisk image. Building ramdisk image in
Soong is required to have vendor_boot.img in the virt APEX.
vendor_boot.img consists of ramdisk and dtb.

Bug: 178980227
Test: m
Change-Id: Ie4e90cef8407b6e4bdf7f03f93724cdc3cd45c20
2021-02-02 00:41:57 +09:00
Jiyong Park
3db465ddd7 Don't use "echo -e" when creating prop file
We don't need to escape backslashes when generating the prop file. In
addition, the "-e" option doesn't seem to be supported in some build
environments.

Bug: 178443594
Test: watch presubmit tests
Change-Id: I167b25255a68b62a75b433f31c5e7c9d57f2579d
2021-01-26 14:08:16 +09:00
Jiyong Park
71baa7690a Sign android_filesystem with avbtool
Use_avb and other avb_* properties allows us to sign an
android_filesystem module with avbtool.

Bug: 172415113
Test: m

Change-Id: Ifa1ed8ded1b10170aaca9b34e6a14f0179dbab5d
2021-01-20 08:39:54 +09:00
Jiyong Park
7267831086 Refactor filesystem.go to make it easy to build prop file
The creation of the prop file is refactored to a function.

Bug: 172415113
Test: m

Change-Id: I969bf4a2476f7a4aa9571945d3645d7af52ff09a
2021-01-20 08:35:52 +09:00
Jiyong Park
12a719c0fc android_filesystem modules can be included in APEX
android_filesystem modules can be included in APEX via the new
`filesystems` property. The filesystem images are placed at
./etc/fs/<modulename>.img.

Bug: 172413888
Test: m nothing

Change-Id: I215ca7a32ff1988a0de4e1f71397684e189839ea
2021-01-07 15:35:25 +09:00
Colin Cross
f1a035e6be Pass pctx and ctx to NewRuleBuilder
Enable the RuleBuilder and RuleBuilderCommand methods to access
the BuilderContext by passing it to NewRuleBuilder instead of
RuleBuilder.Build.

Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
2020-12-01 16:22:16 -08:00
Jiyong Park
65c49f5979 android_filesystem is installable
Also document about the android_filesystem module type.

Bug: 172414391
Test: m
Change-Id: Iae07af9dd22f34c8e0e4c833333bafdf82dcab2a
2020-12-01 23:47:39 +09:00
Jiyong Park
65b6224471 Clients of PackagingBase can customize dependency tag to use
Previously, the dep tag used by PackagingBase was fixed, which prevented
some of its clients (e.g. cvd-host-package) from opting in to
android.InstallAlwaysNeededDependencyTag. Now, PackagingBase.AddDeps
accepts the dependency tag to use.

Also, dependencies toward rust dylib, rlib, and proc_macro are
configured to return true on InstallDepNeeded. This is required to
install shared_lib dependencies of the rust modules when they are
depended on by a rust binary.

Exempt-From-Owner-Approval: a trivial change after +2 from the owner.
This has to land ASAP as many users are affected by acloud being
unavailable.

Bug: N/A
Test: m
Test: acloud create --local-instance --local-image
Change-Id: If22aee7c6f314fcb03b9d4fe6901a2557f1e899c
2020-12-01 03:43:05 +00:00
Jiyong Park
6f0f688c4b add android_filesystem
android_filesystem is a module type that can be used to create filesystem
images out of binaries built for Android. Its initial use will be for
creating an Android-like OS image to run on virtual machines, but the
use is not limited to it.

The module type currently lacks a lot of features like the support for
other filesystem types, and the ability to do something like signing the
image using avbtool, etc. Those will be added in follow-up CLs as we
have actual demands.

Bug: 172414391
Test: m
Change-Id: I4b779d4586e04d9a960688e73b711166708558ab
2020-11-19 08:58:06 +09:00