Category Archives: pkgsrc

NetBSD NAS software setup

Once boot process was solved, I needed to setup ZFS for my hard drives and several services like NFS and Samba, setup network bonding using the new dedicated lagg(4) interface with LACP protocol, which in turn would complete the major NAS functionality.

ZFS setup

Initial ZFS setup was pretty easy. Luckily, configuring ZFS modules (solaris, zfs) in modules.conf(5) file was enough to make it work, even if configuration file was located in chrooted root partition. I mainly followed the Creating ZFS pools on NetBSD article from the UnitedBSD , or more exactly the “Create a ZFS pool” section by creating a ZFS pool and datasets with the mount points. After that, adding “zfs=YES” line in rc.conf(5) file does the final trick in order to mount ZFS partitions in their intended locations. I also enabled de-duplication and gzip compression features. The main mistake followed after adding a second hard drive to the zpool, which was intended to be a mirrored drive, for which attach command should have been used. NetBSD’s zpool command doesn’t allow removal of the drive without proper redundancy and doesn’t support forced removal, thus I need to recreate the pool, which was a bit of painful setback. According to recommendations I scheduled once a month zpool scrub operation, but still need to setup scheduled snapshots in the nearest future.

Link aggregation

As mentioned previously QNAP TVS-675 system contains two expansion card slots using PCIe Gen3 x4 interface. Thanks to the cut at the back of the port, cards with x8 physical slot can also fit into the port (longer cards may not fit though without modifications, metal frame can block the insertion). The challenge in doing so that it was a very short distance between PSU and a slot bracket, which made it very difficult to unscrew it without removing the PSU first. Once the network card was physically in place, the major problem occurred while setting up the lagg(4) interface using link aggregation control protocol (LACP). It appeared that mcx(4) driver wasn’t setting up full-duplex data transmission required by the protocol. Fortunately, the fix was relatively easy and made it into NetBSD 10 release by enforcing full-duplex in the driver. Additionally, missing lagg parameters were documented in ifconfig(8) man page. After the fix, network bonding setup was pretty straightforward by creating /etc/ifconfig.lagg0 file:

create
laggproto lacp laggport mcx0 laggport mcx1
up

I also created ifconfig.mcx0 and ifconfig.mcx1 with only up command and added net_interfaces=”mcx0,mcx1,lagg0″ line to /etc/rc.conf to control initialization order and ensure that mcx interfaces are up before lagg0 interface is created and initialized. For dhcpcd I added dhcpcd_flags=”-qM lagg0″ flags. After reboot my switch was happy to accept link aggregation with my NAS system.

Samba setup

Next step was to install and enable samba(8). The small issue was the missing xbase set required by the samba installation, since I was not aware of this requirement. I simply downloaded the required set and extracted it manually. Other than that I could mainly reuse configuration file from Linux system by only adjusting required paths and placing it in /usr/pkg/etc/samba/smb.conf location. Of course I needed to create a samba user (smbpasswd). Also worth to note that smbd, nmbd and winbindd services should be enabled instead of samba service, contrary to typical Linux experience.

NFS setup

NFS configuration was not compatible with the Linux one on the other hand and I needed to rewrite it from scratch. NetBSD “how to set up nfs and nis” and UnitedBSD NFS on NetBSD: server and client side wiki articles were a great guidance. To enable NFS properly I needed to add these line to /etc/rc.conf:

# NFS server
rpcbind=YES
nfs_server=YES
nfsd_flags=’-n8′
mountd=${nfs_server}
lockd=${nfs_server}
statd=${nfs_server}

And configure /etc/exports according to examples from the articles above. From client side I just needed to adjust /etc/fstab to the new NFS path.

Other notes

I also installed rtorrent as my torrent service and utilized cron to enable it after boot by adding this line to crontab configuration:

@reboot /usr/bin/tmux new-session -d '/usr/pkg/bin/rtorrent -D -I -n -o import=$
PWD/.rtorrent.rc'

.rtorrent.rc file just need to point to the session path, otherwise I kept it standard. After that tmux attach -d -t 0 command can be used to attach to the rtorrent session and CTRL+B D to detach from it.

In order to monitor HDD and its temperature I installed smartmontools utility. Current temperature can be retrieved using sudo smartctl -a /dev/rwd1|grep -i temp command (raw device should be used, thus rwd1 instead of wd1).

Finally I created the patch for the CPU temperature which didn’t make it to NetBSD 10 release, but hopefully will be available with NetBSD 10.1 through envstat(8) command. For time being I am using the patched kernel.

Overall my experience is quite positive with the new setup. There are still few improvements required, mainly for the data redundancy and potentially better power management and improved CPU support. The NAS device doesn’t like enclosed environments without proper airflow and my become extremely noisy in such case, however it works pretty silently be default. Actually the main noise was coming from 10-Gbit ethernet card, which has an active fan. Hard drives are also pretty audible unfortunately, thus SSDs would be preferred if silence is the priority.

pkgsrc-2022Q1 quarterly release

Time is moving fast and pkgsrc released three quarterly releases since my last update. The last one, 2022Q1 release was announced few days ago. It marks 74th quarterly release with 321 new packages added, 56 removed, and 1762 updates to 1209 unique packages since last update. You can read more details in the release annoucement. As usual, pkgsrc can be retrieved from the github mirror, CVS repository or as a archived file. Installation and usage instructions can be found here or in the project page.

pkgsrc-2021Q1 quarterly release

Last week pkgsrc announced the 70th quarterly release. Since this release default Go version is 1.16. Compared to the last release, over 2000 packages were updated, 381 added and 61 removed. There is also a note stating that some packages with difficult dependencies like Firefox may not compile on NetBSD 8, it is advised to upgrade to NetBSD 9. As usual, pkgsrc can be retrieved from the github mirror, CVS repository or as a tar file. Instructions can be found here.

GNOME 3 is finally available on NetBSD

With a some overdue compared to other BSDs, GNOME 3 desktop environment meta package was recently added to pkgsrc. Successful installations were reported by some NetBSD users including screenshots! Thus, I am also planning to give a try soon, since it is my default desktop environment in Linux systems. Currently, it can be build from sources only using latest pkgsrc branch. Likely, binary package will be available with the pkgsrc-2020Q4 release next year.

pkgsrc-2020Q3, NetBSD 9.1 were released

In October two major releases were announced. A bit over a week ago, the day on 9 of October, 2020 was marked by 68th quarterly release of pkgsrc project. pkgsrc2020-Q3 is a third one this year and included 241 new packages, removed 115 of them, and committed 1713 (to 1273 unique packages) updates to existing packages since last release. More information can be found in the release announcement itself.

Just 9 days later, on 18 of October NetBSD tagged 9.1 release and the official announcement is available starting today. This is the first feature update to NetBSD 9 release branch and includes lots of fixes for security and stability reasons as well as new drivers, third party software updates and enhancements. The full list of changes since 9.0 can be found here. Personally, inclusion of aq(4) driver was important to my setup since I am using Aquantia AQC100 based Asus XG-C100F SFP+ 10Gbit network adapter. The CTWM window manager is already default starting this release. As usual, the release can be downloaded from CDN service or any other project mirrors.

NetBSD 9.1 on Ryzen 1600
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
2018, 2019, 2020 The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

NetBSD 9.1 (GENERIC) #0: Mon Oct 19 22:18:57 EEST 2020
system@localhost:/usr/src/sys/arch/amd64/compile/GENERIC
total memory = 32719 MB
avail memory = 31743 MB
cpu_rng: RDSEED
rnd: seeded with 256 bits
WARNING: ZFS on NetBSD is under development
ZFS filesystem version: 5
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
running cgd selftest aes-xts-256 aes-xts-512 done
timecounter: Timecounter “i8254” frequency 1193182 Hz quality 100
BIOSTAR Group X370GT5 ( )
mainbus0 (root)
ACPI: RSDP 0x00000000000F05A0 000024 (v02 ALASKA)
ACPI: XSDT 0x00000000DBFA30A0 0000C4 (v01 ALASKA A M I 01072009 AMI 00010013)
ACPI: FACP 0x00000000DBFA85F8 000114 (v06 ALASKA A M I 01072009 AMI 00010013)
ACPI: DSDT 0x00000000DBFA3200 0053F2 (v02 ALASKA A M I 01072009 INTL 20120913)
ACPI: FACS 0x00000000DC03FE00 000040
ACPI: APIC 0x00000000DBFA8710 00015E (v03 ALASKA A M I 01072009 AMI 00010013)
ACPI: FPDT 0x00000000DBFA8870 000044 (v01 ALASKA A M I 01072009 AMI 00010013)
ACPI: FIDT 0x00000000DBFA88B8 00009C (v01 ALASKA A M I 01072009 AMI 00010013)
ACPI: SSDT 0x00000000DBFA8958 0000C8 (v02 ALASKA CPUSSDT 01072009 AMI 01072009)
ACPI: SSDT 0x00000000DBFA8A20 008C98 (v02 AMD AMD ALIB 00000002 MSFT 04000000)
ACPI: SSDT 0x00000000DBFB16B8 0036B9 (v01 AMD AMD AOD 00000001 INTL 20120913)
ACPI: MCFG 0x00000000DBFB4D78 00003C (v01 ALASKA A M I 01072009 MSFT 00010013)
ACPI: BHMB 0x00000000DBFB4DB8 000474 (v01 ALASKA A M I 00000001 AMI 00000001)
ACPI: HPET 0x00000000DBFB5230 000038 (v01 ALASKA A M I 01072009 AMI 00000005)
ACPI: SSDT 0x00000000DBFB5268 000024 (v01 AMDFCH FCHZP 00001000 INTL 20120913)
ACPI: UEFI 0x00000000DBFB5290 000042 (v01 ALASKA A M I 00000002 01000013)
ACPI: TPM2 0x00000000DBFB52D8 000038 (v04 ALASKA A M I 00000001 AMI 00000000)
ACPI: IVRS 0x00000000DBFB5310 0000D0 (v02 AMD AMD IVRS 00000001 AMD 00000000)
ACPI: SSDT 0x00000000DBFB53E0 001A58 (v01 AMD AMD CPU 00000001 AMD 00000001)
ACPI: CRAT 0x00000000DBFB6E38 000BD0 (v01 AMD AMD CRAT 00000001 AMD 00000001)
ACPI: CDIT 0x00000000DBFB7A08 000029 (v01 AMD AMD CDIT 00000001 AMD 00000001)
ACPI: SSDT 0x00000000DBFB7A38 001D4A (v01 AMD AmdTable 00000001 INTL 20120913)
ACPI: SSDT 0x00000000DBFB9788 0000BF (v01 AMD AMD PT 00001000 INTL 20120913)
ACPI: WSMT 0x00000000DBFB9848 000028 (v01 ALASKA A M I 01072009 AMI 00010013)
ACPI: 8 ACPI AML tables successfully acquired and loaded
ioapic0 at mainbus0 apid 13: pa 0xfec00000, version 0x21, 24 pins
ioapic1 at mainbus0 apid 14: pa 0xfec01000, version 0x21, 32 pins
cpu0 at mainbus0 apid 0
cpu0: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu0: package 0, core 0, smt 0
cpu1 at mainbus0 apid 2
cpu1: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu1: package 0, core 1, smt 0
cpu2 at mainbus0 apid 4
cpu2: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu2: package 0, core 2, smt 0
cpu3 at mainbus0 apid 8
cpu3: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu3: package 0, core 4, smt 0
cpu4 at mainbus0 apid 10
cpu4: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu4: package 0, core 5, smt 0
cpu5 at mainbus0 apid 12
cpu5: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu5: package 0, core 6, smt 0
cpu6 at mainbus0 apid 1
cpu6: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu6: package 0, core 0, smt 1
cpu7 at mainbus0 apid 3
cpu7: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu7: package 0, core 1, smt 1
cpu8 at mainbus0 apid 5
cpu8: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu8: package 0, core 2, smt 1
cpu9 at mainbus0 apid 9
cpu9: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu9: package 0, core 4, smt 1
cpu10 at mainbus0 apid 11
cpu10: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu10: package 0, core 5, smt 1
cpu11 at mainbus0 apid 13
cpu11: AMD Ryzen 5 1600 Six-Core Processor , id 0x800f11
cpu11: package 0, core 6, smt 1
acpi0 at mainbus0: Intel ACPICA 20190405
acpi0: X/RSDT: OemId , AslId
acpi0: autoconfiguration error: invalid PCI address for D01D
acpi0: MCFG: segment 0, bus 0-63, address 0x00000000f8000000
acpi0: SCI interrupting at int 9
acpi0: fixed power button present
timecounter: Timecounter “ACPI-Fast” frequency 3579545 Hz quality 1000
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter “hpet0” frequency 14318180 Hz quality 2000
AMDN (PNP0C01) at acpi0 not configured
IOMA (PNP0C02) at acpi0 not configured
APSP (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43 irq 0
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
spkr0 at pcppi1: PC Speaker
wsbell at spkr0 not configured
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
SIO1 (PNP0C02) at acpi0 not configured
pckbc1 at acpi0 (PS2K, PNP0303-0) (kbd port): io 0x60,0x64 irq 1
UAR1 (PNP0501) at acpi0 not configured
S900 (PNP0C02) at acpi0 not configured
acpibut0 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
GPIO (AMDI0030) at acpi0 not configured
TPM (MSFT0101) at acpi0 not configured
AWR0 (PNP0C02) at acpi0 not configured
ABR0 (PNP0C02) at acpi0 not configured
ABR1 (PNP0C02) at acpi0 not configured
ABR2 (PNP0C02) at acpi0 not configured
ABR3 (PNP0C02) at acpi0 not configured
ABR4 (PNP0C02) at acpi0 not configured
ABR5 (PNP0C02) at acpi0 not configured
ABR6 (PNP0C02) at acpi0 not configured
ABR7 (PNP0C02) at acpi0 not configured
AWR1 (PNP0C02) at acpi0 not configured
ABR8 (PNP0C02) at acpi0 not configured
ABR9 (PNP0C02) at acpi0 not configured
ABRA (PNP0C02) at acpi0 not configured
ABRB (PNP0C02) at acpi0 not configured
ABRC (PNP0C02) at acpi0 not configured
ABRD (PNP0C02) at acpi0 not configured
ABRE (PNP0C02) at acpi0 not configured
ABRF (PNP0C02) at acpi0 not configured
PTIO (AMDIF030) at acpi0 not configured
acpitz0 at acpi0 (THRM)
acpitz0: levels: critical 85.0 C, passive cooling
acpiwmi0 at acpi0 (AOD, PNP0C14-AOD): ACPI WMI Interface
acpiwmibus at acpiwmi0 not configured
ACPI: Enabled 1 GPEs in block 00 to 1F
attimer1: attached to pcppi1
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
amdsmn0 at pci0 dev 0 function 0: AMD System Management Network
amdzentemp0 at amdsmn0: AMD CPU Temperature Sensors (Family17h)
vendor 1022 product 1451 (IOMMU system) at pci0 dev 0 function 2 not configured
pchb0 at pci0 dev 1 function 0: vendor 1022 product 1452 (rev. 0x00)
ppb0 at pci0 dev 1 function 1: vendor 1022 product 1453 (rev. 0x00)
ppb0: PCI Express capability version 2 x4 @ 2.5GT/s
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
xhci0 at pci1 dev 0 function 0: vendor 1022 product 43b9 (rev. 0x02)
xhci0: interrupting at msi0 vec 0
xhci0: xHCI version 1.10
usb0 at xhci0: USB revision 3.1
usb1 at xhci0: USB revision 2.0
ahcisata0 at pci1 dev 0 function 1: vendor 1022 product 43b5 (rev. 0x02)
ahcisata0: 64-bit DMA
ahcisata0: AHCI revision 1.31, 8 ports, 32 slots, CAP 0xef36ff27
ahcisata0: interrupting at msi1 vec 0
atabus0 at ahcisata0 channel 0
atabus1 at ahcisata0 channel 1
atabus2 at ahcisata0 channel 2
atabus3 at ahcisata0 channel 3
atabus4 at ahcisata0 channel 4
atabus5 at ahcisata0 channel 5
atabus6 at ahcisata0 channel 6
atabus7 at ahcisata0 channel 7
ppb1 at pci1 dev 0 function 2: vendor 1022 product 43b0 (rev. 0x02)
ppb1: PCI Express capability version 2
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
ppb2 at pci2 dev 0 function 0: vendor 1022 product 43b4 (rev. 0x02)
ppb2: PCI Express capability version 2 x1 @ 5.0GT/s
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
ppb3 at pci2 dev 1 function 0: vendor 1022 product 43b4 (rev. 0x02)
ppb3: PCI Express capability version 2 x1 @ 5.0GT/s
ppb3: link is x1 @ 2.5GT/s
pci4 at ppb3 bus 4
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
ppb4 at pci4 dev 0 function 0: vendor 1b21 product 1080 (rev. 0x03)
pci5 at ppb4 bus 5
pci5: i/o space, memory space enabled, rd/line, wr/inv ok
ppb5 at pci2 dev 2 function 0: vendor 1022 product 43b4 (rev. 0x02)
ppb5: PCI Express capability version 2 x1 @ 5.0GT/s
pci6 at ppb5 bus 6
pci6: i/o space, memory space enabled, rd/line, wr/inv ok
ppb6 at pci2 dev 3 function 0: vendor 1022 product 43b4 (rev. 0x02)
ppb6: PCI Express capability version 2 x1 @ 5.0GT/s
pci7 at ppb6 bus 7
pci7: i/o space, memory space enabled, rd/line, wr/inv ok
ppb7 at pci2 dev 4 function 0: vendor 1022 product 43b4 (rev. 0x02)
ppb7: PCI Express capability version 2 x2 @ 5.0GT/s
pci8 at ppb7 bus 8
pci8: i/o space, memory space enabled, rd/line, wr/inv ok
aq0 at pci8 dev 0 function 0: Aquantia AQC100 10 Gigabit Network Adapter (rev. 0x02)
aq0: Atlantic revision B1, F/W version 3.1.58
aq0: fw2x> F/W capabilities=0x63c0001900007f20
aq0: Etheraddr: xx:xx:xx:xx:xx:xx
ppb8 at pci2 dev 6 function 0: vendor 1022 product 43b4 (rev. 0x02)
ppb8: PCI Express capability version 2 x1 @ 5.0GT/s
pci9 at ppb8 bus 9
pci9: i/o space, memory space enabled, rd/line, wr/inv ok
ppb9 at pci2 dev 7 function 0: vendor 1022 product 43b4 (rev. 0x02)
ppb9: PCI Express capability version 2 x1 @ 5.0GT/s
ppb9: link is x1 @ 2.5GT/s
pci10 at ppb9 bus 10
pci10: i/o space, memory space enabled, rd/line, wr/inv ok
athn0 at pci10 dev 0 function 0: Atheros AR9287
athn0: rev 2 (2T2R), ROM rev 4, address xx:xx:xx:xx:xx:xx
athn0: interrupting at ioapic1 pin 3
athn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
athn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
pchb1 at pci0 dev 2 function 0: vendor 1022 product 1452 (rev. 0x00)
pchb2 at pci0 dev 3 function 0: vendor 1022 product 1452 (rev. 0x00)
ppb10 at pci0 dev 3 function 1: vendor 1022 product 1453 (rev. 0x00)
ppb10: PCI Express capability version 2 x16 @ 8.0GT/s
pci11 at ppb10 bus 11
pci11: i/o space, memory space enabled, rd/line, wr/inv ok
radeon0 at pci11 dev 0 function 0: vendor 1002 product 6811 (rev. 0x81)
hdaudio0 at pci11 dev 0 function 1: HD Audio Controller
hdaudio0: interrupting at msi3 vec 0
hdafg0 at hdaudio0: vendor 1002 product aa01
hdafg0: HDMI00 2ch: Digital Out [Jack]
hdafg0: HDMI01 2ch: Digital Out [Jack]
hdafg0: HDMI02 2ch: Digital Out [Jack]
hdafg0: HDMI03 2ch: Digital Out [Jack]
hdafg0: HDMI04 2ch: Digital Out [Jack]
hdafg0: HDMI05 2ch: Digital Out [Jack]
hdafg0: 2ch/0ch 32000Hz 44100Hz 48000Hz PCM16 AC3
pchb3 at pci0 dev 4 function 0: vendor 1022 product 1452 (rev. 0x00)
pchb4 at pci0 dev 7 function 0: vendor 1022 product 1452 (rev. 0x00)
ppb11 at pci0 dev 7 function 1: vendor 1022 product 1454 (rev. 0x00)
ppb11: PCI Express capability version 2 x16 @ 8.0GT/s
pci12 at ppb11 bus 12
pci12: i/o space, memory space enabled, rd/line, wr/inv ok
vendor 1022 product 145a (non-essential instrumentation, subclass 0x00) at pci12 dev 0 function 0 not configured
vendor 1022 product 1456 (miscellaneous crypto) at pci12 dev 0 function 2 not configured
xhci1 at pci12 dev 0 function 3: vendor 1022 product 145c (rev. 0x00)
xhci1: interrupting at msi4 vec 0
xhci1: xHCI version 1.0
usb2 at xhci1: USB revision 3.0
usb3 at xhci1: USB revision 2.0
pchb5 at pci0 dev 8 function 0: vendor 1022 product 1452 (rev. 0x00)
ppb12 at pci0 dev 8 function 1: vendor 1022 product 1454 (rev. 0x00)
ppb12: PCI Express capability version 2 x16 @ 8.0GT/s
pci13 at ppb12 bus 13
pci13: i/o space, memory space enabled, rd/line, wr/inv ok
vendor 1022 product 1455 (non-essential instrumentation, subclass 0x00) at pci13 dev 0 function 0 not configured
ahcisata1 at pci13 dev 0 function 2: vendor 1022 product 7901 (rev. 0x51)
ahcisata1: 64-bit DMA
ahcisata1: AHCI revision 1.31, 8 ports, 32 slots, CAP 0xf737ff07
ahcisata1: interrupting at msi5 vec 0
atabus8 at ahcisata1 channel 0
atabus9 at ahcisata1 channel 1
atabus10 at ahcisata1 channel 2
atabus11 at ahcisata1 channel 3
atabus12 at ahcisata1 channel 4
atabus13 at ahcisata1 channel 5
atabus14 at ahcisata1 channel 6
atabus15 at ahcisata1 channel 7
hdaudio1 at pci13 dev 0 function 3: HD Audio Controller
hdaudio1: interrupting at msi6 vec 0
hdafg1 at hdaudio1: vendor 10ec product 0892
hdafg1: DAC00 8ch: Speaker [Jack]
hdafg1: DAC01 2ch: HP Out [Jack]
hdafg1: DIG02 2ch: SPDIF Out [Jack]
hdafg1: ADC03 2ch: Line In [Jack], Mic In [Jack]
hdafg1: ADC04 2ch: Mic In [Jack]
hdafg1: 8ch/2ch 32000Hz 44100Hz 48000Hz 88200Hz 96000Hz 192000Hz PCM16 PCM20 PCM24 AC3
audio0 at hdafg1: playback, capture, full duplex, independent
audio0: slinear_le:16 8ch 48000Hz, blk 7680 bytes (10ms) for playback
audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for recording
spkr1 at audio0: PC Speaker (synthesized)
wsbell at spkr1 not configured
piixpm0 at pci0 dev 20 function 0: vendor 1022 product 790b (rev. 0x59)
piixpm0: interrupting at SMI,
iic0 at piixpm0 port 0: I2C bus
iic1 at piixpm0 port 1: I2C bus
pcib0 at pci0 dev 20 function 3: vendor 1022 product 790e (rev. 0x51)
pchb6 at pci0 dev 24 function 0: vendor 1022 product 1460 (rev. 0x00)
pchb7 at pci0 dev 24 function 1: vendor 1022 product 1461 (rev. 0x00)
pchb8 at pci0 dev 24 function 2: vendor 1022 product 1462 (rev. 0x00)
pchb9 at pci0 dev 24 function 3: vendor 1022 product 1463 (rev. 0x00)
pchb10 at pci0 dev 24 function 4: vendor 1022 product 1464 (rev. 0x00)
pchb11 at pci0 dev 24 function 5: vendor 1022 product 1465 (rev. 0x00)
pchb12 at pci0 dev 24 function 6: vendor 1022 product 1466 (rev. 0x00)
pchb13 at pci0 dev 24 function 7: vendor 1022 product 1467 (rev. 0x00)
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: FFH, lat 1 us, pow 0 mW
acpicpu0: C2: I/O, lat 400 us, pow 0 mW
acpicpu0: P0: FFH, lat 1 us, pow 3960 mW, 3200 MHz
acpicpu0: P1: FFH, lat 1 us, pow 2940 mW, 2800 MHz
acpicpu0: P2: FFH, lat 1 us, pow 1350 mW, 1550 MHz
acpicpu0: T0: I/O, lat 1 us, pow 0 mW, 100 %
acpicpu0: T1: I/O, lat 1 us, pow 0 mW, 88 %
acpicpu0: T2: I/O, lat 1 us, pow 0 mW, 76 %
acpicpu0: T3: I/O, lat 1 us, pow 0 mW, 64 %
acpicpu0: T4: I/O, lat 1 us, pow 0 mW, 52 %
acpicpu0: T5: I/O, lat 1 us, pow 0 mW, 40 %
acpicpu0: T6: I/O, lat 1 us, pow 0 mW, 28 %
acpicpu0: T7: I/O, lat 1 us, pow 0 mW, 16 %
acpicpu1 at cpu1: ACPI CPU
acpicpu2 at cpu2: ACPI CPU
acpicpu3 at cpu3: ACPI CPU
acpicpu4 at cpu4: ACPI CPU
acpicpu5 at cpu5: ACPI CPU
acpicpu6 at cpu6: ACPI CPU
acpicpu7 at cpu7: ACPI CPU
acpicpu8 at cpu8: ACPI CPU
acpicpu9 at cpu9: ACPI CPU
acpicpu10 at cpu10: ACPI CPU
acpicpu11 at cpu11: ACPI CPU
timecounter: Timecounter “clockinterrupt” frequency 100 Hz quality 0
autoconfiguration error: ERROR: 656 cycle TSC drift observed
uhub0 at usb0: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 3.00/1.00, addr 0
uhub0: 8 ports with 8 removable, self powered
uhub1 at usb1: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 0
uhub1: 14 ports with 14 removable, self powered
uhub2 at usb2: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 3.00/1.00, addr 0
uhub2: 4 ports with 4 removable, self powered
uhub3 at usb3: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 0
uhub3: 4 ports with 4 removable, self powered
IPsec: Initialized Security Association Processing.
ahcisata0 port 0: device present, speed: 6.0Gb/s
ahcisata0 port 1: device present, speed: 1.5Gb/s
ahcisata0 port 5: device present, speed: 3.0Gb/s
wd0 at atabus0 drive 0
wd0:
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 476 GB, 992277 cyl, 16 head, 63 sec, 512 bytes/sect x 1000215216 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133), WRITE DMA FUA, NCQ (32 tags)
wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA), NCQ (31 tags)
atapibus0 at atabus1: 1 targets
umass0 at uhub0 port 6 configuration 1 interface 0
umass0: StoreJet Transcend (0x174c) StoreJet Transcend (0x5106), rev 3.00/80.00, addr 1
umass0: using SCSI over Bulk-Only
cd0 at atapibus0 drive 0: cdrom removable
scsibus0 at umass0: 2 targets, 1 lun per target
uhub4 at uhub1 port 11: vendor 05e3 (0x5e3) USB2.0 Hub (0x608), class 9/0, rev 2.00/32.98, addr 2
uhub4: single transaction translator
cd0: drive supports PIO mode 4sd0 at scsibus0 target 0 lun 0: disk fixed
, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
cd0(ahcisata0:1:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100) (using DMA)
wd1 at atabus5 drive 0
wd1:
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 149 GB, 310101 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
sd0: 238 GB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 500118192 sectors
sd0: GPT GUID: aa426d16-0d0e-40a1-90e7-9a75f7b5c75f
dk0 at sd0: “67b20926-002a-424f-a169-2c7efc563bb9”, 614401 blocks at 4097, type: msdos
dk1 at sd0: “5d7e40e5-4454-4a98-a81e-c5223d78f161”, 421527550 blocks at 618498, type: ext2fs
dk2 at sd0: “ed7d719c-6ef4-451f-9732-2e4dd981273b”, 35925033 blocks at 464178417, type:
dk3 at sd0: “731c9349-02e0-471d-93db-99f63c06afe8”, 42032369 blocks at 422146048, type: ffs
uhub4: 4 ports with 4 removable, self powered
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 7, NCQ (32 tags)
wd1(ahcisata0:5:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA), NCQ (31 tags)
ubt0 at uhub3 port 1
ubt0: vendor 0a12 (0xa12) Bluetooth2.1+EDR CLASS1 (0x01), rev 2.00/52.76, addr 1
uhidev0 at uhub4 port 1 configuration 1 interface 0
uhidev0: Logitech (0x46d) USB Receiver (0xc52b), rev 2.00/12.10, addr 3, iclass 3/1
ukbd0 at uhidev0
wskbd0 at ukbd0: console keyboard
uhidev1 at uhub4 port 1 configuration 1 interface 1
uhidev1: Logitech (0x46d) USB Receiver (0xc52b), rev 2.00/12.10, addr 3, iclass 3/1
uhidev1: 8 report ids
ums0 at uhidev1 reportid 2: 16 buttons, W and Z dirs
wsmouse0 at ums0 mux 0
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0
uhid2 at uhidev1 reportid 8: input=1, output=0, feature=0
uhidev2 at uhub4 port 1 configuration 1 interface 2
uhidev2: Logitech (0x46d) USB Receiver (0xc52b), rev 2.00/12.10, addr 3, iclass 3/0
uhidev2: 33 report ids
uhid3 at uhidev2 reportid 16: input=6, output=6, feature=0
uhid4 at uhidev2 reportid 17: input=19, output=19, feature=0
uhid5 at uhidev2 reportid 32: input=14, output=14, feature=0
uhid6 at uhidev2 reportid 33: input=31, output=31, feature=0
uhidev3 at uhub4 port 2 configuration 1 interface 0
uhidev3: Fnatic Gear (0x195d) RUSH Mechanical Keyboard (0x2030), rev 2.00/1.09, addr 4, iclass 3/1
ukbd1 at uhidev3
wskbd1 at ukbd1 mux 1
uhidev4 at uhub4 port 2 configuration 1 interface 1
uhidev4: Fnatic Gear (0x195d) RUSH Mechanical Keyboard (0x2030), rev 2.00/1.09, addr 4, iclass 3/0
uhid7 at uhidev4: input=4, output=0, feature=0
uhidev5 at uhub4 port 2 configuration 1 interface 2
uhidev5: Fnatic Gear (0x195d) RUSH Mechanical Keyboard (0x2030), rev 2.00/1.09, addr 4, iclass 3/0
ukbd2 at uhidev5
wskbd2 at ukbd2 mux 1
uhidev6 at uhub4 port 3 configuration 1 interface 0
uhidev6: vendor 195d (0x195d) Trackball Mouse (0x1009), rev 1.10/1.00, addr 5, iclass 3/1
ums1 at uhidev6: 3 buttons and Z dir
wsmouse1 at ums1 mux 0
WARNING: 2 errors while detecting hardware; check system log.
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
kern.module.path=/stand/amd64/9.1/modules
kern info: [drm] initializing kernel modesetting (PITCAIRN 0x1002:0x6811 0x1458:0x2015).
kern info: [drm] register mmio base: 0xfcc00000
kern info: [drm] register mmio size: 262144
kern info: ATOM BIOS: GV
radeon0: info: VRAM: 2048M 0x0000000000000000 – 0x000000007FFFFFFF (2048M used)
radeon0: info: GTT: 2048M 0x0000000080000000 – 0x00000000FFFFFFFF
kern info: [drm] Detected VRAM RAM=800M, BAR=256M
kern info: [drm] RAM width 256bits DDR
Zone kernel: Available graphics memory: 11322790 kiB
Zone dma32: Available graphics memory: 2097152 kiB
kern info: [drm] radeon: 2048M of VRAM memory ready
kern info: [drm] radeon: 2048M of GTT memory ready.
kern info: [drm] Loading pitcairn Microcode
kern info: [drm] radeon/PITCAIRN_mc2.bin: 31100 bytes
kern info: [drm] Internal thermal controller with fan control
kern info: [drm] radeon: dpm initialized
kern info: [drm] Found VCE firmware/feedback version 50.0.1 / 17!
kern info: [drm] GART: num cpu pages 524288, num gpu pages 524288
kern info: [drm] PCIE GART of 2048M enabled (table at 0x00000000002E8000).
radeon0: info: WB enabled
radeon0: info: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0x0xffffb140c3d3dc00
radeon0: info: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0x0xffffb140c3d3dc04
radeon0: info: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0x0xffffb140c3d3dc08
radeon0: info: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0x0xffffb140c3d3dc0c
radeon0: info: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0x0xffffb140c3d3dc10
radeon0: info: fence driver on ring 5 use gpu addr 0x0000000000075a18 and cpu addr 0x0xffffb3825ae75a18
radeon0: info: fence driver on ring 6 use gpu addr 0x0000000080000c18 and cpu addr 0x0xffffb140c3d3dc18
radeon0: info: fence driver on ring 7 use gpu addr 0x0000000080000c1c and cpu addr 0x0xffffb140c3d3dc1c
kern info: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
kern info: [drm] Driver supports precise vblank timestamp query.
radeon0: info: radeon: MSI limited to 32-bit
radeon0: interrupting at ioapic1 pin 30 (radeon0)
kern info: [drm] radeon: irq initialized.
kern info: [drm] ring test on 0 succeeded in 2 usecs
kern info: [drm] ring test on 1 succeeded in 1 usecs
kern info: [drm] ring test on 2 succeeded in 1 usecs
kern info: [drm] ring test on 3 succeeded in 5 usecs
kern info: [drm] ring test on 4 succeeded in 5 usecs
kern info: [drm] ring test on 5 succeeded in 2 usecs
kern info: [drm] UVD initialized successfully.
kern info: [drm] ring test on 6 succeeded in 25 usecs
kern info: [drm] ring test on 7 succeeded in 3 usecs
kern info: [drm] VCE initialized successfully.
kern info: [drm] ib test on ring 0 succeeded in 0 usecs
kern info: [drm] ib test on ring 1 succeeded in 0 usecs
kern info: [drm] ib test on ring 2 succeeded in 0 usecs
kern info: [drm] ib test on ring 3 succeeded in 0 usecs
kern info: [drm] ib test on ring 4 succeeded in 0 usecs
kern info: [drm] ib test on ring 5 succeeded
kern info: [drm] ib test on ring 6 succeeded
kern info: [drm] ib test on ring 7 succeeded
kern info: [drm] Radeon Display Connectors
kern info: [drm] Connector 0:
kern info: [drm] DP-1
kern info: [drm] HPD4
kern info: [drm] DDC: 0x6530 0x6530 0x6534 0x6534 0x6538 0x6538 0x653c 0x653c
kern info: [drm] Encoders:
kern info: [drm] DFP1: INTERNAL_UNIPHY2
kern info: [drm] Connector 1:
kern info: [drm] HDMI-A-1
kern info: [drm] HPD5
kern info: [drm] DDC: 0x6550 0x6550 0x6554 0x6554 0x6558 0x6558 0x655c 0x655c
kern info: [drm] Encoders:
kern info: [drm] DFP2: INTERNAL_UNIPHY2
kern info: [drm] Connector 2:
kern info: [drm] DVI-I-1
kern info: [drm] HPD6
kern info: [drm] DDC: 0x6580 0x6580 0x6584 0x6584 0x6588 0x6588 0x658c 0x658c
kern info: [drm] Encoders:
kern info: [drm] DFP3: INTERNAL_UNIPHY
kern info: [drm] CRT1: INTERNAL_KLDSCP_DAC1
kern info: [drm] Connector 3:
kern info: [drm] DVI-D-1
kern info: [drm] HPD1
kern info: [drm] DDC: 0x6570 0x6570 0x6574 0x6574 0x6578 0x6578 0x657c 0x657c
kern info: [drm] Encoders:
kern info: [drm] DFP4: INTERNAL_UNIPHY1
radeondrmkmsfb0 at radeon0
radeondrmkmsfb0: framebuffer at 0xffffb3825b8bb000, size 1920×1080, depth 32, stride 7680
wsdisplay0 at radeondrmkmsfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
wskbd1: connecting to wsdisplay0
wskbd2: connecting to wsdisplay0
aq0: link is UP: speed=10000
wsdisplay0: screen 1 added (default, vt100 emulation)
wsdisplay0: screen 2 added (default, vt100 emulation)
wsdisplay0: screen 3 added (default, vt100 emulation)
wsdisplay0: screen 4 added (default, vt100 emulation)

pkgsrc-2020Q2 released

The time is moving fast and next quarterly release of pkgsrc is ready. Today the pkgsrc developers officially announced 67th the cross-platform packaging system release. It includes 440 new packages, let go of 111 packages, and performed 2844 package updates (for 2146 unique packages). All release announcement can be found here. pkgsrc can be retrieved from the github mirror, CVS repository or as a tar file. Instructions can be found here.

pkgsrc-2020Q1 released and more

Today the pkgsrc developers announced the 66th quarterly release. In total 335 packages were added, 163 were removed and 2323 package updates performed (to 1762 unique packages) since last release. Please read release announcement for the highlights of the release. pkgsrc can be retrieved from the github mirror, CVS repository or as a tar file. Instructions can be found here.

In general, I am using pkgsrc extensively and recently I had a very positive experience on one of my secondary computers for the first time after 2 years. I was pleasantly surprised with the very smooth process with only wine package failing (which is quite expected for NetBSD as a target, it was patched manually before as well). Personally, I usually use current branch, but the pkgsrc-2020Q1 release should guarantee stability of packages if that matters to your setup. Binary packages will be also based on this release (installed by pkgin). Recently, I started to contribute to pkgsrc through pkgsrc WIP which makes it easier to contribute fore newcomers. Thank to this, I also contributed to 1 package update in this release :).

Addionally, I also missed NetBSD 9.0 based irBSD 15.03.2020 v9 release. It can be downloaded from here. For the reminder, it is a digital forensic suite for cryptography, penetration testing, data recovery, reverse engineering, privacy and other security tasks with pkgin package manager and ratpoison as default window manager. Give it a try!

The last but not the least, there is an interesting project going on to run RISC OS and NetBSD at the same time on RK3399 SoC. You can read about the project here or follow Michael Grunditz tweeter account.

pkgsrc-2019Q3 released

On 3 of October 64rd quarterly release of pkgsrc was announced. pkgsrc-2019Q3 had 301 packages added and 114 packages removed, 1280 packages were updated (1682 package updates in total). Besides notable additions mentioned in the release announcement, it was the first release with contribution from myself! Due to time constraints I don’t believe that I will become regular contributor but I plan to work on few selected packages in the future too.

Codelite building issues from pkgsrc

Recently I am trying to build my own desktop environment on NetBSD which is based on current branch and using current pkgsrc for packages. I successfully built up to date MATE 1.22.1 desktop environment but got stuck on pretty outaded CodeLite IDE (9.1.0 in pkgsrc compared to 13.0.0 being the latest at the time of writing). The first error I hit by was:

/usr/pkgsrc/editors/codelite/work/codelite-9.1/LiteEditor/clangpch_cache.h:35:10: fatal error: clang-c/Index.h: No such file or directory

Since I was quite sure that I should have it, I quickly looked around and I found that header exists in /usr/pkg/include/clang-c/Index.h. So quick workaround was quite obvious by setting CFLAGS environment variable to point to pkg include folder. Since I checked that this variable didn’t have any value, I just simply did:

export CFLAGS=/usr/pkg/include

It helped me to finish the build successfully but linking failed with “ld: cannot find -lclang” error… So yet another environment variable was needed:

export LIBRARY_PATH=/usr/pkg/lib

After that linking went successfully but it wasn’t the end of the story yet. Package PLIST file contained 5 files which were not available after the build. Apparently spell checker was not part of the build for some reason and lib/codelite/SpellCheck.so and all files in share/codelite/dics/ folder (including folder itself) were missing. Because of this pkg_create was failing to assemble the installation package. You would see messages like “pkg_create: can’t stat <filename>”. I just decided remove those files from PLIST file:

fossil diff --unified PLIST

Index: editors/codelite/PLIST
==================================================================
— editors/codelite/PLIST
+++ editors/codelite/PLIST
@@ -22,11 +22,10 @@
lib/codelite/MemCheck.so
lib/codelite/Outline.so
lib/codelite/QMakePlugin.so
lib/codelite/SFTP.so
lib/codelite/SnipWiz.so
-lib/codelite/SpellCheck.so
lib/codelite/Subversion.so
lib/codelite/Tweaks.so
lib/codelite/UnitTestsPP.so
lib/codelite/WebTools.so
lib/codelite/Wizards.so
@@ -64,14 +63,10 @@
share/codelite/config/cfg/sdl.cfg
share/codelite/config/cfg/std.cfg
share/codelite/config/cfg/windows.cfg
share/codelite/config/codelite.xml.default
share/codelite/config/debuggers.xml.default
-share/codelite/dics/en_GB.aff
-share/codelite/dics/en_GB.dic
-share/codelite/dics/en_US.aff
-share/codelite/dics/en_US.dic
share/codelite/gdb_printers/boost/init.py
share/codelite/gdb_printers/boost/printers.py
share/codelite/gdb_printers/helper.py
share/codelite/gdb_printers/libstdcxx/init.py
share/codelite/gdb_printers/libstdcxx/v6/init.py

Unfortunately there is one caveat that after changing this file I needed to make a clean build again (make clean before make install). Fortunately, it doesn’t take long to rebuild CodeLite on modern CPU, especially if all cores are utilized. Finally, after all the struggles CodeLite IDE started successfully (even if it’s a relatively old version).

CodeLite 9.1.0 on NetBSD amd64 8.99.50

Update: Actually I managed to build the latest CodeLite (13.0.1) too straight from github source code. The most applied patches were the same as pkgsrc package has (actually seems even less is needed now). Manually I needed to add /usr/pkg/libexec/wx-3.0 to PATH since build script need wx-config and I also needed to change libssh.so path to from /usr/lib/libssh.so to /usr/pkg/lib/libssh.so (libssh-0.87) in CMakeFiles/<module>.dir/link.txt files which were linking against it. Probably updating pkgsrc package should not be difficult too considering my relatively easy success , so I guess package is not actively maintained anymore. Will see if I can prepare a patch.

CodeLite 13.0.1 on NetBSD amd64 8.99.50