zaius: enable distro feature to support MAC2
Enable the distro feature phosphor-aspeednic-use-mac2
to support MAC2
This solution is not desirable but it works for now,
For details please refer to
https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/23415
Noted that this changed local.conf.sample, which means you need to
modify the build/conf/local.conf accordingly
Tested: devtool modify u-boot and saw the aspeednic patch is applied.
Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I5f3ce68328baef143c319269c7065749664519f4
diff --git a/meta-zaius/conf/distro/openbmc-zaius.conf b/meta-zaius/conf/distro/openbmc-zaius.conf
new file mode 100644
index 0000000..854e0fb
--- /dev/null
+++ b/meta-zaius/conf/distro/openbmc-zaius.conf
@@ -0,0 +1,2 @@
+require conf/distro/openbmc-openpower.conf
+require conf/distro/include/phosphor-aspeednic-use-mac2.inc
diff --git a/meta-zaius/conf/local.conf.sample b/meta-zaius/conf/local.conf.sample
index c7ccc92..d09389e 100644
--- a/meta-zaius/conf/local.conf.sample
+++ b/meta-zaius/conf/local.conf.sample
@@ -1,5 +1,5 @@
MACHINE ??= "zaius"
-DISTRO ?= "openbmc-openpower"
+DISTRO ?= "openbmc-zaius"
PACKAGE_CLASSES ?= "package_rpm"
SANITY_TESTED_DISTROS_append ?= " *"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
diff --git a/meta-zaius/recipes-bsp/u-boot/u-boot-aspeed/0002-board-aspeed-aspeednic-Use-MAC2-for-networking.patch b/meta-zaius/recipes-bsp/u-boot/u-boot-aspeed/0002-board-aspeed-aspeednic-Use-MAC2-for-networking.patch
deleted file mode 100644
index 2de2d82..0000000
--- a/meta-zaius/recipes-bsp/u-boot/u-boot-aspeed/0002-board-aspeed-aspeednic-Use-MAC2-for-networking.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From cbb09e400a5283e5b543e2b01b8c0038890a5260 Mon Sep 17 00:00:00 2001
-From: Xo Wang <xow@google.com>
-Date: Thu, 20 Oct 2016 17:42:13 -0700
-Subject: [PATCH 2/2] board/aspeed, aspeednic: Use MAC2 for networking
-
-Enable and select MAC2 for aspeednic.
-
-Signed-off-by: Xo Wang <xow@google.com>
----
- drivers/net/aspeednic.c | 4 ++--
- include/configs/ast-g5-ncsi.h | 1 +
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c
-index 8b85893..cff8370 100644
---- a/drivers/net/aspeednic.c
-+++ b/drivers/net/aspeednic.c
-@@ -18,8 +18,8 @@
- /* From the board config file */
- #define CONFIG_MAC1_PHY_SETTING 2
- #define CONFIG_MAC2_PHY_SETTING 0
--#define CONFIG_ASPEED_MAC_NUMBER 1
--#define CONFIG_ASPEED_MAC_CONFIG 1 // config MAC1
-+#define CONFIG_ASPEED_MAC_NUMBER 2
-+#define CONFIG_ASPEED_MAC_CONFIG 2 // config MAC2
- #define _PHY_SETTING_CONCAT(mac) CONFIG_MAC##mac##_PHY_SETTING
- #define _GET_MAC_PHY_SETTING(mac) _PHY_SETTING_CONCAT(mac)
- #define CONFIG_ASPEED_MAC_PHY_SETTING \
-diff --git a/include/configs/ast-g5-ncsi.h b/include/configs/ast-g5-ncsi.h
-index f73a8f1..1408618 100644
---- a/include/configs/ast-g5-ncsi.h
-+++ b/include/configs/ast-g5-ncsi.h
-@@ -22,6 +22,7 @@
- /* Ethernet */
- #define CONFIG_LIB_RAND
- #define CONFIG_ASPEEDNIC
-+#define CONFIG_MAC2_ENABLE
-
- /* platform.S settings */
- #define CONFIG_DRAM_ECC_SIZE 0x10000000
---
-2.8.0.rc3.226.g39d4020
-
diff --git a/meta-zaius/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend b/meta-zaius/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
index 1686be0..ddd2ff8 100644
--- a/meta-zaius/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
+++ b/meta-zaius/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
@@ -1,3 +1,2 @@
FILESEXTRAPATHS_prepend_zaius := "${THISDIR}/${PN}:"
-SRC_URI_append_zaius = " file://0001-board-aspeed-Add-reset_phy-for-Zaius.patch \
- file://0002-board-aspeed-aspeednic-Use-MAC2-for-networking.patch"
+SRC_URI_append_zaius = " file://0001-board-aspeed-Add-reset_phy-for-Zaius.patch"