Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b8f2fc5 authored by derfelot's avatar derfelot Committed by Andreas Schneider
Browse files
parent 2a9983ea
Loading
Loading
Loading
Loading
+35 −13
Original line number Diff line number Diff line
@@ -100,7 +100,10 @@ endif
KERNEL_HEADERS_INSTALL := $(KERNEL_OUT)/usr
KERNEL_MODULES_INSTALL ?= system
KERNEL_MODULES_OUT ?= $(PRODUCT_OUT)/$(KERNEL_MODULES_INSTALL)/lib/modules

ifneq ($(SOMC_PLATFORM),)
KERNEL_DIFFCONFIG ?= $(TARGET_PRODUCT)_diffconfig
endif
KERNEL_SRC_DIR := $(TARGET_KERNEL_SOURCE)
TARGET_PREBUILT_KERNEL := $(TARGET_PREBUILT_INT_KERNEL)

define mv-modules
@@ -119,6 +122,7 @@ mpath=`dirname $$mdpath`; rm -rf $$mpath;\
fi
endef

FORCE:
ifneq ($(KERNEL_LEGACY_DIR),true)
$(KERNEL_USR): $(KERNEL_HEADERS_INSTALL)
	rm -rf $(KERNEL_SYMLINK)
@@ -130,12 +134,9 @@ endif
$(KERNEL_OUT):
	mkdir -p $(KERNEL_OUT)

$(KERNEL_CONFIG): $(KERNEL_OUT)
$(KERNEL_CONFIG): $(KERNEL_OUT) FORCE
	env KBUILD_DIFFCONFIG=$(KERNEL_DIFFCONFIG) \
		$(MAKE) -C $(TARGET_KERNEL_SOURCE) O=$(BUILD_ROOT_LOC)$(KERNEL_OUT) $(KERNEL_MAKE_ENV) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) $(KERNEL_DEFCONFIG)
	$(hide) if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \
			echo "Overriding kernel config with '$(KERNEL_CONFIG_OVERRIDE)'"; \
			echo $(KERNEL_CONFIG_OVERRIDE) >> $(KERNEL_OUT)/.config; \
			$(MAKE) -C $(TARGET_KERNEL_SOURCE) O=$(BUILD_ROOT_LOC)$(KERNEL_OUT) $(KERNEL_MAKE_ENV) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) oldconfig; fi

$(TARGET_PREBUILT_INT_KERNEL): $(KERNEL_OUT) $(KERNEL_HEADERS_INSTALL)
	$(hide) echo "Building kernel..."
@@ -149,11 +150,13 @@ $(TARGET_PREBUILT_INT_KERNEL): $(KERNEL_OUT) $(KERNEL_HEADERS_INSTALL)
$(KERNEL_HEADERS_INSTALL): $(KERNEL_OUT)
	$(hide) if [ ! -z "$(KERNEL_HEADER_DEFCONFIG)" ]; then \
			rm -f $(BUILD_ROOT_LOC)$(KERNEL_CONFIG); \
			env KBUILD_DIFFCONFIG=$(KERNEL_DIFFCONFIG) \
				$(MAKE) -C $(TARGET_KERNEL_SOURCE) O=$(BUILD_ROOT_LOC)$(KERNEL_OUT) $(KERNEL_MAKE_ENV) ARCH=$(KERNEL_HEADER_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) $(KERNEL_HEADER_DEFCONFIG); \
			$(MAKE) -C $(TARGET_KERNEL_SOURCE) O=$(BUILD_ROOT_LOC)$(KERNEL_OUT) $(KERNEL_MAKE_ENV) ARCH=$(KERNEL_HEADER_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) headers_install; fi
	$(hide) if [ "$(KERNEL_HEADER_DEFCONFIG)" != "$(KERNEL_DEFCONFIG)" ]; then \
			echo "Used a different defconfig for header generation"; \
			rm -f $(BUILD_ROOT_LOC)$(KERNEL_CONFIG); \
			env KBUILD_DIFFCONFIG=$(KERNEL_DIFFCONFIG) \
				$(MAKE) -C $(TARGET_KERNEL_SOURCE) O=$(BUILD_ROOT_LOC)$(KERNEL_OUT) $(KERNEL_MAKE_ENV) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) $(KERNEL_DEFCONFIG); fi
	$(hide) if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \
			echo "Overriding kernel config with '$(KERNEL_CONFIG_OVERRIDE)'"; \
@@ -162,13 +165,32 @@ $(KERNEL_HEADERS_INSTALL): $(KERNEL_OUT)

kerneltags: $(KERNEL_OUT) $(KERNEL_CONFIG)
	$(MAKE) -C $(TARGET_KERNEL_SOURCE) O=$(BUILD_ROOT_LOC)$(KERNEL_OUT) $(KERNEL_MAKE_ENV) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) tags
	@if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \
		echo "Overriding kernel config with '$(KERNEL_CONFIG_OVERRIDE)'"; \
		echo $(KERNEL_CONFIG_OVERRIDE) >> $(KERNEL_OUT)/.config; \
		$(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) oldconfig; \
	fi

platformconfig: KERNEL_DIFFCONFIG=""
platformconfig: kernelconfig

kernelconfig: $(KERNEL_OUT) $(KERNEL_CONFIG)
	env KCONFIG_NOTIMESTAMP=true \
	@env KCONFIG_NOTIMESTAMP=true \
	     $(MAKE) -C $(TARGET_KERNEL_SOURCE) O=$(BUILD_ROOT_LOC)$(KERNEL_OUT) $(KERNEL_MAKE_ENV) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) menuconfig
	env KCONFIG_NOTIMESTAMP=true \
	@env KCONFIG_NOTIMESTAMP=true \
	     $(MAKE) -C $(TARGET_KERNEL_SOURCE) O=$(BUILD_ROOT_LOC)$(KERNEL_OUT) $(KERNEL_MAKE_ENV) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) savedefconfig
	cp $(KERNEL_OUT)/defconfig $(TARGET_KERNEL_SOURCE)/arch/$(KERNEL_ARCH)/configs/$(KERNEL_DEFCONFIG)

	@env KCONFIG_NOTIMESTAMP=true KBUILD_DIFFCONFIG=$(KERNEL_DIFFCONFIG) \
	     $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) savediffconfig
	@if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \
		echo "Overriding kernel config with '$(KERNEL_CONFIG_OVERRIDE)'"; \
		echo $(KERNEL_CONFIG_OVERRIDE) >> $(KERNEL_OUT)/.config; \
		$(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) oldconfig; \
	fi
	@if [ ! $(KERNEL_DIFFCONFIG) ]; then \
		cp -f $(KERNEL_OUT)/defconfig $(KERNEL_SRC_DIR)/arch/$(KERNEL_ARCH)/configs/$(KERNEL_DEFCONFIG); \
		echo ===========; \
		echo $(KERNEL_DEFCONFIG) has been modified !; \
		echo ===========; \
	fi
endif
endif
+8 −19
Original line number Diff line number Diff line
@@ -59,27 +59,16 @@ num_devices parameter is optional and tells zram how many devices should be
pre-created. Default: 1.

2) Set max number of compression streams
	Compression backend may use up to max_comp_streams compression streams,
	thus allowing up to max_comp_streams concurrent compression operations.
	By default, compression backend uses single compression stream.

	Examples:
	#show max compression streams number
	Regardless the value passed to this attribute, ZRAM will always
	allocate multiple compression streams - one per online CPUs - thus
	allowing several concurrent compression operations. The number of
	allocated compression streams goes down when some of the CPUs
	become offline. There is no single-compression-stream mode anymore,
	unless you are running a UP system or has only 1 CPU online.

	To find out how many streams are currently available:
	cat /sys/block/zram0/max_comp_streams

	#set max compression streams number to 3
	echo 3 > /sys/block/zram0/max_comp_streams

Note:
In order to enable compression backend's multi stream support max_comp_streams
must be initially set to desired concurrency level before ZRAM device
initialisation. Once the device initialised as a single stream compression
backend (max_comp_streams equals to 1), you will see error if you try to change
the value of max_comp_streams because single stream compression backend
implemented as a special case by lock overhead issue and does not support
dynamic max_comp_streams. Only multi stream backend supports dynamic
max_comp_streams adjustment.

3) Select compression algorithm
	Using comp_algorithm device attribute one can see available and
	currently selected (shown in square brackets) compression algorithms,
+22 −0
Original line number Diff line number Diff line
Ramdump Debug Memory

Debug memory contains necessary information for ramdump to dump
the memory.This memory is used as a bridge between Android and
ramdump.

This memory is used by the modules mentioned below:
a) Rdtags
b) Ramdump Memory Descriptors


Required Properties:
-compatible: "removed-dma-pool", "qcom,debug_memory"
-reg: Specifies the physical address of the debug memory region and its size

Example:
	debug_region: debug_region@57e00000 {
		compatible = "removed-dma-pool", "qcom,debug_memory";
		no-map;
		reg = <0 0x57e00000 0 0x100000>;
		label = "debug_mem";
	};
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ Optional properties:
- qcom,thermal-derate-current	: Array of currrent limits for thermal mitigation. Required if
				  qcom,thermal-derate-en is specified. Unit is mA. Format is
				  qcom,thermal-derate-current = <OTST1_LIMIT, OTST2_LIMIT, OTST3_LIMIT>.
				  0, 15, 30, 45 for pmi8998.
- qcom,otst-ramp-back-up-dis	: Boolean property to disable current ramp
				  backup after thermal derate trigger is
				  deasserted.
+5 −13
Original line number Diff line number Diff line
@@ -86,11 +86,11 @@ LAB subnode required properties:
					40 and 50.
- interrupts:				Specify the interrupts as per the interrupt
					encoding.
					Currently "lab-vreg-ok" is required and "lab-sc_err"
					is optional for LCD mode in pmi8998.
					For AMOLED mode, "lab-vreg-ok" is required
					only when SWIRE control is enabled and skipping
					2nd SWIRE pulse is required in pmi8952/8996.
					Currently "lab-vreg-ok" is required for
					LCD mode in pmi8998. For AMOLED mode,
					"lab-vreg-ok" is required only when SWIRE
					control is enabled and skipping 2nd SWIRE
					pulse is required in pmi8952/8996.
- interrupt-names:			Interrupt names to match up 1-to-1 with
					the interrupts specified in 'interrupts'
					property.
@@ -211,14 +211,6 @@ IBB subnode required properties:

IBB subnode optional properties:

- interrupts:				Specify the interrupts as per the interrupt
					encoding.
					Currently "ibb-sc-err" could be used for LCD mode
					in pmi8998 to detect the short circuit fault.
- interrupt-names:			Interrupt names to match up 1-to-1 with
					the interrupts specified in 'interrupts'
					property.

- qcom,qpnp-ibb-discharge-resistor:	The discharge resistor in Kilo Ohms which
					controls the soft start time. Supported values
					are 300, 64, 32 and 16.
Loading