blob: 8c87c6a8ece1e66719f9f203f3abb96bd8e52dc8 (
plain) (
tree)
|
|
#!/bin/bash
ROOT_DIR=$(readlink -f $(dirname $(readlink -f $0))/..)
. ${ROOT_DIR}/config/paths.conf
mkdir -p ${ROOT_DIR}/build/sqfs-base
cd ${ROOT_DIR}/build/sqfs-base
if [ ! -f .osib_unpacked ]; then
tar xf ${BUILDROOT_OUT_PATH}/rootfs.tar
touch .osib_unpacked
fi
rm run
tar xzf ${ROOT_DIR}/share/files/dev.tgz
if [ ! -f .osib_moved_libs ]; then
for f in $(find {lib,usr/lib} |grep "\.so\(\..*\|$\)"); do
targetdir=$(dirname $f)
if [ ! -d openslx/$targetdir ]; then
#echo "creating openslx/$targetdir"
mkdir -p openslx/$targetdir
fi
mv $f openslx/$f
done
touch .osib_moved_libs
fi
if [ ! -f .osib_create_ld_links ]; then
echo "create ld-*.so links from /lib"
for f in $(ls -1 openslx/lib/ld*); do
ln -sf "../$f" "lib/$(basename $f)"
done
touch .osib_create_ld_links
fi
if [ ! -f .osib_moved_bins ]; then
for d in $(find {bin,sbin,usr/bin,usr/sbin,usr/local/bin,usr/local/sbin} -type d); do
#echo $d
mkdir -p "openslx/$d"
mv $d/* openslx/$d/
done
touch .osib_moved_bins
fi
ln -sf /usr/lib/systemd/systemd init
|