From 839026e1bbcedc398bc5ebd54ffa142b66952e0a Mon Sep 17 00:00:00 2001 From: CFC4N Date: Sat, 5 Nov 2022 19:48:22 +0800 Subject: [PATCH] workflows : revert kernel version on Linux/Android arm64 due QEMU have not kconfig.h header file. fatal error: 'linux/kconfig.h' file not found. Signed-off-by: CFC4N --- .github/workflows/go-c-cpp.yml | 18 ++++++++---------- .github/workflows/release.yml | 18 ++++++++---------- Makefile | 2 -- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.github/workflows/go-c-cpp.yml b/.github/workflows/go-c-cpp.yml index 002fe35f1..62bd7a465 100644 --- a/.github/workflows/go-c-cpp.yml +++ b/.github/workflows/go-c-cpp.yml @@ -118,14 +118,14 @@ jobs: run: go test -v ./... build-on-ubuntu2004-arm64: - runs-on: ubuntu-20.04 - name: build on ubuntu-20.04 arm64 + runs-on: ubuntu-22.04 + name: build on ubuntu-22.04 arm64 # Run steps on a matrix of 3 arch/distro combinations strategy: matrix: include: - arch: aarch64 - distro: ubuntu20.04 + distro: ubuntu22.04 steps: - uses: actions/checkout@v3 with: @@ -177,19 +177,17 @@ jobs: install: | uname -a apt-get update - apt-get install --yes wget git golang build-essential pkgconf libelf-dev llvm-9 clang-9 linux-tools-generic linux-tools-common - wget https://golang.google.cn/dl/go1.18.8.linux-arm64.tar.gz - rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.8.linux-arm64.tar.gz + apt-get install --yes wget git golang build-essential pkgconf libelf-dev llvm-12 clang-12 linux-tools-generic linux-tools-common # Produce a binary artifact and place it in the mounted volume run: | uname -a date - export PATH=/usr/local/go/bin:$PATH:/usr/local/bin + export PATH=$PATH:/usr/local/bin echo $PATH for tool in "clang" "llc" "llvm-strip" do rm -f /usr/bin/$tool - ln -s /usr/bin/$tool-9 /usr/bin/$tool + ln -s /usr/bin/$tool-12 /usr/bin/$tool done clang --version which bpftool @@ -202,7 +200,7 @@ jobs: echo "-------------------start: Create ecapture.tar.gz of Linux -------------------" make env make clean - make nocore + make echo "-------------------ecapture --help-------------------" bin/ecapture -v echo "-------------------create tar.gz file-------------------" @@ -229,7 +227,7 @@ jobs: echo "-------------------start: Create ecapture.tar.gz of Android kernel CO:RE -------------------" make env make clean - ANDROID=1 make nocore + ANDROID=1 make echo "-------------------ecapture --help-------------------" echo "bin/ecapture -v" echo "-------------------create tar.gz file-------------------" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c152fe68d..8c9e5c7c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,14 +53,14 @@ jobs: make -f builder/Makefile.release release SNAPSHOT_VERSION=${{ steps.get_tags.outputs.VERSION }} build-on-ubuntu2004-arm64: - runs-on: ubuntu-20.04 - name: build on ubuntu-20.04 arm64 + runs-on: ubuntu-22.04 + name: build on ubuntu-22.04 arm64 # Run steps on a matrix of 3 arch/distro combinations strategy: matrix: include: - arch: aarch64 - distro: ubuntu20.04 + distro: ubuntu22.04 steps: - uses: actions/checkout@v3 with: @@ -126,19 +126,17 @@ jobs: install: | uname -a apt-get update - apt-get install --yes wget git build-essential pkgconf libelf-dev llvm-9 clang-9 linux-tools-generic linux-tools-common - wget https://golang.google.cn/dl/go1.18.8.linux-arm64.tar.gz - rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.8.linux-arm64.tar.gz + apt-get install --yes wget git build-essential golang pkgconf libelf-dev llvm-12 clang-12 linux-tools-generic linux-tools-common # Produce a binary artifact and place it in the mounted volume run: | uname -a date - export PATH=/usr/local/go/bin:$PATH:/usr/local/bin + export PATH=$PATH:/usr/local/bin echo $PATH for tool in "clang" "llc" "llvm-strip" do rm -f /usr/bin/$tool - ln -s /usr/bin/$tool-9 /usr/bin/$tool + ln -s /usr/bin/$tool-12 /usr/bin/$tool done clang --version which bpftool @@ -147,7 +145,7 @@ jobs: echo "-------------------end: Create ecapture.tar.gz of Linux -------------------" make env make clean - make nocore + make echo "-------------------ecapture --help-------------------" bin/ecapture -v echo "-------------------create tar.gz file-------------------" @@ -174,7 +172,7 @@ jobs: echo "-------------------start: Create ecapture.tar.gz of Android kernel CO:RE -------------------" make env make clean - ANDROID=1 make nocore + ANDROID=1 make echo "-------------------ecapture --help-------------------" echo "bin/ecapture -v" echo "-------------------create tar.gz file-------------------" diff --git a/Makefile b/Makefile index f6dd95812..4808f9b59 100644 --- a/Makefile +++ b/Makefile @@ -286,7 +286,6 @@ $(KERN_OBJECTS): %.o: %.c \ -target bpfel -c $< -o $(subst kern/,user/bytecode/,$@) \ -fno-ident -fdebug-compilation-dir . -g -D__BPF_TARGET_MISSING="GCC error \"The eBPF is using target specific macros, please provide -target\"" \ -MD -MP - #KERNEL_LESS_5_2 $(CMD_CLANG) -D__TARGET_ARCH_$(LINUX_ARCH) \ $(EXTRA_CFLAGS) \ $(BPFHEADER) \ @@ -348,7 +347,6 @@ $(KERN_OBJECTS_NOCORE): %.nocore: %.c \ -march=bpf \ -filetype=obj \ -o $(subst kern/,user/bytecode/,$(subst .c,.o,$<)) - # -DKERNEL_LESS_5_2 $(CMD_CLANG) \ $(BPFHEADER) \ -I $(KERN_SRC_PATH)/arch/$(LINUX_ARCH)/include \