blob: 9cc93208de249bee3412c0f806a6141bf13ef2e5 [file] [log] [blame]
Alistair Strachan771cbf92018-08-29 17:00:22 +00001// Copyright 2018 Google Inc. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// NOTE: image-sig (RSA signature) support is broken because the U-Boot code
16// requires API features from openssl which are not provided by boringssl
17
David Andersone6f0ea92019-09-26 14:24:51 -070018cc_defaults {
19 name: "uboot_host_defaults",
Alistair Strachan771cbf92018-08-29 17:00:22 +000020
21 cflags: [
22 "-D__KERNEL_STRICT_NAMES",
23 "-D_GNU_SOURCE",
24 "-DMKIMAGE_DTC=\"dtc\"",
25 "-DUSE_HOSTCC",
26 "-Wno-missing-field-initializers",
27 "-Wno-pointer-arith",
28 "-Wno-unused-parameter",
29 "-Wno-visibility",
Sam Protsenkoe1aa1962018-11-27 22:10:45 +020030 "-Wno-sign-compare",
Alistair Strachan771cbf92018-08-29 17:00:22 +000031 "-include linux/kconfig.h",
32 "-include compiler.h",
33 ],
34
David Andersone6f0ea92019-09-26 14:24:51 -070035 local_include_dirs: [
36 "prebuilt-intermediates",
37 ],
38
39 target: {
40 darwin: {
41 enabled: false,
42 },
43 },
44}
45
46cc_binary_host {
47 name: "mkimage",
48
49 defaults: ["uboot_host_defaults"],
50
Alistair Strachan771cbf92018-08-29 17:00:22 +000051 srcs: [
52 "common/bootm.c",
53 "common/hash.c",
54 "common/image.c",
55 "common/image-fit.c",
Alistair Strachan92536d82018-12-21 12:48:55 -080056 "lib/crc16.c",
Alistair Strachan771cbf92018-08-29 17:00:22 +000057 "lib/crc32.c",
58 "lib/fdtdec.c",
59 "lib/fdtdec_common.c",
60 "lib/libfdt/fdt_region.c",
61 "lib/libfdt/fdt_ro.c",
62 "lib/md5.c",
63 "lib/rc4.c",
64 "lib/sha1.c",
65 "lib/sha256.c",
66 "tools/aisimage.c",
67 "tools/atmelimage.c",
68 "tools/default_image.c",
69 "tools/fit_common.c",
70 "tools/fit_image.c",
71 "tools/gpimage.c",
72 "tools/gpimage-common.c",
73 "tools/image-host.c",
74 "tools/imagetool.c",
Alistair Strachan92536d82018-12-21 12:48:55 -080075 "tools/imx8image.c",
Alistair Strachanb64db842019-01-15 10:20:28 -080076 "tools/imx8mimage.c",
Alistair Strachan771cbf92018-08-29 17:00:22 +000077 "tools/imximage.c",
78 "tools/kwbimage.c",
79 "tools/libfdt/fdt.c",
80 "tools/libfdt/fdt_addresses.c",
81 "tools/libfdt/fdt_empty_tree.c",
82 "tools/libfdt/fdt_overlay.c",
83 "tools/libfdt/fdt_rw.c",
84 "tools/libfdt/fdt_strerror.c",
85 "tools/libfdt/fdt_sw.c",
86 "tools/libfdt/fdt_wip.c",
87 "tools/lpc32xximage.c",
88 "tools/mkimage.c",
Alistair Strachan92536d82018-12-21 12:48:55 -080089 "tools/mtk_image.c",
Alistair Strachan771cbf92018-08-29 17:00:22 +000090 "tools/mxsimage.c",
91 "tools/omapimage.c",
92 "tools/os_support.c",
93 "tools/pbl_crc32.c",
94 "tools/pblimage.c",
95 "tools/rkcommon.c",
96 "tools/rkimage.c",
97 "tools/rksd.c",
98 "tools/rkspi.c",
99 "tools/socfpgaimage.c",
100 "tools/stm32image.c",
101 "tools/ublimage.c",
102 "tools/vybridimage.c",
103 "tools/zynqimage.c",
104 "tools/zynqmpbif.c",
105 "tools/zynqmpimage.c",
106 ],
107
108 local_include_dirs: [
Alistair Strachan771cbf92018-08-29 17:00:22 +0000109 "scripts/dtc/libfdt",
110 "tools",
111 ],
David Andersone6f0ea92019-09-26 14:24:51 -0700112}
Alistair Strachan6a97e6e2018-08-29 10:08:10 -0700113
David Andersone6f0ea92019-09-26 14:24:51 -0700114cc_binary_host {
115 name: "mkenvimage",
116
117 defaults: ["uboot_host_defaults"],
118
119 srcs: [
120 "lib/crc32.c",
121 "tools/mkenvimage.c",
122 "tools/os_support.c",
123 ],
124
125 local_include_dirs: [
126 "tools",
127 ],
Alistair Strachan771cbf92018-08-29 17:00:22 +0000128}