8eab0e02df
* [202012][platform/barefoot] (#8543) Why I did it Pcied running by python 2. How I did it dropped python2 support and add python3 support for pcied in file docker-pmon.supervisord.conf.j2 How to verify it docker exec pmon supervisorctl status * [Netberg][nba715] Initial support for Netberg Aurora 715 switch Signed-off-by: Andrew Sapronov <andrew.sapronov@gmail.com> Co-authored-by: Kostiantyn Yarovyi <kostiantynx.yarovyi@intel.com>
42 lines
1.1 KiB
Makefile
Executable File
42 lines
1.1 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
|
|
export INSTALL_MOD_DIR:=extra
|
|
|
|
PYTHON3 ?= python3
|
|
|
|
PACKAGE_PRE_NAME := sonic-platform-netberg
|
|
KVERSION ?= $(shell uname -r)
|
|
KERNEL_SRC := /lib/modules/$(KVERSION)
|
|
MOD_SRC_DIR:= $(shell pwd)
|
|
MODULE_DIRS:= aurora-715
|
|
MODULE_DIR := modules
|
|
|
|
%:
|
|
dh $@
|
|
|
|
override_dh_auto_build:
|
|
(for mod in $(MODULE_DIRS); do \
|
|
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
|
|
if [ -f "$${mod}/setup.py" ]; then \
|
|
rm -rdf build; \
|
|
$(PYTHON3) $${mod}/setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
|
|
fi;\
|
|
debian/netberg_platform_version.sh $${mod} $(MOD_SRC_DIR)/$${mod}; \
|
|
done)
|
|
|
|
|
|
override_dh_auto_install:
|
|
(for mod in $(MODULE_DIRS); do \
|
|
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
|
cp $(MOD_SRC_DIR)/$${mod}/$(MODULE_DIR)/*.ko \
|
|
debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
|
done)
|
|
|
|
override_dh_usrlocal:
|
|
|
|
override_dh_clean:
|
|
dh_clean
|
|
(for mod in $(MODULE_DIRS); do \
|
|
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules clean; \
|
|
done)
|