Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,14 @@ Optional parameters:
not be long enough for a kernel to boot so this allows that timeout
to be configured. Takes the value passed to timeout (e.g. 30s or 4m).

--use-cbl-qemu (only relevant with '-a s390'):
Currently, s390 only boots with patches that are available in QEMU
master. It could take a while for those patches to make it to various
distribution versions of qemu-system-s390 so we provide a copy of it
at https://github.com/ClangBuiltLinux/qemu-binaries. This option
downloads that repo here and decompresses the binary to use it.
--use-cbl-qemu (only relevant with '-a riscv' or '-a s390'):
Certain distribution versions of qemu-system-riscv have an issue
with shutting down. This was fixed in QEMU upstream so an upstream
binary is provided in case you are affected by it.

s390 only boots with patches that are available in QEMU master. It
could take a while for those patches to make it to various
distribution versions of qemu-system-s390.

This option downloads https://github.com/ClangBuiltLinux/qemu-binaries
here and decompresses the binary to use it.
24 changes: 12 additions & 12 deletions boot-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,6 @@ function setup_qemu_args() {
KIMAGE=bzImage
QEMU_ARCH_ARGS=(-M s390-ccw-virtio)
QEMU=(qemu-system-s390x)
if ${USE_CBL_QEMU:-false}; then
QEMU_BINARIES=${BASE}/qemu-binaries

green "Downloading or updating qemu-binaries..."
[[ -d ${QEMU_BINARIES} ]] || git clone https://github.com/ClangBuiltLinux/qemu-binaries "${QEMU_BINARIES}"
git -C "${QEMU_BINARIES}" pull --rebase

QEMU_BIN=${QEMU_BINARIES}/bin
QEMU_S390=${QEMU_BIN}/${QEMU[*]}
zstd -q -d "${QEMU_S390}".zst -o "${QEMU_S390}" || die "Error decompressing qemu-system-s390x"
export PATH=${QEMU_BIN}:${PATH}
fi
;;

x86 | x86_64)
Expand All @@ -238,6 +226,18 @@ function setup_qemu_args() {
esac
;;
esac
if ${USE_CBL_QEMU:-false} && [[ ${ARCH} = "riscv" || ${ARCH} = "s390" ]]; then
QEMU_BINARIES=${BASE}/qemu-binaries

green "Downloading or updating qemu-binaries..."
[[ -d ${QEMU_BINARIES} ]] || git clone https://github.com/ClangBuiltLinux/qemu-binaries "${QEMU_BINARIES}"
git -C "${QEMU_BINARIES}" pull --rebase
Comment on lines +233 to +234

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider shallow clone and git reset --hard FETCH_HEAD? Though probably overkill as we only have like 2 commits in that repo...it is of binaries though.


QEMU_BIN=${QEMU_BINARIES}/bin
QEMU_BINARY=${QEMU_BIN}/${QEMU[*]}
zstd -q -d "${QEMU_BINARY}".zst -o "${QEMU_BINARY}" || die "Error decompressing ${QEMU[*]}"
export PATH=${QEMU_BIN}:${PATH}
fi
checkbin "${QEMU[*]}"

# If '-k' is an path that ends in the kernel image, we can just use it directly
Expand Down