File tree Expand file tree Collapse file tree 4 files changed +24
-1
lines changed
Expand file tree Collapse file tree 4 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,15 @@ mkdir qemu/build && cd qemu/build && ../configure --target-list=x86_64-softmmu -
7979cd scripts/create-image/ && ./create-image.sh && cd ../..
8080~~~
8181
82+ Or if you prefer using docker to build your image:
83+ ~~~
84+ cd scripts/create-image/
85+ docker build -t img .
86+ docker run -v $(pwd):/mnt --privileged --rm img
87+ ~~~
88+
89+ Notice that ` privileged ` is necessary because we want to use ` /dev/loop* ` inside docker.
90+
8291### Step 4: Install uv
8392~~~
8493pip install uv
Original file line number Diff line number Diff line change @@ -32,5 +32,5 @@ RUN ./debootstrap.sh
3232
3333# will copy the img file to /mnt. Need --privilege flag for docker run.
3434COPY --chmod=0755 configure.sh /src/
35- CMD ["bash" , "-x " , "./configure.sh" ]
35+ CMD ["bash" , "-c " , "set -ex; source ./configure.sh" ]
3636
Original file line number Diff line number Diff line change 22# Copyright 2025 syzkaller project authors. All rights reserved.
33# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
44
5+ usage () {
6+ echo " Please use the ./create-image.sh instead." >&2
7+ exit 1
8+ }
9+
10+ # Prevent execution if not sourced
11+ (return 0 2> /dev/null) || {
12+ usage
13+ }
14+
15+ if [ -z " $DIR " ] || [ " $( realpath " $DIR " ) " = / ]; then
16+ usage
17+ fi
18+
519# Set some defaults and enable promtless ssh to the machine for root.
620sudo sed -i ' /^root/ { s/:x:/::/ }' $DIR /etc/passwd
721echo ' T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100' | sudo tee -a $DIR /etc/inittab
You can’t perform that action at this time.
0 commit comments