diff --git a/Makefile b/Makefile index 59b55e29d13e..d71493885648 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,11 @@ CONFIGURED_ARCH ?= amd64 LINUX_HEADER_COMMON = linux-headers-$(KVERSION_SHORT)-common_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_all.deb LINUX_HEADER_AMD64 = linux-headers-$(KVERSION)_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_$(CONFIGURED_ARCH).deb -LINUX_IMAGE = linux-image-$(KVERSION)-unsigned_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_$(CONFIGURED_ARCH).deb +ifeq ($(CONFIGURED_ARCH), armhf) + LINUX_IMAGE = linux-image-$(KVERSION)_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_$(CONFIGURED_ARCH).deb +else + LINUX_IMAGE = linux-image-$(KVERSION)-unsigned_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_$(CONFIGURED_ARCH).deb +endif MAIN_TARGET = $(LINUX_HEADER_COMMON) DERIVED_TARGETS = $(LINUX_HEADER_AMD64) $(LINUX_IMAGE) @@ -95,7 +99,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Optionally add/remove kernel options if [ -f ../manage-config ]; then - ../manage-config $(CONFIGURED_ARCH) + ../manage-config $(CONFIGURED_ARCH) $(CONFIGURED_PLATFORM) fi # Building a custom kernel from Debian kernel source diff --git a/manage-config b/manage-config index 60a101cdd607..1d26574e1380 100755 --- a/manage-config +++ b/manage-config @@ -25,9 +25,13 @@ # Configuration file to change ARCH=amd64 -if [ $# = 1 ]; then +PLATFORM= +if [ $# -ge 1 ]; then ARCH=$1 fi +if [ $# -ge 2 ]; then + PLATFORM=$2 +fi case "$ARCH" in amd64) CONFIG_FILE_LOC=debian/build/build_amd64_none_amd64 @@ -61,7 +65,7 @@ if [ -e ${exclusion_file} -o -e ${inclusion_file} ]; then # Process any exclusions in the kernel if [ -f ${exclusion_file} ]; then - exclusion_opts=$(get_section_opts ${exclusion_file} "common" ${ARCH}) + exclusion_opts=$(get_section_opts ${exclusion_file} "common" ${ARCH} ${PLATFORM}) while read -r opt; do if [ ! -z "$opt" ] && [[ ! "$opt" =~ ^#.* ]]; then scripts/config --file ${CONFIG_FILE} -d $opt @@ -71,7 +75,7 @@ if [ -e ${exclusion_file} -o -e ${inclusion_file} ]; then # Process any inclusions in the kernel if [ -f ${inclusion_file} ]; then - inclusion_opts=$(get_section_opts ${inclusion_file} "common" ${ARCH}) + inclusion_opts=$(get_section_opts ${inclusion_file} "common" ${ARCH} ${PLATFORM}) while read -r opt; do if [ ! -z "$opt" ] && [[ ! "$opt" =~ ^#.* ]]; then echo $opt >> ${CONFIG_FILE} diff --git a/patch/0001-arm64-default-config-for-sonic-patches.patch b/patch/0001-arm64-default-config-for-sonic-patches.patch deleted file mode 100644 index de1652e0af77..000000000000 --- a/patch/0001-arm64-default-config-for-sonic-patches.patch +++ /dev/null @@ -1,74 +0,0 @@ -From adf767005a35a2afeb8006c1023633af4de9d78e Mon Sep 17 00:00:00 2001 -From: Antony Rheneus -Date: Thu, 17 Oct 2019 18:31:57 +0530 -Subject: [PATCH] arm64 default config for sonic patches - ---- - debian/build/build_arm64_none_arm64/.config | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/debian/build/build_arm64_none_arm64/.config b/debian/build/build_arm64_none_arm64/.config -index 0ce4748..be5b136 100644 ---- a/debian/build/build_arm64_none_arm64/.config -+++ b/debian/build/build_arm64_none_arm64/.config -@@ -1247,6 +1247,7 @@ CONFIG_NET_ACT_POLICE=m - CONFIG_NET_ACT_GACT=m - CONFIG_GACT_PROB=y - CONFIG_NET_ACT_MIRRED=m -+# CONFIG_NET_ACT_SAMPLE is not set - CONFIG_NET_ACT_IPT=m - CONFIG_NET_ACT_NAT=m - CONFIG_NET_ACT_PEDIT=m -@@ -1289,6 +1290,7 @@ CONFIG_MPLS_IPTUNNEL=m - # CONFIG_HSR is not set - # CONFIG_NET_SWITCHDEV is not set - CONFIG_NET_L3_MASTER_DEV=y -+# CONFIG_CGROUP_L3MDEV is not set - # CONFIG_QRTR is not set - # CONFIG_NET_NCSI is not set - CONFIG_RPS=y -@@ -1472,6 +1474,7 @@ CONFIG_NFC_PN533=m - CONFIG_NFC_PN533_USB=m - # CONFIG_NFC_PN533_I2C is not set - # CONFIG_NFC_ST95HF is not set -+# CONFIG_PSAMPLE is not set - CONFIG_LWTUNNEL=y - CONFIG_DST_CACHE=y - CONFIG_NET_DEVLINK=m -@@ -1721,6 +1724,8 @@ CONFIG_EEPROM_LEGACY=m - CONFIG_EEPROM_MAX6875=m - CONFIG_EEPROM_93CX6=m - # CONFIG_EEPROM_93XX46 is not set -+# CONFIG_EEPROM_SFF_8436 is not set -+# CONFIG_EEPROM_OPTOE is not set - CONFIG_CB710_CORE=m - # CONFIG_CB710_DEBUG is not set - CONFIG_CB710_DEBUG_ASSUMPTIONS=y -@@ -2999,6 +3004,7 @@ CONFIG_I2C_MUX=m - # CONFIG_I2C_MUX_PINCTRL is not set - # CONFIG_I2C_MUX_REG is not set - # CONFIG_I2C_DEMUX_PINCTRL is not set -+# CONFIG_I2C_MUX_MLXCPLD is not set - CONFIG_I2C_HELPER_AUTO=y - CONFIG_I2C_SMBUS=m - CONFIG_I2C_ALGOBIT=m -@@ -3386,6 +3392,7 @@ CONFIG_SENSORS_MAX1668=m - CONFIG_SENSORS_MAX6639=m - CONFIG_SENSORS_MAX6642=m - CONFIG_SENSORS_MAX6650=m -+# CONFIG_SENSORS_MAX6620 is not set - # CONFIG_SENSORS_MAX6697 is not set - # CONFIG_SENSORS_MAX31790 is not set - # CONFIG_SENSORS_MCP3021 is not set -@@ -5397,6 +5404,8 @@ CONFIG_LEDS_LT3593=m - # - # CONFIG_LEDS_BLINKM is not set - # CONFIG_LEDS_SYSCON is not set -+# CONFIG_LEDS_MLXREG is not set -+# CONFIG_LEDS_USER is not set - - # - # LED Triggers --- -2.7.4 - diff --git a/patch/0001-armhf-default-config-for-the-sonic-patches.patch b/patch/0001-armhf-default-config-for-the-sonic-patches.patch deleted file mode 100644 index 9f51f22c1124..000000000000 --- a/patch/0001-armhf-default-config-for-the-sonic-patches.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 3a09f684413faf1c4f7d21d7d79914b54e087cf6 Mon Sep 17 00:00:00 2001 -From: Antony Rheneus -Date: Thu, 17 Oct 2019 10:48:29 +0530 -Subject: [PATCH] armhf default config for the sonic patches - ---- - debian/build/build_armhf_none_armmp/.config | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/debian/build/build_armhf_none_armmp/.config b/debian/build/build_armhf_none_armmp/.config -index 8f02d03..32a2698 100644 ---- a/debian/build/build_armhf_none_armmp/.config -+++ b/debian/build/build_armhf_none_armmp/.config -@@ -1501,6 +1501,7 @@ CONFIG_NET_ACT_POLICE=m - CONFIG_NET_ACT_GACT=m - CONFIG_GACT_PROB=y - CONFIG_NET_ACT_MIRRED=m -+# CONFIG_NET_ACT_SAMPLE is not set - CONFIG_NET_ACT_IPT=m - CONFIG_NET_ACT_NAT=m - CONFIG_NET_ACT_PEDIT=m -@@ -1543,6 +1544,7 @@ CONFIG_MPLS_IPTUNNEL=m - # CONFIG_HSR is not set - CONFIG_NET_SWITCHDEV=y - CONFIG_NET_L3_MASTER_DEV=y -+# CONFIG_CGROUP_L3MDEV is not set - # CONFIG_NET_NCSI is not set - CONFIG_RPS=y - CONFIG_RFS_ACCEL=y -@@ -1716,6 +1718,7 @@ CONFIG_NFC_PN533=m - CONFIG_NFC_PN533_USB=m - # CONFIG_NFC_PN533_I2C is not set - # CONFIG_NFC_ST95HF is not set -+# CONFIG_PSAMPLE is not set - CONFIG_LWTUNNEL=y - CONFIG_DST_CACHE=y - CONFIG_NET_DEVLINK=m -@@ -2010,6 +2013,8 @@ CONFIG_EEPROM_LEGACY=m - CONFIG_EEPROM_MAX6875=m - CONFIG_EEPROM_93CX6=m - # CONFIG_EEPROM_93XX46 is not set -+# CONFIG_EEPROM_SFF_8436 is not set -+# CONFIG_EEPROM_OPTOE is not set - CONFIG_CB710_CORE=m - # CONFIG_CB710_DEBUG is not set - CONFIG_CB710_DEBUG_ASSUMPTIONS=y -@@ -3385,6 +3390,7 @@ CONFIG_I2C_MUX_PCA954x=m - # CONFIG_I2C_MUX_PINCTRL is not set - # CONFIG_I2C_MUX_REG is not set - # CONFIG_I2C_DEMUX_PINCTRL is not set -+# CONFIG_I2C_MUX_MLXCPLD is not set - CONFIG_I2C_HELPER_AUTO=y - CONFIG_I2C_ALGOBIT=y - CONFIG_I2C_ALGOPCA=m -@@ -3818,6 +3824,7 @@ CONFIG_SENSORS_MAX1668=m - CONFIG_SENSORS_MAX6639=m - CONFIG_SENSORS_MAX6642=m - CONFIG_SENSORS_MAX6650=m -+# CONFIG_SENSORS_MAX6620 is not set - # CONFIG_SENSORS_MAX6697 is not set - # CONFIG_SENSORS_MAX31790 is not set - # CONFIG_SENSORS_MCP3021 is not set -@@ -6031,6 +6038,8 @@ CONFIG_LEDS_TCA6507=m - # - # CONFIG_LEDS_BLINKM is not set - # CONFIG_LEDS_SYSCON is not set -+# CONFIG_LEDS_MLXREG is not set -+# CONFIG_LEDS_USER is not set - - # - # LED Triggers -@@ -6434,6 +6443,7 @@ CONFIG_SPEAKUP_SYNTH_DUMMY=m - CONFIG_CHROME_PLATFORMS=y - # CONFIG_CROS_EC_CHARDEV is not set - CONFIG_CROS_EC_PROTO=y -+# CONFIG_MELLANOX_PLATFORM is not set - CONFIG_CLKDEV_LOOKUP=y - CONFIG_HAVE_CLK_PREPARE=y - CONFIG_COMMON_CLK=y --- -2.7.4 - diff --git a/patch/0042-Marvell-a385-Micron-4G-flash-support.patch b/patch/0042-Marvell-a385-Micron-4G-flash-support.patch deleted file mode 100644 index b6724c579a21..000000000000 --- a/patch/0042-Marvell-a385-Micron-4G-flash-support.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 5e248248ac5be0541cacb45b2b4d05df3741c2c6 Mon Sep 17 00:00:00 2001 -From: gilt -Date: Mon, 22 Jul 2019 13:44:06 +0300 -Subject: [PATCH 1/4] Micron 4G flash support - -Change-Id: Ib4dd7094920c124c213f6b3c81140845e5baa084 ---- - drivers/mtd/nand/pxa3xx_nand.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c -index 3b8911c..98e9a34 100644 ---- a/drivers/mtd/nand/pxa3xx_nand.c -+++ b/drivers/mtd/nand/pxa3xx_nand.c -@@ -1638,7 +1638,22 @@ static int pxa_ecc_init(struct pxa3xx_nand_info *info, - ecc->size = info->chunk_size; - mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops); - ecc->strength = 16; -- } else { -+ } -+ else if (strength == 8 && ecc_stepsize == 512 && page_size == 8192) { -+ info->ecc_bch = 1; -+ info->nfullchunks = 8; -+ info->ntotalchunks = 9; -+ info->chunk_size = 1024; -+ info->spare_size = 0; -+ info->last_chunk_size = 0; -+ info->last_spare_size = 160; -+ info->ecc_size = 32; -+ ecc->mode = NAND_ECC_HW; -+ ecc->size = info->chunk_size; -+ mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops); -+ ecc->strength = 16; -+ } -+ else { - dev_err(&info->pdev->dev, - "ECC strength %d at page size %d is not supported\n", - strength, page_size); --- -2.6.3 - diff --git a/patch/0042-armhf-additional-configs.patch b/patch/0042-armhf-additional-configs.patch deleted file mode 100644 index d9bbcc89f195..000000000000 --- a/patch/0042-armhf-additional-configs.patch +++ /dev/null @@ -1,89 +0,0 @@ -From a961464da6c88aee4d94af4038c748a1e8a1f412 Mon Sep 17 00:00:00 2001 -From: Antony Rheneus -Date: Thu, 17 Oct 2019 18:57:48 +0530 -Subject: [PATCH] armhf mandatory configs for boot - ---- - debian/build/build_armhf_none_armmp/.config | 53 ++++++++++++++++------------- - 1 file changed, 30 insertions(+), 23 deletions(-) - -diff --git a/debian/build/build_armhf_none_armmp/.config b/debian/build/build_armhf_none_armmp/.config -index e997934..69288eb 100644 ---- a/debian/build/build_armhf_none_armmp/.config -+++ b/debian/build/build_armhf_none_armmp/.config -@@ -1793,16 +1793,16 @@ CONFIG_PROC_EVENTS=y - CONFIG_MTD=y - # CONFIG_MTD_TESTS is not set - # CONFIG_MTD_REDBOOT_PARTS is not set --# CONFIG_MTD_CMDLINE_PARTS is not set -+CONFIG_MTD_CMDLINE_PARTS=y - # CONFIG_MTD_AFS_PARTS is not set --CONFIG_MTD_OF_PARTS=m --CONFIG_MTD_AR7_PARTS=m -+CONFIG_MTD_OF_PARTS=y -+CONFIG_MTD_AR7_PARTS=y - - # - # User Modules And Translation Layers - # --CONFIG_MTD_BLKDEVS=m --CONFIG_MTD_BLOCK=m -+CONFIG_MTD_BLKDEVS=y -+CONFIG_MTD_BLOCK=y - CONFIG_MTD_BLOCK_RO=m - # CONFIG_FTL is not set - # CONFIG_NFTL is not set -@@ -1817,8 +1817,10 @@ CONFIG_MTD_SWAP=m - # - # RAM/ROM/Flash chip drivers - # --# CONFIG_MTD_CFI is not set -+CONFIG_MTD_CFI=y - # CONFIG_MTD_JEDECPROBE is not set -+CONFIG_MTD_GEN_PROBE=y -+# CONFIG_MTD_CFI_ADV_OPTIONS is not set - CONFIG_MTD_MAP_BANK_WIDTH_1=y - CONFIG_MTD_MAP_BANK_WIDTH_2=y - CONFIG_MTD_MAP_BANK_WIDTH_4=y -@@ -1829,6 +1831,10 @@ CONFIG_MTD_CFI_I1=y - CONFIG_MTD_CFI_I2=y - # CONFIG_MTD_CFI_I4 is not set - # CONFIG_MTD_CFI_I8 is not set -+CONFIG_MTD_CFI_INTELEXT=y -+CONFIG_MTD_CFI_AMDSTD=y -+CONFIG_MTD_CFI_STAA=y -+CONFIG_MTD_CFI_UTIL=y - CONFIG_MTD_RAM=m - # CONFIG_MTD_ROM is not set - # CONFIG_MTD_ABSENT is not set -@@ -1850,8 +1856,8 @@ CONFIG_MTD_PLATRAM=m - CONFIG_MTD_DATAFLASH=m - # CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set - # CONFIG_MTD_DATAFLASH_OTP is not set --CONFIG_MTD_M25P80=m --CONFIG_MTD_SST25L=m -+CONFIG_MTD_M25P80=y -+CONFIG_MTD_SST25L=y - # CONFIG_MTD_SLRAM is not set - # CONFIG_MTD_PHRAM is not set - # CONFIG_MTD_MTDRAM is not set -@@ -1878,7 +1884,7 @@ CONFIG_MTD_NAND_RICOH=m - # CONFIG_MTD_NAND_DISKONCHIP is not set - # CONFIG_MTD_NAND_DOCG4 is not set - CONFIG_MTD_NAND_CAFE=m --CONFIG_MTD_NAND_PXA3xx=m -+CONFIG_MTD_NAND_PXA3xx=y - CONFIG_MTD_NAND_NANDSIM=m - CONFIG_MTD_NAND_GPMI_NAND=m - # CONFIG_MTD_NAND_BRCMNAND is not set -@@ -3824,7 +3830,7 @@ CONFIG_SENSORS_MAX1668=m - CONFIG_SENSORS_MAX6639=m - CONFIG_SENSORS_MAX6642=m - CONFIG_SENSORS_MAX6650=m --# CONFIG_SENSORS_MAX6620 is not set -+CONFIG_SENSORS_MAX6620=m - # CONFIG_SENSORS_MAX6697 is not set - # CONFIG_SENSORS_MAX31790 is not set - # CONFIG_SENSORS_MCP3021 is not set -2.7.4 - diff --git a/patch/0042-armhf-proc-dma-kconfig.patch b/patch/0042-armhf-proc-dma-kconfig.patch deleted file mode 100644 index 16abf2226452..000000000000 --- a/patch/0042-armhf-proc-dma-kconfig.patch +++ /dev/null @@ -1,22 +0,0 @@ -From b8d69b46ddc0f78d2965e426da48082202d030a3 Mon Nov 19 00:00:00 2001 -From: Antony Rheneus -Date: Tue, 19 Nov 2019 15:45:07 +0530 -Subject: [PATCH] armhf proc dma Kconfig - ---- - arch/arm/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 32a2698..d50fff8 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -219,7 +219,7 @@ - bool - - config GENERIC_ISA_DMA -- bool -+ def_bool y - - config FIQ - bool diff --git a/patch/kconfig-exclusions b/patch/kconfig-exclusions index 4e639729d68b..de35a6940c3f 100644 --- a/patch/kconfig-exclusions +++ b/patch/kconfig-exclusions @@ -10,3 +10,31 @@ CONFIG_MLXSW_PCI [arm64] [armhf] + +[marvell-armhf] +CONFIG_ARCH_VIRT +CONFIG_ARCH_BCM +CONFIG_ARCH_EXYNOS +CONFIG_ARCH_HIGHBANK +CONFIG_ARCH_MXC +CONFIG_ARCH_MESON +CONFIG_ARCH_OMAP3 +CONFIG_ARCH_OMAP4 +CONFIG_SOC_OMAP5 +CONFIG_SOC_AM33XX +CONFIG_SOC_DRA7XX +CONFIG_ARCH_ROCKCHIP +CONFIG_ARCH_SOCFPGA +CONFIG_ARCH_SUNXI +CONFIG_ARCH_TEGRA +CONFIG_ARCH_VEXPRESS +CONFIG_ARCH_WM8850 +CONFIG_FW_CFG_SYSFS +CONFIG_VORTEX +CONFIG_NTP_PPS +CONFIG_SENSORS_MAX6620 +CONFIG_SND_LX6464ES +CONFIG_EFI +CONFIG_LOCK_DOWN_KERNEL +CONFIG_SECONDARY_TRUSTED_KEYRING +CONFIG_SYSTEM_BLACKLIST_KEYRING diff --git a/patch/kconfig-inclusions b/patch/kconfig-inclusions index a71af234438a..c7fb4de6c5f3 100644 --- a/patch/kconfig-inclusions +++ b/patch/kconfig-inclusions @@ -58,5 +58,11 @@ CONFIG_MAX1363=m [arm64] [armhf] +CONFIG_EEPROM_SFF_8436=m +CONFIG_EEPROM_OPTOE=m +CONFIG_I2C_MUX_GPIO=m - +[marvell-armhf] +CONFIG_ARCH_NR_GPIO=0 +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_OF_PARTS=y diff --git a/patch/series b/patch/series index 132077f7d5ee..32f66c8fc1a8 100755 --- a/patch/series +++ b/patch/series @@ -1,7 +1,4 @@ # This series applies on GIT commit 18c5597832fcf6988111b05a9a1607ae148723c -# (Marvell) -# 0001-armhf-default-config-for-the-sonic-patches.patch -# 0001-arm64-default-config-for-sonic-patches.patch driver-arista-net-tg3-dma-mask-4g-sb800.patch driver-arista-net-tg3-disallow-broadcom-default-mac.patch @@ -39,11 +36,6 @@ e1000-Do-not-perform-reset-in-reset_task-if-we-are-a.patch macsec-Support-XPN-frame-handling-IEEE-802.1AEbw.patch netlink-add-NLA_MIN_LEN.patch macsec-Netlink-support-of-XPN-cipher-suites-IEEE-802.patch -# -# (Marvell) -# 0042-Marvell-a385-Micron-4G-flash-support.patch -# 0042-armhf-additional-configs.patch -# 0042-armhf-proc-dma-kconfig.patch Support-for-fullcone-nat.patch driver-ixgbe-external-phy.patch #