Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: build failed on aarch 64 ubuntu : 'linux/kconfig.h' file not found #125 #126

Merged
merged 2 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/go-c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ jobs:
tar -czf ${OUT_ARCHIVE} ${TAR_DIR}
cp ${OUT_ARCHIVE} "/artifacts/"
echo "-------------------end: Create ecapture.tar.gz of Linux -------------------"
echo "-------------------start: Create ecapture.tar.gz of Android kernel 4.18+ -------------------"
echo "-------------------start: Create ecapture.tar.gz of Android kernel CO:RE -------------------"
make env
make clean
ANDROID=1 make
Expand All @@ -235,7 +235,7 @@ jobs:
fi
TAR_DIR=ecapture-${SNAPSHOT_VERSION}-android_gki-${UNAME_M}
RELEASE_NOTES=${OUTPUT_DIR}/release_notes.txt
OUT_ARCHIVE=${OUTPUT_DIR}/${artifact_name}-android_gki-${{ matrix.arch }}.tar.gz
OUT_ARCHIVE=${OUTPUT_DIR}/${artifact_name}-android_core-${{ matrix.arch }}.tar.gz
mkdir -p ${TAR_DIR}
cp LICENSE ${TAR_DIR}/LICENSE
cp CHANGELOG.md ${TAR_DIR}/CHANGELOG.md
Expand All @@ -245,7 +245,7 @@ jobs:
cp ${OUTPUT_DIR}/release_notes.txt ${TAR_DIR}/release_notes.txt
tar -czf ${OUT_ARCHIVE} ${TAR_DIR}
cp ${OUT_ARCHIVE} "/artifacts/"
echo "-------------------end: Create ecapture.tar.gz of Android kernel 4.18+ -------------------"
echo "-------------------end: Create ecapture.tar.gz of Android kernel CO:RE -------------------"
echo "Produced artifact at /artifacts/${artifact_name}"

- name: Show the artifact
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ jobs:
tar -czf ${OUT_ARCHIVE} ${TAR_DIR}
cp ${OUT_ARCHIVE} "/artifacts/"
echo "-------------------end: Create ecapture.tar.gz of Linux -------------------"
echo "-------------------start: Create ecapture.tar.gz of Android kernel 4.18+ -------------------"
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 -h"
echo "-------------------create tar.gz file-------------------"
Expand All @@ -182,7 +182,7 @@ jobs:
if [ -z "${SNAPSHOT_VERSION}" ]; then
SNAPSHOT_VERSION="v0.0.0"
fi
TAR_DIR=ecapture-${SNAPSHOT_VERSION}-android_4.18-${UNAME_M}
TAR_DIR=ecapture-${SNAPSHOT_VERSION}-android_core-${UNAME_M}
RELEASE_NOTES=${OUTPUT_DIR}/release_notes.txt
OUT_ARCHIVE=${OUTPUT_DIR}/${artifact_name}-android-${{ matrix.arch }}.tar.gz
mkdir -p ${TAR_DIR}
Expand All @@ -194,7 +194,7 @@ jobs:
cp ${OUTPUT_DIR}/release_notes.txt ${TAR_DIR}/release_notes.txt
tar -czf ${OUT_ARCHIVE} ${TAR_DIR}
cp ${OUT_ARCHIVE} "/artifacts/"
echo "-------------------end: Create ecapture.tar.gz of Android kernel 4.18+ -------------------"
echo "-------------------end: Create ecapture.tar.gz of Android kernel CO:RE -------------------"
echo "Produced artifact at /artifacts/${artifact_name}"

- name: Upload artifacts
Expand Down
38 changes: 20 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ GO_VERSION_MIN = $(shell echo $(GO_VERSION) | $(CMD_CUT) -d'.' -f2)
| .check_$(CMD_GO)
#
@if [ ${GO_VERSION_MAJ} -eq 1 ]; then
if [ ${GO_VERSION_MIN} -lt 16 ]; then
echo -n "you MUST use golang 1.16 or newer, "
if [ ${GO_VERSION_MIN} -lt 17 ]; then
echo -n "you MUST use golang 1.17 or newer, "
echo "your current golang version is ${GO_VERSION}"
exit 1
fi
Expand Down Expand Up @@ -169,24 +169,24 @@ endif
# Target Arch
#
BPFHEADER ?=
ifeq ($(UNAME_M),x86_64)
ARCH = x86_64
LINUX_ARCH = x86
GO_ARCH = amd64
BPFHEADER = -I ./kern \
-I ./kern/bpf/x86
AUTOGENCMD = $(CMD_BPFTOOL) btf dump file /sys/kernel/btf/vmlinux format c > kern/bpf/x86/vmlinux.h
endif

ifeq ($(UNAME_M),aarch64)
ARCH = arm64
LINUX_ARCH = arm64
GO_ARCH = arm64
BPFHEADER = -I ./kern \
-I ./kern/bpf/arm64
AUTOGENCMD = ls -al kern/bpf/arm64/vmlinux.h
ARCH = arm64
LINUX_ARCH = arm64
GO_ARCH = arm64
BPFHEADER = -I ./kern \
-I ./kern/bpf/arm64
AUTOGENCMD = ls -al kern/bpf/arm64/vmlinux.h
else
# x86_64 default
ARCH = x86_64
LINUX_ARCH = x86
GO_ARCH = amd64
BPFHEADER = -I ./kern \
-I ./kern/bpf/x86
AUTOGENCMD = $(CMD_BPFTOOL) btf dump file /sys/kernel/btf/vmlinux format c > kern/bpf/x86/vmlinux.h
endif


#
# include vpath
#
Expand Down Expand Up @@ -219,7 +219,7 @@ KERN_OBJECTS_NOCORE = ${KERN_SOURCES:.c=.nocore}
.PHONY: env
env:
@echo ---------------------------------------
@echo "Makefile Environment:"
@echo "eCapture Makefile Environment:"
@echo ---------------------------------------
@echo "PARALLEL $(PARALLEL)"
@echo ---------------------------------------
Expand Down Expand Up @@ -248,6 +248,8 @@ env:
@echo "KERN_SRC_PATH $(KERN_SRC_PATH)"
@echo ---------------------------------------
@echo "GO_ARCH $(GO_ARCH)"
@echo "ANDROID $(ANDROID)"
@echo "AUTOGENCMD $(AUTOGENCMD)"
@echo ---------------------------------------

#
Expand Down