John D. Baker | 17 Jul 06:10 2015

Latest evbmips/LOONGSON (Lemote Yeeloong) observations

As of NetBSD-7.99.20:


Writes to NFS via extraction of files by 'tar' or I/O redirection produce
corrupt files.

'amd' complains about "invalid argument" on all automount points


Writes to 'ext2fs' filesystems via extraction of files by 'tar' causes
system to hang requiring power-cycle (no diagnostic messages printed,
dropping to DDB not possible).  (As of 7.99.1[5-8], it would print a
diagnostic message, but that has been lost.)

Running from NFS root, system may hang when starting services via
'rc'--typically 'syslogd' or 'ntpd'.  Usually occurs on first boot attempt
following long power-down period.  Power-cycle is required.  Subsequent
attempts usually succeed.

"Backspace" key generates DEL (^?) in applications, not treated as synonym
for ^H (erase).  (Annoying at Password: prompts or in text editors.)


'ntpd' no-longer complains about:

  ntpd[PID]: local_clock:
.../src/external/bsd/ntp/dist/ntpd/ntp_loopfilter.c line 703: invalid struct
(Continue reading)

John D. Baker | 7 Jul 23:23 2015

Tracking -current on evbmips-mips64e[bl]?

I find it interesting that HEAD evbmips-mips64e[bl] seem to perpetually
fail on the autobuild system.  There was an exceptional period of a few
hours a couple of weeks back where at least evbmips-mips64el (the one
that I poke at from time to time) built successfully, so I updated and
managed to build it as well.

Since then, they again fail perpetually on the autobuild system, yet I
manage to do successful update builds locally.  I suspect that will
cease to be the case at some point.

Is it not discouraging to see weeks and months of failed autobuild
attempts go by?  I generally gauge whether to bother with another
round of poking at my Lemote Yeeloong by whether an autobuild attempt

(Perhaps I should be looking at a different platform, but that's really
a topic for a different message.)


|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

Andy Ruhl | 8 Jun 07:36 2015

Atheros SOC AR9331 router

I bought an interesting device recently. Search Amazon for "Tbmax
router". 2 RJ45 ethernet ports, wifi, USB, and USB power. And a nicely
accessible serial port. I bought a USB to serial adapter that plugs
right in, search for "JBtek serial".

Some more info on it here:

I had to swap tx and rx to get the serial console on mine.

I'm not a developer so I can't get NetBSD working on it. Looks like
someone might be trying according to this:

If it could boot from USB this could be really good.


Andrew Parker | 7 Mar 03:55 2015

NetBSD on Cavium Octeon

I'd like to try getting NetBSD running on a Ubiquiti Edgerouter Lite and am wondering if anybody has tried
this or had any success with it?

John D. Baker | 19 Feb 07:01 2015

wsfonts that don't work w/LOONGSON (Lemote YeeLoong)

I wanted to use the recently-added "glass10x19" and/or "glass10x25" VT220-
like fonts in my custom LOONGSON-based kernel, but the wsfont subsystem
ignores them and falls back to one of the other fonts in the stock
LOONGSON kernel "gallant12x22" or "bold8x16".

If I disable the stock fonts, and leave only my added fonts, then the
kernel hangs, sometimes printing a message (in the PMON font) claiming
the font table is empty.

This got me curious about the other fonts listed in
"sys/dev/wsfont/files.wsfont".  Below are the ones which are ignored if


The rest provide a working console, although FONT_LUCIDA16x29 and
FONT_SONY12x24 are a bit too large for a comfortably-sized terminal
on a 1024x600 display panel.

Are there any clues as to why the above-listed fonts are ignored on
evbmips/LOONGSON?  I know FONT_GLASS10x19 works on macppc and i386.


|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
(Continue reading)

John D. Baker | 10 Feb 03:10 2015

latest evbmips/LOONGSON observations

After reading this post:

I dug out my Yeeloong and went hunting:

eventually producing a working 7.99.4 kernel.  A mips/loongson guru
should take a look at this.

Along the way, I tried a few things I hadn't before--taking some cues
from OpenBSD/loongson.

I tried the "wsfb" driver for Xorg and it works quite well, if a bit
sluggish.  The show-stopper is that the screen-saver operates backwards.

After an initial delay, the next keyboard/mouse event blanks the
screen immediately.  After an idle period, the screen is restored, but
the next keyboard/mouse event just blanks it again.

I've added 'xset s off' to my ".xinitrc". to keep it from blanking.

Without an "xorg.conf", the auto-detected "siliconmotion" driver crashes
complaining about:

[  3406.966] (EE) Failed to load /usr/X11R7/lib/modules/drivers/
/usr/X11R7/lib/modules/drivers/ Undefined symbol "exaOffscreenFree"
(symnum = 101)

(Continue reading)

John D. Baker | 6 Feb 01:23 2015

Re: netbsd-7 LOONGSON kernel doesn't work

On Tue, 23 Dec 2014 19:03:17 -0400 (AST), Jared McNeill
<jmcneill <at>> wrote:

> I found my old Lemote Yeeloong netbook today and thought I'd try
> netbsd-7 on it. Not much luck:

I see the same thing with 7.99.4 LOONGSON kernel from just a few hours
ago (first time I've tried since 6.99.40).

I tried booting my custom YEELOONG root-on-NFS kernel, but for some
reason it claimed the font table was empty and hung (I tried putting
the recently-added GLASS10x19 and GLASS10x25 VT220-like fonts in it).

I'll see about reverting my change to see if I get a kernel that works
and if not, start bisecting...


|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

Jared McNeill | 24 Dec 00:03 2014

netbsd-7 LOONGSON kernel doesn't work

I found my old Lemote Yeeloong netbook today and thought I'd try netbsd-7 
on it. Not much luck:

Two issues:

   1- Not sure why it's using wd0 for boot device, since it's the
      INSTALL_LOONGSON kernel.
   2- The panic.

Last kernel I had on this was quite old -- 6.99.7 -- so not sure what has 
changed since then.

Here are the kernels I tried:

Any hints?


John D. Baker | 1 Feb 09:03 2014

Other interesting mips breakage...

I should have looked at port-mips <at>  more diligently before my latest spate
of PR filing.  The very issues I filed about were discussed here at length.

In light of that, I'd welcome input on issues already being pursued in
absence of an active PR.  What I've come to observe since evbmips/LOONGSON
became operational again (on my Lemote YEELOONG, since that's the only
mips/evbmips machine I have):

X server:  the undefined symbol issues seem to have been resolved, but
now the server complains that it can't load the "int10" module, saying
that it doesn't exist.  Also what looks like a NULL pointer dereference.

The 'dig' utility dies with segfault in pthread_getspecific().

Can't build anything from pkgsrc as the C compiler dies with bus error
compiling the first real source in "pkgtools/digest".  (It works well
enough to complete the "./configure" script, though.)

If there are hints on the above, please share.  I suspect the most
obvious thing to try is nuke OBJDIR and DESTDIR from orbit, just to
make sure.

A few things that persist from early 6.99.x days:

PR/48564: 'tar' corrupts files extracted to NFS.  I originally saw this as
a result of bizzare modifications suggested when running 'etcupdate' on
my NFS-root installation.  Then LOONGSON kernel build breakage, etc.
intervened.  Finally, I sat down and analyzed what the nature of the
data corruption was.

(Continue reading)

Rajasekhar Pulluru | 2 Jan 16:42 2014

kmem_alloc vs malloc


Need some help on understanding below issue.

When driver A invokes kmem_alloc, see panic due to TLB miss in driver B.
This issue happens during kernel bootup. At this time, show map output
shows, resident memory = wired memory.

When the kmem_alloc in driver A is replaced by malloc, don't see any issue
with driver B.

kmem_alloc allocates wired memory. malloc allocates uninitialized memory in
kernel address space.

How does the issue go away replacing kmem_alloc with malloc ? Is it related?

Thanks & Regards,

Rajasekhar Pulluru | 26 Dec 14:18 2013

trap: cpu0, TLB miss (load or instr. fetch) in kernel mode

Dear group members,

Need your help.

While porting usb driver to evbmips, receive below trap during system
bootup. Couldn't see backtrace as program counter is 0. how to proceed

pid 0(system): trap: cpu0, TLB miss (load or instr. fetch) in kernel mode
status=0x8203, cause=0x108, epc=0, vaddr=0xdeadbeef
tf=0x85011d20 ksp=0x85011e60 ra=0xffffffff80272a88 ppl=0x17108128
kernel: TLB miss (load or instr. fetch) trap
Stopped in pid 0.4 (system) at  0:      invalid address.
db> show reg
at          0xffffffc0
v0          0
v1          0x82        _KERNEL_OPT_NLOOP+0x1
a0          0
a1          0x1 _KERNEL_OPT_NINET
a2          0x8 _KERNEL_OPT_NINET+0x7
a3          0x812782a0  cpu_info_store
a4          0x2 _KERNEL_OPT_NINET+0x1
a5          0x1 _KERNEL_OPT_NINET
a6          0x80        _KERNEL_OPT_DDB_HISTORY_SIZE+0x1c
a7          0x81e794f8  ipl_eimr_map+0x18
t0          0x82a8a000  _prop_data_pool+0x5ea58
t1          0x1 _KERNEL_OPT_NINET
t2          0x85010000
t3          0x8027bfd4  tc_init+0x13c
s0          0xd13dc000
(Continue reading)