875328bf8a
* [202205][linux-kernel] advance submodule head linux-kernel: * 3fe00d4 2022-06-24 | [sflow + dropmon] added missing patch for the sFlow + dropmon feature. (#281) (HEAD -> 202205) [Vadym Hlushko] * ca727d6 2022-04-21 | [sflow + dropmon] added patches for the sFlow + dropmon feature. (#276) [Vadym Hlushko] Signed-off-by: Ying Xie <ying.xie@microsoft.com> * Update BRCM KNET modules to support new psample definitions from sflow… (#11709) * Update BRCM KNET module to support new psample definitions from sflow dropmon feature * Update BRCM KNET module to support new psample definitions from sflow dropmon feature * Advance saibcm-modules-dnx Signed-off-by: Ying Xie <ying.xie@microsoft.com> Co-authored-by: Michael Li <52540620+michaelli10@users.noreply.github.com>
71 lines
1.9 KiB
Makefile
71 lines
1.9 KiB
Makefile
#
|
|
# $Copyright: Copyright 2018-2021 Broadcom. All rights reserved.
|
|
# The term 'Broadcom' refers to Broadcom Inc. and/or its subsidiaries.
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# version 2 as published by the Free Software Foundation.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# A copy of the GNU General Public License version 2 (GPLv2) can
|
|
# be found in the LICENSES folder.$
|
|
#
|
|
|
|
help:
|
|
@echo ''
|
|
@echo 'Build Linux GPL kernel modules for SDKLT.'
|
|
@echo ''
|
|
@echo 'Available make targets:'
|
|
@echo 'kmod - Build kernel modules'
|
|
@echo 'clean - Remove object files'
|
|
@echo ''
|
|
@echo 'Supported make variables:'
|
|
@echo 'KDIR - Linux kernel source directory (mandatory)'
|
|
@echo 'CROSS_COPILE - Cross-compiler prefix (optional)'
|
|
@echo ''
|
|
@echo 'Examples:'
|
|
@echo 'make -s KDIR=$$KERNEL/linux kmod'
|
|
@echo 'make -s clean'
|
|
@echo ''
|
|
|
|
ifndef KDIR
|
|
nokdir:
|
|
@echo 'Error: The $$KDIR environment variable is not set.'
|
|
@echo '$$KDIR must point to a configured Linux kernel source tree.'
|
|
exit 1
|
|
endif
|
|
|
|
export KDIR
|
|
export CROSS_COMPILE
|
|
|
|
override SDK := $(CURDIR)
|
|
|
|
kmod: bde knet knetcb
|
|
|
|
bde:
|
|
$(MAKE) -C $(SDK)/linux/bde SDK=$(SDK) \
|
|
$(TARGET)
|
|
ln -sf $(SDK)/linux/bde/*.ko
|
|
|
|
knet: bde
|
|
$(MAKE) -C $(SDK)/linux/knet SDK=$(SDK) \
|
|
KBUILD_EXTRA_SYMBOLS=$(SDK)/linux/bde/Module.symvers \
|
|
$(TARGET)
|
|
ln -sf $(SDK)/linux/knet/*.ko
|
|
|
|
knetcb: knet
|
|
$(MAKE) -C $(SDK)/linux/knetcb SDK=$(SDK) \
|
|
KBUILD_EXTRA_SYMBOLS=$(SDK)/linux/knet/Module.symvers \
|
|
$(TARGET)
|
|
ln -sf $(SDK)/linux/knetcb/*.ko
|
|
|
|
clean:
|
|
$(MAKE) kmod TARGET=clean
|
|
rm -f *.ko
|
|
|
|
.PHONY: help kmod bde knet knetcb $(PSAMPLE) clean
|