pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 1 | # Copyright (C) 2012 The CyanogenMod Project |
Bruno Martins | dde64a9 | 2022-04-08 19:37:17 +0100 | [diff] [blame] | 2 | # (C) 2017-2022 The LineageOS Project |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 16 | |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 17 | # Android makefile to build kernel as a part of Android Build |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 18 | # |
| 19 | # Configuration |
| 20 | # ============= |
| 21 | # |
| 22 | # These config vars are usually set in BoardConfig.mk: |
| 23 | # |
Sebastiano Barezzi | 0f68589 | 2022-03-16 17:42:13 +0100 | [diff] [blame] | 24 | # TARGET_KERNEL_CONFIG = List of kernel defconfigs, first one being the base one, |
| 25 | # while all the others are fragments that will be merged. |
| 26 | # to main one in .config. |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 27 | # TARGET_KERNEL_VARIANT_CONFIG = Variant defconfig, optional |
| 28 | # TARGET_KERNEL_SELINUX_CONFIG = SELinux defconfig, optional |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 29 | # |
| 30 | # TARGET_KERNEL_CLANG_COMPILE = Compile kernel with clang, defaults to false |
| 31 | # |
| 32 | # TARGET_KERNEL_CLANG_VERSION = Clang prebuilts version, optional, defaults to clang-stable |
| 33 | # |
| 34 | # TARGET_KERNEL_CLANG_PATH = Clang prebuilts path, optional |
| 35 | # |
| 36 | # BOARD_KERNEL_IMAGE_NAME = Built image name |
| 37 | # for ARM use: zImage |
| 38 | # for ARM64 use: Image.gz |
| 39 | # for uncompressed use: Image |
| 40 | # If using an appended DT, append '-dtb' |
| 41 | # to the end of the image name. |
| 42 | # For example, for ARM devices, |
| 43 | # use zImage-dtb instead of zImage. |
| 44 | # |
basamaryan | f749b01 | 2023-10-05 14:17:47 +0200 | [diff] [blame] | 45 | # BOARD_DTBO_CFG = Path to a mkdtboimg config file |
Luca Stefani | 0d0cbe3 | 2020-08-03 11:58:00 +0200 | [diff] [blame] | 46 | # |
Aayush Gupta | 48411fb | 2020-08-25 10:03:10 +0000 | [diff] [blame] | 47 | # BOARD_CUSTOM_DTBOIMG_MK = Path to a custom dtboimage makefile |
| 48 | # |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 49 | # KERNEL_CC = The C Compiler used. This is automatically set based |
| 50 | # on whether the clang version is set, optional. |
Luca Stefani | d31bdb8 | 2020-04-03 18:58:16 +0200 | [diff] [blame] | 51 | # KERNEL_LD = The Linker used. This is automatically set based |
| 52 | # on whether the clang/gcc version is set, optional. |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 53 | # |
| 54 | # KERNEL_CLANG_TRIPLE = Target triple for clang (e.g. aarch64-linux-gnu-) |
| 55 | # defaults to arm-linux-gnu- for arm |
| 56 | # aarch64-linux-gnu- for arm64 |
| 57 | # x86_64-linux-gnu- for x86 |
| 58 | # |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 59 | # NEED_KERNEL_MODULE_ROOT = Optional, if true, install kernel |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 60 | # modules in root instead of vendor |
| 61 | # NEED_KERNEL_MODULE_SYSTEM = Optional, if true, install kernel |
| 62 | # modules in system instead of vendor |
Vachounet | b3baf3e | 2020-02-04 14:24:30 +0100 | [diff] [blame] | 63 | # NEED_KERNEL_MODULE_VENDOR_OVERLAY = Optional, if true, install kernel |
| 64 | # modules in vendor overlay instead of vendor |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 65 | |
Arian | cbc8e70 | 2022-09-13 13:10:27 +0200 | [diff] [blame] | 66 | ifneq ($(TARGET_USES_KERNEL_PLATFORM),true) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 67 | ifneq ($(TARGET_NO_KERNEL),true) |
Łukasz Patron | 793babe | 2022-11-13 03:00:08 +0100 | [diff] [blame] | 68 | ifneq ($(TARGET_NO_KERNEL_OVERRIDE),true) |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 69 | |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 70 | ## Externally influenced variables |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 71 | KERNEL_SRC := $(TARGET_KERNEL_SOURCE) |
| 72 | # kernel configuration - mandatory |
| 73 | KERNEL_DEFCONFIG := $(TARGET_KERNEL_CONFIG) |
| 74 | VARIANT_DEFCONFIG := $(TARGET_KERNEL_VARIANT_CONFIG) |
| 75 | SELINUX_DEFCONFIG := $(TARGET_KERNEL_SELINUX_CONFIG) |
| 76 | |
| 77 | ## Internal variables |
Rashed Abdel-Tawab | 73706e0 | 2019-10-15 00:56:52 -0400 | [diff] [blame] | 78 | DTC := $(HOST_OUT_EXECUTABLES)/dtc |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 79 | KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 80 | DTBO_OUT := $(TARGET_OUT_INTERMEDIATES)/DTBO_OBJ |
| 81 | DTB_OUT := $(TARGET_OUT_INTERMEDIATES)/DTB_OBJ |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 82 | KERNEL_CONFIG := $(KERNEL_OUT)/.config |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 83 | KERNEL_RELEASE := $(KERNEL_OUT)/include/config/kernel.release |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 84 | |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 85 | ifeq ($(KERNEL_ARCH),x86_64) |
| 86 | KERNEL_DEFCONFIG_ARCH := x86 |
| 87 | else |
| 88 | KERNEL_DEFCONFIG_ARCH := $(KERNEL_ARCH) |
| 89 | endif |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 90 | KERNEL_DEFCONFIG_DIR := $(KERNEL_SRC)/arch/$(KERNEL_DEFCONFIG_ARCH)/configs |
| 91 | KERNEL_DEFCONFIG_SRC := $(KERNEL_DEFCONFIG_DIR)/$(KERNEL_DEFCONFIG) |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 92 | |
Sebastiano Barezzi | 0f68589 | 2022-03-16 17:42:13 +0100 | [diff] [blame] | 93 | ALL_KERNEL_DEFCONFIG_SRCS := $(foreach config,$(KERNEL_DEFCONFIG),$(KERNEL_DEFCONFIG_DIR)/$(config)) |
| 94 | |
| 95 | BASE_KERNEL_DEFCONFIG := $(word 1, $(KERNEL_DEFCONFIG)) |
| 96 | BASE_KERNEL_DEFCONFIG_SRC := $(word 1, $(ALL_KERNEL_DEFCONFIG_SRCS)) |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 97 | |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 98 | ifeq ($(BOARD_KERNEL_IMAGE_NAME),) |
| 99 | $(error BOARD_KERNEL_IMAGE_NAME not defined.) |
| 100 | endif |
| 101 | TARGET_PREBUILT_INT_KERNEL := $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME) |
| 102 | |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 103 | ifeq "$(wildcard $(KERNEL_SRC) )" "" |
| 104 | ifneq ($(TARGET_PREBUILT_KERNEL),) |
| 105 | HAS_PREBUILT_KERNEL := true |
| 106 | NEEDS_KERNEL_COPY := true |
| 107 | else |
| 108 | $(foreach cf,$(PRODUCT_COPY_FILES), \ |
| 109 | $(eval _src := $(call word-colon,1,$(cf))) \ |
| 110 | $(eval _dest := $(call word-colon,2,$(cf))) \ |
| 111 | $(ifeq kernel,$(_dest), \ |
| 112 | $(eval HAS_PREBUILT_KERNEL := true))) |
| 113 | endif |
| 114 | |
| 115 | ifneq ($(HAS_PREBUILT_KERNEL),) |
| 116 | $(warning ***************************************************************) |
| 117 | $(warning * Using prebuilt kernel binary instead of source *) |
| 118 | $(warning * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *) |
| 119 | $(warning * Please configure your device to download the kernel *) |
| 120 | $(warning * source repository to $(KERNEL_SRC)) |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 121 | $(warning * for more information *) |
| 122 | $(warning ***************************************************************) |
| 123 | FULL_KERNEL_BUILD := false |
| 124 | KERNEL_BIN := $(TARGET_PREBUILT_KERNEL) |
| 125 | else |
| 126 | $(warning ***************************************************************) |
| 127 | $(warning * *) |
| 128 | $(warning * No kernel source found, and no fallback prebuilt defined. *) |
| 129 | $(warning * Please make sure your device is properly configured to *) |
| 130 | $(warning * download the kernel repository to $(KERNEL_SRC)) |
| 131 | $(warning * and add the TARGET_KERNEL_CONFIG variable to BoardConfig.mk *) |
| 132 | $(warning * *) |
| 133 | $(warning * As an alternative, define the TARGET_PREBUILT_KERNEL *) |
| 134 | $(warning * variable with the path to the prebuilt binary kernel image *) |
| 135 | $(warning * in your BoardConfig.mk file *) |
| 136 | $(warning * *) |
| 137 | $(warning ***************************************************************) |
| 138 | $(error "NO KERNEL") |
| 139 | endif |
| 140 | else |
| 141 | NEEDS_KERNEL_COPY := true |
| 142 | ifeq ($(TARGET_KERNEL_CONFIG),) |
| 143 | $(warning **********************************************************) |
| 144 | $(warning * Kernel source found, but no configuration was defined *) |
| 145 | $(warning * Please add the TARGET_KERNEL_CONFIG variable to your *) |
| 146 | $(warning * BoardConfig.mk file *) |
| 147 | $(warning **********************************************************) |
Luca Stefani | cd9eed4 | 2020-08-03 11:32:19 +0200 | [diff] [blame] | 148 | $(error "NO KERNEL CONFIG") |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 149 | else |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 150 | FULL_KERNEL_BUILD := true |
| 151 | KERNEL_BIN := $(TARGET_PREBUILT_INT_KERNEL) |
| 152 | endif |
| 153 | endif |
| 154 | |
| 155 | ifeq ($(FULL_KERNEL_BUILD),true) |
| 156 | |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 157 | ifeq ($(NEED_KERNEL_MODULE_ROOT),true) |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 158 | KERNEL_MODULES_OUT := $(TARGET_ROOT_OUT) |
Rashed Abdel-Tawab | 539c2ae | 2019-09-10 08:44:55 -0700 | [diff] [blame] | 159 | KERNEL_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_recovery) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 160 | KERNEL_MODULE_MOUNTPOINT := |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 161 | else ifeq ($(NEED_KERNEL_MODULE_SYSTEM),true) |
| 162 | KERNEL_MODULES_OUT := $(TARGET_OUT) |
Rashed Abdel-Tawab | 539c2ae | 2019-09-10 08:44:55 -0700 | [diff] [blame] | 163 | KERNEL_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_system) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 164 | KERNEL_MODULE_MOUNTPOINT := system |
Vachounet | b3baf3e | 2020-02-04 14:24:30 +0100 | [diff] [blame] | 165 | else ifeq ($(NEED_KERNEL_MODULE_VENDOR_OVERLAY),true) |
Marko Man | ae50052 | 2021-04-10 18:34:06 +0200 | [diff] [blame] | 166 | KERNEL_MODULES_OUT := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PLATFORM_VNDK_VERSION) |
Vachounet | b3baf3e | 2020-02-04 14:24:30 +0100 | [diff] [blame] | 167 | KERNEL_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_product) |
| 168 | KERNEL_MODULE_MOUNTPOINT := product |
Alexander Koskovich | bbbf4ae | 2022-01-22 22:26:50 -0700 | [diff] [blame] | 169 | else ifeq ($(BOARD_USES_VENDOR_DLKMIMAGE),true) |
| 170 | KERNEL_MODULES_OUT := $(TARGET_OUT_VENDOR_DLKM) |
| 171 | KERNEL_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_vendor) |
| 172 | KERNEL_MODULE_MOUNTPOINT := vendor_dlkm |
| 173 | $(INSTALLED_VENDOR_DLKMIMAGE_TARGET): $(TARGET_PREBUILT_INT_KERNEL) |
Rashed Abdel-Tawab | d164cac | 2019-06-13 12:08:09 +0200 | [diff] [blame] | 174 | else |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 175 | KERNEL_MODULES_OUT := $(TARGET_OUT_VENDOR) |
Rashed Abdel-Tawab | 539c2ae | 2019-09-10 08:44:55 -0700 | [diff] [blame] | 176 | KERNEL_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_vendor) |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 177 | KERNEL_MODULE_MOUNTPOINT := vendor |
Rashed Abdel-Tawab | d164cac | 2019-06-13 12:08:09 +0200 | [diff] [blame] | 178 | endif |
Rashed Abdel-Tawab | 539c2ae | 2019-09-10 08:44:55 -0700 | [diff] [blame] | 179 | MODULES_INTERMEDIATES := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,kernel_modules) |
Vachounet | 7d6628f | 2019-01-09 13:54:35 +0100 | [diff] [blame] | 180 | |
Michael Bestas | 1a715c9 | 2022-08-13 02:56:34 +0300 | [diff] [blame] | 181 | ifneq (,$(filter dlkm,$(BOARD_VENDOR_RAMDISK_FRAGMENTS))) |
Tim Zimmermann | 6c6ff81 | 2023-09-06 13:09:51 +0200 | [diff] [blame] | 182 | KERNEL_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD) |
Michael Bestas | 1a715c9 | 2022-08-13 02:56:34 +0300 | [diff] [blame] | 183 | KERNEL_VENDOR_RAMDISK_MODULES_OUT := $(VENDOR_RAMDISK_FRAGMENT.dlkm.STAGING_DIR) |
| 184 | KERNEL_VENDOR_RAMDISK_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_vendor_ramdisk_fragment-stage-dlkm) |
| 185 | $(INTERNAL_VENDOR_RAMDISK_FRAGMENT_TARGETS): $(TARGET_PREBUILT_INT_KERNEL) |
Michael Bestas | 206a483 | 2022-11-04 02:12:03 +0200 | [diff] [blame] | 186 | else ifeq ($(PRODUCT_BUILD_VENDOR_KERNEL_BOOT_IMAGE),true) |
Tim Zimmermann | 6c6ff81 | 2023-09-06 13:09:51 +0200 | [diff] [blame] | 187 | KERNEL_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD) |
Michael Bestas | 206a483 | 2022-11-04 02:12:03 +0200 | [diff] [blame] | 188 | KERNEL_VENDOR_RAMDISK_MODULES_OUT := $(TARGET_VENDOR_KERNEL_RAMDISK_OUT) |
| 189 | KERNEL_VENDOR_RAMDISK_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_vendor_kernel_ramdisk) |
| 190 | $(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET): $(TARGET_PREBUILT_INT_KERNEL) |
Michael Bestas | 1a715c9 | 2022-08-13 02:56:34 +0300 | [diff] [blame] | 191 | else |
Tim Zimmermann | 6c6ff81 | 2023-09-06 13:09:51 +0200 | [diff] [blame] | 192 | KERNEL_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD) |
Michael Bestas | 1a715c9 | 2022-08-13 02:56:34 +0300 | [diff] [blame] | 193 | KERNEL_VENDOR_RAMDISK_MODULES_OUT := $(TARGET_VENDOR_RAMDISK_OUT) |
Alessandro Astone | 8e87081 | 2021-01-08 17:43:27 +0100 | [diff] [blame] | 194 | KERNEL_VENDOR_RAMDISK_DEPMOD_STAGING_DIR := $(KERNEL_BUILD_OUT_PREFIX)$(call intermediates-dir-for,PACKAGING,depmod_vendor_ramdisk) |
| 195 | $(INTERNAL_VENDOR_RAMDISK_TARGET): $(TARGET_PREBUILT_INT_KERNEL) |
Michael Bestas | 1a715c9 | 2022-08-13 02:56:34 +0300 | [diff] [blame] | 196 | endif |
Alessandro Astone | 8e87081 | 2021-01-08 17:43:27 +0100 | [diff] [blame] | 197 | |
Rashed Abdel-Tawab | 73706e0 | 2019-10-15 00:56:52 -0400 | [diff] [blame] | 198 | # Add host bin out dir to path |
| 199 | PATH_OVERRIDE := PATH=$(KERNEL_BUILD_OUT_PREFIX)$(HOST_OUT_EXECUTABLES):$$PATH |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 200 | ifeq ($(TARGET_KERNEL_CLANG_COMPILE),true) |
| 201 | ifneq ($(TARGET_KERNEL_CLANG_VERSION),) |
Luca Stefani | 270b0bf | 2019-09-14 16:26:26 +0200 | [diff] [blame] | 202 | KERNEL_CLANG_VERSION := clang-$(TARGET_KERNEL_CLANG_VERSION) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 203 | else |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 204 | # Use the default version of clang if TARGET_KERNEL_CLANG_VERSION hasn't been set by the device config |
| 205 | KERNEL_CLANG_VERSION := $(LLVM_PREBUILTS_VERSION) |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 206 | endif |
Bruno Martins | 1074997 | 2020-09-24 11:51:33 +0100 | [diff] [blame] | 207 | TARGET_KERNEL_CLANG_PATH ?= $(BUILD_TOP)/prebuilts/clang/host/$(HOST_PREBUILT_TAG)/$(KERNEL_CLANG_VERSION) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 208 | ifeq ($(KERNEL_ARCH),arm64) |
| 209 | KERNEL_CLANG_TRIPLE ?= CLANG_TRIPLE=aarch64-linux-gnu- |
| 210 | else ifeq ($(KERNEL_ARCH),arm) |
| 211 | KERNEL_CLANG_TRIPLE ?= CLANG_TRIPLE=arm-linux-gnu- |
| 212 | else ifeq ($(KERNEL_ARCH),x86) |
| 213 | KERNEL_CLANG_TRIPLE ?= CLANG_TRIPLE=x86_64-linux-gnu- |
| 214 | endif |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 215 | PATH_OVERRIDE += PATH=$(TARGET_KERNEL_CLANG_PATH)/bin:$$PATH LD_LIBRARY_PATH=$(TARGET_KERNEL_CLANG_PATH)/lib64:$$LD_LIBRARY_PATH |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 216 | ifeq ($(KERNEL_CC),) |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 217 | KERNEL_CC := CC="$(CCACHE_BIN) clang" |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 218 | endif |
Luca Stefani | d31bdb8 | 2020-04-03 18:58:16 +0200 | [diff] [blame] | 219 | ifeq ($(KERNEL_LD),) |
| 220 | KERNEL_LD := |
| 221 | endif |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 222 | endif |
| 223 | |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 224 | ifneq ($(TARGET_KERNEL_MODULES),) |
| 225 | $(error TARGET_KERNEL_MODULES is no longer supported!) |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 226 | endif |
| 227 | |
Alessandro Astone | 2094bd3 | 2021-12-11 01:49:53 +0100 | [diff] [blame^] | 228 | PATH_OVERRIDE += PATH=$(KERNEL_TOOLCHAIN_PATH_gcc):$$PATH |
Marko Man | 0de88b1 | 2019-10-08 13:28:11 +0200 | [diff] [blame] | 229 | |
Alexander Koskovich | 5ca9b97 | 2022-06-15 22:50:47 -0700 | [diff] [blame] | 230 | ifeq (true,$(filter true, $(TARGET_NEEDS_DTBOIMAGE) $(BOARD_KERNEL_SEPARATED_DTBO))) |
| 231 | KERNEL_MAKE_FLAGS += DTC_EXT=$(KERNEL_BUILD_OUT_PREFIX)$(DTC) |
| 232 | endif |
| 233 | |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 234 | # Internal implementation of make-kernel-target |
| 235 | # $(1): output path (The value passed to O=) |
| 236 | # $(2): target to build (eg. defconfig, modules, dtbo.img) |
| 237 | define internal-make-kernel-target |
Luca Stefani | d31bdb8 | 2020-04-03 18:58:16 +0200 | [diff] [blame] | 238 | $(PATH_OVERRIDE) $(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_BUILD_OUT_PREFIX)$(1) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) $(KERNEL_CLANG_TRIPLE) $(KERNEL_CC) $(KERNEL_LD) $(2) |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 239 | endef |
| 240 | |
| 241 | # Make a kernel target |
| 242 | # $(1): The kernel target to build (eg. defconfig, modules, modules_install) |
| 243 | define make-kernel-target |
| 244 | $(call internal-make-kernel-target,$(KERNEL_OUT),$(1)) |
| 245 | endef |
| 246 | |
| 247 | # Make a DTBO target |
| 248 | # $(1): The DTBO target to build (eg. dtbo.img, defconfig) |
| 249 | define make-dtbo-target |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 250 | $(call internal-make-kernel-target,$(DTBO_OUT),$(1)) |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 251 | endef |
| 252 | |
Rashed Abdel-Tawab | b1531b6 | 2019-09-27 23:37:14 -0400 | [diff] [blame] | 253 | # Make a DTB targets |
| 254 | # $(1): The DTB target to build (eg. dtbs, defconfig) |
| 255 | define make-dtb-target |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 256 | $(call internal-make-kernel-target,$(DTB_OUT),$(1)) |
Rashed Abdel-Tawab | b1531b6 | 2019-09-27 23:37:14 -0400 | [diff] [blame] | 257 | endef |
| 258 | |
Alessandro Astone | 0c21d65 | 2020-09-14 21:14:47 +0200 | [diff] [blame] | 259 | # $(1): modules list |
| 260 | # $(2): output dir |
| 261 | # $(3): mount point |
| 262 | # $(4): staging dir |
Alessandro Astone | 8e87081 | 2021-01-08 17:43:27 +0100 | [diff] [blame] | 263 | # $(5): module load list |
Alessandro Astone | 0c21d65 | 2020-09-14 21:14:47 +0200 | [diff] [blame] | 264 | # Depmod requires a well-formed kernel version so 0.0 is used as a placeholder. |
| 265 | define build-image-kernel-modules-omnirom |
Alessandro Astone | 0c21d65 | 2020-09-14 21:14:47 +0200 | [diff] [blame] | 266 | mkdir -p $(2)/lib/modules |
| 267 | cp $(1) $(2)/lib/modules/ |
| 268 | rm -rf $(4) |
| 269 | mkdir -p $(4)/lib/modules/0.0/$(3)lib/modules |
| 270 | cp $(1) $(4)/lib/modules/0.0/$(3)lib/modules |
| 271 | $(DEPMOD) -b $(4) 0.0 |
| 272 | sed -e 's/\(.*modules.*\):/\/\1:/g' -e 's/ \([^ ]*modules[^ ]*\)/ \/\1/g' $(4)/lib/modules/0.0/modules.dep > $(2)/lib/modules/modules.dep |
Alessandro Astone | 8e87081 | 2021-01-08 17:43:27 +0100 | [diff] [blame] | 273 | cp $(4)/lib/modules/0.0/modules.softdep $(2)/lib/modules |
Alessandro Astone | 0c21d65 | 2020-09-14 21:14:47 +0200 | [diff] [blame] | 274 | cp $(4)/lib/modules/0.0/modules.alias $(2)/lib/modules |
Alessandro Astone | 8e87081 | 2021-01-08 17:43:27 +0100 | [diff] [blame] | 275 | rm -f $(2)/lib/modules/modules.load |
| 276 | for MODULE in $(5); do \ |
| 277 | basename $$MODULE >> $(2)/lib/modules/modules.load; \ |
| 278 | done |
Alessandro Astone | 0c21d65 | 2020-09-14 21:14:47 +0200 | [diff] [blame] | 279 | endef |
| 280 | |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 281 | $(KERNEL_OUT): |
| 282 | mkdir -p $(KERNEL_OUT) |
| 283 | |
Bruno Martins | dde64a9 | 2022-04-08 19:37:17 +0100 | [diff] [blame] | 284 | $(KERNEL_CONFIG): $(KERNEL_OUT) $(ALL_KERNEL_DEFCONFIG_SRCS) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 285 | @echo "Building Kernel Config" |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 286 | $(call make-kernel-target,VARIANT_DEFCONFIG=$(VARIANT_DEFCONFIG) SELINUX_DEFCONFIG=$(SELINUX_DEFCONFIG) $(KERNEL_DEFCONFIG)) |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 287 | $(hide) if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \ |
| 288 | echo "Overriding kernel config with '$(KERNEL_CONFIG_OVERRIDE)'"; \ |
| 289 | echo $(KERNEL_CONFIG_OVERRIDE) >> $(KERNEL_OUT)/.config; \ |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 290 | $(call make-kernel-target,oldconfig); \ |
| 291 | fi |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 292 | $(hide) if [ ! -z "$(KERNEL_ADDITIONAL_CONFIG)" ]; then \ |
| 293 | echo "Using additional config '$(KERNEL_ADDITIONAL_CONFIG)'"; \ |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 294 | $(KERNEL_SRC)/scripts/kconfig/merge_config.sh -m -O $(KERNEL_OUT) $(KERNEL_OUT)/.config $(KERNEL_SRC)/arch/$(KERNEL_ARCH)/configs/$(KERNEL_ADDITIONAL_CONFIG); \ |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 295 | $(call make-kernel-target,KCONFIG_ALLCONFIG=$(KERNEL_OUT)/.config alldefconfig); \ |
| 296 | fi |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 297 | |
Rashed Abdel-Tawab | 73706e0 | 2019-10-15 00:56:52 -0400 | [diff] [blame] | 298 | $(TARGET_PREBUILT_INT_KERNEL): $(KERNEL_CONFIG) $(DEPMOD) $(DTC) |
| 299 | @echo "Building Kernel Image ($(BOARD_KERNEL_IMAGE_NAME))" |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 300 | $(call make-kernel-target,$(BOARD_KERNEL_IMAGE_NAME)) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 301 | $(hide) if grep -q '^CONFIG_OF=y' $(KERNEL_CONFIG); then \ |
| 302 | echo "Building DTBs"; \ |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 303 | $(call make-kernel-target,dtbs); \ |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 304 | fi |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 305 | $(hide) if grep -q '=m' $(KERNEL_CONFIG); then \ |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 306 | echo "Building Kernel Modules"; \ |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 307 | $(call make-kernel-target,modules) || exit "$$?"; \ |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 308 | echo "Installing Kernel Modules"; \ |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 309 | $(call make-kernel-target,INSTALL_MOD_PATH=$(MODULES_INTERMEDIATES) INSTALL_MOD_STRIP=1 modules_install); \ |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 310 | kernel_release=$$(cat $(KERNEL_RELEASE)) \ |
Luca Stefani | ebfad6d | 2020-08-01 21:20:23 +0200 | [diff] [blame] | 311 | kernel_modules_dir=$(MODULES_INTERMEDIATES)/lib/modules/$$kernel_release \ |
| 312 | $(foreach s, $(TARGET_MODULE_ALIASES),\ |
| 313 | $(eval p := $(subst :,$(space),$(s))) \ |
| 314 | ; mv $$(find $$kernel_modules_dir -name $(word 1,$(p))) $$kernel_modules_dir/$(word 2,$(p))); \ |
| 315 | modules=$$(find $$kernel_modules_dir -type f -name '*.ko'); \ |
Alessandro Astone | 8e87081 | 2021-01-08 17:43:27 +0100 | [diff] [blame] | 316 | ($(call build-image-kernel-modules-omnirom,$$modules,$(KERNEL_MODULES_OUT),$(KERNEL_MODULE_MOUNTPOINT)/,$(KERNEL_DEPMOD_STAGING_DIR),$(BOARD_VENDOR_KERNEL_MODULES_LOAD))); \ |
| 317 | $(if $(BOOT_KERNEL_MODULES),\ |
| 318 | vendor_boot_modules=$$(for m in $(BOOT_KERNEL_MODULES); do \ |
| 319 | p=$$(find $$kernel_modules_dir -type f -name $$m); \ |
| 320 | if [ -n "$$p" ]; then echo $$p; else echo "ERROR: $$m from BOOT_KERNEL_MODULES was not found" 1>&2 && exit 1; fi; \ |
| 321 | done); \ |
| 322 | [ $$? -ne 0 ] && exit 1; \ |
Tim Zimmermann | 6c6ff81 | 2023-09-06 13:09:51 +0200 | [diff] [blame] | 323 | ($(call build-image-kernel-modules-omnirom,$$vendor_boot_modules,$(KERNEL_VENDOR_RAMDISK_MODULES_OUT),/,$(KERNEL_VENDOR_RAMDISK_DEPMOD_STAGING_DIR),$(KERNEL_VENDOR_RAMDISK_KERNEL_MODULES_LOAD))); \ |
Alessandro Astone | 8e87081 | 2021-01-08 17:43:27 +0100 | [diff] [blame] | 324 | ) \ |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 325 | fi |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 326 | |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 327 | .PHONY: kerneltags |
| 328 | kerneltags: $(KERNEL_CONFIG) |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 329 | $(call make-kernel-target,tags) |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 330 | |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 331 | .PHONY: kernelsavedefconfig alldefconfig |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 332 | |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 333 | kernelsavedefconfig: $(KERNEL_OUT) |
Sebastiano Barezzi | 0f68589 | 2022-03-16 17:42:13 +0100 | [diff] [blame] | 334 | $(call make-kernel-config,$(KERNEL_OUT),$(BASE_KERNEL_DEFCONFIG)) |
dianlujitao | 925082e | 2022-06-12 17:07:30 +0800 | [diff] [blame] | 335 | $(call make-kernel-target,savedefconfig) |
Sebastiano Barezzi | 0f68589 | 2022-03-16 17:42:13 +0100 | [diff] [blame] | 336 | cp $(KERNEL_OUT)/defconfig $(BASE_KERNEL_DEFCONFIG_SRC) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 337 | |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 338 | alldefconfig: $(KERNEL_OUT) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 339 | env KCONFIG_NOTIMESTAMP=true \ |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 340 | $(call make-kernel-target,alldefconfig) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 341 | |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 342 | ifeq (true,$(filter true, $(TARGET_NEEDS_DTBOIMAGE) $(BOARD_KERNEL_SEPARATED_DTBO))) |
Aayush Gupta | 48411fb | 2020-08-25 10:03:10 +0000 | [diff] [blame] | 343 | ifneq ($(BOARD_CUSTOM_DTBOIMG_MK),) |
| 344 | include $(BOARD_CUSTOM_DTBOIMG_MK) |
| 345 | else |
Rashed Abdel-Tawab | 73706e0 | 2019-10-15 00:56:52 -0400 | [diff] [blame] | 346 | MKDTIMG := $(HOST_OUT_EXECUTABLES)/mkdtimg$(HOST_EXECUTABLE_SUFFIX) |
basamaryan | f749b01 | 2023-10-05 14:17:47 +0200 | [diff] [blame] | 347 | MKDTBOIMG := $(HOST_OUT_EXECUTABLES)/mkdtboimg$(HOST_EXECUTABLE_SUFFIX) |
dianlujitao | 3c29dbf | 2022-06-12 18:50:34 +0800 | [diff] [blame] | 348 | |
| 349 | $(DTBO_OUT): |
| 350 | mkdir -p $(DTBO_OUT) |
| 351 | |
| 352 | $(BOARD_PREBUILT_DTBOIMAGE): $(DTC) $(MKDTIMG) $(MKDTBOIMG) $(DTBO_OUT) |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 353 | $(BOARD_PREBUILT_DTBOIMAGE): |
| 354 | @echo "Building dtbo.img" |
dianlujitao | 3c29dbf | 2022-06-12 18:50:34 +0800 | [diff] [blame] | 355 | $(hide) find $(DTBO_OUT)/arch/$(KERNEL_ARCH)/boot/dts -type f -name "*.dtbo" | xargs rm -f |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 356 | $(call make-dtbo-target,$(KERNEL_DEFCONFIG)) |
dianlujitao | 3c29dbf | 2022-06-12 18:50:34 +0800 | [diff] [blame] | 357 | ifeq ($(BOARD_KERNEL_SEPARATED_DTBO),true) |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 358 | $(call make-dtbo-target,dtbs) |
Luca Stefani | 0d0cbe3 | 2020-08-03 11:58:00 +0200 | [diff] [blame] | 359 | ifdef BOARD_DTBO_CFG |
| 360 | $(MKDTBOIMG) cfg_create $@ $(BOARD_DTBO_CFG) -d $(DTBO_OUT)/arch/$(KERNEL_ARCH)/boot/dts |
| 361 | else |
Luca Stefani | c4f598a | 2020-08-05 11:37:46 +0200 | [diff] [blame] | 362 | $(MKDTBOIMG) create $@ --page_size=$(BOARD_KERNEL_PAGESIZE) $(shell find $(DTBO_OUT)/arch/$(KERNEL_ARCH)/boot/dts -type f -name "*.dtbo" | sort) |
dianlujitao | 3c29dbf | 2022-06-12 18:50:34 +0800 | [diff] [blame] | 363 | endif # BOARD_DTBO_CFG |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 364 | else |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 365 | $(call make-dtbo-target,dtbo.img) |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 366 | endif # BOARD_KERNEL_SEPARATED_DTBO |
dianlujitao | 3c29dbf | 2022-06-12 18:50:34 +0800 | [diff] [blame] | 367 | $(hide) touch -c $(DTBO_OUT) |
Aayush Gupta | 48411fb | 2020-08-25 10:03:10 +0000 | [diff] [blame] | 368 | endif # BOARD_CUSTOM_DTBOIMG_MK |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 369 | endif # TARGET_NEEDS_DTBOIMAGE/BOARD_KERNEL_SEPARATED_DTBO |
| 370 | |
| 371 | ifeq ($(BOARD_INCLUDE_DTB_IN_BOOTIMG),true) |
| 372 | ifeq ($(BOARD_PREBUILT_DTBIMAGE_DIR),) |
dianlujitao | 3c29dbf | 2022-06-12 18:50:34 +0800 | [diff] [blame] | 373 | $(DTB_OUT): |
| 374 | mkdir -p $(DTB_OUT) |
| 375 | |
| 376 | $(INSTALLED_DTBIMAGE_TARGET): $(DTC) $(DTB_OUT) |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 377 | @echo "Building dtb.img" |
dianlujitao | 3c29dbf | 2022-06-12 18:50:34 +0800 | [diff] [blame] | 378 | $(hide) find $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts -type f -name "*.dtb" | xargs rm -f |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 379 | $(call make-dtb-target,$(KERNEL_DEFCONFIG)) |
| 380 | $(call make-dtb-target,dtbs) |
| 381 | cat $(shell find $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts -type f -name "*.dtb" | sort) > $@ |
dianlujitao | 3c29dbf | 2022-06-12 18:50:34 +0800 | [diff] [blame] | 382 | $(hide) touch -c $(DTB_OUT) |
Luca Stefani | acf449e | 2020-08-02 19:08:31 +0200 | [diff] [blame] | 383 | endif # !BOARD_PREBUILT_DTBIMAGE_DIR |
| 384 | endif # BOARD_INCLUDE_DTB_IN_BOOTIMG |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 385 | |
| 386 | endif # FULL_KERNEL_BUILD |
| 387 | |
| 388 | ## Install it |
| 389 | |
| 390 | ifeq ($(NEEDS_KERNEL_COPY),true) |
| 391 | file := $(INSTALLED_KERNEL_TARGET) |
| 392 | ALL_PREBUILT += $(file) |
maxwen | a922b41 | 2021-11-02 23:35:25 +0100 | [diff] [blame] | 393 | |
| 394 | ifeq ($(BOARD_KERNEL_IMAGE_LZ4),true) |
| 395 | $(file) : $(KERNEL_BIN) |
maxwen | b1a41e4 | 2022-08-26 23:32:32 +0200 | [diff] [blame] | 396 | $(LZ4) -9 -f $(KERNEL_BIN) $@ |
maxwen | a922b41 | 2021-11-02 23:35:25 +0100 | [diff] [blame] | 397 | else |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 398 | $(file) : $(KERNEL_BIN) | $(ACP) |
| 399 | $(transform-prebuilt-to-target) |
maxwen | a922b41 | 2021-11-02 23:35:25 +0100 | [diff] [blame] | 400 | endif |
pulser | 5c9a4f3 | 2013-08-25 14:15:02 +0200 | [diff] [blame] | 401 | |
| 402 | ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET) |
| 403 | endif |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 404 | |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 405 | .PHONY: kernel |
dianlujitao | fb133a3 | 2019-09-12 17:37:45 +0800 | [diff] [blame] | 406 | kernel: $(INSTALLED_KERNEL_TARGET) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 407 | |
Marko Man | 0b2160a | 2019-09-08 01:28:58 +0200 | [diff] [blame] | 408 | .PHONY: dtboimage |
| 409 | dtboimage: $(INSTALLED_DTBOIMAGE_TARGET) |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 410 | |
Rashed Abdel-Tawab | b1531b6 | 2019-09-27 23:37:14 -0400 | [diff] [blame] | 411 | .PHONY: dtbimage |
| 412 | dtbimage: $(INSTALLED_DTBIMAGE_TARGET) |
Rashed Abdel-Tawab | b1531b6 | 2019-09-27 23:37:14 -0400 | [diff] [blame] | 413 | |
Łukasz Patron | 793babe | 2022-11-13 03:00:08 +0100 | [diff] [blame] | 414 | endif # TARGET_NO_KERNEL_OVERRIDE |
Marko Man | 3ba2cde | 2018-03-09 09:14:36 +0100 | [diff] [blame] | 415 | endif # TARGET_NO_KERNEL |
Arian | cbc8e70 | 2022-09-13 13:10:27 +0200 | [diff] [blame] | 416 | endif # TARGET_USES_KERNEL_PLATFORM |