land: Build kernel from source
Change-Id: Iba69bc19f24bd3ddeedae6e5341f21bf07891e7c
This commit is contained in:
parent
3e464c2ae7
commit
67db1c2d30
3 changed files with 2 additions and 55 deletions
|
@ -1,10 +1,9 @@
|
|||
# kernel
|
||||
BOARD_KERNEL_BASE := 0x80000000
|
||||
BOARD_CUSTOM_BOOTIMG_MK := $(DEVICE_PATH)/mkbootimg.mk
|
||||
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78B0000
|
||||
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
|
||||
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
|
||||
BOARD_KERNEL_PAGESIZE := 2048
|
||||
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000 --tags_offset 0x00000100
|
||||
TARGET_KERNEL_CONFIG := cyanogenmod_land_defconfig
|
||||
TARGET_KERNEL_CONFIG := lineageos_land_defconfig
|
||||
TARGET_KERNEL_SOURCE := kernel/xiaomi/msm8937
|
||||
TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/kernel
|
||||
|
|
BIN
kernel
BIN
kernel
Binary file not shown.
52
mkbootimg.mk
52
mkbootimg.mk
|
@ -1,52 +0,0 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# Use prebuilt kernel
|
||||
INTERNAL_BOOTIMAGE_ARGS := \
|
||||
$(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET)) \
|
||||
--kernel $(TARGET_PREBUILT_KERNEL)
|
||||
|
||||
ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
|
||||
INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET)
|
||||
endif
|
||||
|
||||
INTERNAL_BOOTIMAGE_FILES := $(filter-out --%,$(INTERNAL_BOOTIMAGE_ARGS))
|
||||
|
||||
INTERNAL_RECOVERYIMAGE_ARGS := \
|
||||
$(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET)) \
|
||||
--kernel $(TARGET_PREBUILT_KERNEL) \
|
||||
--ramdisk $(recovery_ramdisk)
|
||||
|
||||
BOARD_KERNEL_CMDLINE := $(strip $(BOARD_KERNEL_CMDLINE))
|
||||
ifdef BOARD_KERNEL_CMDLINE
|
||||
INTERNAL_BOOTIMAGE_ARGS += --cmdline "$(BOARD_KERNEL_CMDLINE)"
|
||||
INTERNAL_RECOVERYIMAGE_ARGS += --cmdline "$(BOARD_KERNEL_CMDLINE)"
|
||||
endif
|
||||
|
||||
BOARD_KERNEL_BASE := $(strip $(BOARD_KERNEL_BASE))
|
||||
ifdef BOARD_KERNEL_BASE
|
||||
INTERNAL_BOOTIMAGE_ARGS += --base $(BOARD_KERNEL_BASE)
|
||||
INTERNAL_RECOVERYIMAGE_ARGS += --base $(BOARD_KERNEL_BASE)
|
||||
endif
|
||||
|
||||
BOARD_KERNEL_PAGESIZE := $(strip $(BOARD_KERNEL_PAGESIZE))
|
||||
ifdef BOARD_KERNEL_PAGESIZE
|
||||
INTERNAL_BOOTIMAGE_ARGS += --pagesize $(BOARD_KERNEL_PAGESIZE)
|
||||
INTERNAL_RECOVERYIMAGE_ARGS += --pagesize $(BOARD_KERNEL_PAGESIZE)
|
||||
endif
|
||||
|
||||
# Overload bootimg generation: Same as the original, using prebuilt kernel
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
|
||||
$(call pretty,"Target boot image: $@")
|
||||
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
|
||||
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
|
||||
@echo -e ${CL_CYN}"Made boot image: $@"${CL_RST}
|
||||
|
||||
# Overload recoveryimg generation: Same as the original, using prebuilt kernel
|
||||
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) \
|
||||
$(recovery_ramdisk) \
|
||||
$(recovery_kernel)
|
||||
$(call build-recoveryimage-target, $@)
|
||||
@echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST}
|
||||
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
|
||||
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
|
||||
@echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST}
|
Loading…
Reference in a new issue