Skip to content

Commit

Permalink
image update
Browse files Browse the repository at this point in the history
Signed-off-by: lec-bit <glfhmzmy@126.com>
  • Loading branch information
lec-bit committed Apr 19, 2024
1 parent 3f1f62d commit f13e86b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
6 changes: 1 addition & 5 deletions build/docker/kmesh.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ WORKDIR /kmesh

ARG arch

ADD out/$arch/*so* /usr/lib64/
ADD out/$arch/kmesh-daemon /usr/bin/
ADD out/$arch/kmesh-cni /usr/bin/
ADD out/$arch/mdacore /usr/bin/
ADD build/docker/start_kmesh.sh /kmesh
ADD out/$arch/ko /kmesh
ADD out/$arch /kmesh

RUN yum install -y kmod util-linux iptables
13 changes: 12 additions & 1 deletion build/docker/start_kmesh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@

# docker image compile online, if not compile online, the following lines also have no effect

if (uname -r | grep oe2303); then
kernel=oe2303
else
kernel=normal
fi

cp $kernel/*so* /usr/lib64/
cp $kernel/kmesh-daemon /usr/bin/
cp $kernel/kmesh-cni /usr/bin/
cp $kernel/mdacore /usr/bin

lsmod | grep kmesh > /dev/null
if [ $? -ne 0 ] && [ -f kmesh.ko ]; then
if [ $? -ne 0 ] && [ -f $kernel/ko/kmesh.ko ]; then
cp kmesh.ko /lib/modules/$(uname -r)
depmod -a
modprobe kmesh
Expand Down
27 changes: 16 additions & 11 deletions kmesh_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,25 @@ function copy_to_host() {
else
arch="aarch64"
fi

local kernel="normal"
if (uname -r | grep oe2303); then
kernel="oe2303"
fi

mkdir -p "./out/$arch"
mkdir -p "./out/$arch/ko"
mkdir -p "./out/$arch/$kernel"
mkdir -p "./out/$arch/$kernel/ko"

cp /usr/lib64/libkmesh_api_v2_c.so out/$arch
cp /usr/lib64/libkmesh_deserial.so out/$arch
cp /usr/lib64/libboundscheck.so out/$arch
find /usr/lib64 -name 'libbpf.so*' -exec cp {} out/$arch \;
find /usr/lib64 -name 'libprotobuf-c.so*' -exec cp {} out/$arch \;
cp /usr/bin/kmesh-daemon out/$arch
cp /usr/bin/kmesh-cni out/$arch
cp /usr/bin/mdacore out/$arch
cp /usr/lib64/libkmesh_api_v2_c.so out/$arch/$kernel
cp /usr/lib64/libkmesh_deserial.so out/$arch/$kernel
cp /usr/lib64/libboundscheck.so out/$arch/$kernel
find /usr/lib64 -name 'libbpf.so*' -exec cp {} out/$arch/$kernel \;
find /usr/lib64 -name 'libprotobuf-c.so*' -exec cp {} out/$arch/$kernel \;
cp /usr/bin/kmesh-daemon out/$arch/$kernel
cp /usr/bin/kmesh-cni out/$arch/$kernel
cp /usr/bin/mdacore out/$arch/$kernel
if [ -f "/lib/modules/kmesh/kmesh.ko" ]; then
cp /lib/modules/kmesh/kmesh.ko out/$arch/ko
cp /lib/modules/kmesh/kmesh.ko out/$arch/$kernel/ko
fi
}

Expand Down

0 comments on commit f13e86b

Please sign in to comment.