mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "ARM: convert build of appended dtb zImage to list of dtbs"
This commit is contained in:
commit
6ebf3aed6d
11 changed files with 166 additions and 15 deletions
|
|
@ -42,7 +42,7 @@ config ARM
|
|||
select CPU_PM if SUSPEND || CPU_IDLE
|
||||
select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
select DMA_DECLARE_COHERENT
|
||||
select DMA_REMAP if MMU
|
||||
select DMA_DIRECT_REMAP
|
||||
select EDAC_SUPPORT
|
||||
select EDAC_ATOMIC_SCRUB
|
||||
select GENERIC_ALLOCATOR
|
||||
|
|
@ -453,6 +453,31 @@ config ARCH_PXA
|
|||
help
|
||||
Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
|
||||
|
||||
config ARCH_QCOM
|
||||
bool "Qualcomm MSM (non-multiplatform)"
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select CPU_V7
|
||||
select AUTO_ZRELADDR
|
||||
select HAVE_SMP
|
||||
select CLKDEV_LOOKUP
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GENERIC_ALLOCATOR
|
||||
select ARM_PATCH_PHYS_VIRT
|
||||
select ARM_HAS_SG_CHAIN
|
||||
select ARCH_HAS_OPP
|
||||
select SOC_BUS
|
||||
select GENERIC_IRQ_MULTI_HANDLER
|
||||
select PM_OPP
|
||||
select SPARSE_IRQ
|
||||
select USE_OF
|
||||
select PINCTRL
|
||||
help
|
||||
Support for Qualcomm MSM/QSD based systems. This runs on the
|
||||
apps processor of the MSM/QSD and depends on a shared memory
|
||||
interface to the modem processor which runs the baseband
|
||||
stack and controls some vital subsystems
|
||||
(clock and power control, etc).
|
||||
|
||||
config ARCH_RPC
|
||||
bool "RiscPC"
|
||||
depends on MMU
|
||||
|
|
@ -1360,7 +1385,7 @@ config ARCH_NR_GPIO
|
|||
int
|
||||
default 2048 if ARCH_SOCFPGA
|
||||
default 1024 if ARCH_BRCMSTB || ARCH_RENESAS || ARCH_TEGRA || \
|
||||
ARCH_ZYNQ
|
||||
ARCH_ZYNQ || ARCH_QCOM
|
||||
default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \
|
||||
SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
|
||||
default 416 if ARCH_SUNXI
|
||||
|
|
@ -1741,6 +1766,21 @@ config DEPRECATED_PARAM_STRUCT
|
|||
This was deprecated in 2001 and announced to live on for 5 years.
|
||||
Some old boot loaders still use this way.
|
||||
|
||||
config BUILD_ARM_APPENDED_DTB_IMAGE
|
||||
bool "Build a concatenated zImage/dtb by default"
|
||||
depends on OF
|
||||
help
|
||||
Enabling this option will cause a concatenated zImage and list of
|
||||
DTBs to be built by default (instead of a standalone zImage.)
|
||||
The image will built in arch/arm/boot/zImage-dtb
|
||||
|
||||
config BUILD_ARM_APPENDED_DTB_IMAGE_NAME
|
||||
string "Default dtb name"
|
||||
depends on BUILD_ARM_APPENDED_DTB_IMAGE
|
||||
help
|
||||
Space separated list of names of dtbs to append when building a
|
||||
concatenated zImage-dtb.
|
||||
|
||||
# Compressed boot loader in ROM. Yes, we really want to ask about
|
||||
# TEXT and BSS so we preserve their values in the config files.
|
||||
config ZBOOT_ROM_TEXT
|
||||
|
|
|
|||
|
|
@ -1878,7 +1878,7 @@ config DEBUG_UNCOMPRESS
|
|||
config UNCOMPRESS_INCLUDE
|
||||
string
|
||||
default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
|
||||
PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
|
||||
ARCH_QCOM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
|
||||
default "mach/uncompress.h"
|
||||
|
||||
config EARLY_PRINTK
|
||||
|
|
|
|||
|
|
@ -300,6 +300,8 @@ libs-y := arch/arm/lib/ $(libs-y)
|
|||
boot := arch/arm/boot
|
||||
ifeq ($(CONFIG_XIP_KERNEL),y)
|
||||
KBUILD_IMAGE := $(boot)/xipImage
|
||||
else ifeq ($(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE),y)
|
||||
KBUILD_IMAGE := $(boot)/zImage-dtb
|
||||
else
|
||||
KBUILD_IMAGE := $(boot)/zImage
|
||||
endif
|
||||
|
|
@ -318,6 +320,7 @@ endif
|
|||
|
||||
all: $(notdir $(KBUILD_IMAGE))
|
||||
|
||||
DTSSUBDIR := qcom
|
||||
|
||||
archheaders:
|
||||
$(Q)$(MAKE) $(build)=arch/arm/tools uapi
|
||||
|
|
@ -343,12 +346,22 @@ $(BOOT_TARGETS): vmlinux
|
|||
$(INSTALL_TARGETS):
|
||||
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
|
||||
|
||||
%.dtb: | scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
|
||||
|
||||
dtbs: scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) dtbs
|
||||
$(foreach DIR, $(DTSSUBDIR), $(Q)$(MAKE) $(build)=$(boot)/dts/$(DIR) MACHINE=$(MACHINE) dtbs)
|
||||
|
||||
PHONY += vdso_install
|
||||
vdso_install:
|
||||
ifeq ($(CONFIG_VDSO),y)
|
||||
$(Q)$(MAKE) $(build)=arch/arm/vdso $@
|
||||
endif
|
||||
|
||||
zImage-dtb: vmlinux scripts dtbs
|
||||
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) DTSSUBDIR=$(DTSSUBDIR) $(boot)/$@
|
||||
|
||||
# We use MRPROPER_FILES and CLEAN_FILES now
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
|
|
|
|||
1
arch/arm/boot/.gitignore
vendored
1
arch/arm/boot/.gitignore
vendored
|
|
@ -3,3 +3,4 @@ zImage
|
|||
xipImage
|
||||
bootpImage
|
||||
uImage
|
||||
zImage-dtb
|
||||
|
|
|
|||
|
|
@ -13,8 +13,10 @@
|
|||
|
||||
OBJCOPYFLAGS :=-O binary -R .comment -S
|
||||
|
||||
ifneq ($(MACHINE),)
|
||||
include $(MACHINE)/Makefile.boot
|
||||
include $(srctree)/arch/arm/boot/dts/Makefile
|
||||
ifneq ($(DTSSUBDIR),)
|
||||
DTSSUBDIR_INCS=$(foreach DIR, $(DTSSUBDIR), $(addsuffix /Makefile, $(addprefix $(srctree)/arch/arm/boot/dts/, $(DIR))))
|
||||
include $(DTSSUBDIR_INCS)
|
||||
endif
|
||||
|
||||
# Note: the following conditions must always be true:
|
||||
|
|
@ -29,6 +31,14 @@ export ZRELADDR INITRD_PHYS PARAMS_PHYS
|
|||
|
||||
targets := Image zImage xipImage bootpImage uImage
|
||||
|
||||
DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES))
|
||||
ifneq ($(DTB_NAMES),)
|
||||
DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
|
||||
else
|
||||
DTB_LIST := $(dtb-y)
|
||||
endif
|
||||
DTB_OBJS := $(addprefix $(obj)/dts/,$(DTB_LIST))
|
||||
|
||||
ifeq ($(CONFIG_XIP_KERNEL),y)
|
||||
|
||||
cmd_deflate_xip_data = $(CONFIG_SHELL) -c \
|
||||
|
|
@ -66,6 +76,10 @@ $(obj)/compressed/vmlinux: $(obj)/Image FORCE
|
|||
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
$(obj)/zImage-dtb: $(obj)/zImage $(DTB_OBJS) FORCE
|
||||
$(call if_changed,cat)
|
||||
@echo ' Kernel: $@ is ready'
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(LOADADDR),)
|
||||
|
|
|
|||
|
|
@ -1303,3 +1303,19 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
|
|||
aspeed-bmc-opp-zaius.dtb \
|
||||
aspeed-bmc-portwell-neptune.dtb \
|
||||
aspeed-bmc-quanta-q71l.dtb
|
||||
|
||||
dtstree := $(srctree)/$(src)
|
||||
vendor := $(dtstree)/vendor
|
||||
ifneq "$(wildcard $(vendor)/Makefile)" ""
|
||||
subdir-y += vendor
|
||||
endif
|
||||
|
||||
DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES))
|
||||
ifneq ($(DTB_NAMES),)
|
||||
DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
|
||||
else
|
||||
DTB_LIST := $(dtb-y)
|
||||
endif
|
||||
|
||||
targets += dtbs dtbs_install
|
||||
targets += $(DTB_LIST)
|
||||
|
|
|
|||
|
|
@ -1,31 +1,64 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
menuconfig ARCH_QCOM
|
||||
bool "Qualcomm Support"
|
||||
depends on ARCH_MULTI_V7
|
||||
select ARCH_SUPPORTS_BIG_ENDIAN
|
||||
select ARM_GIC
|
||||
select ARM_AMBA
|
||||
select PINCTRL
|
||||
select QCOM_SCM if SMP
|
||||
help
|
||||
Support for Qualcomm's devicetree based systems.
|
||||
|
||||
if ARCH_QCOM
|
||||
menu "QCOM SoC Type"
|
||||
|
||||
config ARCH_MSM8X60
|
||||
bool "Enable support for MSM8X60"
|
||||
select ARCH_SUPPORTS_BIG_ENDIAN
|
||||
select ARM_GIC
|
||||
select ARM_AMBA
|
||||
select QCOM_SCM if SMP
|
||||
select CLKSRC_QCOM
|
||||
select CLKSRC_OF
|
||||
select COMMON_CLK
|
||||
|
||||
config ARCH_MSM8960
|
||||
bool "Enable support for MSM8960"
|
||||
select CLKSRC_QCOM
|
||||
select ARCH_SUPPORTS_BIG_ENDIAN
|
||||
select ARM_GIC
|
||||
select ARM_AMBA
|
||||
select QCOM_SCM if SMP
|
||||
select CLKSRC_OF
|
||||
select COMMON_CLK
|
||||
|
||||
|
||||
config ARCH_MSM8974
|
||||
bool "Enable support for MSM8974"
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select ARCH_SUPPORTS_BIG_ENDIAN
|
||||
select ARM_GIC
|
||||
select ARM_AMBA
|
||||
select QCOM_SCM if SMP
|
||||
select CLKSRC_OF
|
||||
select COMMON_CLK
|
||||
|
||||
config ARCH_MDM9615
|
||||
bool "Enable support for MDM9615"
|
||||
select CLKSRC_QCOM
|
||||
select ARCH_SUPPORTS_BIG_ENDIAN
|
||||
select ARM_GIC
|
||||
select ARM_AMBA
|
||||
select QCOM_SCM if SMP
|
||||
select CLKSRC_OF
|
||||
select COMMON_CLK
|
||||
|
||||
config ARCH_SDXLEMUR
|
||||
bool "Enable support for SDXLEMUR"
|
||||
select CPU_V7
|
||||
select ARM_GIC
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select MSM_CORTEX_A7
|
||||
select PINCTRL
|
||||
select PCI
|
||||
select QCOM_SCM if SMP
|
||||
select MSM_JTAG_MM if CORESIGHT_ETM
|
||||
select PM_DEVFREQ
|
||||
select COMMON_CLK
|
||||
select COMMON_CLK_QCOM
|
||||
select QCOM_GDSC
|
||||
select GENERIC_CLOCKEVENTS_BROADCAST
|
||||
|
||||
endmenu
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
obj-$(CONFIG_SMP) += platsmp.o
|
||||
obj-$(CONFIG_USE_OF) += board-dt.o
|
||||
|
|
|
|||
21
arch/arm/mach-qcom/board-dt.c
Normal file
21
arch/arm/mach-qcom/board-dt.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_fdt.h>
|
||||
|
||||
#include "board-dt.h"
|
||||
|
||||
void __init board_dt_populate(struct of_dev_auxdata *adata)
|
||||
{
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
|
||||
/* Explicitly parent the /soc devices to the root node to preserve
|
||||
* the kernel ABI (sysfs structure, etc) until userspace is updated
|
||||
*/
|
||||
of_platform_populate(of_find_node_by_path("/soc"),
|
||||
of_default_bus_match_table, adata, NULL);
|
||||
}
|
||||
8
arch/arm/mach-qcom/board-dt.h
Normal file
8
arch/arm/mach-qcom/board-dt.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/of_platform.h>
|
||||
|
||||
void __init board_dt_populate(struct of_dev_auxdata *adata);
|
||||
|
|
@ -310,6 +310,10 @@ $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
|
|||
|
||||
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
|
||||
|
||||
# Concatentate multiple files together
|
||||
quiet_cmd_cat = CAT $@
|
||||
cmd_cat = (cat $(filter-out FORCE,$^) > $@) || (rm -f $@; false)
|
||||
|
||||
# Bzip2
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue