• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2012 The Android Open Source Project
2
3package {
4    default_applicable_licenses: ["Android-Apache-2.0"],
5}
6
7cc_library_headers {
8    name: "libmkbootimg_abi_headers",
9    vendor_available: true,
10    export_include_dirs: ["include"],
11}
12
13cc_library_headers {
14    name: "bootimg_headers",
15    vendor_available: true,
16    recovery_available: true,
17    export_include_dirs: ["include/bootimg"],
18    host_supported: true,
19    target: {
20        windows: {
21            enabled: true,
22        },
23    },
24    apex_available: [
25        "//apex_available:platform",
26        "com.android.virt",
27    ],
28}
29
30cc_library {
31    name: "libmkbootimg_abi_check",
32    vendor_available: true,
33    vndk: {
34        enabled: true,
35    },
36    srcs: [
37        "mkbootimg_dummy.cpp",
38    ],
39    header_libs: ["libmkbootimg_abi_headers"],
40    export_header_lib_headers: ["libmkbootimg_abi_headers"],
41}
42
43python_defaults {
44    name: "mkbootimg_defaults",
45    version: {
46        py3: {
47            embedded_launcher: true,
48        },
49    },
50}
51
52python_binary_host {
53    name: "mkbootimg",
54    defaults: ["mkbootimg_defaults"],
55    main: "mkbootimg.py",
56    srcs: [
57        "mkbootimg.py",
58        "gki/generate_gki_certificate.py",
59    ],
60    required: [
61        "avbtool",
62    ],
63}
64
65python_binary_host {
66    name: "unpack_bootimg",
67    defaults: ["mkbootimg_defaults"],
68    srcs: [
69        "unpack_bootimg.py",
70    ],
71}
72
73
74python_binary_host {
75    name: "repack_bootimg",
76    defaults: ["mkbootimg_defaults"],
77    srcs: [
78        "repack_bootimg.py",
79    ],
80    required: [
81        "lz4",
82        "minigzip",
83        "mkbootfs",
84        "mkbootimg",
85        "toybox",
86        "unpack_bootimg",
87    ],
88}
89
90python_binary_host {
91    name: "certify_bootimg",
92    defaults: ["mkbootimg_defaults"],
93    main: "gki/certify_bootimg.py",
94    srcs: [
95        "gki/certify_bootimg.py",
96        "gki/generate_gki_certificate.py",
97        "unpack_bootimg.py",
98    ],
99    required: [
100        "avbtool",
101    ],
102}
103
104python_test_host {
105    name: "mkbootimg_test",
106    defaults: ["mkbootimg_defaults"],
107    main: "tests/mkbootimg_test.py",
108    srcs: [
109        "tests/mkbootimg_test.py",
110    ],
111    data: [
112        ":avbtool",
113        ":mkbootimg",
114        ":unpack_bootimg",
115        "tests/data/*",
116    ],
117    test_options: {
118        unit_test: true,
119    },
120}
121