OpenBSD/loongson on the Lemote Yeeloong 8101B

2016-05-22 23:56

After hunting for Loongson based hardware for the first half of 2015, I was finally able to find an used Yeeloong in July, in very good condition. Upon receiving the parcel, the first thing I did was to install OpenBSD on this exquisitely exotic machine.

For more information regarding the OpenBSD/loongson port and how it came to be, the OpenBSD Journal has a nice story on the topic.

I have been using my Yeeloong more and more during the last few months, notably to attempt building LLVM on this machine. Before deciding to invest more time into this platform though, I needed to make sure I would have a backup unit in case my current one suddenly stopped working. I'm now the lucky owner of another Yeeloong 8101B in even better condition, which was kindly donated to me by Julien Clerc. Thanks again if you are reading this Julien, I'll be sure to put it to good use.

The CPU in the Yeeloong is a Loongson 2F which is a single-core MIPS-III 64-bit processor running at 800/900 MHz, and the device comes equipped with 1GB of RAM (PC2-6400) and a 160GB HDD. Interestingly, this machine doesn't require any binary blob in order to run, and is using the PMON firmware and boot loader.

This is the output of running file on executables:

ELF 64-bit LSB executable, MIPS, MIPS-III version 1

Here is the result of a quick md5 -t benchmark:

MD5 time trial. Processing 10000 10000-byte blocks... Digest = 52e5f9c9e6f656f3e1800dfa5579d089 Time = 1.718992 seconds Speed = 58173627.335089 bytes/second

For the record, LibreSSL speed benchmark results are available here.

Sadly, the fan is quite loud, especially under load, which somehow prevents me from running the machines as much as I would like. I haven't been looking for a replacement yet, although I might do so in the future. I've read in various places that Noctua fans are supposedly very quiet. If anyone has any experience with silent fans, I would be interested in hearing your thoughts on the matter.

As previously mentioned, the Yeeloong comes with a 1GB DDR2 SO-DIMM module from ADATA (ADOVE1A0834E). Upgrading to 2GB is supposedly possible, given the RAM module used is single rank. Despite hours of searching on various memory manufacturers sites and stores, I haven't been able to find any such module. Do they even exist?

On the other hand, the Lemote Fuloong seems more resilient to the type of RAM it accepts, and jasper@ mentioned he successfully upgraded his device using a Kingston 2GB DDR2 SO-DIMM module (KFJ-FPC218/2G). Unfortunately, this module does not work on any of my Yeeloongs. There is no point in attempting to use anything larger as OpenBSD/loongson is limited to 2GB of usable memory, more information can be found in the comments of src/sys/arch/loongson/loongson/loongson2_machdep.c.

That's it for now, I'll be adding some potentially useful information below for reference purposes.

Lastly, if you have some unused Loongson hardware collecting dust, I'm looking for a Fuloong, please contact me if you have a spare one. Some OpenBSD developers are also looking for Loongson hardware, if you do not use your devices, please consider donating them to the OpenBSD project.

System message buffer (dmesg output):

Copyright ( c ) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright ( c ) 1995-2016 OpenBSD. All rights reserved. http://www.OpenBSD.org OpenBSD 5.9-current ( GENERIC ) #533: Tue Mar 15 09:50:08 MDT 2016 deraadt@loongson.openbsd.org:/usr/src/sys/arch/loongson/compile/GENERIC real mem = 1073741824 ( 1024MB ) avail mem = 1058635776 ( 1009MB ) mainbus0 at root: Lemote Yeeloong cpu0 at mainbus0: STC Loongson2F CPU 796 MHz, STC Loongson2F FPU cpu0: cache L1-I 64KB D 64KB 4 way, L2 512KB 4 way bonito0 at mainbus0: memory and PCI-X controller, rev 1 pci0 at bonito0 bus 0 rl0 at pci0 dev 7 function 0 "Realtek 8139" rev 0x10: irq 5, address 00:23:8b:f2:b6:25 rlphy0 at rl0 phy 0: RTL internal PHY smfb0 at pci0 dev 8 function 0 "Silicon Motion LynxEM+" rev 0xb0 wsdisplay0 at smfb0 mux 1: console ( std, vt100 emulation ) ohci0 at pci0 dev 9 function 0 "NEC USB" rev 0x44: irq 7, version 1.0 ehci0 at pci0 dev 9 function 1 "NEC USB" rev 0x05: irq 7 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "NEC EHCI root hub" rev 2.00/1.00 addr 1 glxpcib0 at pci0 dev 14 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit 3579545Hz timer, watchdog, gpio, i2c isa0 at glxpcib0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 ( kbd slot ) wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 ( aux slot ) wsmouse0 at pms0 mux 0 mcclock0 at isa0 port 0x70/2: mc146818 or compatible ykbec0 at isa0 port 0x381/3 gpio1 at glxpcib0: 32 pins iic at glxpcib0 not configured glxclk0 at glxpcib0: clock, prof pciide0 at pci0 dev 14 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0: <WDC WD1600BEVT-24A23T0> wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors wd0 ( pciide0:0:0 ) : using PIO mode 4, Ultra-DMA mode 2 pciide0: channel 1 ignored ( disabled ) auglx0 at pci0 dev 14 function 3 "AMD CS5536 Audio" rev 0x01: isa irq 9, CS5536 AC97 ac97: codec id 0x414c4760 ( Avance Logic ALC655 rev 0 ) audio0 at auglx0 ohci1 at pci0 dev 14 function 4 "AMD CS5536 USB" rev 0x02: isa irq 11, version 1.0, legacy support ehci1 at pci0 dev 14 function 5 "AMD CS5536 USB" rev 0x02: isa irq 11 usb1 at ehci1: USB revision 2.0 uhub1 at usb1 "AMD EHCI root hub" rev 2.00/1.00 addr 1 usb2 at ohci0: USB revision 1.0 uhub2 at usb2 "NEC OHCI root hub" rev 1.00/1.00 addr 1 usb3 at ohci1: USB revision 1.0 uhub3 at usb3 "AMD OHCI root hub" rev 1.00/1.00 addr 1 apm0 at mainbus0 umass0 at uhub1 port 1 configuration 1 interface 0 "Generic USB2.0-CRW" rev 2.00/58.87 addr 2 umass0: using SCSI over Bulk-Only scsibus0 at umass0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <Generic-, Multi-Card, 1.00> SCSI0 0/direct removable serial.0bda0158114173400000 urtw0 at uhub1 port 4 configuration 1 interface 0 "Realtek RTL8187B" rev 2.00/2.00 addr 3 urtw0: RTL8187B rev E, address 00:17:c4:4e:05:9f vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root scsibus2 at softraid0: 256 targets pmon bootpath: /dev/disk/wd0 boot device: wd0 root on wd0a ( b7c2a835706c4aec.a ) swap on wd0b dump on wd0b

Sensors output:

$ sysctl hw.sensors hw.sensors.ykbec0.temp0 = 55.00 degC ( Internal temperature ) hw.sensors.ykbec0.temp1 = 26.00 degC ( Battery temperature ) hw.sensors.ykbec0.fan0 = 4615 RPM hw.sensors.ykbec0.volt0 = 12.37 VDC ( Battery voltage ) hw.sensors.ykbec0.current0 = 0.00 A ( Battery current ) hw.sensors.ykbec0.amphour0 = 1.77 Ah ( Battery full charge capacity ) hw.sensors.ykbec0.indicator0 = Off ( Battery charging ) hw.sensors.ykbec0.indicator1 = On ( AC-Power ) hw.sensors.ykbec0.percent0 = 100.00% ( Battery capacity ) , OK

PCI device data: