From 2713386f233907d652935cca7158475c26a0cac7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 30 Jan 2008 15:37:49 +0000 Subject: scripts: Add poky-chroot scripts (credit should mainly go to Ross) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3627 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- scripts/poky-chroot-setup | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 scripts/poky-chroot-setup (limited to 'scripts/poky-chroot-setup') diff --git a/scripts/poky-chroot-setup b/scripts/poky-chroot-setup new file mode 100755 index 0000000000..d85c864da7 --- /dev/null +++ b/scripts/poky-chroot-setup @@ -0,0 +1,30 @@ +#!/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 " + 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" +touch "$TARGET/.pokychroot" -- cgit v1.2.3