diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-01-16 20:33:22 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-01-16 20:33:22 +0100 |
| commit | e715b3c803ba8243858c613c60d4046d57048a11 (patch) | |
| tree | 8b79fa2df45d162f869dc3d1051c3694250271e9 /tools/create-gce-image.sh | |
| parent | 45cc58b2fc3aa9db5ac2bfefe6bf5bac51914c4a (diff) | |
syz-gce: support continous build
Add "local" mode in which syz-gce clones, builds and
monitors for updates a linux kernel repo.
Diffstat (limited to 'tools/create-gce-image.sh')
| -rwxr-xr-x | tools/create-gce-image.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/create-gce-image.sh b/tools/create-gce-image.sh index afa530d73..d63c35b21 100755 --- a/tools/create-gce-image.sh +++ b/tools/create-gce-image.sh @@ -9,7 +9,7 @@ # - you need a user-space system, a basic Debian system can be created with: # sudo debootstrap --include=openssh-server,curl,tar,time,strace stable debian # - you need qemu-nbd, grub and maybe something else: -# sudo apt-get install qemu-utils grub +# sudo apt-get install qemu-utils grub-efi # - you need nbd support in kernel # - you need kernel to use with image (e.g. arch/x86/boot/bzImage) # note: kernel modules are not supported @@ -46,10 +46,10 @@ if [ "$(basename $3)" != "vmlinux" ]; then exit 1 fi -if [ "$(grep nbd0 /proc/partitions)" != "" ]; then - echo "/dev/nbd0 is already in use, try sudo qemu-nbd -d /dev/nbd0" - exit 1 -fi +# Clean up after previous unsuccessful run. +sudo umount disk.mnt || true +sudo qemu-nbd -d /dev/nbd0 || true +rm -rf disk.mnt disk.raw tag obj || true sudo modprobe nbd fallocate -l 2G disk.raw |
