From a7e0b17f550edfb73cc841e4d9a10b37d2c50e00 Mon Sep 17 00:00:00 2001 From: Maor Vanmak Date: Wed, 2 Nov 2022 15:56:57 +0000 Subject: [PATCH 1/2] SPDK: support compilation in lbv2 build system. 1. Use specific container for compile DPDK/SPDK instead dockerize. 2. Add lbv2 for lbyaml v2 support. This change coexist with current build system (dockerize and lb-build) Signed-off-by: Maor Vanmak --- Makefile.container | 9 +++++++++ Makefile.lb | 15 +++++++++------ lbv2.yaml | 9 +++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 Makefile.container create mode 100644 lbv2.yaml diff --git a/Makefile.container b/Makefile.container new file mode 100644 index 00000000000..3377c859ca3 --- /dev/null +++ b/Makefile.container @@ -0,0 +1,9 @@ +include $(WORKSPACE_TOP)/lb_containers/Makefile.container + + +TARGETS := all build checkout_deps clean install checkin + +$(TARGETS): dpdk_container + ${Q}run_in_container -i lbdpdk:${LBDPDK_CONTAINER_VERSION} -- ${MAKE} -f Makefile.lb $@ + +.PHONY: $(TARGETS) diff --git a/Makefile.lb b/Makefile.lb index ce638646a25..81e6120d159 100644 --- a/Makefile.lb +++ b/Makefile.lb @@ -4,17 +4,20 @@ RTE_SDK:=$(shell component-tool localpath --repo=dpdk --type=$(BUILD_TYPE) dpdk- SPDK_INSTALL_DIR ?= $(shell component-tool localpath --repo=spdk --type=$(BUILD_TYPE) spdk-sdk) MACHINE_CFLAGS := "-march=broadwell" +DISABLE_WARNING := "-Wno-address-of-packed-member -Wno-misleading-indentation -Wno-vla-parameter \ + -Wno-zero-length-bounds -Wno-maybe-uninitialized -Wno-format-overflow -fcommon \ + -Wno-return-type -Wno-deprecated-declarations" all: build checkout_deps: $(Q)lb-build -d -build: checkout_deps - ./configure --with-dpdk=$(RTE_SDK) - $(Q)$(MAKE) MACHINE_CFLAGS=$(MACHINE_CFLAGS) CONFIG_DPDK_DIR=$(RTE_SDK) +build: checkout_deps + CFLAGS=$(DISABLE_WARNING) CXXFLAGS=$(CXXFLAGS) ./configure --with-dpdk=$(RTE_SDK) + $(Q)$(MAKE) MACHINE_CFLAGS=$(MACHINE_CFLAGS) CONFIG_DPDK_DIR=$(RTE_SDK) -j10 -clean: checkout_deps +clean: checkout_deps $(Q)$(MAKE) CONFIG_DPDK_DIR=$(RTE_SDK) clean install: |checkout_deps @@ -26,8 +29,8 @@ install: |checkout_deps $(Q) cp -a config* $(SPDK_INSTALL_DIR) $(Q) cp -a include $(SPDK_INSTALL_DIR) -checkin: +checkin: $(Q)component-tool checkin --repo=spdk --type=$(BUILD_TYPE) spdk-sdk -.PHONY: install checkin +.PHONY: install checkin diff --git a/lbv2.yaml b/lbv2.yaml new file mode 100644 index 00000000000..157a66cb6da --- /dev/null +++ b/lbv2.yaml @@ -0,0 +1,9 @@ +spdk: + spdk-sdk: + build: + - make -f Makefile.container all + install: + - make -f Makefile.container install + deps: + - dpdk:dpdk-sdk + - file://. From d87c1eb01a83ef69040bfd0169c7eaccad452453 Mon Sep 17 00:00:00 2001 From: Maor Vanmak Date: Tue, 15 Nov 2022 16:53:21 +0000 Subject: [PATCH 2/2] gitignore: add mk/cc.flags.mk generated during build Signed-off-by: Maor Vanmak --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index bd83e94e50b..763d77fea92 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ CONFIG.local .settings mk/cc.mk mk/config.mk +mk/cc.flags.mk PYTHON_COMMAND