summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 15:08:09 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 15:08:45 +0100
commitcaab7fc509bf27706ff3248689f6afd04225cfda (patch)
treef832f656c91502303968fcee1aae382b9f713626 /scripts
parent232ef8430e2cfbf6eee54f602dc74b9986e3997f (diff)
downloadopenembedded-core-caab7fc509bf27706ff3248689f6afd04225cfda.tar.gz
openembedded-core-caab7fc509bf27706ff3248689f6afd04225cfda.tar.bz2
openembedded-core-caab7fc509bf27706ff3248689f6afd04225cfda.tar.xz
openembedded-core-caab7fc509bf27706ff3248689f6afd04225cfda.zip
Drop chroot usage as its not well used, tested and is broken
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/poky-chroot-run86
-rwxr-xr-xscripts/poky-chroot-setup31
2 files changed, 0 insertions, 117 deletions
diff --git a/scripts/poky-chroot-run b/scripts/poky-chroot-run
deleted file mode 100755
index f1f4dec6a..000000000
--- a/scripts/poky-chroot-run
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/bash
-#
-# Runs a command within a Poky chroot
-#
-
-XEPHYR=`which Xephyr`
-if [ ! -n "$XEPHYR" -o ! -x "$XEPHYR" ]; then
- echo "You need to install Xephyr to use $0"
- exit 1
-fi
-
-CHROOTUID=`which chrootuid`
-if [ ! -n "$CHROOTUID" -o ! -x "$CHROOTUID" ]; then
- echo "You need to install Xephyr to use $0"
- exit 1
-fi
-
-
-case $# in
- 0)
- echo "Invalid arguments."
- echo "$ $0 <target> [command]"
- exit 1
- ;;
- 1)
- ROOTFS=$1
- shift
- # Set $1 to be the boot script
- set -- /usr/bin/poky-chroot-launch
- ;;
- *)
- ROOTFS=$1
- shift
- # Now $1 onwards are the command and arguments to run
- ;;
-esac
-
-test -f "$ROOTFS/.pokychroot" || { echo "$ROOTFS is not setup for use as a Poky chroot." ; exit 1 ;}
-
-set -e
-
-# chrootuid doesn't handle relative paths, so ensure that the rootfs path is
-# absolute
-if test ${ROOTFS:0:1} != /; then
- ROOTFS="$(pwd)/$ROOTFS"
-fi
-
-safe_mount() {
- if ! mountpoint -q "$ROOTFS/$1"; then
- sudo mount --bind $1 "$ROOTFS/$1"
- fi
-}
-safe_umount() {
- if mountpoint -q "$ROOTFS/$1"; then
- sudo umount "$ROOTFS/$1"
- fi
-}
-
-# Mount the directories we need
-for m in /dev /dev/pts /dev/shm /proc /sys /tmp; do
- safe_mount $m
-done
-
-# Set up the environment
-export PATH=/bin:/usr/bin:/sbin:/usr/sbin
-export HOME=/home/$USER
-
-if [ ! -f "$ROOTFS/.pokychroot.init" ]; then
- sudo $CHROOTUID -i "$ROOTFS" $USER /bin/sh -c "/usr/bin/poky-chroot-init"
- touch "$ROOTFS/.pokychroot.init"
-fi
-
-$XEPHYR :1 -ac -screen 640x480x16 &
-
-# Go go go!
-sudo $CHROOTUID -i "$ROOTFS" $USER "$@" || /bin/true
-
-# Trap term signals so we don't kill ourselves
-trap true TERM
-# send term signal to the process group
-kill -- -$$
-
-# Unmount TODO: only umount if there are no other sessions active, somehow.
-for m in /tmp /sys /proc /dev/shm /dev/pts /dev; do
- safe_umount $m
-done
diff --git a/scripts/poky-chroot-setup b/scripts/poky-chroot-setup
deleted file mode 100755
index 209efd6df..000000000
--- a/scripts/poky-chroot-setup
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-#
-# Script to extract a poky qemux86 rootfs and prepare it for
-# use as a chroot
-#
-
-set -e
-
-case $# in
- 2)
- TGZ=$1
- TARGET=$2
- ;;
- *)
- echo "Invalid arguments, please run as:"
- echo "$ $0 <qemux86-rootfs.tar.gz> <target-directory>"
- exit 1
-esac
-
-echo "Extracting $TGZ into $TARGET"
-
-test -d "$TARGET" && { echo "$TARGET already exists, please remove and retry or specify a dirferent directory." ; exit 1 ; }
-mkdir --parents "$TARGET"
-
-tar -C "$TARGET" --exclude ./dev/\* -jxp -f "$TGZ"
-echo "HAVE_TOUCHSCREEN=0" >> "$TARGET/etc/formfactor/machconfig"
-echo "DISPLAY_WIDTH_PIXELS=640" >> "$TARGET/etc/formfactor/machconfig"
-echo "DISPLAY_HEIGHT_PIXELS=480" >> "$TARGET/etc/formfactor/machconfig"
-cp /etc/passwd "$TARGET/etc/passwd"
-cp /etc/resolv.conf "$TARGET/etc/resolv.conf"
-touch "$TARGET/.pokychroot"