Skip to contentSkip to conversation

Help needed: Sparc 64, kernel panic

Qemu-devel Ajallooiean Hossein 4 participants 15 messages Apr 20, 2017 – May 4, 2017

lore
Share & tools
lore
#0 lore raw

Hi All

Has anyone experienced any kernel panics with the Sparc64 in 2.9-rc4? I dont seem to be able to run it right out of the box.

Ill appreciate any kind of help

Regards
-H

#1 lore raw
Quoted 8 lines · Ajallooiean Hossein

Hi All

Has anyone experienced any kernel panics with the Sparc64 in 2.9-rc4? I dont seem to be able to run it right out of the box.

Ill appreciate any kind of help

Regards
-H

I have a range of test images that I boot on a regular basis for qemu-system-sparc64 with success. Can you provide the full command line, QEMU version, and the output of the panic?

ATB,

Mark.

#2 lore raw

Thanks for getting back to me so quickly.

I can boot Sparc64 -- ONLY when using the qemu from package manager. supposedly version 2.5

but when building it myself (as i have some additions) - im getting this kernel error:

https://pastebin.com/9XjdrUat

I am compiling qemu by myself and am using the following cmd to run it:

/Downloads/qemu-2.9.0-rc4/sparc64-softmmu$ ./qemu-system-sparc64 -M sun4u -m 196 -kernel /home/nihosa/Downloads/kernel4.10.11.sparc64 -hda /home/nihosa/Downloads/debian-9.0-sparc64-NETINST-1.qcow2 -nographic -L pc-bios

If you have it running, could you please send me your kernel/image for testing?

Thanks a lot
Hoss
________________________________________
From: Mark Cave-Ayland <[email protected]>
Sent: Thursday, April 20, 2017 9:26 AM
To: Ajallooiean Hossein; [email protected]
Subject: Re: [Qemu-devel] Help needed: Sparc 64, kernel panic

Quoted 8 lines · Ajallooiean Hossein

Hi All

Has anyone experienced any kernel panics with the Sparc64 in 2.9-rc4? I dont seem to be able to run it right out of the box.

Ill appreciate any kind of help

Regards
-H

I have a range of test images that I boot on a regular basis for qemu-system-sparc64 with success. Can you provide the full command line, QEMU version, and the output of the panic?

ATB,

Mark.

#3 lore raw
Quoted 12 lines · Ajallooiean Hossein

Thanks for getting back to me so quickly.

I can boot Sparc64 -- ONLY when using the qemu from package manager. supposedly version 2.5

but when building it myself (as i have some additions) - im getting this kernel error:

https://pastebin.com/9XjdrUat

I am compiling qemu by myself and am using the following cmd to run it:

Quoted 7 lines

/Downloads/qemu-2.9.0-rc4/sparc64-softmmu$ ./qemu-system-sparc64 -M sun4u -m 196 -kernel /home/nihosa/Downloads/kernel4.10.11.sparc64 -hda /home/nihosa/Downloads/debian-9.0-sparc64-NETINST-1.qcow2 -nographic -L pc-bios

If you have it running, could you please send me your kernel/image for testing?

Thanks a lot
Hoss

Hmmm possibly not enough memory - have you tried using -m 256 or -m 512 at all? Also currently you'll need to boot with -nographic as there is an issue with the bochs_drm driver at the moment.

ATB,

Mark.

#4 lore raw
In reply to Ajallooiean Hossein

Hi Ajallooiean,

Quoted 10 lines · Ajallooiean Hossein

Thanks for getting back to me so quickly.

I can boot Sparc64 -- ONLY when using the qemu from package manager. supposedly version 2.5

but when building it myself (as i have some additions) - im getting this kernel error:

https://pastebin.com/9XjdrUat

I am compiling qemu by myself and am using the following cmd to run it:

Can you share your configure options and the final output (displaying CFLAGS, QEMU_CFLAGS and which features enabled)

Can you try recompiling with --disable-tcg-interpreter then retesting your kernel?

Thanks,

Phil.

Quoted 36 lines

/Downloads/qemu-2.9.0-rc4/sparc64-softmmu$ ./qemu-system-sparc64 -M sun4u -m 196 -kernel /home/nihosa/Downloads/kernel4.10.11.sparc64 -hda /home/nihosa/Downloads/debian-9.0-sparc64-NETINST-1.qcow2 -nographic -L pc-bios

If you have it running, could you please send me your kernel/image for testing?

Thanks a lot
Hoss
________________________________________
From: Mark Cave-Ayland <[email protected]>
Sent: Thursday, April 20, 2017 9:26 AM
To: Ajallooiean Hossein; [email protected]
Subject: Re: [Qemu-devel] Help needed: Sparc 64, kernel panic

Quoted 8 lines · Ajallooiean Hossein

Hi All

Has anyone experienced any kernel panics with the Sparc64 in 2.9-rc4? I dont seem to be able to run it right out of the box.

Ill appreciate any kind of help

Regards
-H

I have a range of test images that I boot on a regular basis for qemu-system-sparc64 with success. Can you provide the full command line, QEMU version, and the output of the panic?

ATB,

Mark.

#5 lore raw
In reply to Ajallooiean Hossein
Quoted 5 lines · Ajallooiean Hossein

Thanks for getting back to me so quickly.

I can boot Sparc64 -- ONLY when using the qemu from package manager. supposedly version 2.5

but when building it myself (as i have some additions) - im getting this kernel error:

Sanity check -- if you build a purely upstream QEMU without any of your additions does it still have this kernel error?

thanks
-- PMM

#6 lore raw

Ive downloaded the rc4 link you posted for 2.9 and am using that. - vanilla qemu

And am getting the error with that version.

Kindest regards
Hoss

On 20 Apr 2017, 14:40 +0200, Peter Maydell <[email protected]>, wrote:
On 20 April 2017 at 10:29, Ajallooiean Hossein <[email protected]> wrote:
Thanks for getting back to me so quickly.

I can boot Sparc64 -- ONLY when using the qemu from package manager. supposedly version 2.5

but when building it myself (as i have some additions) - im getting this kernel error:

Sanity check -- if you build a purely upstream QEMU without any of your additions does it still have this kernel error?

thanks
-- PMM

#7 lore raw

Just to add to the below:

I'm configuring qemu with only one option "--target-list=sparc64-softmmu"

see here for my configure output:
https://pastebin.com/sLShqF36

thanks for the support
Hoss
________________________________________
From: Qemu-devel <[email protected]> on behalf of Ajallooiean Hossein <[email protected]>
Sent: Thursday, April 20, 2017 3:08 PM
To: Peter Maydell
Cc: Mark Cave-Ayland; [email protected]
Subject: Re: [Qemu-devel] Help needed: Sparc 64, kernel panic

Ive downloaded the rc4 link you posted for 2.9 and am using that. - vanilla qemu

And am getting the error with that version.

Kindest regards
Hoss

On 20 Apr 2017, 14:40 +0200, Peter Maydell <[email protected]>, wrote:
On 20 April 2017 at 10:29, Ajallooiean Hossein <[email protected]> wrote:
Thanks for getting back to me so quickly.

I can boot Sparc64 -- ONLY when using the qemu from package manager. supposedly version 2.5

but when building it myself (as i have some additions) - im getting this kernel error:

Sanity check -- if you build a purely upstream QEMU without any of your additions does it still have this kernel error?

thanks
-- PMM

#8 lore raw
In reply to Ajallooiean Hossein
Quoted 9 lines · Ajallooiean Hossein

Thanks for getting back to me so quickly.

I can boot Sparc64 -- ONLY when using the qemu from package manager. supposedly version 2.5

but when building it myself (as i have some additions) - im getting this kernel error:

https://pastebin.com/9XjdrUat

Quoted 7 lines

I am compiling qemu by myself and am using the following cmd to run it:

/Downloads/qemu-2.9.0-rc4/sparc64-softmmu$ ./qemu-system-sparc64 -M sun4u -m 196 -kernel /home/nihosa/Downloads/kernel4.10.11.sparc64 -hda /home/nihosa/Downloads/debian-9.0-sparc64-NETINST-1.qcow2 -nographic -L pc-bios

If you have it running, could you please send me your kernel/image for testing?

I've just uploaded my latest kernel build and .config here for you to test:

https://www.ilande.co.uk/tmp/qemu/sparc64-kernel/vmlinux
https://www.ilande.co.uk/tmp/qemu/sparc64-kernel/.config

Can you also confirm your host architecture and the compiler/version you are using?

ATB,

Mark.

#9 lore raw

Thanks for the files and the notes.

I am attaching my config-host file for you. I'm on x86_64, running Linux 64, Ubuntu 16.04.2 LTS

so, i can also boot like you do - this worked before as well. btw, if you try to install that to a disk, itll not be able to as youll need to define memory for it.

The problem is after i install the iso on the qcow2 disk and then try to boot qemu-system-sparc64.

so here is the steps to reproduce the issue:
1- create a qcow2 image : debian-9.0-sparc64-NETINST-1.qcow2 2- download debian image: debian-9.0-sparc64-NETINST-1.iso 3- install the OS on dIsk
i use the below command line to do it:

./qemu-system-sparc64 -cdrom /home/nihosa/Downloads/debian-9.0-sparc64-NETINST-1.iso -hda /home/nihosa/Downloads/debian-sparc.qcow2 -nographic -boot d -L pc-bios -m 200

i guess i dont have to define a kernel in the above code???

4- installation goes all well.
5- i try to run the new disk image: - here i add kernel as if i dont add it ill get the below:

https://pastebin.com/cFwrX9E9

6- so here im adding kernel: - the one that you provided
./qemu-system-sparc64 -hda <PATH>/debian-sparc.qcow2 -nographic -L pc-bios -m 200 -kernel <PATH>/vmlinux

7 -i get a this error now: - with your kernel
https://pastebin.com/Z0ah7nji

8- if i use the newest kernel: available/stable i get this error: - i am compiling the kernel myself
https://pastebin.com/6EDYiaxX

9- and if i use a kernel that was working with 2.7 - i get this:
https://pastebin.com/bWbsrKCm

Thanks
Hoss
________________________________________
From: Mark Cave-Ayland <[email protected]>
Sent: Friday, April 21, 2017 2:03 PM
To: Ajallooiean Hossein; [email protected]
Subject: Re: [Qemu-devel] Help needed: Sparc 64, kernel panic

Quoted 9 lines · Ajallooiean Hossein

Thanks for getting back to me so quickly.

I can boot Sparc64 -- ONLY when using the qemu from package manager. supposedly version 2.5

but when building it myself (as i have some additions) - im getting this kernel error:

https://pastebin.com/9XjdrUat

Quoted 7 lines

I am compiling qemu by myself and am using the following cmd to run it:

/Downloads/qemu-2.9.0-rc4/sparc64-softmmu$ ./qemu-system-sparc64 -M sun4u -m 196 -kernel /home/nihosa/Downloads/kernel4.10.11.sparc64 -hda /home/nihosa/Downloads/debian-9.0-sparc64-NETINST-1.qcow2 -nographic -L pc-bios

If you have it running, could you please send me your kernel/image for testing?

I've just uploaded my latest kernel build and .config here for you to test:

https://www.ilande.co.uk/tmp/qemu/sparc64-kernel/vmlinux
https://www.ilande.co.uk/tmp/qemu/sparc64-kernel/.config

Can you also confirm your host architecture and the compiler/version you are using?

ATB,

Mark.

# Automatically generated by configure - do not modify

all:
prefix=/usr/local
bindir=${prefix}/bin
libdir=${prefix}/lib
libexecdir=${prefix}/libexec
includedir=${prefix}/include
mandir=${prefix}/share/man
sysconfdir=${prefix}/etc
qemu_confdir=${prefix}/etc/qemu
qemu_datadir=${prefix}/share/qemu
qemu_docdir=${prefix}/share/doc/qemu
qemu_moddir=${prefix}/lib/qemu
qemu_localstatedir=${prefix}/var
qemu_helperdir=${prefix}/libexec
extra_cflags=-m64 -mcx16
extra_ldflags=
qemu_localedir=${prefix}/share/locale
libs_softmmu=-lpixman-1 -lutil -L$(BUILD_DIR)/dtc/libfdt -lfdt
ARCH=x86_64
STRIP=strip
CONFIG_POSIX=y
CONFIG_LINUX=y
CONFIG_SLIRP=y
CONFIG_SMBD_COMMAND="/usr/sbin/smbd"
CONFIG_L2TPV3=y
CONFIG_AUDIO_DRIVERS=oss
CONFIG_OSS=y
CONFIG_BDRV_RW_WHITELIST=
CONFIG_BDRV_RO_WHITELIST=
CONFIG_VNC=y
CONFIG_FNMATCH=y
VERSION=2.8.94
PKGVERSION=
SRC_PATH=/home/nihosa/Downloads/qemu-2.9.0-rc4
TARGET_DIRS=sparc64-softmmu
CONFIG_UTIMENSAT=y
CONFIG_PIPE2=y
CONFIG_ACCEPT4=y
CONFIG_SPLICE=y
CONFIG_EVENTFD=y
CONFIG_FALLOCATE=y
CONFIG_FALLOCATE_PUNCH_HOLE=y
CONFIG_FALLOCATE_ZERO_RANGE=y
CONFIG_POSIX_FALLOCATE=y
CONFIG_SYNC_FILE_RANGE=y
CONFIG_FIEMAP=y
CONFIG_DUP3=y
CONFIG_PPOLL=y
CONFIG_PRCTL_PR_SET_TIMERSLACK=y
CONFIG_EPOLL=y
CONFIG_EPOLL_CREATE1=y
CONFIG_SENDFILE=y
CONFIG_TIMERFD=y
CONFIG_SETNS=y
CONFIG_CLOCK_ADJTIME=y
CONFIG_SYNCFS=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY1=y
CONFIG_BYTESWAP_H=y
CONFIG_HAS_GLIB_SUBPROCESS_TESTS=y
CONFIG_TLS_PRIORITY="NORMAL"
HAVE_IFADDRS_H=y
CONFIG_ATTR=y
CONFIG_VHOST_SCSI=y
CONFIG_VHOST_NET_USED=y
CONFIG_VHOST_VSOCK=y
INSTALL_BLOBS=yes
CONFIG_IOVEC=y
CONFIG_PREADV=y
CONFIG_FDT=y
CONFIG_SIGNALFD=y
CONFIG_FDATASYNC=y
CONFIG_MADVISE=y
CONFIG_POSIX_MADVISE=y
CONFIG_AVX2_OPT=y
CONFIG_BZIP2=y
BZIP2_LIBS=-lbz2
CONFIG_QOM_CAST_DEBUG=y
CONFIG_COROUTINE_BACKEND=ucontext
CONFIG_COROUTINE_POOL=1
CONFIG_OPEN_BY_HANDLE=y
CONFIG_LINUX_MAGIC_H=y
CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE=y
CONFIG_VALGRIND_H=y
CONFIG_HAS_ENVIRON=y
CONFIG_CPUID_H=y
CONFIG_INT128=y
CONFIG_ATOMIC128=y
CONFIG_ATOMIC64=y
CONFIG_GETAUXVAL=y
HOST_USB=stub
CONFIG_TPM=$(CONFIG_SOFTMMU)
CONFIG_TPM_PASSTHROUGH=y
TRACE_BACKENDS=log
CONFIG_TRACE_LOG=y
CONFIG_TRACE_FILE=trace
CONFIG_RTNETLINK=y
CONFIG_REPLICATION=y
CONFIG_AF_VSOCK=y
CONFIG_SYSMACROS=y
CONFIG_THREAD_SETNAME_BYTHREAD=y
CONFIG_PTHREAD_SETNAME_NP=y
TOOLS=qemu-ga ivshmem-client$(EXESUF) ivshmem-server$(EXESUF) qemu-nbd$(EXESUF) qemu-img$(EXESUF) qemu-io$(EXESUF)
ROMS=optionrom
MAKE=make
INSTALL=install
INSTALL_DIR=install -d -m 0755
INSTALL_DATA=install -c -m 0644
INSTALL_PROG=install -c -m 0755
INSTALL_LIB=install -c -m 0644
PYTHON=python -B
CC=cc
CC_I386=$(CC) -m32
HOST_CC=cc
CXX=c++
OBJCC=cc
AR=ar
ARFLAGS=rv
AS=as
CCAS=cc
CPP=cc -E
OBJCOPY=objcopy
LD=ld
NM=nm
WINDRES=windres
CFLAGS=-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g
CFLAGS_NOPIE=
QEMU_CFLAGS=-I/usr/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong QEMU_INCLUDES=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/i386 -I$(SRC_PATH)/linux-headers -I/home/nihosa/Downloads/qemu-2.9.0-rc4/linux-headers -I. -I$(SRC_PATH) -I$(SRC_PATH)/include
AUTOCONF_HOST :=
LDFLAGS=-Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
LDFLAGS_NOPIE=
LD_REL_FLAGS=-Wl,-r -Wl,--no-relax
LD_I386_EMULATION=elf_i386
LIBS+=-lm -lgthread-2.0 -pthread -lglib-2.0 -lz -lrt
LIBS_TOOLS+=
PTHREAD_LIB=
EXESUF=
DSOSUF=.so
LDFLAGS_SHARED=-shared
LIBS_QGA+=-lm -lgthread-2.0 -pthread -lglib-2.0 -lrt
TASN1_LIBS=
TASN1_CFLAGS=
POD2MAN=pod2man --utf8
TRANSLATE_OPT_CFLAGS=
config-host.h: subdir-dtc

#10 lore raw
Quoted 14 lines · Ajallooiean Hossein

Thanks for the files and the notes.

I am attaching my config-host file for you. I'm on x86_64, running Linux 64, Ubuntu 16.04.2 LTS

so, i can also boot like you do - this worked before as well. btw, if you try to install that to a disk, itll not be able to as youll need to define memory for it.

The problem is after i install the iso on the qcow2 disk and then try to boot qemu-system-sparc64.

so here is the steps to reproduce the issue:
1- create a qcow2 image : debian-9.0-sparc64-NETINST-1.qcow2 2- download debian image: debian-9.0-sparc64-NETINST-1.iso 3- install the OS on dIsk
i use the below command line to do it:

Quoted 8 lines

./qemu-system-sparc64 -cdrom /home/nihosa/Downloads/debian-9.0-sparc64-NETINST-1.iso -hda /home/nihosa/Downloads/debian-sparc.qcow2 -nographic -boot d -L pc-bios -m 200

i guess i dont have to define a kernel in the above code???

4- installation goes all well.
5- i try to run the new disk image: - here i add kernel as if i dont add it ill get the below:

https://pastebin.com/cFwrX9E9

I've just done a test install with
https://people.debian.org/~glaubitz/debian-cd/2017-03-24/debian-9.0-sparc64-NETINST-1.iso
and I didn't see any errors similar to the ones you mention (although I did have to blacklist the bochs_drm module upon boot).

The resulting qcow2 image can be found temporarily at
https://www.ilande.co.uk/tmp/qemu/sparc64-kernel/deb90.qcow2.xz and you can launch it with:

./qemu-system-sparc64 -hda deb90.qcow2 -m 256 -nographic

Username and password are both root.

ATB,

Mark.

#11 lore raw

Hi Mark,

Thanks a lot for this. - it did work!

So, now im wondering how did you install the iso on disk?

would you mind sharing your command line for the install please? and hacks if any

i am now able to install and boot, but my boot hang after this line "[ 22.559491] [TTM] Initializing pool allocator" - inside user space. - I did blacklist bochs_drm for installing as such "-append 'modprobe.blacklist=bochs_drm'".

also, i have a couple of questions if you dont mind responding to them. - ill appreciate this a lot:
1- did you use virtio for your install? i.e. not using the "-cdrom" command and blacklisting the pata_cmd64x and also providing your own virtio device (/dev/vdb)?
- i used this link for hints on how to install with virtio http://tyom.blogspot.ch/2013/03/debiansparc64-wheezy-under-qemu-how-to.html

2- i see that you used ext3 for your OS install, isnt that slower than ext4? -again im referencing this: http://tyom.blogspot.ch/2013/03/virtio-performance-and-filesystems.html

3- also, im noticing that you didnt define root=/dev/sda or root=/dev/vda1 for when your running qemu. and when im running your image i have to do that, otherwise ill get to the initramfs only. is there a trick behind this?

4- i dont see you defining a kernel and initrd? is there a reason for this? if i just use your cmd line, ill get this: also, are you extracting the kernel and initrd from the image or the iso?

OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0 kernel cmdline
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Mar 15 2017 19:37
Type 'help' for detailed information
Trying disk:a...
Not a bootable ELF image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
SILO Version 1.4.14
boot:

Thanks a lot in advance for your help.

Cheers
Hoss
________________________________________
From: Mark Cave-Ayland <[email protected]>
Sent: Saturday, April 22, 2017 11:12 AM
To: Ajallooiean Hossein; [email protected]
Subject: Re: [Qemu-devel] Help needed: Sparc 64, kernel panic

Quoted 14 lines · Ajallooiean Hossein

Thanks for the files and the notes.

I am attaching my config-host file for you. I'm on x86_64, running Linux 64, Ubuntu 16.04.2 LTS

so, i can also boot like you do - this worked before as well. btw, if you try to install that to a disk, itll not be able to as youll need to define memory for it.

The problem is after i install the iso on the qcow2 disk and then try to boot qemu-system-sparc64.

so here is the steps to reproduce the issue:
1- create a qcow2 image : debian-9.0-sparc64-NETINST-1.qcow2 2- download debian image: debian-9.0-sparc64-NETINST-1.iso 3- install the OS on dIsk
i use the below command line to do it:

Quoted 8 lines

./qemu-system-sparc64 -cdrom /home/nihosa/Downloads/debian-9.0-sparc64-NETINST-1.iso -hda /home/nihosa/Downloads/debian-sparc.qcow2 -nographic -boot d -L pc-bios -m 200

i guess i dont have to define a kernel in the above code???

4- installation goes all well.
5- i try to run the new disk image: - here i add kernel as if i dont add it ill get the below:

https://pastebin.com/cFwrX9E9

I've just done a test install with
https://people.debian.org/~glaubitz/debian-cd/2017-03-24/debian-9.0-sparc64-NETINST-1.iso
and I didn't see any errors similar to the ones you mention (although I did have to blacklist the bochs_drm module upon boot).

The resulting qcow2 image can be found temporarily at
https://www.ilande.co.uk/tmp/qemu/sparc64-kernel/deb90.qcow2.xz and you can launch it with:

./qemu-system-sparc64 -hda deb90.qcow2 -m 256 -nographic

Username and password are both root.

ATB,

Mark.

#12 lore raw

Hi Mark

Sorry for pinging so early.

Im just wondering if youve had time to go over my email below.

Any help would be greatly appreciated.

Thanks
Hoss
________________________________________
From: Qemu-devel <[email protected]> on behalf of Ajallooiean Hossein <[email protected]>
Sent: Sunday, April 23, 2017 1:42:08 AM
To: [email protected]
Cc: Mark Cave-Ayland
Subject: Re: [Qemu-devel] Help needed: Sparc 64, kernel panic

Hi Mark,

Thanks a lot for this. - it did work!

So, now im wondering how did you install the iso on disk?

would you mind sharing your command line for the install please? and hacks if any

i am now able to install and boot, but my boot hang after this line "[ 22.559491] [TTM] Initializing pool allocator" - inside user space. - I did blacklist bochs_drm for installing as such "-append 'modprobe.blacklist=bochs_drm'".

also, i have a couple of questions if you dont mind responding to them. - ill appreciate this a lot:
1- did you use virtio for your install? i.e. not using the "-cdrom" command and blacklisting the pata_cmd64x and also providing your own virtio device (/dev/vdb)?
- i used this link for hints on how to install with virtio http://tyom.blogspot.ch/2013/03/debiansparc64-wheezy-under-qemu-how-to.html

2- i see that you used ext3 for your OS install, isnt that slower than ext4? -again im referencing this: http://tyom.blogspot.ch/2013/03/virtio-performance-and-filesystems.html

3- also, im noticing that you didnt define root=/dev/sda or root=/dev/vda1 for when your running qemu. and when im running your image i have to do that, otherwise ill get to the initramfs only. is there a trick behind this?

4- i dont see you defining a kernel and initrd? is there a reason for this? if i just use your cmd line, ill get this: also, are you extracting the kernel and initrd from the image or the iso?

OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0 kernel cmdline
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Mar 15 2017 19:37
Type 'help' for detailed information
Trying disk:a...
Not a bootable ELF image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
SILO Version 1.4.14
boot:

Thanks a lot in advance for your help.

Cheers
Hoss
________________________________________
From: Mark Cave-Ayland <[email protected]>
Sent: Saturday, April 22, 2017 11:12 AM
To: Ajallooiean Hossein; [email protected]
Subject: Re: [Qemu-devel] Help needed: Sparc 64, kernel panic

Quoted 14 lines · Ajallooiean Hossein

Thanks for the files and the notes.

I am attaching my config-host file for you. I'm on x86_64, running Linux 64, Ubuntu 16.04.2 LTS

so, i can also boot like you do - this worked before as well. btw, if you try to install that to a disk, itll not be able to as youll need to define memory for it.

The problem is after i install the iso on the qcow2 disk and then try to boot qemu-system-sparc64.

so here is the steps to reproduce the issue:
1- create a qcow2 image : debian-9.0-sparc64-NETINST-1.qcow2 2- download debian image: debian-9.0-sparc64-NETINST-1.iso 3- install the OS on dIsk
i use the below command line to do it:

Quoted 8 lines

./qemu-system-sparc64 -cdrom /home/nihosa/Downloads/debian-9.0-sparc64-NETINST-1.iso -hda /home/nihosa/Downloads/debian-sparc.qcow2 -nographic -boot d -L pc-bios -m 200

i guess i dont have to define a kernel in the above code???

4- installation goes all well.
5- i try to run the new disk image: - here i add kernel as if i dont add it ill get the below:

https://pastebin.com/cFwrX9E9

I've just done a test install with
https://people.debian.org/~glaubitz/debian-cd/2017-03-24/debian-9.0-sparc64-NETINST-1.iso
and I didn't see any errors similar to the ones you mention (although I did have to blacklist the bochs_drm module upon boot).

The resulting qcow2 image can be found temporarily at
https://www.ilande.co.uk/tmp/qemu/sparc64-kernel/deb90.qcow2.xz and you can launch it with:

./qemu-system-sparc64 -hda deb90.qcow2 -m 256 -nographic

Username and password are both root.

ATB,

Mark.

#13 lore raw
In reply to Ajallooiean Hossein

On 23/04/17 00:42, Ajallooiean Hossein wrote:

Hi Ajallooiean,

Quoted 7 lines

Hi Mark,

Thanks a lot for this. - it did work!

So, now im wondering how did you install the iso on disk?

would you mind sharing your command line for the install please? and hacks if any

I simply went for something along the lines of:

./qemu-system-sparc64 -hda deb90.qcow2 -cdrom debian-9.0-sparc64-NETINST-1.iso -boot d -nographic

i.e. no virtio devices and using the in-built device emulation. I do have some alpha patches that add virtio support to OpenBIOS but they are definitely not ready for production yet.

Quoted 1 line

i am now able to install and boot, but my boot hang after this line "[ 22.559491] [TTM] Initializing pool allocator" - inside user space. - I did blacklist bochs_drm for installing as such "-append 'modprobe.blacklist=bochs_drm'".

Once I installed the image, I restarted QEMU as normal but this time booting from the qcow2 image i.e.

./qemu-system-sparc64 -hda deb90.qcow2 -cdrom
debian-9.0-sparc64-NETINST-1.iso -nographic

Then at the SILO "boot: " prompt I typed:

Linux modprobe.blacklist=bochs_drm

That got me to a terminal login at which point I created the following file as /etc/modprobe.d/bochs_drm.conf:

blacklist bochs_drm

I then did an update-initramfs rebooted as normal, since with the module blacklisted there is no need to enter any custom parameters at the SILO boot prompt and I can simply hit Enter.

Quoted 3 lines

also, i have a couple of questions if you dont mind responding to them. - ill appreciate this a lot:
1- did you use virtio for your install? i.e. not using the "-cdrom" command and blacklisting the pata_cmd64x and also providing your own virtio device (/dev/vdb)?
- i used this link for hints on how to install with virtio http://tyom.blogspot.ch/2013/03/debiansparc64-wheezy-under-qemu-how-to.html

No, I just used the slower in-built CDROM emulation.

Quoted 3 lines

2- i see that you used ext3 for your OS install, isnt that slower than ext4? -again im referencing this: http://tyom.blogspot.ch/2013/03/virtio-performance-and-filesystems.html

From memory the installer insisted that /boot needed to be an ext3

partition in order to work with SILO which is why I chose it.

Quoted 1 line

3- also, im noticing that you didnt define root=/dev/sda or root=/dev/vda1 for when your running qemu. and when im running your image i have to do that, otherwise ill get to the initramfs only. is there a trick behind this?

No, it just seems to work for me with the inbuilt CDROM? However if you switch to using my image with virtio then you'll have to tweak /etc/fstab to use /dev/vda* rather than /dev/sda* devices and rebuild the initramfs once again.

Quoted 16 lines

4- i dont see you defining a kernel and initrd? is there a reason for this? if i just use your cmd line, ill get this: also, are you extracting the kernel and initrd from the image or the iso?

OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0 kernel cmdline
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Mar 15 2017 19:37
Type 'help' for detailed information
Trying disk:a...
Not a bootable ELF image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
SILO Version 1.4.14
boot:

Right - all you need to do here is hit Enter and boot will continue. Since I'm not using virtio I'm letting SILO do the work here. Once you've blacklisted bochs_drm and rebuilt the initramfs with everything setup then you should be able to copy them from the resulting image and boot them directly in QEMU using -kernel and -initrd.

ATB,

Mark.

#14 lore raw

Thanks a lot.

I really appreciate this.
________________________________________
From: Mark Cave-Ayland <[email protected]>
Sent: Monday, May 1, 2017 9:06 PM
To: Ajallooiean Hossein; [email protected]
Subject: Re: [Qemu-devel] Help needed: Sparc 64, kernel panic

On 23/04/17 00:42, Ajallooiean Hossein wrote:

Hi Ajallooiean,

Quoted 7 lines

Hi Mark,

Thanks a lot for this. - it did work!

So, now im wondering how did you install the iso on disk?

would you mind sharing your command line for the install please? and hacks if any

I simply went for something along the lines of:

./qemu-system-sparc64 -hda deb90.qcow2 -cdrom debian-9.0-sparc64-NETINST-1.iso -boot d -nographic

i.e. no virtio devices and using the in-built device emulation. I do have some alpha patches that add virtio support to OpenBIOS but they are definitely not ready for production yet.

Quoted 1 line

i am now able to install and boot, but my boot hang after this line "[ 22.559491] [TTM] Initializing pool allocator" - inside user space. - I did blacklist bochs_drm for installing as such "-append 'modprobe.blacklist=bochs_drm'".

Once I installed the image, I restarted QEMU as normal but this time booting from the qcow2 image i.e.

./qemu-system-sparc64 -hda deb90.qcow2 -cdrom
debian-9.0-sparc64-NETINST-1.iso -nographic

Then at the SILO "boot: " prompt I typed:

Linux modprobe.blacklist=bochs_drm

That got me to a terminal login at which point I created the following file as /etc/modprobe.d/bochs_drm.conf:

blacklist bochs_drm

I then did an update-initramfs rebooted as normal, since with the module blacklisted there is no need to enter any custom parameters at the SILO boot prompt and I can simply hit Enter.

Quoted 3 lines

also, i have a couple of questions if you dont mind responding to them. - ill appreciate this a lot:
1- did you use virtio for your install? i.e. not using the "-cdrom" command and blacklisting the pata_cmd64x and also providing your own virtio device (/dev/vdb)?
- i used this link for hints on how to install with virtio http://tyom.blogspot.ch/2013/03/debiansparc64-wheezy-under-qemu-how-to.html

No, I just used the slower in-built CDROM emulation.

Quoted 3 lines

2- i see that you used ext3 for your OS install, isnt that slower than ext4? -again im referencing this: http://tyom.blogspot.ch/2013/03/virtio-performance-and-filesystems.html

From memory the installer insisted that /boot needed to be an ext3

partition in order to work with SILO which is why I chose it.

Quoted 1 line

3- also, im noticing that you didnt define root=/dev/sda or root=/dev/vda1 for when your running qemu. and when im running your image i have to do that, otherwise ill get to the initramfs only. is there a trick behind this?

No, it just seems to work for me with the inbuilt CDROM? However if you switch to using my image with virtio then you'll have to tweak /etc/fstab to use /dev/vda* rather than /dev/sda* devices and rebuild the initramfs once again.

Quoted 16 lines

4- i dont see you defining a kernel and initrd? is there a reason for this? if i just use your cmd line, ill get this: also, are you extracting the kernel and initrd from the image or the iso?

OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0 kernel cmdline
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Mar 15 2017 19:37
Type 'help' for detailed information
Trying disk:a...
Not a bootable ELF image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
SILO Version 1.4.14
boot:

Right - all you need to do here is hit Enter and boot will continue. Since I'm not using virtio I'm letting SILO do the work here. Once you've blacklisted bochs_drm and rebuilt the initramfs with everything setup then you should be able to copy them from the resulting image and boot them directly in QEMU using -kernel and -initrd.

ATB,

Mark.