Re: qemu-system-sparc64 not booting install of debian sparc64

2020-06-30 Thread Adrian Davey

On 2020-06-30 15:30, Connor McLaughlan wrote:

On Tue, Jun 30, 2020 at 4:10 PM John Paul Adrian Glaubitz
 wrote:

You can specify both kernel and initrd on the command line using 
"-kernel"
and "-initrd" respectively. You just need to extract them from the 
virtual

machine disk image.

Adria


Hi Adrian,

i am almost up and running, i provided -initrd, -kernel and  -append 
root.


Booting up looks good. Also systemd is coming up.

Now it crashes after some VGA init:

[ 84.672537] [drm] Found bochs VGA, ID 0xb0c5.
[ 84.673255][drm] Framebuffer size 16384 kB @ 0x1ff2200, mmio @
0x1ff2300.
[ 84.711815] [TTM] Zone kernel: Available graphics memory: 2067220 KiB
[ 84.712821] [TTM] Initializing pool allocator
qemu: fatal: Trap 0x0032 while trap level (5) >= MAXTL (5), Error state
pc: 00405618 npc: 0040561c
...
pstate: 0015 ccr: 00 (icc:  xcc: ) asi: 11 tl: 5 pil: 0
gl: 2 tbr: 0042 hpstate:  htba:
 cansave: 5 canrestore: 1 otherwin: 0 wstate: 8
cleanwin: 7 cwp: 7 fsr:  y:  fprs:
 Aborted

I guess i will have to try some framebuffer kernel settings and stuff.

Regards,
Connor



Hi Connor,

Taken from https://wiki.debian.org/Sparc64Qemu

Create/edit /etc/modprobe.d/drm-blacklist.conf

# blacklist of DRM modules that do not load on qemu-system-sparc64 sun4u
blacklist drm
blacklist bochs-drm
blacklist ttm


May help you here.

Cheers,

Adrian



Re: How to determine if my qemu_sparc64 linux is completed booting?

2017-07-04 Thread Adrian Davey

On 2017-07-04 09:03, Mohd Yunus Sharum wrote:

On 04/07/2017 14:59, Mark Cave-Ayland wrote:

On 04/07/17 07:35, John Paul Adrian Glaubitz wrote:


On 07/04/2017 07:41 AM, Mohd Yunus Sharum wrote:
Then when i accessed the VM using minicom -p /dev/pts/2, it showed 
the boot process stopped until '[  OK  ] Found device 
QEMU_HARDDISK'.


I try (qemu) info status, and shows the vm is running.

I try to ssh localhost -p  but can't login.

In this case, how can i determine if the system is successfully 
booted and fully functional? Thanks.
You need to pass "console=ttyS0" or similar to tell systemd to 
actually
activate a serial console. Console over serial is disabled by 
default.


We should maybe change that in debian-installer.

Looking at the dmesg output, it looks like you're hitting the issue
where the bochs_drm module panics on load meaning that you end up with
no framebuffer unless you explicitly set the serial console as above.

I actually managed to debug this over the weekend and sent the patch
upstream (see
https://lists.freedesktop.org/archives/dri-devel/2017-July/145935.html)
so qemu-system-sparc64 should work fine with the bochs_drm framebuffer
when the 4.13 kernel comes out.

Adrian - next time you do a set of Debian images, would it be possible
to include this patch until it lands upstream?


ATB,

Mark.



I'm not sure if i really understand this.

Where should i put the option to enable console=ttyS0?

Is it the same if i change the -serial option on qemu-system-sparc64
command as the following?
(This require sudo, and nothing appear when i use minicom -D /dev/ttyS0 
).


LC_ALL=C QEMU_AUDIO_DRV=none \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
/usr/bin/qemu-system-sparc64 -name debian-unstable-sparc64
-machine sun4u,accel=tcg,usb=off -m 1024 \
-realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 \
-uuid ccd8b5c2-b8e4-4d5e-af19-9322cd8e55bf -rtc base=utc
-no-reboot -no-shutdown \
-boot strict=on \
-drive
file=/mypath/virtual-machines/linux-sparc64-img.qcow2,if=none,id=drive-ide0-0-1,format=qcow2,cache=none,aio=native
\
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-1,id=ide0-0-1 \
-netdev user,id=hostnet0,hostfwd=tcp::-:22 \
-device e1000,netdev=hostnet0,id=net0,mac=52:54:00:ce:98:e8 \
-msg timestamp=on -serial /dev/ttyS0 -nographic


-yunus


I'd recommend visiting https://wiki.debian.org/Sparc64Qemu and looking 
at the debug with systemd section, you will see how to boot to emergency 
target be able to edit blacklisted modules and then retry your normal 
boot.


Adrian



Re: /boot partition failing to mount

2017-03-29 Thread Adrian Davey
On 29 March 2017 18:55:10 BST, John Paul Adrian Glaubitz 
 wrote:
>On 03/29/2017 07:52 PM, Jesse Talavera-Greenberg wrote:
>> It's a plain file.  More specifically:
>> 
>> /bin/mount: setuid ELF 64-bit MSB shared object, SPARC V9, relaxed
>memory ordering, version 1 (SYSV), dynamically linked, interpreter
>/lib64/ld-linux.so.2, for
>> GNU/Linux 3.2.0,
>BuildID[sha1]=1015b9e9ef9f847f7c80beffca091666c6fa8605, stripped
>
>Ok, good. Either way, be prepared that you might run into problems with
>/usr being
>on a separate partition, see [1,2].
>
>> I just mentioned that changing the /etc/fstab record solved the
>problem, though.
>
>Yes, I saw that. However, the mail just arrived after I sent my
>message.
>
>> That being said, thank you for your help, and for your efforts in
>maintaining
>> Debian for this architecture.
>
>You're welcome :).
>
>Adrian
>
>> [1]
>https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
>> [2] https://wiki.debian.org/UsrMerge
>
>-- 
> .''`.  John Paul Adrian Glaubitz
>: :' :  Debian Developer - glaub...@debian.org
>`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
>  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Have you checked that the uuid was the correct one, you can still do this 
looking in /dev or using blkid 

Regards,

Adrian


Re: Missing dirmngr after fresh install

2017-03-21 Thread Adrian Davey

Hi,

On 2017-03-21 19:44, Jukka Nousiainen wrote:

Hi,

Many thanks for the new builds that have appeared recently.

I burnt the latest netinst image for installing into a v240. Here's 
some notes:


0) First, boot from cd into rescue mode shell
1) Label + partition disks for RAID1, leaving a bit of empty space at
the start of disk just in case something would accidentally write v1.2
metadata:

Device Start   End   Sectors  Size Id Type  
Flags

/dev/sdb1  16065 125845184 125829120   60G fd Linux raid autodetect
/dev/sdb2  125853210 143364059  17510850  8.4G fd Linux raid autodetect
/dev/sdb3  0 143364059 143364060 68.4G  5 Whole disk

Device Start   End   Sectors  Size Id Type  
Flags

/dev/sda1  16065 125845184 125829120   60G fd Linux raid autodetect
/dev/sda2  125853210 143364059  17510850  8.4G fd Linux raid autodetect
/dev/sda3  0 143364059 143364060 68.4G  5 Whole disk

2) Create arrays with v1.0 metadata:

mdadm --create /dev/md0 -n2 -x0 -l1 -e 1.0 /dev/sda1 /dev/sdb1
mdadm --create /dev/md1 -n2 -x0 -l1 -e 1.0 /dev/sda2 /dev/sdb2

3) Reboot from rescue mode into standard debian-installer
4) Use md0 as ext3 root, md1 as swap (seems to work without dedicated
/boot ...?)
5) After SILO has been installed, set boot devices:

ok setenv boot-device disk0:c disk1:c
ok boot

6) First problem: gpg --recv-keys operation fails due to missing 
dirmngr:


gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or 
directory


7) As workaround. Download, sha256sum verify & install dirmngr and
it's dependencies:

- dirmngr_2.1.18-6_sparc64.deb
- libldap-2.4-2_2.4.44+dfsg-3_sparc64.deb
- libldap-common_2.4.44+dfsg-3_all.deb
- libsasl2-2_2.1.27~101-g0780600+dfsg-2_sparc64.deb
- libsasl2-modules-db_2.1.27~101-g0780600+dfsg-2_sparc64.deb
- libksba8_1.3.5-2_sparc64.deb

After this, key retrieval should work.

8) Install firmware-qlogic etc. LUNs in a test array were visible out
of the box and multipathd seemed happy enough.

Any suggestions/workarounds for the missing dirmngr issue?


Simple idea to avoid the issue is by just using

`apt-get install debian-ports-archive-keyring`

Or download it from 
https://ftp.de.debian.org/debian-ports/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2016.11.28_all.deb 
, pop it on a usb stick and `dpkg -i ` the package if internet 
connectivity is an issue to start with.


(accept the unverified deb package this one time, after the package is 
install you have no issues using debian-ports archives)


Then you don't need any dirmngr or any of those dependencies.

Hope this helps.



Also, what repos should be used for ZFS packages?


Kind regards,
Jukka



Regards,

Adrian



Re: X in debian-9.0-sparc on qemu

2017-03-09 Thread Adrian Davey

On 2017-03-09 16:45, sacarde wrote:

Alle giovedì 9 marzo 2017, Adrian Davey ha scritto:


apt-get install xfonts-base, xfonts-encodings, xfonts-utils,
tightvncserver
say yes to the dependencies


run: apt-get install xfonts-base xfonts-encodings xfonts-utils 
tightvnvserver


Reading package lists... Done
Building dependency tree
Reading state information... Done
xfonts-base is already the newest version (1:1.0.4+nmu1).
xfonts-encodings is already the newest version (1:1.0.4-2).
xfonts-encodings set to manually installed.
tightvncserver is already the newest version (1:1.3.9-9).
xfonts-utils is already the newest version (1:7.7+4).
xfonts-utils set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 154 not upgraded.


same error


which is your vnc commandline?

thanks


Hi,

vncserver

that's it.

Adrian



Re: X in debian-9.0-sparc on qemu

2017-03-09 Thread Adrian Davey

On 2017-03-09 16:01, sacarde wrote:

Alle giovedì 9 marzo 2017, John Paul Adrian Glaubitz ha scritto:



if I run: tightvncserver :1

Couldn't start Xtightvnc; trying default font path.
Please set correct fontPath in the tightvncserver script.
Couldn't start Xtightvnc process.

09/03/17 16:53:55 Xvnc version TightVNC-1.3.9
09/03/17 16:53:55 Copyright (C) 2000-2007 TightVNC Group
09/03/17 16:53:55 Copyright (C) 1999 AT&T Laboratories Cambridge
09/03/17 16:53:55 All Rights Reserved.
09/03/17 16:53:55 See http://www.tightvnc.com/ for information on 
TightVNC

09/03/17 16:53:55 Desktop name 'X' (debian:1)
09/03/17 16:53:55 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 
3.8t

09/03/17 16:53:55 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
09/03/17 16:53:56 Xvnc version TightVNC-1.3.9
09/03/17 16:53:56 Copyright (C) 2000-2007 TightVNC Group
09/03/17 16:53:56 Copyright (C) 1999 AT&T Laboratories Cambridge
09/03/17 16:53:56 All Rights Reserved.
09/03/17 16:53:56 See http://www.tightvnc.com/ for information on 
TightVNC

09/03/17 16:53:56 Desktop name 'X' (debian:1)
09/03/17 16:53:56 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 
3.8t

09/03/17 16:53:56 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/Speedo/' not found - ignoring
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring

ls -l /usr/share/fonts/X11/
total 36
drwxr-xr-x 3 root root  4096 Mar  5 09:59 encodings
drwxr-xr-x 2 root root 24576 Mar  5 10:03 misc
drwxr-xr-x 2 root root  4096 Mar  9 11:40 Type1
drwxr-xr-x 2 root root  4096 Mar  5 09:59 util



if I run: tigervncserver

tigervncserver: /usr/bin/Xtigervnc did not start up, please look
into '/root/.vnc/debian:1.log' to determine the reason! -1
Killing Xtigervnc process ID 649... success!

and log empty


Hi,

Just tried on a fresh basic sid install:

apt-get install xfonts-base, xfonts-encodings, xfonts-utils, 
tightvncserver

say yes to the dependencies

bingo! working vncserver

Regards,

Adrian



Re: X in debian-9.0-sparc on qemu

2017-03-08 Thread Adrian Davey

On 2017-03-08 16:20, sacarde wrote:

Alle martedì 7 marzo 2017, Adrian Davey ha scritto:

You might like to read https://wiki.debian.org/Sparc64Qemu for some
guidance about blacklisting DRM modules that auto-load and cause 
issues

with qemu sparc64.  It is also a useful URL to see what others have
experienced with later d-i images etc.

Once QEMU 2.9 lands I am sure we'll see sun4v target info too.



OK, I blacklist 3 modules as your link describes
now wihtout "-vga none" boot is OK

but error using tigervncserver is the same...


p.s.
if you run: Xorg -configure
xorg.conf is done regularly ?


thankyou


Hi,

tigervncserver or tightvncserver are both independent from Xorg xserver 
config and also independent of any display adaptor/screen/keyboard/mouse 
attached or not.
Personally I add twm to make vnc slightly nicer on startup and it's 
light enough to not munch cpu cycles.


I have not tried tigervnc but tightvnc works perfectly here with current 
uptodate sid installed on qemu.


Regards,

Adrian



Re: X in debian-9.0-sparc on qemu

2017-03-07 Thread Adrian Davey

On 2017-03-07 16:23, sacarde wrote:

Alle martedì 7 marzo 2017, Artyom Tarasenko ha scritto:



> remember that I run with param: "-vga none" and "-nographic"
Do you really need "-vga none"? I think  "-nographic" should be 
enough.



if I dont use "-vga none" boot stop here:

...
...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Found device /dev/ttyS0.
[  121.547468] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  121.571064] sr 1:0:0:0: Attached scsi generic sg1 type 5
[  121.920354] [drm] Initialized drm 1.1.0 20060810
[  122.669983] [drm] Found bochs VGA, ID 0xb0c5.
[  122.670894] [drm] Framebuffer size 16384 kB @ 0x1ff0100, mmio @
0x1ff0200.
[  122.723687] [TTM] Zone  kernel: Available graphics memory: 248624 
kiB

[  122.724586] [TTM] Initializing pool allocator


and then %cpu qemu task is 100% but nothing more appears



Hi,

You might like to read https://wiki.debian.org/Sparc64Qemu for some 
guidance about blacklisting DRM modules that auto-load and cause issues 
with qemu sparc64.  It is also a useful URL to see what others have 
experienced with later d-i images etc.


Once QEMU 2.9 lands I am sure we'll see sun4v target info too.

Regards,

Adrian



Re: X in debian-9.0-sparc on qemu

2017-03-05 Thread Adrian Davey

On 2017-03-05 10:54, sacarde wrote:

I have not seen a working display adapter on qemu for sparc64 target,
however, would you be able to consider vnc over ssh perhaps to run 
your X

session?



I cant run X in virtualized system, ok (until I have vga=none)

do you mean run "ssh -X ..." to execute single applications on host PC 
?




thanks

saca...@tiscali.it


Hi,

Install vnc server in your qemu-system-sparc64 image, (see e.g 
https://packages.debian.org/sid/tightvncserver )
then connect to it from your desktop vnc client. If you need to, wrap it 
in an SSH tunnel so that e.g.


vnc client connects to localhost:5911 ->SSH tunnel to qemu IP (port 
forward 5911 to remote host 5901) ->localhost:5901 vnc server


The vnc session is a bit like RDP in the windows world, a virtual X 
session that you can detach from / re-attach to later, ideal for 
headless servers or display-less emulated systems.


http://www.debianhelp.co.uk/vnc.htm might be a useful starting point.

Hope this helps,

Adrian



Re: X in debian-9.0-sparc on qemu

2017-03-04 Thread Adrian Davey
On 4 March 2017 10:28:47 GMT+00:00, sacarde  wrote:
>hi,
>   is there a way to run X in qemu-sparc on a installed system with
>
>debian-9.0-sparc64-NETINST-1.iso
>
>I use this command:
>
>qemu-system-sparc64 -m 512 -vga none -drive 
>file=/.../sparc64.img,format=raw,index=0 -nographic -boot c -net nic
>-net 
>tap,vlan=0,ifname=tap0
>
>
>any suggestions ?
>
>
>
>thankyou 
>
>
>saca...@tiscali.it

Hi,

I have not seen a working display adapter on qemu for sparc64 target, however, 
would you be able to consider vnc over ssh perhaps to run your X session?

Regards,

Adrian

Re: Grub2 with sparc64 patches

2017-01-26 Thread Adrian Davey

On 2017-01-26 16:52, louis ayotte wrote:

On 2017-01-25 03:02 PM, John Paul Adrian Glaubitz wrote:

On 01/25/2017 08:21 PM, Eric Snowberg wrote:
I believe you are running out of memory here because grub is trying 
to load all those frame buffer modules within your config.



error: no suitable video mode found.

And then it didn’t find one that worked.

For this, I believe you are having the same problem as Frans.  Could 
you add the following to /etc/default/grub:


GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES=“iso9660"

and then regenerate your grub.cfg with grub-mkconfig.

Adrian,

I don’t plan on adding frame buffer support since newer systems don’t 
have them.  Would it be possible to change your grub package to 
include a /etc/default/grub file for SPARC with the changes above?  
We do the same thing with our grub rpm.
Oh, absolutely. Thanks for the suggestion. This was just the first 
package and I'm happy to include

all improvements that are necessary.

Adrian



K applied these changes, in chroot

  GNU nano 2.7.4   File:
/etc/default/grub

# note that you can use only modes which your graphic card supports via 
VBE

# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

GRUB_TERMINAL_OUTPUT="console"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES="iso9660"


Saved and exited


# grub-mkconfig
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod iso9660
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
insmod all_video
  else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
  fi
}

terminal_output console
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
Found linux image: /boot/vmlinuz-4.9.0-1-sparc64-smp
Found initrd image: /boot/initrd.img-4.9.0-1-sparc64-smp
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class
gnu --class os $menuentry_id_option
'gnulinux-simple-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_sun
insmod ext2
set root='hd1,sun1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root
--hint-ieee1275='ieee1275//pci@400/pci@0/pci@8/scsi@0/disk@0,sun1'
--hint-bios=hd1,sun1 --hint-efi=hd1,sun1 --hint-baremetal=ahci1,sun1
eda75771-2b2f-4ef8-95f7-d007f3f3355a
else
  search --no-floppy --fs-uuid --set=root
eda75771-2b2f-4ef8-95f7-d007f3f3355a
fi
echo'Loading Linux 4.9.0-1-sparc64-smp ...'
linux/vmlinuz-4.9.0-1-sparc64-smp
root=UUID=2f8e4b53-061c-4878-9d30-bec179fb59e4 ro  quiet
echo'Loading initial ramdisk ...'
initrd/initrd.img-4.9.0-1-sparc64-smp
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option
'gnulinux-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4' {
menuentry 'Debian GNU/Linux, with Linux 4.9.0-1-sparc64-smp' 
--class

debian --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-4.9.0-1-sparc64-smp-advanced-2f8e4b53-061c-4878-9d30-bec179fb59e4'
{
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; 
fi

insmod part_sun
insmod ext2
set root='hd1,sun1'
  

Re: report on debian-9.0-sparc64-NETINST-1.iso with qemu

2017-01-25 Thread Adrian Davey

On 2017-01-25 13:24, Artyom Tarasenko wrote:

On Tue, Jan 24, 2017 at 10:03 PM, Bruno Haible  wrote:

Hi Adrian,

Thank you for the rapid answer.

Yes, the latest image is known to have a broken version of 
debootstrap. I

should probably remove these images to keep others from using them.


Thanks. I tried again with the older image
https://people.debian.org/~glaubitz/debian-cd/2016-05-04/

1) At the first attempt, with a default partitioning ('/' partition 
and swap
partition), the installation completed but the installed system could 
not

boot: "Cannot find /etc/silo.conf".

The reason appears to be that my hard disk is > 1 GB, and the advice 
from [1]
helped: I could overcome this problem by creating a boot partition at 
the
beginning of the disk (250 MB in my case, and in ext2, to avoid the 
warning).


May I suggest that the Debian installer uses such a partitioning 
scheme by
default? I've seen the Debian 8.6 installer use a separate /boot 
partition
by default on armhf and s390x. So, it shouldn't be easy to do the same 
thing

for sparc...?

2) The installed system now boots, either by entering
 1/vmlinuz initrd=/initrd.img root=/dev/sda2
at the SILO prompt, or by letting this prompt timeout. However, the 
boot process

hangs after one minute, after this output:

 Starting udev Kernel Device Manager...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Found device /dev/ttyS0.
[   66.121368] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   66.137222] sr 1:0:0:0: Attached scsi generic sg1 type 5
[   66.384970] [drm] Initialized drm 1.1.0 20060810
[   66.726958] [drm] Found bochs VGA, ID 0xb0c5.
[   66.727424] [drm] Framebuffer size 16384 kB @ 0x1ff0100, mmio @ 
0x1ff0200.
[   66.773438] [TTM] Zone  kernel: Available graphics memory: 248620 
kiB

[   66.774061] [TTM] Initializing pool allocator

Any idea? Is there a combination of a '-vga' parameter to qemu [2] and 
some kernel
parameters [3] (I tried 'console=ttyS0', 'console=/dev/null', 'nofb', 
'nomodeset',

'vga=normal') that would make this work?

3) There's a problem with the network interface: It accepts a 
configuration
through the built-in DHCP server of QEMU, but - as I could see by 
putting myself
in a chroot environment at the end of the installation - an 'ssh 
me@10.0.2.2'
cannot connect to the host machine at 10.0.2.2. DNS lookup doesn't 
work either,

although /etc/resolv.conf contains the correct value 10.0.2.3.
On other platforms this works.
The hardware emulated by QEMU on this platform is
  hub 0
   \ hub0port1: user.0: index=0,type=user,net=10.0.2.0,restrict=off
   \ hub0port0: ne2k_pci.0: 
index=0,type=nic,model=ne2k_pci,macaddr=52:54:00:12:34:56

Does anyone happen to know?


What is your exact QEMU command line?

Does ping 10.0.2.2 work? Is the interface up in the ifconfig output?

I'm currently more focused on sun4v emulation, so I'm not sure about
the ne2k status. My blog post from May 2012 [1] says it was not
working at that time, but it was before Mark improved the IOMMU
support. But virtio was definitely working in 2015. Please try

-net nic,model=virtio -net user

qemu boot parameters (modifying the "interrupts" property described in
[1] should not be necessary nowadays).

Artyom

1. 
http://tyom.blogspot.de/2012/05/networking-in-linuxsparc64-under-qemu.html


Hi,

https://wiki.debian.org/Sparc64Qemu

Might be a starting point for you with qemu emulating sparc64 hardware. 
I know that e1000 nic works perfectly.


Regards,

Adrian



Re: booting qemu sparc gives black window

2016-05-18 Thread Adrian Davey

On 2016-05-18 11:44, David Griffith wrote:

On Wed, 18 May 2016, Adrian Davey wrote:


On 2016-05-18 11:27, David Griffith wrote:

On Wed, 18 May 2016, Mark Cave-Ayland wrote:


On 18/05/16 11:11, David Griffith wrote:


Ahhh so it appears that Debian have broken QEMU packages for
qemu-system-sparc :(

You should be able to grab the binaries directly from QEMU git at
http://git.qemu.org/?p=qemu.git;a=tree;f=pc-bios;h=1cbe7b99f5fd330fab9880b0d06f0c029b00;hb=a257c741491ff1c3c192d13a89c136dd6401c54d

- simply drop both files into /usr/share/qemu manually and see if 
that

helps.


No change.  Still black.


How strange.

First can you check again with the different display options: 
-display
sdl, -display gtk and -display vnc and see if that changes anything? 
At
least if anything is wrong and you launch these from a terminal you 
may

see some errors on the command line.

Secondly what happens if you remove the -hda part from your command 
line

and just try booting the ISO?


Still black.


package openbios-sparc adds
/usr/share/openbios/QEMU,tcx.bin
/usr/share/openbios/openbios-sparc32
/usr/share/openbios/openbios-sparc64

it could be that qemu is not looking at the correct location, I see 
only symlinks from /usr/share/qemu/ to /usr/share/openbios for 
sparc32/64 files.


Okay.  Now that those video bin files are in the proper place and
named correctly, the graphical window is showing something normal.  I
guess the package is mangled.

Now that that's done, neither "boot 2" nor "boot cdrom" will work.

===begin quote===
Boot device: /iommu/sbus/ledma@5,8400010/le@5,8c0  File and args:
Internal loopback test -- Wrong packet length; expected 36, observed 64

Can't open boot device

Type  help  for more information
ok boot cdrom
Boot device: /iommu/sbus/espdma@5,840/esp@5,880/sd@6,0:d  File 
and args:


Can't open boot device

ok boot 2
Boot device: /iommu/sbus/ledma@5,8400010/le@5,8c0  File and args: 2
Internal loopback test -- Wrong packet length; expected 36, observed 64

Can't open boot device

ok
===end quote===


FYI

BUG #824665 "openbios-sparc: missing QEMU,cgthree.bin file" created, 
once it's included then we can file a bug report for qemu-system-sparc 
to include the symlinks for all the sparc display bin files.


Regards,

Adrian



Re: booting qemu sparc gives black window

2016-05-18 Thread Adrian Davey

On 2016-05-18 11:27, David Griffith wrote:

On Wed, 18 May 2016, Mark Cave-Ayland wrote:


On 18/05/16 11:11, David Griffith wrote:


Ahhh so it appears that Debian have broken QEMU packages for
qemu-system-sparc :(

You should be able to grab the binaries directly from QEMU git at
http://git.qemu.org/?p=qemu.git;a=tree;f=pc-bios;h=1cbe7b99f5fd330fab9880b0d06f0c029b00;hb=a257c741491ff1c3c192d13a89c136dd6401c54d

- simply drop both files into /usr/share/qemu manually and see if 
that

helps.


No change.  Still black.


How strange.

First can you check again with the different display options: -display
sdl, -display gtk and -display vnc and see if that changes anything? 
At
least if anything is wrong and you launch these from a terminal you 
may

see some errors on the command line.

Secondly what happens if you remove the -hda part from your command 
line

and just try booting the ISO?


Still black.


package openbios-sparc adds
/usr/share/openbios/QEMU,tcx.bin
/usr/share/openbios/openbios-sparc32
/usr/share/openbios/openbios-sparc64

it could be that qemu is not looking at the correct location, I see only 
symlinks from /usr/share/qemu/ to /usr/share/openbios for sparc32/64 
files.


Regards,

Adrian



Re: Debian on qemu-system-sparc64

2016-01-25 Thread Adrian Davey

Hi Artyom,

On 2016-01-25 21:39, Adrian Davey wrote:

Hi Artyom,

On 2016-01-25 17:42, Artyom Tarasenko wrote:
On Mon, Jan 25, 2016 at 12:05 PM, Adrian Davey  
wrote:

Hi all,

Just thought I'd share a couple of things to help people use debian 
on

emulated sparc64 (sun4u).

Currently, graphics is not functioning


Interesting. This used to work with Debian 7 and older QEMU versions.
Is it regression in Debian or qemu-system-sparc64/OpenBIOS ?

Could you please check if Debian 7 also hangs in your setup?

Regards,
Artyom



Ok I have finally installed debian 7 sparc (64 bit kernel, 32bit
userland) on current (debian/unstable amd64) qemu-system-sparc64
(sun4u) and indeed I can manually modprobe both drm and ttm that I
thought I needed to blacklist on current sparc64 unstable.  So I tried
again on current unstable sparc64, at least I get more than a hung
system now...

snip


Another item to note is that running
`top` in debian/unstable sparc64 has a load of ~1.09 of an idle system
(1.6 us, 2.9 sy, 0.0 ni, 95.5 id)
while
`top` in debian/7.9 sparc has a load of ~0.00 of an idle system (0.3
us, 1.6 sy, 0.0 ni, 98.7 id)

I am tempted to try the 4.3 kernel on the debian 7.9 VM to see what 
happens...


Ok after a little fun with forcing dpkg architectures and depends in 
addition to a little bit of debian backports for initramfs-tools and 
udev + some guidance from 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=+752742, I have the 
4.3 kernel running on debian/7.9~ sparc.


Same problem with bochs-drm as expected, but `top` remains the same for 
load stats as the previous kernel.


I wonder what is causing 64bit userland to spin so much on noops, or 
whatever it is doing.




Regards,

Adrian


Regards,

Adrian



Re: Debian on qemu-system-sparc64

2016-01-25 Thread Adrian Davey

Hi Artyom,

On 2016-01-25 17:42, Artyom Tarasenko wrote:
On Mon, Jan 25, 2016 at 12:05 PM, Adrian Davey  
wrote:

Hi all,

Just thought I'd share a couple of things to help people use debian on
emulated sparc64 (sun4u).

Currently, graphics is not functioning


Interesting. This used to work with Debian 7 and older QEMU versions.
Is it regression in Debian or qemu-system-sparc64/OpenBIOS ?

Could you please check if Debian 7 also hangs in your setup?

Regards,
Artyom



Ok I have finally installed debian 7 sparc (64 bit kernel, 32bit 
userland) on current (debian/unstable amd64) qemu-system-sparc64 (sun4u) 
and indeed I can manually modprobe both drm and ttm that I thought I 
needed to blacklist on current sparc64 unstable.  So I tried again on 
current unstable sparc64, at least I get more than a hung system now...


dmesg output:

[0.00] PROMLIB: Sun IEEE Boot Prom 'OBP 3.10.24 1999/01/01 
01:01'

[0.00] PROMLIB: Root node compatible: sun4u
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 4.3.0-1-sparc64 
(debian-ker...@lists.debian.org) (gcc version 4.9.3 (Debian 4.9.3-11) ) 
#1 Debian 4.3.3-7 (2016-01-19)

[0.00] bootconsole [earlyprom0] enabled
[0.00] ARCH: SUN4U
[0.00] Ethernet address: 00:00:00:00:00:00
[0.00] MM: PAGE_OFFSET is 0xf800 (max_phys_bits == 
40)

[0.00] MM: VMALLOC [0x0001 --> 0x0600]
[0.00] MM: VMEMMAP [0x0600 --> 0x0c00]
[0.00] Kernel: Using 3 locked TLB entries for main kernel image.
[0.00] Remapping the kernel... done.
[0.00] OF stdout device is: /pci@1fe,0/ebus@2/su
[0.00] PROM: Built device tree with 56667 bytes of memory.
[0.00] Top of RAM: 0x3fe8, Total RAM: 0x3fe8
[0.00] Memory hole size: 0MB
[0.00] Allocated 16384 bytes for kernel page tables.
[0.00] Zone ranges:
[0.00]   DMA  empty
[0.00]   Normal   [mem 0x-0x3fe7]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x3fe7]
[0.00] Initmem setup node 0 [mem 
0x-0x3fe7]

[0.00] On node 0 totalpages: 130880
[0.00]   Normal zone: 1151 pages used for memmap
[0.00]   Normal zone: 130880 pages, LIFO batch:15
[0.00] Booting Linux...
[0.00] CPU CAPS: [flush,stbar,swap,muldiv,v9,mul32,div32,v8plus]
[0.00] CPU CAPS: [vis]
[0.00] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[0.00] pcpu-alloc: [0] 0
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  
Total pages: 129729

[0.00] Kernel command line: root=/dev/sda1
[0.00] PID hash table entries: 4096 (order: 2, 32768 bytes)
[0.00] Dentry cache hash table entries: 131072 (order: 7, 
1048576 bytes)
[0.00] Inode-cache hash table entries: 65536 (order: 6, 524288 
bytes)

[0.00] Sorting __ex_table...
[0.00] Memory: 1016536K/1047040K available (5104K kernel code, 
689K rwdata, 1408K rodata, 392K init, 579K bss, 30504K reserved, 0K 
cma-reserved)

[0.00] NR_IRQS:2048 nr_irqs:2048 1
[   14.843798] clocksource: tick: mask: 0x max_cycles: 
0x171024e7e0, max_idle_ns: 440795205315 ns

[   14.845450] clocksource: mult[a00] shift[24]
[   14.847095] clockevent: mult[199a] shift[32]
[   14.851874] Console: colour dummy device 80x25
[   14.855127] console [tty0] enabled
[   14.856318] bootconsole [earlyprom0] disabled
[   14.936003] Calibrating delay using timer specific routine.. 205.95 
BogoMIPS (lpj=411900)

[   14.936260] pid_max: default: 32768 minimum: 301
[   14.937060] Security Framework initialized
[   14.937143] Yama: disabled by default; enable with sysctl 
kernel.yama.*

[   14.937839] AppArmor: AppArmor disabled by boot time parameter
[   14.938290] Mount-cache hash table entries: 2048 (order: 1, 16384 
bytes)
[   14.938361] Mountpoint-cache hash table entries: 2048 (order: 1, 
16384 bytes)

[   14.946217] Initializing cgroup subsys io
[   14.946474] Initializing cgroup subsys memory
[   14.946677] Initializing cgroup subsys devices
[   14.946777] Initializing cgroup subsys freezer
[   14.946882] Initializing cgroup subsys net_cls
[   14.946973] Initializing cgroup subsys perf_event
[   14.947062] Initializing cgroup subsys net_prio
[   14.947795] ftrace: allocating 17417 entries in 35 pages
[   15.027304] devtmpfs: initialized
[   15.036091] Performance events: No support for PMU type 'ultra12'
[   15.038358] clocksource: jiffies: mask: 0x max_cycles: 
0x, max_idle_ns: 764504178510 ns

[   15.044811] NET: Registered protocol family 16
[   15.064447] /pci@1f,0: PCI IO[1fe0200] MEM[1

Re: Debian on qemu-system-sparc64

2016-01-25 Thread Adrian Davey

Hi Adrian,

On 2016-01-25 13:51, John Paul Adrian Glaubitz wrote:

Hi Adrian!

On 01/25/2016 12:05 PM, Adrian Davey wrote:

Just thought I'd share a couple of things to help people use debian on
emulated sparc64 (sun4u).


Great idea!

Currently, graphics is not functioning so once installed using 
Adrian's

wonderful debian d-i iso [1] from message thread [2], you need to make
sure that systemd it not going to make modprobe load the DRM modules,
else you hang your VM.


Good to know, thanks!


(...)


Would you mind putting this up in the Debian Wiki on the sparc64 page?


https://wiki.debian.org/Sparc64


Added new page https://wiki.debian.org/Sparc64Qemu with link from 
Sparc64 similar to how arm64 did it.




It would also be interesting to know whether you could get networking
on qemu-sparc64 because recently I never managed to do that. Also,
when using virt-manager, I always receive an obscure permissions
error when creating a new sparc64 VM, so I always have to resort
to the command line.


Networking with QEMU can be simple or complex.  Personally, I avoid 
using qemu directly as networking is not simple at the common line 
invocation unless you only want user-mode networking.


I have setup a 'default' network using virt-manager that creates a NATed 
network that bridges to any host system connected network, libvirt sets 
up dnsmasq perfectly for my needs, you can even do IPv6 now too.  I also 
have other networks defined for other VMs that need direct bridge or 
completely private inter-VM network, all really easy to setup with 
virt-manager.


Sadly virt-manager doesn't understand non-x86 system defines very well, 
so it automatically tries to make PCI slot number changes, which then 
fail to save as the config collides. Edit the VM config  from virsh is 
the safe work around.  Libvirt is equally clever in thinking you will 
need USB added, I have not found a way around this as yet, but it 
doesn't harm installation or running of debian.
I can't be bothered with minicom connecting to PTY so I use the 
virt-manager GUI to start/stop VMs and watch the console, even better 
when doing this on a remote system.
I define the /etc/network/interfaces file for the enp0sX device to auto 
up and dhcp from host's libvirt dnsmasq and run ssh into the VM to 
interact with it rather than the virt-manager console as much as 
possible.


Hope this helps.



It would be absolutely fantastic to have a complete walkthrough guide
in the wiki which explains how to get a working qemu-sparc64 on
a vanilla Debian testing/unstable.


It's started, feel free to edit, it was mainly a brain dump for now.



Adrian


Another Adrian



Debian on qemu-system-sparc64

2016-01-25 Thread Adrian Davey

Hi all,

Just thought I'd share a couple of things to help people use debian on 
emulated sparc64 (sun4u).


Currently, graphics is not functioning so once installed using Adrian's 
wonderful debian d-i iso [1] from message thread [2], you need to make 
sure that systemd it not going to make modprobe load the DRM modules, 
else you hang your VM.


For DRM blacklisting:

debian-sparc64:#$ cat /etc/modprobe.d/drm-blacklist.conf

# blacklist of DRM modules that do not load on qemu-system-sparc64 sun4u
blacklist drm
blacklist bochs-drm
blacklist ttm

For sanity, loading initrd at 4.0MB rather than 14MB+:

edit /etc/initramfs-tools/initramfs.conf to not install every module
#MODULES=most
MODULES=dep


I found having the following entry in /etc/silo.conf rather handy for 
debugging the last couple of weeks:


image = /vmlinuz
label = linux-emergency
append = "initrd=/initrd.img root=/dev/sda1 
systemd.unit=emergency.target"


I prefer to run VMs using libvirt, and use the gui from virt-manager so 
I use the following xml in virsh, hope this helps other people. If you 
edit the VM config be sure to check what pci slots are automatically 
reset to lower numbers that then collide with predefined machine config 
in qemu-system-sparc64.





  debian-unstable-sparc64
  ccd8b5c2-b8e4-4d5e-af19-9322cd8e55bf
  1048576
  1048576
  1
  
/machine
  
  
hvm
  
  
  destroy
  restart
  destroy
  
/usr/bin/qemu-system-sparc64

  
  file='/path/to/vm/images/default/debian-unstable-sparc64.qcow2'/>

  
  
  


  
  
  
  



  function='0x0'/>




  
  
  
  function='0x0'/>



  


  


  
  function='0x0'/>



  


Enjoy debian on emulated sparc64. Is it fast? Erm no, but it is fun and 
a useful way to test d-i images. I am sure that booting off IDE for 
silo, kernel and initrd and then using virtio disks would make things 
better for IO, but not tried it yet. I think single threaded qemu 
sparc64 cpu is more the limiting factor, however.


Thanks go to the debian sparc porters and the qemu developers!

Regards,

Adrian



[1] 
https://people.debian.org/~glaubitz/debian-cd/debian-9.0-sparc64-NETINST-1.iso

[2] https://lists.debian.org/debian-sparc/2016/01/msg00097.html