Skip to content

Commit f7faf12

Browse files
author
lec-bit
committed
fix ko make
Signed-off-by: lec-bit <glfhzmy@126.com>
1 parent 693e0ec commit f7faf12

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
run: |
4242
sudo env "PATH=$PATH" bash ./build.sh
4343
44+
# The kernel version of Ubuntu 22.04 is 6.8, so the access control check is enhanced by default.
4445
- name: Setup Enviroments
4546
run: |
4647
echo "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/mk" >> $GITHUB_ENV
@@ -54,7 +55,7 @@ jobs:
5455
- name: golangci-lint
5556
uses: golangci/golangci-lint-action@v3.7.0
5657
with:
57-
args: "--config=common/config/.golangci.yaml --out-format colored-line-number"
58+
args: "--tags=enhanced --config=common/config/.golangci.yaml --out-format colored-line-number"
5859
skip-pkg-cache: true
5960

6061
- name: Go Test

hack/golangci-lint-prepare.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/bash
22
ROOT_DIR=$(git rev-parse --show-toplevel)
33

4-
TARGET_DIR="$ROOT_DIR/bpf/kmesh/bpf2go/kernelnative/enhanced"
4+
TARGET_DIR="$ROOT_DIR/bpf/kmesh/bpf2go/kernelnative/normal"
55

66
FILES=(
77
"kmeshsockops_bpfel.o"
88
"kmeshsockops_bpfeb.o"
99
"kmeshsockopscompat_bpfeb.o"
1010
"kmeshsockopscompat_bpfel.o"
11+
"kmeshcgroupsock_bpfeb.o"
12+
"kmeshcgroupsock_bpfel.o"
13+
"kmeshcgroupsockcompat_bpfeb.o"
14+
"kmeshcgroupsockcompat_bpfel.o"
1115
)
1216

1317
mkdir -p "$TARGET_DIR"

kernel/ko_src/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ CURRENT_PATH := $(shell pwd)
22
DIRS := $(shell find $(CURRENT_PATH) -maxdepth 1 -type d)
33
BASE_DIRS := $(basename $(patsubst $(CURRENT_PATH)/%, %, $(DIRS)))
44
BASE_DIRS := $(filter-out $(CURRENT_PATH), $(BASE_DIRS))
5+
CONFIG_FILE := ../../config/kmesh_marcos_def.h
6+
ENHANCED_KERNEL := $(shell grep -q "#define ENHANCED_KERNEL 1" $(CONFIG_FILE) && echo yes || echo no)
57

6-
ifeq ($(ENHANCED_KERNEL), enhanced)
8+
ifeq ($(ENHANCED_KERNEL), yes)
79
all:
810
@for dir in ${BASE_DIRS}; do \
911
make -C $(CURRENT_PATH)/$$dir; \

0 commit comments

Comments
 (0)