Port-m68k archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: A few issues while playing with virt68k



> On Mar 15, 2024, at 2:47 PM, John Klos <john%klos.com@localhost> wrote:
> 
> Hi,
> 
> I'm looking forward to making more use of virt68k, so I figured I'd give it a try. A quick test showed it was easy to get going, even though there are issues with dealing with big endian disklabels on little endian machines (disklabel -I -i -B be vnd0 gives disklabel: changing le byteorder to be, disklabel: could not read existing label).
> 
> However, when I wanted to set up multiple disks, there were issues. I realized that disklabels don't work:
> 
> disklabel -I -i ld0
> (change some things)...
> partition>W
> Label disk [n]?y
> disklabel: ioctl DIOCWDINFO: No disk label on disk;
> use "disklabel -I" to install initial label
> Label not written

To write the initial one, you need to use -r.  This is just the annoying way that disklabel(8) has ~always worked.

virt68k:thorpej 4$ sudo disklabel ld0
# /dev/rld0:
type: unknown
disk: ld
label: fictious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 16779264
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0  
3 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  14415936      1024     4.2BSD      0     0     0  # (Cyl.      1*-  14302*)
 b:   2097104  14416960       swap                     # (Cyl.  14302*-  16382)
 c:  16779264         0     unused      0     0        # (Cyl.      0 -  16646*)
virt68k:thorpej 5$ 

(Disklabels definitely work.)

> Unlike riscv64 in qemu (the only other qemu NetBSD guest I've played with much), the kernel asks for the root and dump devices, in spite of qemu being run with -append "root=dk1". How does one get it to auto boot?

Weird.  I have:

	-append “root=ld0a”

On my qemu command line and it boots right up without prompting:

the-ripe-vessel:thorpej 8$ ./netbsd-virt68k                                    
WARNING: Image format was not specified for 'disk1.raw' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
WARNING: Image format was not specified for 'disk0.raw' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
[   1.0000000] Initialized Goldfish TTY console @ 0xff008000
[   1.0000000] Memory segment 0: addr=0x003f1000 size=0x07c0f000
[   1.0000000] entropy: ready
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[   1.0000000]     2024
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 10.99.10 (GENERIC) #2: Tue Mar  5 06:33:10 PST 2024
[   1.0000000] thorpej@the-ripe-vessel:/home/nbsd/src/sys/arch/virt68k/compile/GENERIC
[   1.0000000] Qemu 8.1.3: MC68040+MMU+FPU, 4k+4k on-chip physical I/D caches
[   1.0000000] total memory = 128 MB
[   1.0000000] avail memory = 120 MB
[   1.0000000] mainbus0 (root)
[   1.0000000] gfpic0 at mainbus0 addr 0xff000000: Google Goldfish PIC
[   1.0000000] gfpic0: interrupting at IPL 1
[   1.0000000] gfpic1 at mainbus0 addr 0xff001000: Google Goldfish PIC
[   1.0000000] gfpic1: interrupting at IPL 2
[   1.0000000] gfpic2 at mainbus0 addr 0xff002000: Google Goldfish PIC
[   1.0000000] gfpic2: interrupting at IPL 3
[   1.0000000] gfpic3 at mainbus0 addr 0xff003000: Google Goldfish PIC
[   1.0000000] gfpic3: interrupting at IPL 4
[   1.0000000] gfpic4 at mainbus0 addr 0xff004000: Google Goldfish PIC
[   1.0000000] gfpic4: interrupting at IPL 5
[   1.0000000] gfpic5 at mainbus0 addr 0xff005000: Google Goldfish PIC
[   1.0000000] gfpic5: interrupting at IPL 6
[   1.0000000] gfrtc0 at mainbus0 addr 0xff006000: Google Goldfish RTC + timer
[   1.0000000] gfrtc0: hardclock interrupting at gfpic5 irq 1 (IPL 6)
[   1.0000000] gfrtc0: Using as delay() timer.
[   1.0000000] gfrtc1 at mainbus0 addr 0xff007000: Google Goldfish RTC + timer
[   1.0000000] gfrtc1: using as Time of Day Register.
[   1.0000000] gftty0 at mainbus0 addr 0xff008000: Google Goldfish TTY
[   1.0000000] gftty0: console
[   1.0000000] gftty0: interrupting at gfpic0 irq 32 (IPL 1)
[   1.0000000] virtctrl0 at mainbus0 addr 0xff009000: Qemu Virtual System Controller
[   1.0000000] virtctrl0: features=0x00000001
[   1.0000000] virtio0 at mainbus0 addr 0xff01f600
[   1.0000000] virtio0: VirtIO-MMIO-v2
[   1.0000000] virtio0: network device (id 1, rev. 0x01)
[   1.0000000] vioif0 at virtio0: features: 0x130870020<V1,EVENT_IDX,INDIRECT_DESC,CTRL_MAC,CTRL_RX,CTRL_VQ,STATUS,MAC>
[   1.0000000] vioif0: Ethernet address 52:54:00:12:34:56
[   1.0000000] virtio0: interrupting at gfpic4 irq 28 (IPL 5)
[   1.0000000] virtio1 at mainbus0 addr 0xff01f800
[   1.0000000] virtio1: VirtIO-MMIO-v2
[   1.0000000] virtio1: SCSI device (id 8, rev. 0x01)
[   1.0000000] vioscsi0 at virtio1: features: 0x110000000<V1,INDIRECT_DESC>
[   1.0000000] vioscsi0: cmd_per_lun 128 qsize 1024 seg_max 254 max_target 255 max_lun 16383
[   1.0000000] virtio1: interrupting at gfpic4 irq 29 (IPL 5)
[   1.0000000] scsibus0 at vioscsi0: 256 targets, 16384 luns per target
[   1.0000000] virtio2 at mainbus0 addr 0xff01fa00
[   1.0000000] virtio2: VirtIO-MMIO-v2
[   1.0000000] virtio2: entropy device (id 4, rev. 0x01)
[   1.0000000] viornd0 at virtio2: features: 0x110000000<V1,INDIRECT_DESC>
[   1.0000000] virtio2: interrupting at gfpic4 irq 30 (IPL 5)
[   1.0000000] virtio3 at mainbus0 addr 0xff01fc00
[   1.0000000] virtio3: VirtIO-MMIO-v2
[   1.0000000] virtio3: block device (id 2, rev. 0x01)
[   1.0000000] ld0 at virtio3: features: 0x110000a54<V1,INDIRECT_DESC,CONFIG_WCE,FLUSH,BLK_SIZE,GEOMETRY,SEG_MAX>
[   1.0000000] virtio3: interrupting at gfpic4 irq 31 (IPL 5)
[   1.0000000] ld0: 8193 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 16779264 sectors
[   1.0000000] virtio4 at mainbus0 addr 0xff01fe00
[   1.0000000] virtio4: VirtIO-MMIO-v2
[   1.0000000] virtio4: block device (id 2, rev. 0x01)
[   1.0000000] ld1 at virtio4: features: 0x110000a54<V1,INDIRECT_DESC,CONFIG_WCE,FLUSH,BLK_SIZE,GEOMETRY,SEG_MAX>
[   1.0000000] virtio4: interrupting at gfpic4 irq 32 (IPL 5)
[   1.0000000] ld1: 16384 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 33554432 sectors
[   1.0000000] No statclock; using hardclock.
[   1.0000000] Initialzing hardclock: freq=100 Hz, interval=10000 usec
[   1.0900030] cd0 at scsibus0 target 6 lun 0: <QEMU, QEMU CD-ROM, 2.5+> cdrom removable
[   1.0900030] cd0: async, 8-bit transfers, tagged queueing
[   4.8900030] swwdog0: software watchdog initialized
[   4.9000030] root on ld0a dumps on ld0b
[   4.9100030] root file system type: ffs
[   4.9100030] kern.module.path=/stand/virt68k/10.99.10/modules
Fri Mar 15 15:24:57 PDT 2024
Starting root file system check:
/dev/rld0a: file system is clean; not checking
Setting sysctl variables:
ddb.onpanic: 1 -> 0
swapctl: setting dump device to /dev/ld0b
swapctl: adding /dev/ld0b as swap device at priority 0
Starting file system checks:
/dev/rld1a: file system is clean; not checking
Loaded entropy from /var/db/entropy-file.
Waiting for entropy...done
Setting tty flags.
Starting network.
Hostname: virt68k
IPv6 mode: host
Configuring network interfaces: vioif0.
Adding interface aliases:.
Waiting for duplicate address detection to finish...
Starting dhcpcd.
Starting mdnsd.
Building databases: dev, utmp, utmpx.
Starting syslogd.
Mounting all file systems...
Clearing temporary files.
Creating a.out runtime link editor directory cache.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
swapctl: setting dump device to /dev/ld0b
Starting virecover.
Checking for core dump...
savecore: no core dump
Starting local daemons:.
Updating motd.
Starting ntpd.
Starting sshd.
Starting inetd.
Starting cron.
Fri Mar 15 15:25:15 PDT 2024

NetBSD/virt68k (virt68k) (constty)

login:

> 
> Thanks!
> John

-- thorpej



Home | Main Index | Thread Index | Old Index