Move platform-specific hardware plugin base packages to sonic-platform-common submodule (#1301)
This commit is contained in:
parent
6cd307920f
commit
134707f822
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -50,6 +50,9 @@
|
||||
[submodule "platform/broadcom/sonic-platform-modules-ingrasys"]
|
||||
path = platform/broadcom/sonic-platform-modules-ingrasys
|
||||
url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys
|
||||
[submodule "src/sonic-platform-common"]
|
||||
path = src/sonic-platform-common
|
||||
url = https://github.com/Azure/sonic-platform-common
|
||||
[submodule "src/sonic-platform-daemons"]
|
||||
path = src/sonic-platform-daemons
|
||||
url = https://github.com/Azure/sonic-platform-daemons
|
||||
|
@ -7,7 +7,7 @@ COPY [ \
|
||||
"/debs/"]
|
||||
|
||||
# Install Python SwSSSDK (SNMP subagent dependency)
|
||||
COPY python-wheels/sonic_utilities-*-py3-*.whl /python-wheels/
|
||||
COPY python-wheels/sonic_platform_common-*-py3-*.whl /python-wheels/
|
||||
COPY python-wheels/swsssdk-*-py3-*.whl /python-wheels/
|
||||
COPY python-wheels/asyncsnmp-*-py3-*.whl /python-wheels/
|
||||
|
||||
|
@ -77,6 +77,12 @@ sudo cp {{swsssdk_py2_wheel_path}} $FILESYSTEM_ROOT/$SWSSSDK_PY2_WHEEL_NAME
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install $SWSSSDK_PY2_WHEEL_NAME
|
||||
sudo rm -rf $FILESYSTEM_ROOT/$SWSSSDK_PY2_WHEEL_NAME
|
||||
|
||||
# Install sonic-platform-common Python 2 package
|
||||
PLATFORM_COMMON_PY2_WHEEL_NAME=$(basename {{platform_common_py2_wheel_path}})
|
||||
sudo cp {{platform_common_py2_wheel_path}} $FILESYSTEM_ROOT/$PLATFORM_COMMON_PY2_WHEEL_NAME
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install $PLATFORM_COMMON_PY2_WHEEL_NAME
|
||||
sudo rm -rf $FILESYSTEM_ROOT/$PLATFORM_COMMON_PY2_WHEEL_NAME
|
||||
|
||||
# Install SONiC Utilities (and its dependencies via 'apt-get -y install -f')
|
||||
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/python-sonic-utilities_*.deb || \
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
|
||||
|
@ -3,11 +3,11 @@
|
||||
DOCKER_SONIC_P4 = docker-sonic-p4.gz
|
||||
$(DOCKER_SONIC_P4)_PATH = $(PLATFORM_PATH)/docker-sonic-p4
|
||||
$(DOCKER_SONIC_P4)_DEPENDS += $(SWSS) \
|
||||
$(SYNCD) \
|
||||
$(P4_SWITCH) \
|
||||
$(REDIS_SERVER) \
|
||||
$(REDIS_TOOLS) \
|
||||
$(PYTHON_SWSSCOMMON) \
|
||||
$(SYNCD) \
|
||||
$(P4_SWITCH) \
|
||||
$(REDIS_SERVER) \
|
||||
$(REDIS_TOOLS) \
|
||||
$(PYTHON_SWSSCOMMON) \
|
||||
$(LIBTEAMDCT) \
|
||||
$(LIBTEAM_UTILS) \
|
||||
$(SONIC_DEVICE_DATA) \
|
||||
|
@ -3,6 +3,6 @@
|
||||
ASYNCSNMP_PY3 = asyncsnmp-2.1.0-py3-none-any.whl
|
||||
$(ASYNCSNMP_PY3)_SRC_PATH = $(SRC_PATH)/sonic-snmpagent
|
||||
$(ASYNCSNMP_PY3)_PYTHON_VERSION = 3
|
||||
# Depends on sonic-utilities so it is possible to import sonic_psu
|
||||
$(ASYNCSNMP_PY3)_DEPENDS += $(SWSSSDK_PY3) $(SONIC_UTILS_PY3)
|
||||
# Depends on sonic-platform-common so it is possible to import sonic_psu
|
||||
$(ASYNCSNMP_PY3)_DEPENDS += $(SWSSSDK_PY3) $(SONIC_PLATFORM_COMMON_PY3)
|
||||
SONIC_PYTHON_WHEELS += $(ASYNCSNMP_PY3)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# sonic-ledd (SONiC Front-panel LED control daemon) Debian package
|
||||
|
||||
SONIC_LEDD = python-sonic-ledd_1.0-1_all.deb
|
||||
SONIC_LEDD = python-sonic-ledd_1.1-1_all.deb
|
||||
$(SONIC_LEDD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-ledd
|
||||
SONIC_PYTHON_STDEB_DEBS += $(SONIC_LEDD)
|
||||
|
13
rules/sonic-platform-common.mk
Normal file
13
rules/sonic-platform-common.mk
Normal file
@ -0,0 +1,13 @@
|
||||
# sonic-platform-common package
|
||||
|
||||
SONIC_PLATFORM_COMMON_PY2 = sonic_platform_common-1.0-py2-none-any.whl
|
||||
$(SONIC_PLATFORM_COMMON_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-common
|
||||
$(SONIC_PLATFORM_COMMON_PY2)_PYTHON_VERSION = 2
|
||||
SONIC_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY2)
|
||||
|
||||
# Als build sonic-platform-common into python3 wheel, so we can use PSU code in SNMP docker
|
||||
# Note: _DEPENDS macro is not defined
|
||||
SONIC_PLATFORM_COMMON_PY3 = sonic_platform_common-1.0-py3-none-any.whl
|
||||
$(SONIC_PLATFORM_COMMON_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-common
|
||||
$(SONIC_PLATFORM_COMMON_PY3)_PYTHON_VERSION = 3
|
||||
SONIC_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY3)
|
@ -1,14 +1,16 @@
|
||||
# sonic utilities package
|
||||
#
|
||||
# NOTE: sonic-config-engine is a build-time dependency of sonic-utilities
|
||||
# due to unit tests which are run during the build. However,
|
||||
# sonic-platform-common and swsssdk are runtime dependencies, and should be
|
||||
# added here also. However, the current build system assumes all runtime
|
||||
# dependencies are .deb packages.
|
||||
#
|
||||
# TODO: Create a way to specify both .deb and .whl runtime dependencies
|
||||
# then add the aforementioned runtime dependencies here.
|
||||
#
|
||||
|
||||
SONIC_UTILS = python-sonic-utilities_1.1-1_all.deb
|
||||
SONIC_UTILS = python-sonic-utilities_1.2-1_all.deb
|
||||
$(SONIC_UTILS)_SRC_PATH = $(SRC_PATH)/sonic-utilities
|
||||
$(SONIC_UTILS)_WHEEL_DEPENDS = $(SONIC_CONFIG_ENGINE)
|
||||
SONIC_PYTHON_STDEB_DEBS += $(SONIC_UTILS)
|
||||
|
||||
# Build sonic-utilities into python3 wheel, so we can use PSU code
|
||||
# Note: _DEPENDS macro is not defined
|
||||
SONIC_UTILS_PY3 = sonic_utilities-1.1-py3-none-any.whl
|
||||
$(SONIC_UTILS_PY3)_SRC_PATH = $(SRC_PATH)/sonic-utilities
|
||||
$(SONIC_UTILS_PY3)_PYTHON_VERSION = 3
|
||||
$(SONIC_UTILS_PY3)_TEST = n
|
||||
SONIC_PYTHON_WHEELS += $(SONIC_UTILS_PY3)
|
||||
|
4
slave.mk
4
slave.mk
@ -416,7 +416,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
$(LIBPAM_TACPLUS) \
|
||||
$(LIBNSS_TACPLUS)) \
|
||||
$$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \
|
||||
$$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE))
|
||||
$$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE)) \
|
||||
$$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2))
|
||||
$(HEADER)
|
||||
# Pass initramfs and linux kernel explicitly. They are used for all platforms
|
||||
export initramfs_tools="$(DEBS_PATH)/$(INITRAMFS_TOOLS)"
|
||||
@ -433,6 +434,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
export installer_images="$(addprefix $(TARGET_PATH)/,$($*_DOCKERS))"
|
||||
export config_engine_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE))"
|
||||
export swsssdk_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SWSSSDK_PY2))"
|
||||
export platform_common_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2))"
|
||||
|
||||
$(foreach docker, $($*_DOCKERS),\
|
||||
export docker_image="$(docker)"
|
||||
|
1
src/sonic-platform-common
Submodule
1
src/sonic-platform-common
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 0581611b7be5cc52aea2877199785fe72f759a58
|
@ -1 +1 @@
|
||||
Subproject commit d1df4717627acf9421861545b71e411acf3c5f32
|
||||
Subproject commit 920f29b3918635cce14a1e03749ffb1e76bf9abd
|
@ -1 +1 @@
|
||||
Subproject commit 6823ce2f3e46d9bbf5fcfa6b371705a7368929cb
|
||||
Subproject commit 495584bd2f228af81934b23e4cf19648ab387fab
|
Loading…
Reference in New Issue
Block a user