Update qemu image download script

This commit is contained in:
Gulshan Singh 2023-01-18 18:33:50 -08:00
parent 3d57be41e2
commit 0757878b80
2 changed files with 22 additions and 10 deletions

6
.gitignore vendored
View File

@ -76,10 +76,8 @@ tests/**/binaries/div_zero_binary/core
tests/**/binaries/div_zero_binary/binary
!tests/**/binaries/*.go
# QEMU test files
tests/qemu-tests/Image*
tests/qemu-tests/bzImage*
tests/qemu-tests/rootfs*.img
# QEMU test images
tests/qemu-tests/images
# VS Code files
.vscode/

View File

@ -2,12 +2,26 @@
set -o errexit
OUT_DIR=images
URL="https://github.com/gsingh93/linux-exploit-dev-env/releases/latest/download"
wget "$URL/rootfs-x86_64.img"
wget "$URL/rootfs-arm64.img"
mkdir -p "${OUT_DIR}"
wget "$URL/bzImage-linux-x86_64"
wget "$URL/bzImage-ack-x86_64"
wget "$URL/Image-linux-arm64"
wget "$URL/Image-ack-arm64"
for arch in x86_64 arm64; do
file="rootfs-${arch}.img"
wget "${URL}/${file}" -O "${OUT_DIR}/${file}"
file="vmlinux-linux-${arch}"
wget "${URL}/${file}" -O "${OUT_DIR}/${file}"
file="vmlinux-ack-${arch}"
wget "${URL}/${file}" -O "${OUT_DIR}/${file}"
done
for kernel_type in ack linux; do
file="bzImage-${kernel_type}-x86_64"
wget "${URL}/${file}" -O "${OUT_DIR}/${file}"
file="Image-${kernel_type}-arm64"
wget "${URL}/${file}" -O "${OUT_DIR}/${file}"
done