From e2058bbf398313a624cb50d30da777c123a1cedc Mon Sep 17 00:00:00 2001 From: chriskaliX Date: Fri, 29 Nov 2024 01:36:36 +0800 Subject: [PATCH] edriver: config fix --- plugins/edriver/Makefile | 11 +++-------- plugins/edriver/go.mod | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/plugins/edriver/Makefile b/plugins/edriver/Makefile index db6d91d5..e8531a32 100644 --- a/plugins/edriver/Makefile +++ b/plugins/edriver/Makefile @@ -6,19 +6,14 @@ EBPF_TARGET_PATH = user/hades_ebpf_driver.o GO_TARGET_PATH := -o edriver VERSION := v1.1.1 -.PHONY: mod-tidy -mod-tidy: - @echo "Running go mod tidy..." - go mod tidy - -no-core: mod-tidy +no-core: $(EBPF_BUILD) mv $(EBPF_SOURCE_PATH) $(EBPF_TARGET_PATH) CGO_ENABLED=0 go build -ldflags "-X 'hades-ebpf/conf.VERSION=$(VERSION)'" $(GO_TARGET_PATH) . -core: mod-tidy +core: $(EBPF_BUILD) $(EBPF_CO-RE_FLAG) mv $(EBPF_SOURCE_CO-RE_PATH) $(EBPF_TARGET_PATH) CGO_ENABLED=0 go build -ldflags "-X 'hades-ebpf/conf.VERSION=$(VERSION)'" $(GO_TARGET_PATH) . -testing: mod-tidy +testing: cp $(EBPF_TARGET_PATH) test/hades_ebpf_driver.o CGO_ENABLED=0 go test -v -exec sudo ./... \ No newline at end of file diff --git a/plugins/edriver/go.mod b/plugins/edriver/go.mod index 4941da44..71c65ef7 100644 --- a/plugins/edriver/go.mod +++ b/plugins/edriver/go.mod @@ -2,7 +2,7 @@ module hades-ebpf replace github.com/chriskaliX/SDK => ../../SDK/go -go 1.20 +go 1.21.0 require ( github.com/aquasecurity/libbpfgo/helpers v0.4.5