Alistair Strachan | 771cbf9 | 2018-08-29 17:00:22 +0000 | [diff] [blame] | 1 | // 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 Anderson | e6f0ea9 | 2019-09-26 14:24:51 -0700 | [diff] [blame] | 18 | cc_defaults { |
| 19 | name: "uboot_host_defaults", |
Alistair Strachan | 771cbf9 | 2018-08-29 17:00:22 +0000 | [diff] [blame] | 20 | |
| 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 Protsenko | e1aa196 | 2018-11-27 22:10:45 +0200 | [diff] [blame] | 30 | "-Wno-sign-compare", |
Alistair Strachan | 771cbf9 | 2018-08-29 17:00:22 +0000 | [diff] [blame] | 31 | "-include linux/kconfig.h", |
| 32 | "-include compiler.h", |
| 33 | ], |
| 34 | |
David Anderson | e6f0ea9 | 2019-09-26 14:24:51 -0700 | [diff] [blame] | 35 | local_include_dirs: [ |
| 36 | "prebuilt-intermediates", |
| 37 | ], |
| 38 | |
| 39 | target: { |
| 40 | darwin: { |
| 41 | enabled: false, |
| 42 | }, |
| 43 | }, |
| 44 | } |
| 45 | |
| 46 | cc_binary_host { |
| 47 | name: "mkimage", |
| 48 | |
| 49 | defaults: ["uboot_host_defaults"], |
| 50 | |
Alistair Strachan | 771cbf9 | 2018-08-29 17:00:22 +0000 | [diff] [blame] | 51 | srcs: [ |
| 52 | "common/bootm.c", |
| 53 | "common/hash.c", |
| 54 | "common/image.c", |
| 55 | "common/image-fit.c", |
Alistair Strachan | 92536d8 | 2018-12-21 12:48:55 -0800 | [diff] [blame] | 56 | "lib/crc16.c", |
Alistair Strachan | 771cbf9 | 2018-08-29 17:00:22 +0000 | [diff] [blame] | 57 | "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 Strachan | 92536d8 | 2018-12-21 12:48:55 -0800 | [diff] [blame] | 75 | "tools/imx8image.c", |
Alistair Strachan | b64db84 | 2019-01-15 10:20:28 -0800 | [diff] [blame] | 76 | "tools/imx8mimage.c", |
Alistair Strachan | 771cbf9 | 2018-08-29 17:00:22 +0000 | [diff] [blame] | 77 | "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 Strachan | 92536d8 | 2018-12-21 12:48:55 -0800 | [diff] [blame] | 89 | "tools/mtk_image.c", |
Alistair Strachan | 771cbf9 | 2018-08-29 17:00:22 +0000 | [diff] [blame] | 90 | "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 Strachan | 771cbf9 | 2018-08-29 17:00:22 +0000 | [diff] [blame] | 109 | "scripts/dtc/libfdt", |
| 110 | "tools", |
| 111 | ], |
David Anderson | e6f0ea9 | 2019-09-26 14:24:51 -0700 | [diff] [blame] | 112 | } |
Alistair Strachan | 6a97e6e | 2018-08-29 10:08:10 -0700 | [diff] [blame] | 113 | |
David Anderson | e6f0ea9 | 2019-09-26 14:24:51 -0700 | [diff] [blame] | 114 | cc_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 Strachan | 771cbf9 | 2018-08-29 17:00:22 +0000 | [diff] [blame] | 128 | } |