Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.
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
Binary file modified build/ipvsadm
Binary file not shown.
Binary file removed build/libm.so.6
Binary file not shown.
27 changes: 15 additions & 12 deletions build/make-initrd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ cp busybox /tmp/hyperstart-rootfs/sbin/
cp iptables /tmp/hyperstart-rootfs/sbin/
cp ipvsadm /tmp/hyperstart-rootfs/sbin/
cp socat /tmp/hyperstart-rootfs/sbin/
cp libm.so.6 /tmp/hyperstart-rootfs/lib64/
cp mount.nfs /tmp/hyperstart-rootfs/sbin/mount.nfs4

if [ "$INCLUDE_KMODULES"x == "1"x ]; then
Expand All @@ -43,18 +42,22 @@ do
ln -sf /sbin/iptables /tmp/hyperstart-rootfs/${bin}
done

ldd /tmp/hyperstart-rootfs/init | while read line
LDD_BINARIES=(/init /sbin/ipvsadm /sbin/iptables)
for bin in ${LDD_BINARIES[@]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is recommended to use the libs provided by the src-tree or built from the src-tree.
currently /init use the host libs, it will be also fixed later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this because I meet some inconsistent issue when using libc(libc-2.23.so) on my host. Since All of them will be carried by hyperstart, it should be fine.
Just please include pthread.so, it's needed by ipvsadm.

do
arr=(${line// / })

for lib in ${arr[@]}
do
if [ "${lib:0:1}" = "/" ]; then
dir=/tmp/hyperstart-rootfs`dirname $lib`
mkdir -p "${dir}"
cp -f $lib $dir
fi
done
ldd /tmp/hyperstart-rootfs/${bin} | while read line
do
arr=(${line// / })

for lib in ${arr[@]}
do
if [ "${lib:0:1}" = "/" ]; then
dir=/tmp/hyperstart-rootfs`dirname $lib`
mkdir -p "${dir}"
cp -f $lib $dir
fi
done
done
done

if [ "$1"x = "vbox"x ]; then
Expand Down