summaryrefslogtreecommitdiffstats
path: root/remote/rootfs
diff options
context:
space:
mode:
authorJonathan Bauer2013-08-14 17:35:36 +0200
committerJonathan Bauer2013-08-14 17:35:36 +0200
commita7c66e6da3bf10993cc9caf3156850ede66018dc (patch)
treea85da46ddb462529cd6ae35efd0ace8c97dabdf2 /remote/rootfs
parent[rootfs-stage32] setup all addons according to /opt/openslx/config. Your conf... (diff)
parentMerge branch 'master' of simonslx:openslx-ng/tm-scripts (diff)
downloadtm-scripts-a7c66e6da3bf10993cc9caf3156850ede66018dc.tar.gz
tm-scripts-a7c66e6da3bf10993cc9caf3156850ede66018dc.tar.xz
tm-scripts-a7c66e6da3bf10993cc9caf3156850ede66018dc.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/rootfs')
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init10
-rw-r--r--remote/rootfs/rootfs-stage31/rootfs-stage31.build21
-rw-r--r--remote/rootfs/rootfs-stage31/rootfs-stage31.conf3
-rw-r--r--remote/rootfs/rootfs-stage32/rootfs-stage32.conf1
4 files changed, 19 insertions, 16 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 4dc63bfa..23a1f0d5 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -76,8 +76,12 @@ if [ "x$SPLASH" == "x1" -a "x$DEBUG" != "x1" ]; then
fi
# preparations for mounting stage3.2
-mkdir -p /dev/shm/union /dev/shm/uniontmp /rorootfs
+mkdir -p /dev/shm/uniontmp /rorootfs
mount -n -t tmpfs none /dev/shm/uniontmp
+mkdir -p /dev/shm/uniontmp/opt/openslx
+
+echo "Copying busybox etc. to stage32..."
+tar -cp "/bin" "/sbin" "/usr/bin" "/usr/sbin" | tar -xp -C /dev/shm/uniontmp/opt/openslx/
[ $DEBUG -ge 4 ] && drop_shell "Requested Debug Shell (before network)."
@@ -100,8 +104,8 @@ fi
echo "Building aufs..."
#mount -t overlayfs -o lowerdir=/rorootfs,upperdir=/dev/shm/uniontmp overlayfs /mnt
mount -n -t aufs -o br:/dev/shm/uniontmp:/rorootfs=ro none /mnt || drop_shell "Problem building aufs."
-mkdir -p /mnt/uniontmp /mnt/tmp
-mount -n --move /dev/shm/uniontmp /mnt/uniontmp || drop_shell "Problem moving uniontmp."
+mkdir -p /mnt/opt/openslx/uniontmp /mnt/tmp
+mount -n --move /dev/shm/uniontmp /mnt/opt/openslx/uniontmp || drop_shell "Problem moving uniontmp."
[ $DEBUG -ge 2 ] && drop_shell "Requested Debug Shell: after aufs'ing."
diff --git a/remote/rootfs/rootfs-stage31/rootfs-stage31.build b/remote/rootfs/rootfs-stage31/rootfs-stage31.build
index d9f28636..b2b66459 100644
--- a/remote/rootfs/rootfs-stage31/rootfs-stage31.build
+++ b/remote/rootfs/rootfs-stage31/rootfs-stage31.build
@@ -5,36 +5,33 @@ fetch_source() {
build() {
COPYLIST="list_binaries_and_files"
- [ -e $COPYLIST ] && rm -f $COPYLIST
+ [ -e "$COPYLIST" ] && rm -f "$COPYLIST"
for BIN in $REQUIRED_BINARIES; do
- BIN_LOCATION=$(which ${BIN})
- [ ! -z "${BIN_LOCATION}" -a -e "${BIN_LOCATION}" ] \
- && get_link_chain "${BIN_LOCATION}" >> "${COPYLIST}"
+ BIN_LOCATION=$(which "$BIN")
+ [ -z "$BIN_LOCATION" ] && perror "Cannot find $BIN"
+ get_link_chain "$BIN_LOCATION" >> "$COPYLIST"
done
for FILE in $REQUIRED_FILES; do
- get_link_chain "${FILE}" >> "${COPYLIST}"
+ get_link_chain "$FILE" >> "$COPYLIST"
done
- tarcopy "$(cat $COPYLIST|sort -u)" "${MODULE_BUILD_DIR}"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "$MODULE_BUILD_DIR"
}
post_copy() {
pinfo "Generating rootfs for Stage 3.1 ..."
- generate_rootfs
+ generate_rootfs
# copy kernel, modules and firmware
copy_kernel_modules
copy_firmware
copy_kernel
- # copy busybox that has been under /opt/openslx back to /
- cp -r "${TARGET_BUILD_DIR}"/opt/openslx/* "${TARGET_BUILD_DIR}"
- rm -rf "${TARGET_BUILD_DIR}/opt/openslx"
-
# when vmwgfx is loaded via modprobe in stage31, this conf file is read,
# enables fbdev support for vmware so that
# fb doesnt break when switching tty's in minilinux running inside vmware
- mkdir -p "${TARGET_BUILD_DIR}"/etc/modprobe.d
+ # TODO: Why isn't this a simple static file in this module's data dir?
+ mkdir -p "$TARGET_BUILD_DIR/etc/modprobe.d"
echo "options vmwgfx enable_fbdev=1" > "${TARGET_BUILD_DIR}"/etc/modprobe.d/vmwgfx-fbdev.conf
}
diff --git a/remote/rootfs/rootfs-stage31/rootfs-stage31.conf b/remote/rootfs/rootfs-stage31/rootfs-stage31.conf
index 18b5d9c8..cd68e75f 100644
--- a/remote/rootfs/rootfs-stage31/rootfs-stage31.conf
+++ b/remote/rootfs/rootfs-stage31/rootfs-stage31.conf
@@ -55,6 +55,9 @@ REQUIRED_FIRMWARE=" 3com/
RTL8192SE/
rtl_nic/
tigon/"
+REQUIRED_BINARIES="
+ grep
+"
REQUIRED_FILES="
/etc/protocols
/etc/services
diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
index dcdcd347..5c453397 100644
--- a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
+++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
@@ -32,7 +32,6 @@ REQUIRED_BINARIES="
ntpdate
rdns
find
- grep
"
REQUIRED_LIBRARIES=" libcap
libcidn