1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

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
This commit is contained in:
Richard Purdie
2008-01-30 15:37:49 +00:00
parent f55e6e493e
commit 2713386f23
2 changed files with 103 additions and 0 deletions
+30
View File
@@ -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 <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"
touch "$TARGET/.pokychroot"