summaryrefslogtreecommitdiff
path: root/linux/ti_config_fragments
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2016-04-25 10:00:44 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2016-04-25 10:00:44 -0400
commita1df417e74aa6dae7352dc8cbb0ad471af5b7c69 (patch)
treec34b2311e37ea31db153c90cb8f4570374d05e78 /linux/ti_config_fragments
initial Olimex linux tree from Daniel, originally Feb 3, 2016
Diffstat (limited to 'linux/ti_config_fragments')
-rw-r--r--linux/ti_config_fragments/README143
-rw-r--r--linux/ti_config_fragments/am33xx_only.cfg14
-rw-r--r--linux/ti_config_fragments/am43xx_only.cfg14
-rw-r--r--linux/ti_config_fragments/audio_display.cfg73
-rw-r--r--linux/ti_config_fragments/baseport.cfg95
-rw-r--r--linux/ti_config_fragments/connectivity.cfg181
-rw-r--r--linux/ti_config_fragments/debug_ftrace.cfg14
-rw-r--r--linux/ti_config_fragments/debug_options.cfg84
-rw-r--r--linux/ti_config_fragments/defconfig_builder.README143
-rwxr-xr-xlinux/ti_config_fragments/defconfig_builder.sh234
-rw-r--r--linux/ti_config_fragments/defconfig_fragment6
-rw-r--r--linux/ti_config_fragments/defconfig_map.txt44
-rwxr-xr-xlinux/ti_config_fragments/defconfig_merge.sh537
-rw-r--r--linux/ti_config_fragments/dra7_only.cfg23
-rw-r--r--linux/ti_config_fragments/ipc.cfg27
-rw-r--r--linux/ti_config_fragments/multi_core_defconfig_fragment4
-rw-r--r--linux/ti_config_fragments/multi_core_system_test_defconfig_fragment3
-rw-r--r--linux/ti_config_fragments/system_test.cfg24
-rw-r--r--linux/ti_config_fragments/system_test_defconfig_fragment8
-rw-r--r--linux/ti_config_fragments/wlan.cfg7
20 files changed, 1678 insertions, 0 deletions
diff --git a/linux/ti_config_fragments/README b/linux/ti_config_fragments/README
new file mode 100644
index 00000000..cae7c869
--- /dev/null
+++ b/linux/ti_config_fragments/README
@@ -0,0 +1,143 @@
+
+ TI defconfig Fragments
+
+Description
+===========
+
+The Linux kernel contains a script that takes a base defconfig and merges
+defconfig fragment files into a final buildable configuration for your target.
+
+TI Defconfig Merge Script Usage
+===============================
+
+1.0 Script contents
+-------------------
+
+This script will either take in a single defconfig fragment file or a file with
+multiple fragments defined. With either file the base defconfig will initially
+be built, copied to a working directory, and the kernels merge_config script
+will be called for each config file fragment. Each config file fragment will
+be appended to the base config and then the final output will be copied back to
+the kernels working directory.
+
+A copy of both the base config and the final config is stored in the scripts
+logging directory.
+
+Single fragment command line example:
+-------------------------------------
+
+ $ defconfig_merge.sh -c <path to the compiler> \
+ -o <output directory and file name> \
+ -e <path to single fragment file> \
+ -w <path to kernel's working directory>
+
+"use-kernel-config=" - Is required to be defined. This is the base defconfig
+that the config fragments will be appended to. This defconfig should be in the
+Linux kernel path in arch/arm/configs.
+
+ use-kernel-config= < defconfig base to start appending fragments >
+
+"config-fragment=" - Is required to be defined. There should be at least one
+entry per config fragment.
+
+ config-fragment= < path to the defconfig fragment file 1>
+
+Multiple fragment command line example:
+---------------------------------------
+
+ export CROSS_COMPILE=~/linux_kernel/docs/toolchain/linaro-4.7/bin/arm-linux-gnueabihf-
+
+ ./ti_config_fragments/defconfig_merge.sh -o ~/Desktop/kernel/notes/kernel.txt
+ -f ~/linux_kernel/lcpd_kernel/ti_config_fragments/defconfig_fragment -m
+ -w ~/linux_kernel/lcpd_kernel/ -c $CROSS_COMPILE
+
+
+Example:
+use-kernel-config=omap2plus_defconfig
+config-fragment=baseport.cfg
+config-fragment=power.cfg
+config-fragment=connectivity.cfg
+config-fragment=ipc.cfg
+config-fragment=audio_display.cfg
+config-fragment=system_test.cfg
+
+
+OPTIONS:
+ Setup Options:
+ -c The path to the desired compiler
+ -d The defconfig to use as a base
+ -e Single defconfig fragment to append
+ -j How many build threads to use
+ -o Output log
+ -l uImage load address if different from 0x80008000 for no load address use ""
+
+ Build Options:
+ -n Do not pre-build the defconfig just use the existing .config
+ -m MAKE the kernel, modules and dtb files based on the new config
+ -w Linux kernel path directory
+
+ -f Path to file with multiple defconfig options
+
+2.0 Config Fragment File
+------------------------
+
+The config fragment file contains the CONFIG options that will need to be
+turned on or off based on a base defconfig.
+
+To turn on a config flag you merely create a file of any name and populate it
+with CONFIG_BAR=y
+
+Of course if CONFIG_BAR has a parent dependency, say CONFIG_FOO you will need
+to turn that CONFIG option on as well so your file will need to look like this
+
+CONFIG_FOO=y
+CONFIG_BAR=y
+
+You may want to disable a certain config option. Normally in the config file
+it is custumary to have an entry like this
+
+# CONFIG_FOO is not set
+
+Well the merge_config.sh within the kernel strips out all comments from the
+passed in Config fragment file. So in order to turn off a config option you
+will need to explicitly state
+
+CONFIG_FOO=n
+
+Linux Kernel Script Location:
+=============================
+
+scripts/Kconfig/merge_config.sh
+
+Linux Kernel Script Usage
+=========================
+
+To have the latest script usage information displayed please use the
+command below in any linux kernel.
+
+./scripts/Kconfig/merge_config.sh -h
+
+Example:
+
+./scripts/kconfig/merge_config.sh -m -r -O <LOGGING_DIRECTORY> <APPENDED_CONFIGs>
+
+In this example:
+-m = only merge the fragments, do not execute the make command
+-n = use allnoconfig instead of alldefconfig
+-r = list redundant entries when merging fragments
+-O = dir to put generated output files
+
+TI Configuration files
+======================
+
+Below is a list of configuration files for each domain within TI.
+
+These files contain configuration flags that are not currently set in the
+omap2plus_defconfig but these features are available within the TI integration
+kernel.
+
+TI Baseport - baseport.cfg
+TI Connectivity - connectivity.cfg
+TI Audio and Display - audio_display.cfg
+TI Power - power.cfg
+TI System Test add-ons - system_test.cfg
diff --git a/linux/ti_config_fragments/am33xx_only.cfg b/linux/ti_config_fragments/am33xx_only.cfg
new file mode 100644
index 00000000..8c3f1cad
--- /dev/null
+++ b/linux/ti_config_fragments/am33xx_only.cfg
@@ -0,0 +1,14 @@
+##################################################
+# TI AM33XX specific config options
+##################################################
+
+# Disable Socs other than AM33xx
+CONFIG_ARCH_OMAP2=n
+CONFIG_ARCH_OMAP3=n
+CONFIG_ARCH_OMAP4=n
+CONFIG_SOC_OMAP5=n
+CONFIG_SOC_AM43XX=n
+CONFIG_SOC_DRA7XX=n
+
+#Disable CONFIG_SMP
+CONFIG_SMP=n
diff --git a/linux/ti_config_fragments/am43xx_only.cfg b/linux/ti_config_fragments/am43xx_only.cfg
new file mode 100644
index 00000000..fcc1657e
--- /dev/null
+++ b/linux/ti_config_fragments/am43xx_only.cfg
@@ -0,0 +1,14 @@
+##################################################
+# TI AM43XX specific config options
+##################################################
+
+# Disable Socs other than AM43xx
+CONFIG_ARCH_OMAP2=n
+CONFIG_ARCH_OMAP3=n
+CONFIG_ARCH_OMAP4=n
+CONFIG_SOC_OMAP5=n
+CONFIG_SOC_AM33XX=n
+CONFIG_SOC_DRA7XX=n
+
+#Disable CONFIG_SMP
+CONFIG_SMP=n
diff --git a/linux/ti_config_fragments/audio_display.cfg b/linux/ti_config_fragments/audio_display.cfg
new file mode 100644
index 00000000..3c25da4b
--- /dev/null
+++ b/linux/ti_config_fragments/audio_display.cfg
@@ -0,0 +1,73 @@
+##################################################
+# TI Audio/Display config options
+##################################################
+
+CONFIG_COMMON_CLK_PALMAS=y
+
+CONFIG_PWM_TIECAP=y
+CONFIG_PWM_TIEHRPWM=y
+
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_TLC591XX=y
+
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_BACKLIGHT_GPIO=y
+CONFIG_BACKLIGHT_LED=y
+
+CONFIG_DRM=y
+CONFIG_DRM_I2C_NXP_TDA998X=y
+CONFIG_DRM_TILCDC=y
+CONFIG_DRM_OMAP=y
+CONFIG_DRM_OMAP_NUM_CRTCS=2
+CONFIG_DRM_OMAP_WB_M2M=y
+
+CONFIG_DRM_OMAP_SGX_PLUGIN=y
+
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP5_DSS_HDMI=y
+
+CONFIG_DISPLAY_PANEL_DPI=y
+CONFIG_DISPLAY_PANEL_TLC59108=y
+CONFIG_DISPLAY_CONNECTOR_HDMI=y
+CONFIG_DISPLAY_DRA7EVM_ENCODER_TPD12S015=y
+CONFIG_DISPLAY_ENCODER_TPD12S015=y
+CONFIG_DISPLAY_ENCODER_SII9022=y
+CONFIG_DISPLAY_ENCODER_TC358768=y
+
+CONFIG_CMA_SIZE_MBYTES=24
+
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_CONTROLLER=y
+CONFIG_VIDEO_V4L2_SUBDEV_API=y
+
+CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_VIDEO_AM437X_VPFE=m
+CONFIG_VIDEO_TI_CAL=m
+CONFIG_VIDEO_TI_VIP=m
+
+CONFIG_V4L_MEM2MEM_DRIVERS=y
+CONFIG_VIDEO_TI_VPE=m
+
+CONFIG_MEDIA_SUBDRV_AUTOSELECT=n
+CONFIG_VIDEO_OV2659=m
+CONFIG_VIDEO_OV1063X=m
+CONFIG_VIDEO_MT9T11X=m
+
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=m
+
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_EDMA_SOC=y
+CONFIG_SND_DAVINCI_SOC_MCASP=y
+CONFIG_SND_AM335X_SOC_NXPTDA_EVM=m
+CONFIG_SND_AM33XX_SOC_EVM=m
+CONFIG_SND_SIMPLE_CARD=m
+CONFIG_SND_OMAP_SOC_DRA7EVM=y
+CONFIG_SND_SOC_TLV320AIC31XX=m
+CONFIG_SND_SOC_TLV320AIC3X=m
+CONFIG_SND_SOC_HDMI_CODEC=m
+CONFIG_SND_OMAP_SOC_HDMI_AUDIO=m
diff --git a/linux/ti_config_fragments/baseport.cfg b/linux/ti_config_fragments/baseport.cfg
new file mode 100644
index 00000000..fe483d0d
--- /dev/null
+++ b/linux/ti_config_fragments/baseport.cfg
@@ -0,0 +1,95 @@
+##################################################
+# TI Baseport Config Options
+##################################################
+
+# Mem allocator
+CONFIG_SLAB=n
+CONFIG_SLUB=y
+
+# Serial
+CONFIG_SERIAL_8250_OMAP=y
+CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y
+CONFIG_SERIAL_8250_RUNTIME_UARTS=10
+CONFIG_SERIAL_8250_DMA=n
+CONFIG_SERIAL_OMAP=n
+
+CONFIG_JUMP_LABEL=y
+
+# Disable Extra debug options
+CONFIG_SCHEDSTATS=n
+CONFIG_TIMER_STATS=n
+CONFIG_DEBUG_SPINLOCK=n
+CONFIG_DEBUG_MUTEXES=n
+CONFIG_DEBUG_LOCK_ALLOC=n
+CONFIG_PROVE_LOCKING=n
+CONFIG_LOCKDEP=n
+CONFIG_STACKTRACE=n
+CONFIG_SCHED_DEBUG=n
+CONFIG_FTRACE=n
+CONFIG_ARM_UNWIND=n
+CONFIG_DEBUG_PREEMPT=n
+CONFIG_SLUB_DEBUG=n
+
+CONFIG_PREEMPT=y
+CONFIG_DEBUG_FS=y
+
+# pinctrl
+CONFIG_PINCTRL_SINGLE=y
+CONFIG_PINCTRL_TI_IODELAY=y
+
+# Crypto Modules
+CONFIG_CRYPTO_DEV_OMAP_SHAM=y
+CONFIG_CRYPTO_DEV_OMAP_AES=y
+CONFIG_CRYPTO_DEV_OMAP_DES=y
+CONFIG_CRYPTO_USER_API_HASH=y
+CONFIG_CRYPTO_USER_API_SKCIPHER=y
+
+# Firmware Loading from rootfs
+CONFIG_FW_LOADER_USER_HELPER=y
+CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
+
+# AMx3 Power Config Options
+CONFIG_MAILBOX=y
+CONFIG_OMAP2PLUS_MBOX=y
+CONFIG_WKUP_M3_RPROC=y
+CONFIG_SOC_TI=y
+CONFIG_WKUP_M3_IPC=y
+CONFIG_TI_EMIF_SRAM=y
+CONFIG_AMX3_PM=y
+
+# Voltagedomain/cpufreq config
+CONFIG_VOLTAGE_DOMAIN_OMAP=y
+CONFIG_CPUFREQ_VOLTDM=y
+
+# Support Ramdisk
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=8096
+
+# Enable Message Manager
+CONFIG_TI_MESSAGE_MANAGER=y
+CONFIG_TI_SCI_PROTOCOL=y
+
+# Enable SCI Generic PM domains
+CONFIG_TI_SCI_PM_DOMAINS=y
+
+# Enable Reset Controllers
+CONFIG_SYSCON_RESET=y
+CONFIG_TI_SCI_RESET=y
+
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+
+# Enable System V IPC
+CONFIG_SYSVIPC=y
+
+# Thermal
+CONFIG_THERMAL=y
+CONFIG_TI_SOC_THERMAL=y
+CONFIG_TI_THERMAL=y
+CONFIG_OMAP4_THERMAL=y
+CONFIG_OMAP5_THERMAL=y
+CONFIG_DRA752_THERMAL=y
+# Since HWMON is needed by Sensors..
+CONFIG_HWMON=y
+CONFIG_SENSORS_TMP102=y
+CONFIG_SENSORS_GPIO_FAN=y
diff --git a/linux/ti_config_fragments/connectivity.cfg b/linux/ti_config_fragments/connectivity.cfg
new file mode 100644
index 00000000..ab296945
--- /dev/null
+++ b/linux/ti_config_fragments/connectivity.cfg
@@ -0,0 +1,181 @@
+##################################################
+# TI Connectivity Configs
+##################################################
+
+# I2C GPIO expanders
+CONFIG_GPIO_PCF857X=y
+
+#PCIe
+CONFIG_PCI=y
+CONFIG_PCI_DRA7XX=y
+CONFIG_PHY_TI_KEYSTONE_SERDES=y
+#These drivers have been used with DRA7x/AM57x PCIe RC with some success
+CONFIG_NET_VENDOR_BROADCOM=y
+CONFIG_NET_VENDOR_MARVELL=y
+CONFIG_NET_VENDOR_INTEL=y
+CONFIG_TIGON3=m
+CONFIG_SKGE=m
+CONFIG_E1000=m
+CONFIG_E1000E=m
+CONFIG_IWLWIFI=m
+CONFIG_IWLDVM=m
+
+#SATA
+CONFIG_AHCI=m
+CONFIG_SATA_AHCI_PLATFORM=m
+CONFIG_SATA_AHCI=m
+CONFIG_ATA=m
+
+#MTD
+CONFIG_MTD_TESTS=m
+CONFIG_MTD_NAND_OMAP2=y
+CONFIG_MTD_NAND_OMAP_BCH=y
+CONFIG_MTD_NAND_OMAP_BCH_BUILD=y
+
+# Networking
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_NF_NAT_IPV4=m
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_BRIDGE=m
+CONFIG_INET6_AH=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET_ESP=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CPU=m
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_BRIDGE_NF_EBTABLES=m
+CONFIG_BRIDGE_EBT_BROUTE=m
+CONFIG_BRIDGE_EBT_T_FILTER=m
+CONFIG_BRIDGE_EBT_T_NAT=m
+CONFIG_BRIDGE_EBT_802_3=m
+CONFIG_BRIDGE_EBT_AMONG=m
+CONFIG_BRIDGE_EBT_ARP=m
+CONFIG_BRIDGE_EBT_IP=m
+CONFIG_BRIDGE_EBT_IP6=m
+CONFIG_BRIDGE_EBT_LIMIT=m
+CONFIG_BRIDGE_EBT_MARK=m
+CONFIG_BRIDGE_EBT_PKTTYPE=m
+CONFIG_BRIDGE_EBT_STP=m
+CONFIG_BRIDGE_EBT_VLAN=m
+CONFIG_BRIDGE_EBT_ARPREPLY=m
+CONFIG_BRIDGE_EBT_DNAT=m
+CONFIG_BRIDGE_EBT_MARK_T=m
+CONFIG_BRIDGE_EBT_REDIRECT=m
+CONFIG_BRIDGE_EBT_SNAT=m
+CONFIG_BRIDGE_EBT_LOG=m
+CONFIG_BRIDGE_EBT_ULOG=m
+CONFIG_BRIDGE_EBT_NFLOG=m
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_MULTIQ=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFB=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_DRR=m
+CONFIG_NET_SCH_MQPRIO=m
+CONFIG_NET_SCH_CHOKE=m
+CONFIG_NET_SCH_QFQ=m
+CONFIG_NET_SCH_CODEL=m
+CONFIG_NET_SCH_FQ_CODEL=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_FLOW=m
+CONFIG_NET_EMATCH=y
+CONFIG_NET_EMATCH_STACK=32
+CONFIG_NET_EMATCH_CMP=m
+CONFIG_NET_EMATCH_NBYTE=m
+CONFIG_NET_EMATCH_U32=m
+CONFIG_NET_EMATCH_META=m
+CONFIG_NET_EMATCH_TEXT=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_POLICE=m
+CONFIG_NET_ACT_GACT=m
+CONFIG_GACT_PROB=y
+CONFIG_NET_ACT_MIRRED=m
+CONFIG_NET_ACT_IPT=m
+CONFIG_NET_ACT_NAT=m
+CONFIG_NET_ACT_PEDIT=m
+CONFIG_NET_ACT_SIMP=m
+CONFIG_NET_ACT_SKBEDIT=m
+CONFIG_NET_ACT_CSUM=m
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_SCH_FIFO=y
+CONFIG_IP_SCTP=m
+CONFIG_VLAN_8021Q=m
+
+#MDIO phys
+CONFIG_MICREL_PHY=y
+
+#MMC
+CONFIG_MMC=y
+CONFIG_MMC_OMAP_HS=y
+
+#CAN
+CONFIG_CAN=m
+CONFIG_CAN_C_CAN=m
+CONFIG_CAN_C_CAN_PLATFORM=m
+
+#USB gadgets
+CONFIG_USB_AUDIO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_G_NCM=m
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FUNCTIONFS=m
+CONFIG_USB_FUNCTIONFS_ETH=y
+CONFIG_USB_FUNCTIONFS_RNDIS=y
+CONFIG_USB_FUNCTIONFS_GENERIC=y
+CONFIG_USB_MASS_STORAGE=m
+CONFIG_USB_G_SERIAL=m
+CONFIG_USB_MIDI_GADGET=m
+CONFIG_USB_G_PRINTER=m
+CONFIG_USB_CDC_COMPOSITE=m
+CONFIG_USB_G_ACM_MS=m
+CONFIG_USB_G_MULTI=m
+CONFIG_USB_G_MULTI_CDC=y
+CONFIG_USB_G_HID=m
+CONFIG_USB_G_DBGP=m
+CONFIG_USB_G_WEBCAM=m
+CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=32
+
+#USB OTG
+CONFIG_USB_OTG=y
+
+#USB MUSB DMA
+CONFIG_TI_CPPI41=y
+CONFIG_USB_TI_CPPI41_DMA=y
diff --git a/linux/ti_config_fragments/debug_ftrace.cfg b/linux/ti_config_fragments/debug_ftrace.cfg
new file mode 100644
index 00000000..87b959c1
--- /dev/null
+++ b/linux/ti_config_fragments/debug_ftrace.cfg
@@ -0,0 +1,14 @@
+##################################################
+# Debug FTRACE options
+##################################################
+
+CONFIG_FTRACE=y
+CONFIG_DYNAMIC_FTRACE=y
+
+CONFIG_PREEMPT_TRACER=y
+CONFIG_IRQSOFF_TRACER=y
+CONFIG_FUNCTION_TRACER=y
+CONFIG_FUNCTION_PROFILER=y
+CONFIG_PREEMPT_TRACER=y
+CONFIG_SCHED_TRACER=y
+CONFIG_STACK_TRACER=y
diff --git a/linux/ti_config_fragments/debug_options.cfg b/linux/ti_config_fragments/debug_options.cfg
new file mode 100644
index 00000000..06ea2423
--- /dev/null
+++ b/linux/ti_config_fragments/debug_options.cfg
@@ -0,0 +1,84 @@
+##################################################
+# Common Debug options considered generically
+# useful for kernel debug. This is not meant to
+# be an exhaustive list of options and will probably
+# have performance impact by using the same.
+#
+# IMPORTANT NOTE: Do not collect reference performance
+# data with this configuration.
+##################################################
+
+CONFIG_DYNAMIC_DEBUG=y
+
+CONFIG_DEBUG_SECTION_MISMATCH=y
+
+CONFIG_DEBUG_PAGEALLOC=y
+CONFIG_WANT_PAGE_DEBUG_FLAGS=y
+CONFIG_PAGE_POISONING=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_SELFTEST=n
+CONFIG_DEBUG_OBJECTS_FREE=n
+CONFIG_DEBUG_OBJECTS_TIMERS=n
+CONFIG_DEBUG_OBJECTS_WORK=n
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=n
+CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
+CONFIG_DEBUG_SLAB=y
+CONFIG_DEBUG_SLAB_LEAK=y
+CONFIG_SLUB_DEBUG=y
+
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=8000
+CONFIG_DEBUG_KMEMLEAK_TEST=n
+CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=n
+CONFIG_DEBUG_INFO=y
+
+CONFIG_DEBUG_SHIRQ=n
+CONFIG_DEBUG_PREEMPT=y
+
+CONFIG_LOCKUP_DETECTOR=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=300
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
+CONFIG_PANIC_ON_OOPS=y
+CONFIG_PANIC_ON_OOPS_VALUE=1
+
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_PI_LIST=y
+CONFIG_RT_MUTEX_TESTER=n
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
+CONFIG_DEBUG_LOCK_ALLOC=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_LOCKDEP=y
+CONFIG_LOCK_STAT=n
+CONFIG_DEBUG_LOCKDEP=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+CONFIG_DEBUG_LOCKING_API_SELFTESTS=n
+CONFIG_STACKTRACE=y
+CONFIG_DEBUG_KOBJECT=n
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_WRITECOUNT=n
+CONFIG_DEBUG_LIST=y
+CONFIG_DEBUG_SG=y
+CONFIG_DEBUG_NOTIFIERS=y
+CONFIG_DEBUG_CREDENTIALS=n
+
+CONFIG_SPARSE_RCU_POINTER=y
+CONFIG_RCU_TORTURE_TEST=n
+CONFIG_RCU_CPU_STALL_TIMEOUT=60
+CONFIG_RCU_CPU_STALL_INFO=y
+CONFIG_RCU_TRACE=y
+CONFIG_PROVE_RCU=y
+CONFIG_PROVE_RCU_REPEATEDLY=y
+
+CONFIG_DMA_API_DEBUG=y
+
+CONFIG_ARM_PTDUMP=y
+CONFIG_ARM_UNWIND=y
+CONFIG_DEBUG_USER=y
+
diff --git a/linux/ti_config_fragments/defconfig_builder.README b/linux/ti_config_fragments/defconfig_builder.README
new file mode 100644
index 00000000..528c275f
--- /dev/null
+++ b/linux/ti_config_fragments/defconfig_builder.README
@@ -0,0 +1,143 @@
+##################################
+# Introduction
+##################################
+
+Using config fragments in the Linux kernel is a supported model in the
+Linux kernel main line. TI has taken advantage of this model to be able
+to take a base defconfig and add or remove configuration flags based contained
+within a config fragment. This allows the base defconfig to be left in tact
+and helps facilitate and understanding of what config flags can be enabled
+or disabled. The config fragments drastically reduces the number of merge
+conflicts when the Linux stable dot release (LTS) is merged back to the
+integration point as well as merges for TI domain trees.
+
+But alas this creates another issue as with the config fragments there is no
+direct defconfig for customers to build just many, many, many options.
+
+Therefore the defconfig_builder script was derived to take a defconfig map file
+and present a command line interface to the customer to to create a standard
+defconfig based off the TI integration branches. The customer is walked through
+steps and if successful a defconfig will be created in the arch/arm/configs directory
+that can be built.
+
+##################################
+# Usage
+##################################
+
+There is only one option for this script. This option defines the working
+path to where the Linux kernel resides.
+
+ -w - Location of the TI Linux kernel
+
+Command line Example if building from the working Linux kernel
+top level directory:
+ ti_config_fragments/defconfig_builder.sh -w .
+
+Command line Example if building from the ti_config_fragments directory:
+ defconfig_builder.sh -w ../.
+
+##################################
+# Defconfig Map File
+##################################
+
+The defconfig map file contains the mapping of the defconfig options and the
+assembly instructions for the defconfig to be created.
+
+The file contains keywords and all are *required* to be filled out.
+
+processor: - Defines the processor type if the defconfig is to be processor specific
+type: - Defines the type of build. Like debug build, LSK build or RT build
+defconfig: - Defines the base defconfig config to append the config fragments to
+config_file: - Defines a file that contains a list of config fragments. If there is not a list then declare "None" for this field.
+extra_configs: - These are individual config fragments that can be appended to the defconfig by themselves or in addition to
+ the config_file.
+
+Example:
+
+This is an example of an AM335x entry that will create a defconfig only for AM335x
+processors, based on the omap2plus_defconfig. The defconfig_fragment file adds features
+that have been enabled in the TI integrated kernel. The extra_configs will add in the
+debug options as well as undefine all processors that are not AM335x.
+
+processor: AM33xx type: am335x_debug_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg ti_config_fragments/am33xx_only.cfg
+
+##################################
+# Defconfig Mapping
+##################################
+
+#Processor Specific Defconfig options
+
+These defconfig options enable the Linux kernel for the targer processor only. Other processor platforms
+are disabled. The base for each of these defconfigs is the omap2plus_defconfig contained
+in the arch/arm/configs directory of the kernel.
+
+ TI Base Integrated Kernel:
+ am335x_only - Adds the configs from the files contained in the defconfig_fragment file.
+ am335x_debug_only - Adds the configs from the files contained in the defconfig_fragment file and adds in the debug options from the debug_options.cfg
+ am43x_only - Adds the configs from the files contained in the defconfig_fragment file.
+ am43x_debug_only - Adds the configs from the files contained in the defconfig_fragment file and adds in the debug options from the debug_options.cfg
+ dra7xx_only - Adds the configs from the files contained in the defconfig_fragment file.
+ dra7xx_debug_only - Adds the configs from the files contained in the defconfig_fragment file and adds in the debug options from the debug_options.cfg
+
+ Linaro Stable Kernel builds: (These configurations are only available on the TI LSK branch.)
+ am335x_lsk_only - Adds the configs from the files contained in the defconfig_fragment file and adds in the linaro options from the linaro/configs directory
+ am335x_lsk_debug_only - Adds the configs from the files contained in the defconfig_fragment file and adds in the debug options from the debug_options.cfg as
+ well as the linaro options from the linaro/configs directory
+ am43x_lsk_only - Adds the configs from the files contained in the defconfig_fragment file and adds in the linaro options from the linaro/configs directory
+ am43x_lsk_debug_only - Adds the configs from the files contained in the defconfig_fragment file and adds in the debug options from the debug_options.cfg as
+ well as the linaro options from the linaro/configs directory
+ dra7xx_lsk_only - Adds the configs from the files contained in the defconfig_fragment file and adds in the linaro options from the linaro/configs directory
+ dra7xx_lsk_debug_only - Adds the configs from the files contained in the defconfig_fragment file and adds in the debug options from the debug_options.cfg as
+ well as the linaro options from the linaro/configs directory
+
+ TI Based Real Time Kernel: (These configurations are only available on the TI RT branch.)
+ am335x_rt_only - Adds the configs from the files contained in the rt_defconfig_fragment file.
+ am335x_rt_debug_only - Adds the configs from the files contained in the rt_defconfig_fragment file and adds in the debug options from the debug_options.cfg.
+ am43x_rt_only - Adds the configs from the files contained in the rt_defconfig_fragment file.
+ am43x_rt_debug_only - Adds the configs from the files contained in the rt_defconfig_fragment file and adds in the debug options from the debug_options.cfg.
+ dra7xx_rt_only - Adds the configs from the files contained in the rt_defconfig_fragment file.
+ dra7xx_rt_debug_only - Adds the configs from the files contained in the rt_defconfig_fragment file and adds in the debug options from the debug_options.cfg.
+
+#OMAP2+ Defconfig Options
+
+These defconfig options use the omap2plus_defconfig in the arch/arm/configs directory as the base defconfig.
+These options do not disable any processor's or platforms but add additional features that
+
+ TI Base Integrated Kernel:
+ omap2plus_debug - Takes the omap2plus_defconfig and only adds the debug options from the debug_options.cfg.
+ ti_omap2plus - Adds the configs from the files contained in the defconfig_fragment file.
+ ti_omap2plus_debug - Adds the configs from the files contained in the defconfig_fragment file and adds in the debug options from the debug_options.cfg
+
+ Linaro Stable Kernel builds: (These configurations are only available on the TI LSK branch.)
+ ti_lsk_omap2plus - Adds the configs from the files contained in the defconfig_fragment file and adds in the linaro options from the linaro/configs directory.
+ ti_lsk_omap2plus_debug - Adds the configs from the files contained in the defconfig_fragment file and adds in the debug options from the debug_options.cfg as
+ well as the linaro options from the linaro/configs directory
+
+ TI Based Real Time Kernel: (These configurations are only available on the TI RT branch.)
+ ti_rt_omap2plus - Adds the configs from the files contained in the rt_defconfig_fragment file.
+ ti_rt_omap2plus_debug - Adds the configs from the files contained in the rt_defconfig_fragment file and adds in the debug options from the debug_options.cfg.
+
+#Keystone Defconfig Options
+
+These defconfig options use the keystone_defconfig in the arch/arm/configs directory as the base defconfig.
+These options do not disable any processor's or platforms but add additional features that
+
+ TI Base Integrated Kernel:
+ base_keystone_debug - Takes the keystone_defconfig and only adds the debug options from the debug_options.cfg.
+ ti_keystone defconfig - Adds the configs from the files contained in the multi_core_defconfig_fragment file.
+ ti_keystone_debug - Adds the configs from the files contained in the multi_core_defconfig_fragment file and
+ adds in the debug options from the debug_options.cfg.
+
+ Linaro Stable Kernel builds: (These configurations are only available on the TI LSK branch.)
+ ti_lsk_keystone - Adds the configs from the files contained in the multi_core_defconfig_fragment file and adds in the
+ linaro options from the linaro/configs directory
+ ti_lsk_keystone_debug_only - Adds the configs from the files contained in the multi_core_defconfig_fragment file and adds in the
+ debug options from the debug_options.cfg as well as the linaro options from the linaro/configs directory
+
+ TI Based Real Time Kernel: (These configurations are only available on the TI RT branch.)
+ ti_rt_keystone - Adds the configs from the files contained in the rt_defconfig_fragment file.
+ ti_rt_keystone_debug - Adds the configs from the files contained in the rt_defconfig_fragment file and adds in the debug options from the debug_options.cfg.
+
+
+
+
diff --git a/linux/ti_config_fragments/defconfig_builder.sh b/linux/ti_config_fragments/defconfig_builder.sh
new file mode 100755
index 00000000..956610e9
--- /dev/null
+++ b/linux/ti_config_fragments/defconfig_builder.sh
@@ -0,0 +1,234 @@
+#!/bin/bash
+#
+# defconfig_builder.sh
+#
+# This will perform a merged based on a file that contains information in the
+# repos to be merged.
+#
+# For more information type defconfig_builder.sh -h
+#
+# Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+# ALL RIGHTS RESERVED
+
+PROCESSOR_TAG="processor:"
+BUILD_TYPE_TAG="type:"
+CONFIG_FRAGMENT_TAG="config-fragment="
+
+set_working_directory()
+{
+ # Sanity checkup kernel build location.
+ if [ ! -d "$WORKING_PATH" ]; then
+ echo "Kernel working dir $WORKING_PATH is not a directory/ does not exist! exiting.."
+ exit 1
+ fi
+
+ ORIGINAL_DIR=$(pwd)
+ if [ "$ORIGINAL_DIR" != "$WORKING_PATH" ]; then
+ cd "$WORKING_PATH"
+ WORKING_PATH=$(pwd)
+ fi
+
+ TI_WORKING_PATH="$WORKING_PATH/ti_config_fragments"
+ DEFCONFIG_KERNEL_PATH="$WORKING_PATH/arch/arm/configs"
+ DEFCONFIG_MAP_FILE="$TI_WORKING_PATH/defconfig_map.txt"
+}
+
+prepare_for_exit() {
+ rm -f "$PROCESSOR_FILE"
+ rm -f "$BUILD_TYPE_FILE"
+ exit
+}
+
+get_processors() {
+ TEMP_PROC_FILE=$(mktemp)
+ cat "$DEFCONFIG_MAP_FILE" > "$TEMP_PROC_FILE"
+
+ y=0
+ while true;
+ do
+ PROCESSOR_TEMP=$(grep "$PROCESSOR_TAG" "$TEMP_PROC_FILE" | awk '{print$2}' | head -n 1)
+ if [ -z "$PROCESSOR_TEMP" ]; then
+ break
+ fi
+ if ! grep -qc "$PROCESSOR_TEMP" "$PROCESSOR_FILE"; then
+ y=$((y+1))
+ echo -e '\t'"$y". "$PROCESSOR_TEMP" >> "$PROCESSOR_FILE"
+ fi
+ sed -i "1d" "$TEMP_PROC_FILE"
+ done
+
+ rm "$TEMP_PROC_FILE"
+}
+
+choose_processor() {
+ get_processors
+
+ NUM_OF_PROC=$(wc -l "$PROCESSOR_FILE" | awk '{print$1}')
+ # Force the user to answer. Maybe the user does not want to continue
+ while true;
+ do
+ cat "$PROCESSOR_FILE"
+ read -p "Please choose which processor to build for: " REPLY
+ if [ "$REPLY" -gt '0' -a "$REPLY" -le "$NUM_OF_PROC" ]; then
+ CHOOSEN_PROCESSOR=$(grep -w "$REPLY" "$PROCESSOR_FILE" | awk '{print$2}')
+ break
+ else
+ echo -e "\nThis is not a choice try again!\n"
+ fi
+ done
+}
+
+choose_build_type() {
+ TEMP_BT_FILE=$(mktemp)
+ TEMP_BUILD_FILE=$(mktemp)
+
+ grep "$CHOOSEN_PROCESSOR" "$DEFCONFIG_MAP_FILE" | grep "$BUILD_TYPE_TAG" | awk '{print$4}' > "$TEMP_BUILD_FILE"
+
+ y=0
+ while true;
+ do
+ CONFIG_FILE=
+ CONFIG_FRAGMENTS=
+
+ BT_TEMP=$(head -n 1 "$TEMP_BUILD_FILE")
+ if [ -z "$BT_TEMP" ]; then
+ break
+ fi
+ BUILD_DETAILS=$(grep -w "$BT_TEMP" "$DEFCONFIG_MAP_FILE")
+
+ # Check to make sure that the config fragments exist
+ TEMP_EXTRA_CONFIG_FILE=$(echo "$BUILD_DETAILS" | cut -d: -f6)
+ if [ -z "$TEMP_EXTRA_CONFIG_FILE" ]; then
+ CONFIG_FRAGMENTS=
+ else
+ for CONFIG_FRAG in $TEMP_EXTRA_CONFIG_FILE;
+ do
+ if [ ! -e "$CONFIG_FRAG" ]; then
+ CONFIG_FRAGMENTS="N/A"
+ fi
+ done
+ fi
+
+ if ! grep -qc "$BT_TEMP" "$BUILD_TYPE_FILE"; then
+ # If the config file and config fragments are available
+ # add it to the list.
+ CONFIG_FILE=$(echo "$BUILD_DETAILS" | awk '{print$8}')
+ if [ "$CONFIG_FILE" = "None" ]; then
+ CONFIG_FILE=
+ else
+ if [ -e "$TI_WORKING_PATH""/""$CONFIG_FILE" ]; then
+ CONFIG_FILE=
+ fi
+ fi
+ # If the check for the config file and the config fragments
+ # pass then these two variables should be empty. If
+ # they fail then they should be N/A.
+ if [ -z "$CONFIG_FILE" -a -z "$CONFIG_FRAGMENTS" ]; then
+ y=$((y+1))
+ echo -e '\t'"$y". "$BT_TEMP" >> "$BUILD_TYPE_FILE"
+ fi
+ fi
+ sed -i "1d" "$TEMP_BUILD_FILE"
+ done
+
+ NUM_OF_BUILDS=$(wc -l "$BUILD_TYPE_FILE" | awk '{print$1}')
+ # Force the user to answer. Maybe the user does not want to continue
+ while true;
+ do
+ cat "$BUILD_TYPE_FILE"
+ read -p "Please choose which build: " REPLY
+ if [ "$REPLY" -gt '0' -a "$REPLY" -le "$NUM_OF_BUILDS" ]; then
+ CHOOSEN_BUILD_TYPE=$(grep -w "$REPLY" "$BUILD_TYPE_FILE" | awk '{print$2}')
+ break
+ else
+ echo -e "\nThis is not a choice try again!\n"
+ fi
+ done
+ rm "$TEMP_BT_FILE"
+ rm "$TEMP_BUILD_FILE"
+}
+
+get_build_details() {
+
+ BUILD_DETAILS=$(grep -w "$CHOOSEN_BUILD_TYPE" "$DEFCONFIG_MAP_FILE")
+ DEFCONFIG=$(echo "$BUILD_DETAILS" | awk '{print$6}')
+ DEFCONFIG="$DEFCONFIG_KERNEL_PATH""/""$DEFCONFIG"
+ CONFIG_FILE=$(echo "$BUILD_DETAILS" | awk '{print$8}')
+ # There may be a need to just build with the config fragments themselves
+ if [ "$CONFIG_FILE" = "None" ]; then
+ CONFIG_FILE=
+ fi
+ TEMP_EXTRA_CONFIG_FILE=$(echo "$BUILD_DETAILS" | cut -d: -f6)
+ for CONFIG_FRAG in $TEMP_EXTRA_CONFIG_FILE;
+ do
+ if [ -e "$CONFIG_FRAG" ]; then
+ EXTRA_CONFIG_FILE="$EXTRA_CONFIG_FILE $CONFIG_FRAG"
+ else
+ echo "$CONFIG_FRAG" does not exist
+ fi
+ done
+}
+
+usage()
+{
+cat << EOF
+
+This script utilizes a map file to create defconfigs for multiple TI
+platforms.
+
+There is only one option for this script. This option defines the working
+path to where the Linux kernel resides.
+
+ -w - Location of the TI Linux kernel
+
+Command line Example if building from the working Linux kernel
+top level directory:
+ ti_config_fragments/defconfig_builder.sh -w .
+
+Command line Example if building from the ti_config_fragments directory:
+ defconfig_builder.sh -w ../.
+
+EOF
+}
+
+#########################################
+# Script Start
+#########################################
+while getopts "w:" OPTION
+do
+ case $OPTION in
+ w)
+ WORKING_PATH=$OPTARG;;
+ ?)
+ usage
+ exit;;
+ esac
+done
+
+trap prepare_for_exit EXIT SIGINT SIGTERM
+
+set_working_directory
+
+if [ ! -e "$DEFCONFIG_MAP_FILE" ]; then
+ echo "No defconfig map file found"
+ exit 1
+fi
+
+PROCESSOR_FILE=$(mktemp)
+BUILD_TYPE_FILE=$(mktemp)
+
+choose_processor
+choose_build_type
+get_build_details
+
+if [ ! -z "$CONFIG_FILE" -a -e "$TI_WORKING_PATH/$CONFIG_FILE" ]; then
+ CONFIGS=$(grep "$CONFIG_FRAGMENT_TAG" "$TI_WORKING_PATH/$CONFIG_FILE" | cut -d= -f2)
+fi
+
+STATUS=$("$WORKING_PATH"/scripts/kconfig/merge_config.sh -m -r "$DEFCONFIG" "$CONFIGS" "$EXTRA_CONFIG_FILE")
+if [ "$?" = "0" ];then
+ echo "Creating defconfig file ""$WORKING_PATH""/arch/arm/configs/""$CHOOSEN_BUILD_TYPE"_defconfig
+ cp .config "$DEFCONFIG_KERNEL_PATH"/"$CHOOSEN_BUILD_TYPE"_defconfig
+else
+ echo "Defconfig creation failed"
+fi
diff --git a/linux/ti_config_fragments/defconfig_fragment b/linux/ti_config_fragments/defconfig_fragment
new file mode 100644
index 00000000..ec1dfeb3
--- /dev/null
+++ b/linux/ti_config_fragments/defconfig_fragment
@@ -0,0 +1,6 @@
+use-kernel-config=omap2plus_defconfig
+config-fragment=ti_config_fragments/baseport.cfg
+config-fragment=ti_config_fragments/ipc.cfg
+config-fragment=ti_config_fragments/audio_display.cfg
+config-fragment=ti_config_fragments/connectivity.cfg
+config-fragment=ti_config_fragments/wlan.cfg
diff --git a/linux/ti_config_fragments/defconfig_map.txt b/linux/ti_config_fragments/defconfig_map.txt
new file mode 100644
index 00000000..2025ef93
--- /dev/null
+++ b/linux/ti_config_fragments/defconfig_map.txt
@@ -0,0 +1,44 @@
+processor: AM33xx type: am335x_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/am33xx_only.cfg
+processor: AM33xx type: am335x_debug_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg ti_config_fragments/am33xx_only.cfg
+processor: AM33xx type: am335x_lsk_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: linaro/configs/linaro-base.conf ti_config_fragments/am33xx_only.cfg
+processor: AM33xx type: am335x_lsk_debug_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg linaro/configs/linaro-base.conf ti_config_fragments/am33xx_only.cfg
+processor: AM33xx type: am335x_rt_only defconfig: omap2plus_defconfig config_file: rt_defconfig_fragment extra_configs: ti_config_fragments/am33xx_only.cfg
+processor: AM33xx type: am335x_rt_debug_only defconfig: omap2plus_defconfig config_file: rt_defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg ti_config_fragments/am33xx_only.cfg
+
+processor: AM43xx type: am43x_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/am43xx_only.cfg
+processor: AM43xx type: am43x_debug_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg ti_config_fragments/am43xx_only.cfg
+processor: AM43xx type: am43x_lsk_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: linaro/configs/linaro-base.conf ti_config_fragments/am43xx_only.cfg
+processor: AM43xx type: am43x_lsk_debug_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg linaro/configs/linaro-base.conf ti_config_fragments/am43xx_only.cfg
+processor: AM43xx type: am43x_rt_only defconfig: omap2plus_defconfig config_file: rt_defconfig_fragment extra_configs: ti_config_fragments/am43xx_only.cfg
+processor: AM43xx type: am43x_rt_debug_only defconfig: omap2plus_defconfig config_file: rt_defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg ti_config_fragments/am43xx_only.cfg
+
+processor: DRA7x type: dra7xx_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/dra7x_only.cfg
+processor: DRA7x type: dra7xx_debug_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg ti_config_fragments/dra7x_only.cfg
+processor: DRA7x type: dra7xx_lsk_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: linaro/configs/linaro-base.conf ti_config_fragments/dra7x_only.cfg
+processor: DRA7x type: dra7xx_lsk_debug_only defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg linaro/configs/linaro-base.conf ti_config_fragments/dra7x_only.cfg
+processor: DRA7x type: dra7xx_rt_only defconfig: omap2plus_defconfig config_file: rt_defconfig_fragment extra_configs: ti_config_fragments/dra7x_only.cfg
+processor: DRA7x type: dra7xx_rt_debug_only defconfig: omap2plus_defconfig config_file: rt_defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg ti_config_fragments/dra7x_only.cfg
+
+processor: Keystone2 type: base_keystone_debug defconfig: keystone_defconfig config_file: None extra_configs: ti_config_fragments/debug_options.cfg
+processor: Keystone2 type: ti_keystone defconfig: keystone_defconfig config_file: multi_core_defconfig_fragment extra_configs:
+processor: Keystone2 type: ti_keystone_debug defconfig: keystone_defconfig config_file: multi_core_defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg
+processor: Keystone2 type: ti_lsk_keystone defconfig: keystone_defconfig config_file: multi_core_defconfig_fragment extra_configs: linaro/configs/linaro-base.conf
+processor: Keystone2 type: ti_lsk_keystone_debug_only defconfig: keystone_defconfig config_file: multi_core_defconfig_fragment extra_configs: linaro/configs/linaro-base.conf ti_config_fragments/debug_options.cfg
+processor: Keystone2 type: ti_rt_keystone defconfig: keystone_defconfig config_file: rt_defconfig_fragment extra_configs:
+processor: Keystone2 type: ti_rt_keystone_debug defconfig: keystone_defconfig config_file: rt_defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg
+
+processor: OMAP2+ type: omap2plus_debug defconfig: omap2plus_defconfig config_file: None extra_configs: ti_config_fragments/debug_options.cfg
+processor: OMAP2+ type: ti_omap2plus defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs:
+processor: OMAP2+ type: ti_omap2plus_debug defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg
+processor: OMAP2+ type: ti_lsk_omap2plus defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: linaro/configs/linaro-base.conf
+processor: OMAP2+ type: ti_lsk_omap2plus_debug defconfig: omap2plus_defconfig config_file: defconfig_fragment extra_configs: linaro/configs/linaro-base.conf ti_config_fragments/debug_options.cfg
+processor: OMAP2+ type: ti_rt_omap2plus defconfig: omap2plus_defconfig config_file: rt_defconfig_fragment extra_configs:
+processor: OMAP2+ type: ti_rt_omap2plus_debug defconfig: omap2plus_defconfig config_file: rt_defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg
+
+processor: MULTI_v7 type: multi_v7_debug defconfig: multi_v7_defconfig config_file: None extra_configs: ti_config_fragments/debug_options.cfg
+processor: MULTI_v7 type: ti_multi_v7 defconfig: multi_v7_defconfig config_file: defconfig_fragment extra_configs:
+processor: MULTI_v7 type: ti_multi_v7_debug defconfig: multi_v7_defconfig config_file: defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg
+processor: MULTI_v7 type: ti_lsk_multi_v7 defconfig: multi_v7_defconfig config_file: defconfig_fragment extra_configs: linaro/configs/linaro-base.conf
+processor: MULTI_v7 type: ti_lsk_multi_v7_debug defconfig: multi_v7_defconfig config_file: defconfig_fragment extra_configs: linaro/configs/linaro-base.conf ti_config_fragments/debug_options.cfg
+processor: MULTI_v7 type: ti_rt_multi_v7 defconfig: multi_v7_defconfig config_file: rt_defconfig_fragment extra_configs:
+processor: MULTI_v7 type: ti_rt_multi_v7_debug defconfig: multi_v7_defconfig config_file: rt_defconfig_fragment extra_configs: ti_config_fragments/debug_options.cfg
diff --git a/linux/ti_config_fragments/defconfig_merge.sh b/linux/ti_config_fragments/defconfig_merge.sh
new file mode 100755
index 00000000..594b8315
--- /dev/null
+++ b/linux/ti_config_fragments/defconfig_merge.sh
@@ -0,0 +1,537 @@
+#! /bin/bash
+#
+# defconfig_merge.sh
+#
+# This script will do a full kernel build with sparse information, clean
+# the build, rebuild the kernel again. Upon each build a log will be created
+# if there are warnings. Any errors and the whole script exits.
+#
+# Copyright (C) 2013-14 Texas Instruments Incorporated - http://www.ti.com/
+# ALL RIGHTS RESERVED
+
+export unix_user=`whoami`
+export user_home_directory=`getent passwd $unix_user |cut -d: -f6`
+
+BUILD_THREADS=`grep -c "^processor" /proc/cpuinfo`
+DEFCONFIG=""
+CROSS_COMPILE=""
+WORKING_PATH=""
+LOAD_ADDR=0x80008000
+LOAD_ADDRESS_VALUE=""
+LOGGING_DIRECTORY="working_config"
+
+prepare_for_exit()
+{
+ set_original_directory
+}
+
+check_for_compiler()
+{
+ COMPILER_COMMAND=$(which $CROSS_COMPILE"gcc")
+ if [ -x "$COMPILER_COMMAND" ]; then
+ echo "Found " "$CROSS_COMPILE"
+ else
+ echo "Invalid or non-existent compiler $COMPILER_COMMAND" > build_failure.txt
+ return 1
+ fi
+
+ CCACHE_INSTALLED=$(which ccache)
+ if [ -z "$CCACHE_INSTALLED" ]; then
+ echo "To decrease build time install ccache"
+ else
+ CCACHE="ccache"
+ fi
+
+ CROSS_COMPILE=""$CCACHE" "$CROSS_COMPILE""
+ echo "Cross compile command is ""$CROSS_COMPILE"
+}
+
+build_the_defconfig()
+{
+ BUILD_OUT=`mktemp`
+ #Check for defconfig issues
+ echo "Making the $DEFCONFIG"
+ cross_make $DEFCONFIG > $BUILD_OUT 2>&1
+ NUM_OF_ERRORS=`cat $BUILD_OUT | grep -wc "error:"`
+ if [ "$NUM_OF_ERRORS" -gt '0' ];then
+ rm $BUILD_OUT
+ return 1
+ fi
+
+ NUM_OF_WARNINGS=`cat $BUILD_OUT | grep -wc "warning:"`
+ if [ -f $OUT_LOG ]; then
+ IS_THIS_LOGGED=`cat $OUT_LOG | grep -wc "Defconfig build"`
+ if [ "$IS_THIS_LOGGED" = 0 ]; then
+ echo "#########################################################" >> $OUT_LOG
+ echo "# $DEFCONFIG Defconfig build " >> $OUT_LOG
+ echo "#########################################################" >> $OUT_LOG
+ if [ "$NUM_OF_WARNINGS" -gt 0 ]; then
+ echo >> $OUT_LOG
+ cat $DEFCONFIG_OUT >> $OUT_LOG
+ fi
+ echo >> $OUT_LOG
+ echo "There are a total of "$NUM_OF_WARNINGS" warnings in this build" >> $OUT_LOG
+ echo >> $OUT_LOG
+ fi
+ fi
+
+ rm $BUILD_OUT
+}
+
+build_the_new_defconfig()
+{
+ BUILD_OUT=`mktemp`
+ #Check for defconfig issues
+ echo "Making the $NEW_DEFCONFIG"
+ cross_make $NEW_DEFCONFIG > $BUILD_OUT 2>&1
+
+ NUM_OF_ERRORS=`cat $BUILD_OUT | grep -wc "error:"`
+ if [ "$NUM_OF_ERRORS" -gt '0' ];then
+ rm $BUILD_OUT
+ return 1
+ fi
+
+ NUM_OF_WARNINGS=`cat $BUILD_OUT | grep -wc "warning:"`
+ if [ -f $OUT_LOG ]; then
+ IS_THIS_LOGGED=`cat $OUT_LOG | grep -wc "Defconfig build"`
+ if [ "$IS_THIS_LOGGED" = 0 ]; then
+ echo "#########################################################" >> $OUT_LOG
+ echo "# $NEW_DEFCONFIG Defconfig build " >> $OUT_LOG
+ echo "#########################################################" >> $OUT_LOG
+ if [ "$NUM_OF_WARNINGS" -gt 0 ]; then
+ echo >> $OUT_LOG
+ cat $NEW_DEFCONFIG >> $OUT_LOG
+ fi
+ echo >> $OUT_LOG
+ echo "There are a total of "$NUM_OF_WARNINGS" warnings in this build" >> $OUT_LOG
+ echo >> $OUT_LOG
+ fi
+ fi
+
+ rm $BUILD_OUT
+}
+
+build_the_kernel()
+{
+ BUILD_OUT=`mktemp`
+ echo "Building the kernel"
+ if [ -n "$LOAD_ADDR" ]; then
+ LOAD_ADDRESS_VALUE="LOADADDR=$LOAD_ADDR"
+ fi
+
+ cross_make $LOAD_ADDRESS_VALUE uImage > $BUILD_OUT 2>&1
+ #Check for build errors
+ NUM_OF_ERRORS=`cat $BUILD_OUT | grep -wci "error:"`
+ if [ "$NUM_OF_ERRORS" -gt '0' ];then
+ cat $BUILD_OUT > $OUT_LOG
+ rm $BUILD_OUT
+ return 1
+ fi
+ NUM_OF_WARNINGS=`cat $BUILD_OUT | grep -wc "warning:"`
+ echo "#########################################################" >> $OUT_LOG
+ echo "# Kernel Compiler Warnings" >> $OUT_LOG
+ echo "#########################################################" >> $OUT_LOG
+ if [ "$NUM_OF_WARNINGS" -gt 0 ]; then
+ echo >> $OUT_LOG
+ cat $BUILD_OUT | grep 'warning:' >> $OUT_LOG
+ fi
+ echo >> $OUT_LOG
+ echo "There are a total of "$NUM_OF_WARNINGS" warnings in this build" >> $OUT_LOG
+ echo >> $OUT_LOG
+
+ rm $BUILD_OUT
+}
+
+build_the_dtbs()
+{
+ BUILD_OUT=`mktemp`
+ echo "Building the device tree"
+ cross_make dtbs > $BUILD_OUT 2>&1
+ #Check for build errors
+ NUM_OF_ERRORS=`cat $BUILD_OUT | grep -wci "error:"`
+ if [ "$NUM_OF_ERRORS" -gt '0' ];then
+ cat $BUILD_OUT >> $OUT_LOG
+ rm $BUILD_OUT
+ return 1
+ fi
+
+ NUM_OF_WARNINGS=`cat $BUILD_OUT | grep -wc "warning:"`
+ echo "#########################################################" >> $OUT_LOG
+ echo "# Device Tree Warnings" >> $OUT_LOG
+ echo "#########################################################" >> $OUT_LOG
+ if [ "$NUM_OF_WARNINGS" -gt 0 ]; then
+ echo >> $OUT_LOG
+ cat $BUILD_OUT | grep 'warning:' >> $OUT_LOG
+ fi
+ echo >> $OUT_LOG
+ echo "There are a total of "$NUM_OF_WARNINGS" warnings in the device tree" >> $OUT_LOG
+ echo >> $OUT_LOG
+
+ rm $BUILD_OUT
+}
+
+build_the_modules()
+{
+ BUILD_OUT=`mktemp`
+ echo "Building the modules"
+ cross_make modules > $BUILD_OUT 2>&1
+ #Check for build errors
+ NUM_OF_ERRORS=`cat $BUILD_OUT | grep -wci "error:"`
+ if [ "$NUM_OF_ERRORS" -gt '0' ];then
+ cat $BUILD_OUT >> $OUT_LOG
+ rm $BUILD_OUT
+ return 1
+ fi
+
+ NUM_OF_WARNINGS=`cat $BUILD_OUT | grep -wc "warning:"`
+ echo "#########################################################" >> $OUT_LOG
+ echo "# Module Build Warnings" >> $OUT_LOG
+ echo "#########################################################" >> $OUT_LOG
+ if [ "$NUM_OF_WARNINGS" -gt 0 ]; then
+ echo >> $OUT_LOG
+ cat $BUILD_OUT | grep 'warning:' >> $OUT_LOG
+ fi
+ echo >> $OUT_LOG
+ echo "There are a total of "$NUM_OF_WARNINGS" warnings in the modules" >> $OUT_LOG
+ echo >> $OUT_LOG
+
+ cross_make tar-pkg > $BUILD_OUT 2>&1
+ #Check for build errors
+ NUM_OF_ERRORS=`cat $BUILD_OUT | grep -wci "error:"`
+ if [ "$NUM_OF_ERRORS" -gt '0' ];then
+ cat $BUILD_OUT >> $OUT_LOG
+ rm $BUILD_OUT
+ return 1
+ fi
+
+ rm $BUILD_OUT
+}
+
+clean_the_build()
+{
+ cross_make mrproper
+}
+
+setup_directories()
+{
+ INVOKE_DIR=`pwd`
+ SCRIPT_DIR=`dirname $0`
+ if [ -n "$WORKING_PATH" ]; then
+ # invoking script for a different kernel...
+ KERNEL_DIR="$WORKING_PATH"
+ else
+ # The script is located in <kernel_dir>/ti_config_fragments directory..
+ # Lets use that trick to find the kernel directory.
+ KERNEL_DIR=`dirname $SCRIPT_DIR`
+ WORKING_PATH=$KERNEL_DIR
+ fi
+
+ # Sanity checkup kernel build location.
+ if [ ! -d "$KERNEL_DIR" ]; then
+ echo "Kernel working dir $KERNEL_DIR is not a directory/ does not exist! exiting.."
+ exit 1
+ fi
+
+ if [ -n "$DEFCONFIG_EXTRAS_FILE" ]; then
+ DEFCONFIG_EXTRAS_DIR=`dirname $DEFCONFIG_EXTRAS_FILE`
+ DEFCONFIG_EXTRAS_KERNEL_DIR=`dirname $DEFCONFIG_EXTRAS_DIR`
+ DEFCONFIG_EXTRAS_FILE_NAME=`basename $DEFCONFIG_EXTRAS_FILE`
+ DEFCONFIG_EXTRAS_FILE="$DEFCONFIG_EXTRAS_DIR/$DEFCONFIG_EXTRAS_FILE_NAME"
+ if [ ! -e "$DEFCONFIG_EXTRAS_FILE" ]; then
+ echo "Kernel fragments file $DEFCONFIG_EXTRAS_FILE does not exist/is not readable!"
+ usage
+ exit 1
+ fi
+ if [ ! -d "$DEFCONFIG_EXTRAS_DIR" ]; then
+ echo "Kernel fragments dir $DEFCONFIG_EXTRAS_DIR does not exist/is not a directory?"
+ usage
+ exit 1
+ fi
+ fi
+
+ # if just the appended config is provided
+ if [ -n "$APPENDED_CONFIG" ]; then
+ APPENDED_CONFIG_DIR=`dirname $APPENDED_CONFIG`
+ APPENDED_CONFIG_FILE_NAME=`basename $APPENDED_CONFIG`
+ APPENDED_CONFIG="$APPENDED_CONFIG_DIR/$APPENDED_CONFIG_FILE_NAME"
+ fi
+
+}
+
+set_working_directory()
+{
+ ORIGINAL_DIR=`pwd`
+ if [ "$ORIGINAL_DIR" != "$WORKING_PATH" ]; then
+ cd $WORKING_PATH
+ fi
+}
+
+set_original_directory()
+{
+ CURRENT_DIR=`pwd`
+ if [ "$CURRENT_DIR" != "$ORIGINAL_DIR" ]; then
+ cd $ORIGINAL_DIR
+ fi
+}
+
+cross_make()
+{
+ make -C$KERNEL_DIR -j$BUILD_THREADS ARCH=arm $*
+}
+
+usage()
+{
+cat << EOF
+This script will either take in a single defconfig fragment file or a
+file with multiple fragments defined. With either file the base defconfig
+will initially be built, copied to a working directory, and the kernels merge_config
+script will be called for each config file fragment. Each config file fragment will be appended
+to the base config and then the final output will be copied back to the kernels working
+directory.
+
+A copy of both the base config and the final config is stored in the scripts logging directory.
+
+Single fragment command line example:
+
+ defconfig_merge.sh -c <path to the compiler> -o <path to output log file>
+ -e <path to single fragment file> -w <path to the kernel directory>
+
+Multiple fragment file format:
+"use-kernel-config=" - Is required to be defined. This is the base defconfig
+that the config fragments will be appended to. This defconfig should be in the
+Linux kernel path in arch/arm/configs.
+
+ use-kernel-config= < defconfig base to start appending fragments >
+
+"config-fragment=" - Is required to be defined. There should be at least one
+entry per config fragment.
+
+ config-fragment= < path to the defconfig fragment file 1>
+
+Multiple fragment command line example:
+
+ defconfig_merge.sh -c <path to the compiler> -o <path to output log file>
+ -f <path to multiple fragment file> -w <path to the kernel directory>
+
+Example:
+use-kernel-config=omap2plus_defconfig
+config-fragment=ti_config_fragments/baseport.cfg
+config-fragment=ti_config_fragments/power.cfg
+config-fragment=ti_config_fragments/connectivity.cfg
+config-fragment=ti_config_fragments/ipc.cfg
+config-fragment=ti_config_fragments/audio_display.cfg
+config-fragment=ti_config_fragments/system_test.cfg
+
+
+OPTIONS:
+ Setup Options:
+ -c The path to the desired compiler
+ -d The defconfig to use as a base
+ -e Single defconfig fragment to append
+ -j How many build threads to use
+ -o Output log file
+ -l uImage load address if different from 0x80008000 for no load address use ""
+
+ Build Options:
+ -n Do not pre-build the defconfig just use the existing .config
+ -m MAKE the kernel, modules and dtb files based on the new config
+ -w Linux kernel directory
+
+ -f Path to file with multiple defconfig options
+
+EOF
+}
+
+while getopts “c:j:d:e:o:l:mnbf:w:” OPTION
+do
+ case $OPTION in
+ d)
+ DEFCONFIG=$OPTARG;;
+ e)
+ APPENDED_CONFIG=$OPTARG;;
+ c)
+ CROSS_COMPILE=$OPTARG;;
+ j)
+ BUILD_THREADS=$OPTARG;;
+ o)
+ OUT_LOG=$OPTARG;;
+ l)
+ LOAD_ADDR=$OPTARG;;
+ n)
+ NO_CLEAN_DEFCONFIG=1;;
+ m)
+ BUILD_ALL=1;;
+ f)
+ DEFCONFIG_EXTRAS_FILE=$OPTARG;;
+ w)
+ WORKING_PATH=$OPTARG;;
+ ?)
+ usage
+ exit;;
+ esac
+done
+
+setup_directories
+trap prepare_for_exit EXIT SIGINT SIGTERM
+
+
+if [ "$BUILD_ALL" == 1 -o "$NO_CLEAN_DEFCONFIG" != 1 ]; then
+ if [ -z "$CROSS_COMPILE" ]; then
+ echo "Missing cross compile"
+ usage
+ exit 1
+ fi
+fi
+
+if [ -z "$DEFCONFIG_EXTRAS_FILE" -a -z "$APPENDED_CONFIG" ]; then
+ echo "Missing config fragment information"
+ usage
+ exit 1
+fi
+
+
+if [ -z "$OUT_LOG" ]; then
+ echo "Missing output log path, dumping to /dev/null"
+ OUT_LOG=/dev/null
+fi
+
+set_working_directory
+
+LOGGING_DIRECTORY="$WORKING_PATH""/ti_config_fragments/""$LOGGING_DIRECTORY"
+if [ ! -d "$LOGGING_DIRETORY" ];then
+ echo -e "\n\tRemoving $LOGGING_DIRECTORY"
+ rm -rf $LOGGING_DIRECTORY
+fi
+
+echo -e "\n\tCreating $LOGGING_DIRECTORY for final configuration files\n"
+mkdir -p $LOGGING_DIRECTORY
+
+check_for_compiler
+if [ $? -ne 0 ]; then
+ echo -e "\n\tCannot find $CROSS_COMPILE compiler\n"
+ exit 1
+fi
+
+if [ -z "$DEFCONFIG" ];then
+ if [ -n "$DEFCONFIG_EXTRAS_FILE" ]; then
+ DEFCONFIG=`cat $DEFCONFIG_EXTRAS_FILE | grep "use-kernel-config=" | cut -d= -f2`
+ if [ -z "$DEFCONFIG" ]; then
+ echo -e "\n\tMissing base defconfig in the file\n"
+ usage
+ exit 1
+ fi
+ echo "Using base config $DEFCONFIG from the file $DEFCONFIG_EXTRAS_FILE"
+ else
+ echo "Missing a defconfig cannot proceed"
+ usage
+ exit 1
+ fi
+fi
+
+DEFCONFIG_EXTRAS="$LOGGING_DIRECTORY/merged_$DEFCONFIG"
+
+if [ "$NO_CLEAN_DEFCONFIG" != 1 ]; then
+ clean_the_build
+ build_the_defconfig
+ if [ $? -ne 0 ]; then
+ echo "Building $DEFCONFIG failed"
+ exit 1
+ fi
+else
+ if [ -e ".config" ]; then
+ echo "The .config shows it exists"
+ else
+ echo "The .config did not exist already"
+ exit 1
+ fi
+fi
+
+if [ -a .config ]; then
+ cp -v .config $LOGGING_DIRECTORY/base_config
+fi
+
+# There is only one file passed in via command line
+if [ -z "$DEFCONFIG_EXTRAS_FILE" ]; then
+ echo "Only appending $APPENDED_CONFIG"
+ $KERNEL_DIR/scripts/kconfig/merge_config.sh -m -r -O $LOGGING_DIRECTORY $LOGGING_DIRECTORY/base_config $APPENDED_CONFIG
+ if [ $? -ne 0 ]; then
+ echo "Failed to merge config $APPENDED_CONFIG"
+ exit 1
+ fi
+else
+ TEMP_FRAGMENT=`mktemp`
+ cat $DEFCONFIG_EXTRAS_FILE | grep "config-fragment=" | cut -d= -f2 > $TEMP_FRAGMENT
+ NUM_OF_FRAGMENTS=`wc -l $TEMP_FRAGMENT | awk '{print$1}'`
+ if [ -z "$NUM_OF_FRAGMENTS" ]; then
+ echo "Malformed defconfig fragment file"
+ rm $TEMP_FRAGMENT
+ exit 1
+ fi
+ cat $LOGGING_DIRECTORY/base_config > $LOGGING_DIRECTORY/temp_config
+ while read APPENDED_CONFIG
+ do
+ if [ -z "$APPENDED_CONFIG" ]; then
+ break
+ fi
+ if [ ! -r "$APPENDED_CONFIG" ]; then
+ # If not using absolute path, then assume we are relative to kernel dir
+ # of the defconfig_extras
+ APPENDED_CONFIG=$DEFCONFIG_EXTRAS_KERNEL_DIR/$APPENDED_CONFIG
+ fi
+ if [ ! -r "$APPENDED_CONFIG" ]; then
+ echo "Failed to find $APPENDED_CONFIG"
+ usage
+ exit 1
+ fi
+
+ $KERNEL_DIR/scripts/kconfig/merge_config.sh -m -r -O $LOGGING_DIRECTORY $LOGGING_DIRECTORY/temp_config $APPENDED_CONFIG
+ if [ $? -ne 0 ]; then
+ echo "Failed to merge config $APPENDED_CONFIG"
+ rm $TEMP_FRAGMENT
+ exit 1
+ fi
+ cat $APPENDED_CONFIG >> $DEFCONFIG_EXTRAS
+ cat $LOGGING_DIRECTORY/.config > $LOGGING_DIRECTORY/temp_config
+ done <$TEMP_FRAGMENT
+ rm $TEMP_FRAGMENT
+fi
+
+# The final defconfig to create
+NEW_DEFCONFIG="appended_$DEFCONFIG"
+
+# Last step before the build
+cat $LOGGING_DIRECTORY/.config > $LOGGING_DIRECTORY/final_config
+echo -e "\n\t Copying $LOGGING_DIRECTORY/.config to $KERNEL_DIR/.config"
+cp -v $LOGGING_DIRECTORY/.config $KERNEL_DIR/.config
+echo -e "\n\t Copying $LOGGING_DIRECTORY/.config to arch/arm/configs/$NEW_DEFCONFIG"
+cp -v $LOGGING_DIRECTORY/.config $KERNEL_DIR/arch/arm/configs/$NEW_DEFCONFIG
+
+if [ -a $LOGGING_DIRECTORY/temp_config ]; then
+ rm $LOGGING_DIRECTORY/temp_config
+fi
+
+if [ "$BUILD_ALL" == 1 ]; then
+ build_the_new_defconfig
+ if [ $? -ne 0 ]; then
+ echo "Building the defconfig failed"
+ exit 1
+ fi
+
+ build_the_kernel
+ if [ $? -ne 0 ]; then
+ echo "Building the kernel failed"
+ exit 1
+ fi
+
+ build_the_dtbs
+ if [ $? -ne 0 ]; then
+ echo "Building the device tree binaries failed"
+ exit 1
+ fi
+
+ build_the_modules
+ if [ $? -ne 0 ]; then
+ echo "Building the modules failed"
+ exit 1
+ fi
+fi
diff --git a/linux/ti_config_fragments/dra7_only.cfg b/linux/ti_config_fragments/dra7_only.cfg
new file mode 100644
index 00000000..8fef42ac
--- /dev/null
+++ b/linux/ti_config_fragments/dra7_only.cfg
@@ -0,0 +1,23 @@
+##################################################
+# TI DRA7 specific config options
+##################################################
+
+# Supported ARM CPUs
+CONFIG_ARCH_MULTI_V6=n
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_MULTI_V6_V7=n
+CONFIG_CPU_V6=n
+
+# Enable CONFIG_SMP
+CONFIG_SMP=y
+
+# Disable Socs other than DRA7
+CONFIG_ARCH_OMAP2=n
+CONFIG_ARCH_OMAP3=n
+CONFIG_ARCH_OMAP4=n
+CONFIG_SOC_OMAP5=n
+CONFIG_SOC_AM33XX=n
+CONFIG_SOC_AM43XX=n
+CONFIG_SOC_DRA7XX=y
+
+CONFIG_ARM_LPAE=y
diff --git a/linux/ti_config_fragments/ipc.cfg b/linux/ti_config_fragments/ipc.cfg
new file mode 100644
index 00000000..0324447a
--- /dev/null
+++ b/linux/ti_config_fragments/ipc.cfg
@@ -0,0 +1,27 @@
+##################################################
+# TI RPMsg/IPC Config Options
+##################################################
+# HwSpinLock
+CONFIG_HWSPINLOCK_OMAP=y
+
+# Mailbox
+CONFIG_OMAP2PLUS_MBOX=y
+
+# IOMMU
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_OMAP_IOMMU=y
+CONFIG_OMAP_IOMMU_DEBUG=y
+
+# Remoteproc
+CONFIG_OMAP_REMOTEPROC=m
+CONFIG_OMAP_REMOTEPROC_WATCHDOG=y
+CONFIG_KEYSTONE_REMOTEPROC=m
+
+# DSP Memory Mapper for MPM
+CONFIG_KEYSTONE_DSP_MEM=m
+
+# RPMsg
+CONFIG_RPMSG_RPC=m
+
+# UIO Module
+CONFIG_UIO=m
diff --git a/linux/ti_config_fragments/multi_core_defconfig_fragment b/linux/ti_config_fragments/multi_core_defconfig_fragment
new file mode 100644
index 00000000..35daa098
--- /dev/null
+++ b/linux/ti_config_fragments/multi_core_defconfig_fragment
@@ -0,0 +1,4 @@
+use-kernel-config=keystone_defconfig
+config-fragment=ti_config_fragments/connectivity.cfg
+config-fragment=ti_config_fragments/baseport.cfg
+config-fragment=ti_config_fragments/ipc.cfg
diff --git a/linux/ti_config_fragments/multi_core_system_test_defconfig_fragment b/linux/ti_config_fragments/multi_core_system_test_defconfig_fragment
new file mode 100644
index 00000000..fc15feb8
--- /dev/null
+++ b/linux/ti_config_fragments/multi_core_system_test_defconfig_fragment
@@ -0,0 +1,3 @@
+use-kernel-config=keystone_defconfig
+config-fragment=ti_config_fragments/debug_options.cfg
+config-fragment=ti_config_fragments/system_test.cfg
diff --git a/linux/ti_config_fragments/system_test.cfg b/linux/ti_config_fragments/system_test.cfg
new file mode 100644
index 00000000..9b2cad23
--- /dev/null
+++ b/linux/ti_config_fragments/system_test.cfg
@@ -0,0 +1,24 @@
+##################################################
+# TI System Test config options
+##################################################
+CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=n
+CONFIG_CRYPTO_TEST=m
+CONFIG_RTC_DEBUG=y
+CONFIG_THERMAL_EMULATION=y
+# Enable Devfreq for co-processor driver testing
+CONFIG_PM_DEVFREQ=y
+CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
+CONFIG_DEVFREQ_GOV_PERFORMANCE=y
+CONFIG_DEVFREQ_GOV_POWERSAVE=y
+CONFIG_DEVFREQ_GOV_USERSPACE=y
+
+# OMAP5 EVM ETHERNET
+CONFIG_USB_USBNET=y
+CONFIG_USB_NET_DRIVERS=y
+CONFIG_USB_NET_SMSC95XX=y
+
+# OMAP5 EVM USB HOST
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_PCI=y
+CONFIG_USB_EHCI_HCD_OMAP=y
diff --git a/linux/ti_config_fragments/system_test_defconfig_fragment b/linux/ti_config_fragments/system_test_defconfig_fragment
new file mode 100644
index 00000000..830d3fe3
--- /dev/null
+++ b/linux/ti_config_fragments/system_test_defconfig_fragment
@@ -0,0 +1,8 @@
+use-kernel-config=omap2plus_defconfig
+config-fragment=ti_config_fragments/audio_display.cfg
+config-fragment=ti_config_fragments/ipc.cfg
+config-fragment=ti_config_fragments/baseport.cfg
+config-fragment=ti_config_fragments/connectivity.cfg
+config-fragment=ti_config_fragments/wlan.cfg
+config-fragment=ti_config_fragments/debug_options.cfg
+config-fragment=ti_config_fragments/system_test.cfg
diff --git a/linux/ti_config_fragments/wlan.cfg b/linux/ti_config_fragments/wlan.cfg
new file mode 100644
index 00000000..96c1ad8e
--- /dev/null
+++ b/linux/ti_config_fragments/wlan.cfg
@@ -0,0 +1,7 @@
+##################################################
+# TI Bluetooth/WLAN Configs
+##################################################
+
+# Bluetooth
+CONFIG_TI_ST=m
+CONFIG_BT_WILINK=m