Skip to content

Commit

Permalink
Add MediaTek changes
Browse files Browse the repository at this point in the history
  • Loading branch information
iscle committed Jul 28, 2020
0 parents commit 3ef4dc3
Show file tree
Hide file tree
Showing 69,626 changed files with 29,072,465 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .cocciconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[spatch]
options = --timeout 200
options = --use-gitgrep
120 changes: 120 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Normal rules
#
.*
*.o
*.o.*
*.a
*.s
*.ko
*.so
*.so.dbg
*.mod.c
*.i
*.lst
*.symtypes
*.order
*.elf
*.bin
*.tar
*.gz
*.bz2
*.lzma
*.xz
*.lz4
*.lzo
*.patch
*.gcno
*.ll
modules.builtin
Module.symvers
*.dwo
*.su
*.c.[012]*.*

#
# Top-level generic files
#
/tags
/TAGS
/linux
/vmlinux
/vmlinux.32
/vmlinux-gdb.py
/vmlinuz
/System.map
/Module.markers

#
# Debian directory (make deb-pkg)
#
/debian/

#
# tar directory (make tar*-pkg)
#
/tar-install/

#
# git files that we don't want to ignore even if they are dot-files
#
!.gitignore
!.mailmap
!.cocciconfig

#
# Generated include files
#
include/config
include/generated
arch/*/include/generated

# stgit generated dirs
patches-*

# quilt's files
patches
series

# cscope files
cscope.*
ncscope.*

# gnu global files
GPATH
GRTAGS
GSYMS
GTAGS

# id-utils files
ID

*.orig
*~
\#*#

#
# Leavings from module signing
#
extra_certificates
signing_key.pem
signing_key.priv
signing_key.x509
x509.genkey

# Kconfig presets
all.config

# Kdevelop4
*.kdev4

# fetched Android config fragments
kernel/configs/android-*.cfg
172 changes: 172 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
#
# This list is used by git-shortlog to fix a few botched name translations
# in the git archive, either because the author's full name was messed up
# and/or not always written the same way, making contributions from the
# same person appearing not to be so or badly displayed.
#
# repo-abbrev: /pub/scm/linux/kernel/git/
#

Aaron Durbin <[email protected]>
Adam Oldham <[email protected]>
Adam Radford <[email protected]>
Adrian Bunk <[email protected]>
Adriana Reus <[email protected]> <[email protected]>
Alan Cox <[email protected]>
Alan Cox <[email protected]>
Aleksey Gorelov <[email protected]>
Al Viro <[email protected]>
Al Viro <[email protected]>
Andreas Herrmann <[email protected]>
Andrey Ryabinin <[email protected]> <[email protected]>
Andrew Morton <[email protected]>
Andrew Vasquez <[email protected]>
Andy Adamson <[email protected]>
Antoine Tenart <[email protected]>
Antonio Ospite <[email protected]> <[email protected]>
Archit Taneja <[email protected]>
Arnaud Patard <[email protected]>
Arnd Bergmann <[email protected]>
Axel Dyks <[email protected]>
Axel Lin <[email protected]>
Ben Gardner <[email protected]>
Ben M Cahill <[email protected]>
Björn Steinbrink <[email protected]>
Boris Brezillon <[email protected]>
Boris Brezillon <[email protected]> <[email protected]>
Boris Brezillon <[email protected]> <[email protected]>
Brian Avery <[email protected]>
Brian King <[email protected]>
Christoph Hellwig <[email protected]>
Christophe Ricard <[email protected]>
Corey Minyard <[email protected]>
Damian Hobson-Garcia <[email protected]>
David Brownell <[email protected]>
David Woodhouse <[email protected]>
Dmitry Eremin-Solenikov <[email protected]>
Domen Puncer <[email protected]>
Douglas Gilbert <[email protected]>
Ed L. Cashin <[email protected]>
Evgeniy Polyakov <[email protected]>
Felipe W Damasio <[email protected]>
Felix Kuhling <[email protected]>
Felix Moeller <[email protected]>
Filipe Lautert <[email protected]>
Franck Bui-Huu <[email protected]>
Frank Rowand <[email protected]> <[email protected]>
Frank Rowand <[email protected]> <[email protected]>
Frank Rowand <[email protected]> <[email protected]>
Frank Zago <[email protected]>
Greg Kroah-Hartman <greg@echidna.(none)>
Greg Kroah-Hartman <[email protected]>
Greg Kroah-Hartman <[email protected]>
Henk Vergonet <[email protected]>
Henrik Kretzschmar <[email protected]>
Henrik Rydberg <[email protected]>
Herbert Xu <[email protected]>
Jacob Shin <[email protected]>
James Bottomley <jejb@mulgrave.(none)>
James Bottomley <[email protected]>
James E Wilson <[email protected]>
James Ketrenos <jketreno@io.(none)>
Javi Merino <[email protected]> <[email protected]>
<[email protected]> <[email protected]>
Jean Tourrilhes <[email protected]>
Jeff Garzik <[email protected]>
Jens Axboe <[email protected]>
Jens Osterkamp <[email protected]>
Johan Hovold <[email protected]> <[email protected]>
Johan Hovold <[email protected]> <[email protected]>
John Paul Adrian Glaubitz <[email protected]>
John Stultz <[email protected]>
<[email protected]> <[email protected]>
<[email protected]> <[email protected]>
<[email protected]> <[email protected]>
<[email protected]> <[email protected]>
<[email protected]> <[email protected]>
Juha Yrjola <at solidboot.com>
Juha Yrjola <[email protected]>
Juha Yrjola <[email protected]>
Kay Sievers <[email protected]>
Kenneth W Chen <[email protected]>
Konstantin Khlebnikov <[email protected]> <[email protected]>
Koushik <[email protected]>
Krzysztof Kozlowski <[email protected]> <[email protected]>
Krzysztof Kozlowski <[email protected]> <[email protected]>
Kuninori Morimoto <[email protected]>
Leonid I Ananiev <[email protected]>
Linas Vepstas <[email protected]>
Linus Lüssing <[email protected]> <[email protected]>
Linus Lüssing <[email protected]> <[email protected]>
Mark Brown <[email protected]>
Matthieu CASTET <[email protected]>
Mauro Carvalho Chehab <[email protected]> <[email protected]>
Mauro Carvalho Chehab <[email protected]> <[email protected]>
Mauro Carvalho Chehab <[email protected]> <[email protected]>
Mauro Carvalho Chehab <[email protected]> <[email protected]>
Mauro Carvalho Chehab <[email protected]> <[email protected]>
Mauro Carvalho Chehab <[email protected]> <[email protected]>
Mauro Carvalho Chehab <[email protected]> <[email protected]>
Matt Ranostay <[email protected]> Matthew Ranostay <[email protected]>
Matt Ranostay <[email protected]> <[email protected]>
Mayuresh Janorkar <[email protected]>
Michael Buesch <[email protected]>
Michel Dänzer <[email protected]>
Mitesh shah <[email protected]>
Mohit Kumar <[email protected]> <[email protected]>
Morten Welinder <[email protected]>
Morten Welinder <[email protected]>
Morten Welinder <[email protected]>
Morten Welinder <[email protected]>
Mythri P K <[email protected]>
Nguyen Anh Quynh <[email protected]>
Paolo 'Blaisorblade' Giarrusso <[email protected]>
Patrick Mochel <[email protected]>
Peter A Jonsson <[email protected]>
Peter Oruba <[email protected]>
Peter Oruba <[email protected]>
Pratyush Anand <[email protected]> <[email protected]>
Praveen BP <[email protected]>
Qais Yousef <[email protected]> <[email protected]>
Rajesh Shah <[email protected]>
Ralf Baechle <[email protected]>
Ralf Wildenhues <[email protected]>
Randy Dunlap <[email protected]> <[email protected]>
Rémi Denis-Courmont <[email protected]>
Ricardo Ribalda Delgado <[email protected]>
Rudolf Marek <[email protected]>
Rui Saraiva <[email protected]>
Sachin P Sant <[email protected]>
Sam Ravnborg <[email protected]>
Santosh Shilimkar <[email protected]>
Santosh Shilimkar <[email protected]>
Sascha Hauer <[email protected]>
S.Çağlar Onur <[email protected]>
Shiraz Hashim <[email protected]> <[email protected]>
Shuah Khan <[email protected]> <[email protected]>
Shuah Khan <[email protected]> <[email protected]>
Shuah Khan <[email protected]> <[email protected]>
Shuah Khan <[email protected]> <[email protected]>
Simon Kelley <[email protected]>
Stéphane Witzmann <[email protected]>
Stephen Hemminger <[email protected]>
Sudeep Holla <[email protected]> Sudeep KarkadaNagesha <[email protected]>
Sumit Semwal <[email protected]>
Tejun Heo <[email protected]>
Thomas Graf <[email protected]>
Tony Luck <[email protected]>
Tsuneo Yoshioka <[email protected]>
Uwe Kleine-König <[email protected]>
Uwe Kleine-König <[email protected]>
Uwe Kleine-König <[email protected]>
Valdis Kletnieks <[email protected]>
Viresh Kumar <[email protected]> <[email protected]>
Viresh Kumar <[email protected]> <[email protected]>
Viresh Kumar <[email protected]> <[email protected]>
Vlad Dogaru <[email protected]> <[email protected]>
Vladimir Davydov <[email protected]> <[email protected]>
Vladimir Davydov <[email protected]> <[email protected]>
Takashi YOSHII <[email protected]>
Yusuke Goda <[email protected]>
Gustavo Padovan <[email protected]>
Gustavo Padovan <[email protected]>
96 changes: 96 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Copyright (C) 2017 MediaTek Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See http://www.gnu.org/licenses/gpl-2.0.html for more details.

LOCAL_PATH := $(call my-dir)

ifeq ($(notdir $(LOCAL_PATH)),$(strip $(LINUX_KERNEL_VERSION)))
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
include $(LOCAL_PATH)/kenv.mk

ifeq ($(wildcard $(TARGET_PREBUILT_KERNEL)),)
KERNEL_MAKE_DEPENDENCIES := $(shell find $(KERNEL_DIR) -name .git -prune -o -type f | sort)
KERNEL_MAKE_DEPENDENCIES := $(filter-out %/.git %/.gitignore %/.gitattributes,$(KERNEL_MAKE_DEPENDENCIES))

$(TARGET_KERNEL_CONFIG): PRIVATE_DIR := $(KERNEL_DIR)
$(TARGET_KERNEL_CONFIG): $(KERNEL_CONFIG_FILE) $(LOCAL_PATH)/Android.mk
$(TARGET_KERNEL_CONFIG): $(KERNEL_MAKE_DEPENDENCIES)
$(hide) mkdir -p $(dir $@)
$(PREBUILT_MAKE_PREFIX)$(MAKE) -C $(PRIVATE_DIR) $(KERNEL_MAKE_OPTION) $(KERNEL_DEFCONFIG)

$(BUILT_DTB_OVERLAY_TARGET): $(KERNEL_ZIMAGE_OUT)

.KATI_RESTAT: $(KERNEL_ZIMAGE_OUT)
$(KERNEL_ZIMAGE_OUT): PRIVATE_DIR := $(KERNEL_DIR)
$(KERNEL_ZIMAGE_OUT): $(TARGET_KERNEL_CONFIG) $(KERNEL_MAKE_DEPENDENCIES)
$(hide) mkdir -p $(dir $@)
$(PREBUILT_MAKE_PREFIX)$(MAKE) -C $(PRIVATE_DIR) $(KERNEL_MAKE_OPTION)
$(hide) $(call fixup-kernel-cmd-file,$(KERNEL_OUT)/arch/$(KERNEL_TARGET_ARCH)/boot/compressed/.piggy.xzkern.cmd)
# check the kernel image size
python device/mediatek/build/build/tools/check_kernel_size.py $(KERNEL_OUT) $(KERNEL_DIR)

ifeq ($(strip $(MTK_HEADER_SUPPORT)), yes)
$(BUILT_KERNEL_TARGET): $(KERNEL_ZIMAGE_OUT) $(TARGET_KERNEL_CONFIG) $(LOCAL_PATH)/Android.mk | $(HOST_OUT_EXECUTABLES)/mkimage$(HOST_EXECUTABLE_SUFFIX)
$(hide) $(HOST_OUT_EXECUTABLES)/mkimage$(HOST_EXECUTABLE_SUFFIX) $< KERNEL 0xffffffff > $@
else
$(BUILT_KERNEL_TARGET): $(KERNEL_ZIMAGE_OUT) $(TARGET_KERNEL_CONFIG) $(LOCAL_PATH)/Android.mk | $(ACP)
$(copy-file-to-target)
endif

$(TARGET_PREBUILT_KERNEL): $(BUILT_KERNEL_TARGET) $(LOCAL_PATH)/Android.mk | $(ACP)
$(copy-file-to-new-target)

endif#TARGET_PREBUILT_KERNEL is empty

$(INSTALLED_KERNEL_TARGET): $(BUILT_KERNEL_TARGET) $(LOCAL_PATH)/Android.mk | $(ACP)
$(copy-file-to-target)

.PHONY: kernel save-kernel kernel-savedefconfig kernel-menuconfig menuconfig-kernel savedefconfig-kernel clean-kernel
kernel: $(INSTALLED_KERNEL_TARGET)
save-kernel: $(TARGET_PREBUILT_KERNEL)

kernel-savedefconfig: $(TARGET_KERNEL_CONFIG)
cp $(TARGET_KERNEL_CONFIG) $(KERNEL_CONFIG_FILE)

kernel-menuconfig:
$(hide) mkdir -p $(KERNEL_OUT)
$(MAKE) -C $(KERNEL_DIR) $(KERNEL_MAKE_OPTION) menuconfig

menuconfig-kernel savedefconfig-kernel:
$(hide) mkdir -p $(KERNEL_OUT)
$(MAKE) -C $(KERNEL_DIR) $(KERNEL_MAKE_OPTION) $(patsubst %config-kernel,%config,$@)

clean-kernel:
$(hide) rm -rf $(KERNEL_OUT) $(KERNEL_MODULES_OUT) $(INSTALLED_KERNEL_TARGET)
$(hide) rm -f $(INSTALLED_DTB_OVERLAY_TARGET)


.PHONY: check-kernel-config check-kernel-dotconfig check-mtk-config
droid: check-kernel-config check-kernel-dotconfig
check-mtk-config: check-kernel-config check-kernel-dotconfig
check-kernel-config: PRIVATE_COMMAND := $(if $(wildcard device/mediatek/build/build/tools/check_kernel_config.py),$(if $(filter yes,$(DISABLE_MTK_CONFIG_CHECK)),-)python device/mediatek/build/build/tools/check_kernel_config.py -c $(MTK_TARGET_PROJECT_FOLDER)/ProjectConfig.mk -k $(KERNEL_CONFIG_FILE) -p $(MTK_PROJECT_NAME))
check-kernel-config:
$(PRIVATE_COMMAND)

check-kernel-dotconfig: PRIVATE_COMMAND := $(if $(wildcard device/mediatek/build/build/tools/check_kernel_config.py),$(if $(filter yes,$(DISABLE_MTK_CONFIG_CHECK)),-)python device/mediatek/build/build/tools/check_kernel_config.py -c $(MTK_TARGET_PROJECT_FOLDER)/ProjectConfig.mk -k $(TARGET_KERNEL_CONFIG) -p $(MTK_PROJECT_NAME))
check-kernel-dotconfig: $(TARGET_KERNEL_CONFIG)
$(PRIVATE_COMMAND)

### DTB
ifdef BOARD_PREBUILT_DTBIMAGE_DIR
INSTALLED_MTK_DTB_TARGET := $(BOARD_PREBUILT_DTBIMAGE_DIR)/mtk_dtb
$(shell if [ ! -f $(INSTALLED_MTK_DTB_TARGET) ]; then mkdir -p $(dir $(INSTALLED_MTK_DTB_TARGET)); touch $(INSTALLED_MTK_DTB_TARGET);fi)
$(INSTALLED_MTK_DTB_TARGET): $(INSTALLED_KERNEL_TARGET)
@mkdir -p $(dir $@)
@cp -f $(KERNEL_DTB_FILE) $@
endif

endif#TARGET_NO_KERNEL
endif#LINUX_KERNEL_VERSION
Loading

0 comments on commit 3ef4dc3

Please sign in to comment.