blob: 695d33105b56a7768f2c5cfccaf28becd7d6293a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/bin/bash
set -e
DIR="$1"
if [[ -z "$DIR" ]]; then
echo "Usage: $0 <INSTALL DIR>"
exit 1
fi
if [[ ! -d "$DIR" ]]; then
mkdir -p "$DIR"
fi
IMAGE_BASENAME="devel-system-armv7-versatile"
COMPRESSED_IMAGE="$DIR/$IMAGE_BASENAME.img.gz"
DECOMPRESSED_IMAGE=${COMPRESSED_IMAGE/.gz/}
KERNEL_IMAGE="$DIR/$IMAGE_BASENAME.zimage"
./download-image.sh "$DIR" "$IMAGE_BASENAME"
# If we ever get multiple disks working on qemu ARM, execute:
# ./create-source-disk.sh "$DIR"
# Because the devel image doesn't have enough space to develop on the
# main partition, resize it.
truncate --size=5G "$DECOMPRESSED_IMAGE"
sfdisk "$DECOMPRESSED_IMAGE" <<EOF
1,,83,*
EOF
find_tunctl() {
for path in `which tunctl` /{usr/,usr/local/}{bin,sbin}/tunctl; do
if [ -x "$path" ]; then
return 0
fi
done
return 1
}
if ! find_tunctl; then
cat >&2 <<EOF
Could not find tunctl executable in standard paths or PATH
On Fedora it is in the tunctl package.
On Ubuntu it is in the uml-utilities package.
EOF
fi
MACHINE=qemuarmv7 PATH="$PATH:$(pwd)" OE_TMPDIR=/ KERNEL="$KERNEL_IMAGE" \
ROOTFS="$DECOMPRESSED_IMAGE" \
sh ./runqemu serial \
bootparams="rootflags=subvol=factory-run root=/dev/mmcblk0p1" \
btrfs qemuparams="-m 1024 -M vexpress-a9"
|