diff options
author | Helmut Grohne <helmut@subdivi.de> | 2022-12-21 12:29:14 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2022-12-21 12:29:14 +0100 |
commit | 0434e4b932a1f94725b423925d8583ba03900496 (patch) | |
tree | 0eb05e98d8f12c5784801569b9047fc06b7187ec /debvm-run | |
parent | e31e3c7b2f78c6680bcbb7a87939d9646f3807c8 (diff) | |
download | debvm-0434e4b932a1f94725b423925d8583ba03900496.tar.gz |
support ppc64el
Diffstat (limited to 'debvm-run')
-rwxr-xr-x | debvm-run | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -45,9 +45,6 @@ done test -f "$IMAGE" || die "image '$IMAGE' not found" -KERNELNAME=$(/sbin/debugfs "$IMAGE" -R "stat vmlinuz" | sed 's/Fast link dest: "\(.*\)"/\1/;t;d') -INITRDNAME=$(/sbin/debugfs "$IMAGE" -R "stat initrd.img" | sed 's/Fast link dest: "\(.*\)"/\1/;t;d') - cleanup() { set +x test -n "$KERNELTMP" && rm -f "$KERNELTMP" @@ -66,13 +63,24 @@ if command -v elf-arch >/dev/null 2>&1; then VMARCH=$(elf-arch "$KERNELTMP") fi case "$VMARCH" in - amd64|i386) + amd64|i386|ppc64el) DISKDEV=sda ;; *) DISKDEV=vda ;; esac +case "$VMARCH" in + ppc64el) + KERNELLINK=vmlinux + ;; + *) + KERNELLINK=vmlinuz + ;; +esac + +KERNELNAME=$(/sbin/debugfs "$IMAGE" -R "stat $KERNELLINK" | sed 's/Fast link dest: "\(.*\)"/\1/;t;d') +INITRDNAME=$(/sbin/debugfs "$IMAGE" -R "stat initrd.img" | sed 's/Fast link dest: "\(.*\)"/\1/;t;d') KERNEL_CMDLINE=root=/dev/$DISKDEV NETDEV="user,id=net0" @@ -103,6 +111,9 @@ else QEMU=qemu-system-arm set -- -machine virt -cpu max "$@" ;; + ppc64el) + QEMU=qemu-system-ppc64 + ;; *) QEMU="qemu-system-$VMARCH" ;; |