cleanup commit

This commit is contained in:
Andreas Grapentin 2019-03-15 10:10:47 +01:00
parent 5defa8b4a6
commit 342af012f1
No known key found for this signature in database
GPG Key ID: 7171986E4B745536
3 changed files with 35 additions and 9 deletions

3
.gitignore vendored

@ -12,3 +12,6 @@ build/
# generated ssh keys
keys/*
# boostrap packages
/*-stage4/

15
boot.sh

@ -112,6 +112,17 @@ qemu_setargs_riscv64() {
)
}
qemu_setargs_ppc64() {
qemu_args+=(
-machine pseries
-m 2G
-kernel "$1"/vmlinuz-linux-libre
-initrd "$1"/initramfs-linux-libre.img
-append "console=ttyS0 rw root=/dev/sda3"
-drive file="$2"
)
}
qemu_setargs_i386() {
qemu_setargs_x86_64 "$@"
}
@ -142,6 +153,7 @@ boot_from_image() {
case "$machine" in
RISC-V) arch=riscv64 ;;
PowerPC64) arch=ppc64 ;;
ARM) arch=arm ;;
i386) arch=i386 ;;
i386:*) arch=x86_64 ;;
@ -149,7 +161,8 @@ boot_from_image() {
return "$ERROR_UNSPECIFIED" ;;
esac
qemu_args=(-snapshot -nographic)
#qemu_args=(-snapshot -nographic)
qemu_args=(-nographic)
"qemu_setargs_$arch" "$TOPBUILDDIR"/mnt "$1" "$loopdev"
qemu_arch_is_foreign "$arch" || qemu_args+=(-enable-kvm)
QEMU_AUDIO_DRV=none "qemu-system-$arch" "${qemu_args[@]}"

@ -43,6 +43,10 @@ qemu_img_partition_and_mount_for_riscv64() {
qemu_img_partition_and_mount_for_x86_64 "$@"
}
qemu_img_partition_and_mount_for_powerpc64le() {
qemu_img_partition_and_mount_for_x86_64 "$@"
}
qemu_img_partition_and_mount_for_i686() {
qemu_img_partition_and_mount_for_x86_64 "$@"
}
@ -72,6 +76,7 @@ qemu_img_losetup() {
echo -n "checking for free loop device ... "
loopdev=$(losetup -f --show "$1") || loopdev=no
echo "$loopdev"
partprobe "$loopdev"
[ "x$loopdev" == "xno" ] && return "$ERROR_MISSING"
@ -102,6 +107,7 @@ qemu_setup_user_static() {
local interpreter
case "$ARCH" in
armv7h) interpreter=/usr/bin/qemu-arm- ;;
powerpc64le) interpreter=/usr/bin/qemu-ppc64le- ;;
*) interpreter=/usr/bin/qemu-"$ARCH"- ;;
esac
@ -136,6 +142,10 @@ qemu_img_finalize_for_riscv64() {
-O "$1"/boot/bbl
}
qemu_img_finalize_for_powerpc64le() {
true
}
qemu_img_finalize_for_i686() {
true
}