diff options
author | Richard Purdie <richard@openedhand.com> | 2008-01-30 15:37:49 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-01-30 15:37:49 +0000 |
commit | 2713386f233907d652935cca7158475c26a0cac7 (patch) | |
tree | e67b6d5cc1d5f386ac32025c9f6bdbf0fcb42279 /scripts/poky-chroot-setup | |
parent | f55e6e493e881453975fb038d88fcf13474ef42f (diff) | |
download | poky-2713386f233907d652935cca7158475c26a0cac7.tar.gz |
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
Diffstat (limited to 'scripts/poky-chroot-setup')
-rwxr-xr-x | scripts/poky-chroot-setup | 30 |
1 files changed, 30 insertions, 0 deletions
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 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Script to extract a poky qemux86 rootfs and prepare it for | ||
4 | # use as a chroot | ||
5 | # | ||
6 | |||
7 | set -e | ||
8 | |||
9 | case $# in | ||
10 | 2) | ||
11 | TGZ=$1 | ||
12 | TARGET=$2 | ||
13 | ;; | ||
14 | *) | ||
15 | echo "Invalid arguments, please run as:" | ||
16 | echo "$ $0 <qemux86-rootfs.tar.gz> <target-directory>" | ||
17 | exit 1 | ||
18 | esac | ||
19 | |||
20 | echo "Extracting $TGZ into $TARGET" | ||
21 | |||
22 | test -d "$TARGET" && { echo "$TARGET already exists, please remove and retry or specify a dirferent directory." ; exit 1 ; } | ||
23 | mkdir --parents "$TARGET" | ||
24 | |||
25 | tar -C "$TARGET" --exclude ./dev/\* -jxp -f "$TGZ" | ||
26 | echo "HAVE_TOUCHSCREEN=0" >> "$TARGET/etc/formfactor/machconfig" | ||
27 | echo "DISPLAY_WIDTH_PIXELS=640" >> "$TARGET/etc/formfactor/machconfig" | ||
28 | echo "DISPLAY_HEIGHT_PIXELS=480" >> "$TARGET/etc/formfactor/machconfig" | ||
29 | cp /etc/passwd "$TARGET/etc/passwd" | ||
30 | touch "$TARGET/.pokychroot" | ||