c5d0507224
Add new Nokia build target and establish an arm64 build: Platform: arm64-nokia_ixs7215_52xb-r0 HwSKU: Nokia-7215-A1 ASIC: marvell Port Config: 48x1G + 4x10G How I did it - Change make files for saiserver and syncd to use Bulleseye kernel - Change Marvell SAI version to 1.11.0-1 - Add Prestera make files to build kernel, Flattened Device Tree blob and ramdisk for arm64 platforms - Provide device and platform related files for new platform support (arm64-nokia_ixs7215_52xb-r0).
75 lines
2.0 KiB
Makefile
Executable File
75 lines
2.0 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
# See debhelper(7) (uncomment to enable)
|
|
# output every command that modifies files on the build system.
|
|
#export DH_VERBOSE = 1
|
|
|
|
include /usr/share/dpkg/pkg-info.mk
|
|
#--------------------------------------------------------
|
|
|
|
PACKAGE_PRE_NAME := sonic-platform-nokia
|
|
ifneq ($(CROSS_BUILD_ENVIRON), y)
|
|
KVERSION ?= $(shell uname -r)
|
|
endif
|
|
KERNEL_SRC := /lib/modules/$(KVERSION)
|
|
MOD_SRC_DIR:= $(shell pwd)
|
|
MODULE_DIRS:= 7215
|
|
UTILS_DIR := utils
|
|
MODULE_DIR:= modules
|
|
SERVICE_DIR := service
|
|
PLATFORM_DIR := sonic_platform
|
|
|
|
%:
|
|
dh $@ --with systemd,python3 --buildsystem=pybuild
|
|
|
|
clean:
|
|
dh_testdir
|
|
dh_testroot
|
|
dh_clean
|
|
|
|
build:
|
|
(for mod in $(MODULE_DIRS); do \
|
|
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules || exit 1; \
|
|
python3 $${mod}/setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}; \
|
|
done)
|
|
|
|
binary: binary-arch binary-indep
|
|
# Nothing to do
|
|
|
|
binary-arch:
|
|
# Nothing to do
|
|
|
|
binary-indep:
|
|
dh_testdir
|
|
dh_installdirs
|
|
|
|
# Custom package commands
|
|
(for mod in $(MODULE_DIRS); do \
|
|
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
|
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /usr/local/bin; \
|
|
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /boot; \
|
|
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /lib/systemd/system; \
|
|
cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR)/*.service debian/$(PACKAGE_PRE_NAME)-$${mod}/lib/systemd/system/; \
|
|
cp $(MOD_SRC_DIR)/$${mod}/$(UTILS_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin/; \
|
|
cp $(MOD_SRC_DIR)/$${mod}/$(MODULE_DIR)/*.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
|
python3 $${mod}/setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME)-$${mod} --install-layout=deb; \
|
|
done)
|
|
|
|
# Resuming debhelper scripts
|
|
dh_testroot
|
|
dh_install
|
|
dh_installchangelogs
|
|
dh_installdocs
|
|
dh_systemd_enable
|
|
dh_installinit
|
|
dh_systemd_start
|
|
dh_link
|
|
dh_fixperms
|
|
dh_compress
|
|
dh_strip
|
|
dh_installdeb
|
|
dh_gencontrol
|
|
dh_md5sums
|
|
dh_builddeb
|
|
|
|
.PHONY: build binary binary-arch binary-indep clean
|