# # Copyright (C) 2018 CarbonROM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # This file sets variables that control the way modules are built # thorughout the system. It should not be used to conditionally # disable makefiles (the proper mechanism to control what gets # included in a build is to use PRODUCT_PACKAGES in a product # definition file). # NEW_BOOTIMAGE_ARGS := $(subst --kernel $(INSTALLED_KERNEL_TARGET),--kernel $(TARGET_PREBUILT_KERNEL),$(INTERNAL_BOOTIMAGE_ARGS)) NEW_RECOVERYIMAGE_ARGS := $(subst --kernel $(recovery_kernel),--kernel $(TARGET_PREBUILT_KERNEL),$(INTERNAL_RECOVERYIMAGE_ARGS)) $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(call pretty,"Target boot image: $@") $(hide) $(MKBOOTIMG) $(NEW_BOOTIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@ $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw) @echo "Made boot image: $@" $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(recovery_ramdisk) $(recovery_kernel) @echo "----- Making recovery image ------" $(hide) $(MKBOOTIMG) $(NEW_RECOVERYIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@ --id > $(RECOVERYIMAGE_ID_FILE) $(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw) @echo "Made recovery image: $@"