-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
346 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
rm -rf /ko_output || true | ||
mkdir -p /ko_output | ||
BUILD_VERSION=$(cat LKM/src/init.c | grep MODULE_VERSION | awk -F '"' '{print $2}') | ||
KO_NAME=$(grep "MODULE_NAME" ./LKM/Makefile | grep -m 1 ":=" | awk '{print $3}') | ||
|
||
|
||
enableGcc13(){ | ||
export CC=/opt/rh/gcc-toolset-13/root/usr/bin/gcc | ||
export CPP=/opt/rh/gcc-toolset-13/root/usr/bin/cpp | ||
export CXX=/opt/rh/gcc-toolset-13/root/usr/bin/c++ | ||
} | ||
|
||
enableGcc13 | ||
|
||
echo "this is centos" | ||
for f in /usr/src/kernels/* | ||
do | ||
set -e | ||
set -o xtrace | ||
KV="$(basename -- $f)" | ||
echo "Processing $KV file..." | ||
$CC --version | ||
KVERSION=$KV make -C ./LKM clean || true | ||
BATCH=true KVERSION=$KV make -C ./LKM -j all | tee /ko_output/${KO_NAME}_${BUILD_VERSION}_${KV}_amd64.log || true | ||
sha256sum ./LKM/${KO_NAME}.ko | awk '{print $1}' > /ko_output/${KO_NAME}_${BUILD_VERSION}_${KV}_amd64.sign || true | ||
|
||
if [ -s /ko_output/${KO_NAME}_${BUILD_VERSION}_${KV}_amd64.sign ]; then | ||
# The file is not-empty. | ||
echo ok > /dev/null | ||
else | ||
# The file is empty. | ||
rm -f /ko_output/${KO_NAME}_${BUILD_VERSION}_${KV}_amd64.sign | ||
fi | ||
mv ./LKM/${KO_NAME}.ko /ko_output/${KO_NAME}_${BUILD_VERSION}_${KV}_amd64.ko || true | ||
KVERSION=$KV make -C ./LKM clean || true | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
FROM arm64v8/oraclelinux:8 AS rhel8 | ||
FROM arm64v8/oraclelinux:8 AS ol8_uek | ||
|
||
|
||
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel yumdownloader gnutls-utils pciutils-libs; | ||
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel gnutls-utils pciutils-libs; | ||
|
||
RUN dnf install -y wget perl gcc make tree openssl-devel openssl gcc-toolset-11 gcc-toolset-11-binutils-devel binutils-devel gcc-toolset-11-elfutils-libelf-devel; | ||
|
||
RUN dnf groupinstall -y "Development Tools"; | ||
RUN dnf install -y centos-release-scl | ||
RUN dnf install -y devtoolset-8 | ||
|
||
RUN rm -rf /root/headers || true | ||
RUN mkdir /root/headers | ||
|
||
RUN for eachversion in `dnf --showduplicates list kernel-devel | grep kernel-devel.aarch64 | awk '{print $2}'` ; do dnf download --downloaddir=/root/headers kernel-devel-$eachversion.aarch64 || true ; done; | ||
|
||
ADD . /elkeid | ||
WORKDIR /elkeid/driver | ||
RUN bash ./build_script/aarch64/batch_compile_el7.sh | ||
|
||
RUN scl enable gcc-toolset-11 "bash ./build_script/aarch64/batch_compile_el8.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.