summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdata/stage3.1/init6
-rwxr-xr-xmltk1
-rwxr-xr-xremote/setup_tools116
-rw-r--r--remote/tools/systemd/data/etc/systemd/system/openslx-mnt.mount8
4 files changed, 49 insertions, 82 deletions
diff --git a/data/stage3.1/init b/data/stage3.1/init
index 14516a50..f25ddc7b 100755
--- a/data/stage3.1/init
+++ b/data/stage3.1/init
@@ -21,6 +21,8 @@ mount -n -t tmpfs -o 'mode=755' run "/run"
[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc
[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys
+echo "/sbin/mdev" > /proc/sys/kernel/hotplug
+
# read primary graphic adaptor configuration (without proprietary drivers yet)
( hwinfo --gfxcard > /etc/hwinfo ) &
@@ -36,7 +38,9 @@ mount -n -t aufs -o br:/dev/shm/uniontmp:/rorootfs=ro none /mnt
mkdir -p /mnt/uniontmp /mnt/tmp
mount -n --move /dev/shm/uniontmp /mnt/uniontmp
-ln -sf /mnt/lib /
+[ ! -d /lib ] && unlink /lib && mkdir /lib
+mount --bind /mnt/lib /lib
+#ln -sf /mnt/lib /
cat /proc/uptime >/mnt/tmp/runtime
diff --git a/mltk b/mltk
index 6f775cd5..424f63e3 100755
--- a/mltk
+++ b/mltk
@@ -30,6 +30,7 @@ qnd_exit() {
. "${ROOT_DIR}/helper/useradd.inc"
. "${ROOT_DIR}/helper/downloader.inc"
. "${ROOT_DIR}/helper/fileutil.inc"
+. "${ROOT_DIR}/helper/binutil.inc"
banner () {
echo -e "\033[38;5;202m\t __ __ __ "
diff --git a/remote/setup_tools b/remote/setup_tools
index 76f163f5..116dc4b1 100755
--- a/remote/setup_tools
+++ b/remote/setup_tools
@@ -47,59 +47,24 @@ copyfileswithdependencies ()
[ ! -z "${REQUIRED_BINARIES}" ] && pinfo "Gathering required binaries from config file..."
for FILENAME in ${REQUIRED_BINARIES}
do
- FILE=$(find . -name ${FILENAME} -type f -executable | xargs grep -l '^.ELF') # FIXME: What happens on multiple matches? Maybe add " | head -1"
- if [ -z "$FILE" ]; then
- pwarning "\tNo Binary found for ${FILENAME}. Skipping."
- continue
- fi
- pdebug "\tFound ${FILENAME} at ${FILE}"
- echo "${FILE}" >> "${COPYFILES_LIST}"
- # fetch dependencies
- # quick fix to exclude libc*, else it copies unneeded libs...
- # workaround for
- ldd ${FILE} &>/dev/null
- ldd_exit_code=$?
- if [ "x$ldd_exit_code" != "x0" ];
- then
- pdebug "\tldd $FILE failed."
- continue
- fi
- for i in $(ldd "${FILE}" | awk '{print $1 $2 $3}' | grep -v ld-linux | grep -v libc.so | grep -v linux-gate | grep -v linux-vdso)
- do
- arrIN=(${i//=>/ })
- pdebug "* ${arrIN[0]}"
- LOCAL_MATCHES=$(find . -name "$(echo ${arrIN[0]} | awk -F '.' '{print $1}')".so\*)
- if [ "x${LOCAL_MATCHES}" != "x" ];
- then
- for llib in ${LOCAL_MATCHES};
- do
- pdebug " at ${llib}"
- echo ${llib} >> "${COPYFILES_LIST}"
- done
- else
- if [ -e ${arrIN[1]} ];
- then
- echo ${arrIN[1]} >> "${COPYFILES_LIST}"
-
- if [ ! -L ${arrIN[1]} ];
- then
- pdebug " at ${arrIN[1]}"
- else
- pdebug " at ${arrIN[1]} -> $(readlink -f ${arrIN[1]})"
- echo $(readlink -f ${arrIN[1]}) >> ${COPYFILES_LIST}
- fi
- fi
+ FILE=$(find . -name ${FILENAME} -type f -executable | xargs grep -l '^.ELF'|head -1) # FIXME: What happens on multiple matches? Maybe add " | head -1"
+ if [ -z "$FILE" ]; then
+ pwarning "\tNo Binary found for ${FILENAME}. Skipping."
+ continue
fi
- done
+ pdebug "\tFound ${FILENAME} at ${FILE}"
+ echo "${FILE}" >> "${COPYFILES_LIST}"
+ get_dynamic_dependencies -l "${TOOL_DIR}/${TOOL}/build" "$FILE" >> "${COPYFILES_LIST}"
done
[ ! -z "${REQUIRED_LIBRARIES}" ] && pinfo "Gathering required libraries from config file..."
for LIB in ${REQUIRED_LIBRARIES}
do
- for LOCATION in $(find . -name ${LIB}*)
+ for LOCATION in $(find . -name ${LIB})
do
pdebug "* $LOCATION"
- echo ${LOCATION} >> ${COPYFILES_LIST}
+ echo "${LOCATION}" >> ${COPYFILES_LIST}
+ get_dynamic_dependencies -l "${TOOL_DIR}/${TOOL}/build" ${LOCATION} >> ${COPYFILES_LIST}
done
done
@@ -109,34 +74,39 @@ copyfileswithdependencies ()
do
pdebug "* ./$ENTRY"
echo "./${ENTRY}" >> "${COPYFILES_LIST}"
- for BIN in $(find "./${ENTRY}" -type f -not -name '*.a' | xargs grep -l '^.ELF')
- do
- pdebug " Searching libs for ${BIN}..."
- for i in $(ldd ${BIN} | awk '{print $1 $2 $3}' | grep -v ld-linux | grep -v libc.so | grep -v linux-gate | grep -v linux-vdso)
- do
- arrIN=(${i//=>/ })
- pdebug " Searching for ${arrIN[0]}...($i)"
- local LOCAL_MATCHES=$(find . -name "$(echo ${arrIN[0]} | awk -F '.' '{print $1}')".so\*)
- if [ "x${LOCAL_MATCHES}" != "x" ];
- then
- for llib in ${LOCAL_MATCHES};
- do
- pdebug " Found locally, copying ${llib}"
- echo ${llib} >> "${COPYFILES_LIST}"
- done
- else
- if [ ! -z ${arrIN[1]} ] && [ "x${arrIN[1]}" != "xnot" ];
- then
- pdebug " Not found locally but in system, copying ${arrIN[1]}"
- echo ${arrIN[1]} >> "${COPYFILES_LIST}"
- [ -L ${arrIN[1]} ] && echo $(readlink -f "${arrIN[1]}") >> "${COPYFILES_LIST}"
- else
- pwarning "Lib '${arrIN[0]}' from required dir '$ENTRY' neither found in build directory nor on this system."
- pwarning "If this lib is not supplied by another module, this module will probably fail in your final system"
- fi
- fi
- done
- done
+ get_dynamic_dependencies -l "${TOOL_DIR}/${TOOL}/build" ${ENTRY} >> ${COPYFILES_LIST}
+
+
+ #as as \n
+ #echo "./${ENTRY}" >> "${COPYFILES_LIST}"
+ #for BIN in $(find "./${ENTRY}" -type f -not -name '*.a' | xargs grep -l '^.ELF')
+ #do
+ # pdebug " Searching libs for ${BIN}..."
+# for i in $(ldd ${BIN} | awk '{print $1 $2 $3}' | grep -v ld-linux | grep -v libc.so | grep -v linux-gate | grep -v linux-vdso)
+# do
+# arrIN=(${i//=>/ })
+# pdebug " Searching for ${arrIN[0]}...($i)"
+# local LOCAL_MATCHES=$(find . -name "$(echo ${arrIN[0]} | awk -F '.' '{print $1}')".so\*)
+# if [ "x${LOCAL_MATCHES}" != "x" ];
+# then
+# for llib in ${LOCAL_MATCHES};
+# do
+# pdebug " Found locally, copying ${llib}"
+# echo ${llib} >> "${COPYFILES_LIST}"
+# done
+# else
+# if [ ! -z ${arrIN[1]} ] && [ "x${arrIN[1]}" != "xnot" ];
+# then
+# pdebug " Not found locally but in system, copying ${arrIN[1]}"
+# echo ${arrIN[1]} >> "${COPYFILES_LIST}"
+# [ -L ${arrIN[1]} ] && echo $(readlink -f "${arrIN[1]}") >> "${COPYFILES_LIST}"
+# else
+# pwarning "Lib '${arrIN[0]}' from required dir '$ENTRY' neither found in build directory nor on this system."
+# pwarning "If this lib is not supplied by another module, this module will probably fail in your final system"
+# fi
+# fi
+# done
+# done
done
[ ! -z "${REQUIRED_FILES}" ] && pinfo "Gathering required files from config file..."
diff --git a/remote/tools/systemd/data/etc/systemd/system/openslx-mnt.mount b/remote/tools/systemd/data/etc/systemd/system/openslx-mnt.mount
deleted file mode 100644
index 995f123f..00000000
--- a/remote/tools/systemd/data/etc/systemd/system/openslx-mnt.mount
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Mount NFS Share [TEST]
-
-[Mount]
-What=132.230.4.6:/srv/openslx/export/nfs/ubuntu-12.04-test
-Where=/openslx/mnt
-Type=nfs
-Options=ro,async,nolock