Re: pkg_add -u fails on nonexistant package

2019-08-22 Thread Jordon
Yeah, back before Skylake was supported.  I did get a pre-Skylake system 
(broadwell, i think) that is the openbsd system i am using now.  I did get it 
performing ok, but it was lacking some features.  I think it was audio/video 
sources but i could be wrong.  That was a couple years ago! :)

Anyway, i tried that command and i think it got rid of some of the errors.  
There are still a few but im pretty sure it is fewer than it was.

Thanks!


> On Aug 22, 2019, at 11:50, Stuart Henderson  wrote:
> 
> On 2019-08-21, Jordon  wrote:
>> A few years ago I attempted to make a port of obs-studio for openbsd.  
>> With help from this mailing list, I got something that ran but 
>> wasn\xe2\x80\x99t
>> particularly useful, as audio and video sources were not there.
> 
> erm, audio and video sources did work, via ffmpeg.
> it didn't work well on your machine though.
> 
> https://marc.info/?l=openbsd-ports=148404688530732=2
> 
>> On 2019-08-22, Jordon  wrote:
>> Thanks - that fixed it.  I figured there was some cleanup or maintenance 
>> that needed to be done - i just didn't know how to do it.  In running 
>> pkg_check, i did get a lot of these:
>> 
>> --- .libs9-partial-gcc-libs-8.3.0p1.1 ---
>> lib should exist
>> lib is not a directory
>> lib/libatomic.so.3.0 should exist
>> lib/libatomic.so.3.0 is not a file
>> can't read lib/libatomic.so.3.0
>> lib/libestdc++.so.19.0 should exist
>> lib/libestdc++.so.19.0 is not a file
>> can't read lib/libestdc++.so.19.0
>> 
>> Are those problematic?  How do I fix them or should I just ignore them?
> 
> you probably either had some crash or failure during a pkg_add or pkg_delete
> operation, or some filesystem corruption.
> 
> does pkg_delete .libs9-partial-gcc-libs get rid of it?
> 
> 



Re: pkg_add -u fails on nonexistant package

2019-08-22 Thread Jordon
I do the package upgrades as root (‘su -‘) and I’m pretty sure I was doing the 
pkg_check commands in the same terminal this morning.

> On Aug 22, 2019, at 11:00, Isak Holmstroem  wrote:
> 
> How did you run the command? As your user or with doas/or as root?
> 
> I have seen problems with permissions with pkg_check as my user can not read 
> all the directories that pkg_check are trying to read.
> 
> /Isak
> 
>> ----
>> From: Jordon 
>> Sent: Thu Aug 22 14:40:28 CEST 2019
>> To: Isak Holmström 
>> Cc: 
>> Subject: Re: pkg_add -u fails on nonexistant package
>> 
>> 
>> Thanks - that fixed it.  I figured there was some cleanup or maintenance 
>> that needed to be done - i just didn't know how to do it.  In running 
>> pkg_check, i did get a lot of these:
>> 
>> --- .libs9-partial-gcc-libs-8.3.0p1.1 ---
>> lib should exist
>> lib is not a directory
>> lib/libatomic.so.3.0 should exist
>> lib/libatomic.so.3.0 is not a file
>> can't read lib/libatomic.so.3.0
>> lib/libestdc++.so.19.0 should exist
>> lib/libestdc++.so.19.0 is not a file
>> can't read lib/libestdc++.so.19.0
>> 
>> Are those problematic?  How do I fix them or should I just ignore them?
>> 
>> Thanks again!
>> 
>> 
>> 
>> 
>>>>> On Aug 22, 2019, at 00:27, Isak Holmström  wrote:
>>> Have you tried pkg_check to see failing messages for missing files? 
>>> 
>>>> On August 21, 2019 11:03:06 PM UTC, Jordon  wrote:
>>>> A few years ago I attempted to make a port of obs-studio for openbsd. 
>>>> With help from this mailing list, I got something that ran but wasn’t
>>>> particularly useful, as audio and video sources were not there.  I gave
>>>> up on that project and since then have been using that machine for
>>>> local development on a cgi-based website.
>>>> This system runs current and gets updated about once a week or so.  I
>>>> also try to do a ‘pkg_add -u’ regularly too.  Every time I do that, it
>>>> ends with this:
>>>> Fatal error: can't parse OpenBSD::Requiring: writing
>>>> /var/db/pkg/obs-studio-17.0.0/+REQUIRING: No such file or directory at
>>>> /usr/libdata/perl5/OpenBSD/RequiredBy.pm line 30.
>>>> 
>>>> That is the package I was making and it is no longer installed.  How
>>>> does pkg_add even know about it, as it isn't part of the base packages?
>>>> What can I do to get rid of that message?  It has been doing that for a
>>>> while and I am finally annoyed enough to try to fix it!
>>>> 
>>>> Jordon
>>> 
>>> --
>>> Isak - OBSD.xyz
>> 



Re: pkg_add -u fails on nonexistant package

2019-08-22 Thread Jordon
Thanks - that fixed it.  I figured there was some cleanup or maintenance that 
needed to be done - i just didn't know how to do it.  In running pkg_check, i 
did get a lot of these:

--- .libs9-partial-gcc-libs-8.3.0p1.1 ---
lib should exist
lib is not a directory
lib/libatomic.so.3.0 should exist
lib/libatomic.so.3.0 is not a file
can't read lib/libatomic.so.3.0
lib/libestdc++.so.19.0 should exist
lib/libestdc++.so.19.0 is not a file
can't read lib/libestdc++.so.19.0

Are those problematic?  How do I fix them or should I just ignore them?

Thanks again!




>> On Aug 22, 2019, at 00:27, Isak Holmström  wrote:
> Have you tried pkg_check to see failing messages for missing files? 
> 
>> On August 21, 2019 11:03:06 PM UTC, Jordon  wrote:
>> A few years ago I attempted to make a port of obs-studio for openbsd. 
>> With help from this mailing list, I got something that ran but wasn’t
>> particularly useful, as audio and video sources were not there.  I gave
>> up on that project and since then have been using that machine for
>> local development on a cgi-based website.
>> This system runs current and gets updated about once a week or so.  I
>> also try to do a ‘pkg_add -u’ regularly too.  Every time I do that, it
>> ends with this:
>> Fatal error: can't parse OpenBSD::Requiring: writing
>> /var/db/pkg/obs-studio-17.0.0/+REQUIRING: No such file or directory at
>> /usr/libdata/perl5/OpenBSD/RequiredBy.pm line 30.
>> 
>> That is the package I was making and it is no longer installed.  How
>> does pkg_add even know about it, as it isn't part of the base packages?
>> What can I do to get rid of that message?  It has been doing that for a
>> while and I am finally annoyed enough to try to fix it!
>> 
>> Jordon
> 
> --
> Isak - OBSD.xyz



Re: pkg_add -u fails on nonexistant package

2019-08-22 Thread Jordon
Thanks - that fixed it.  I figured there was some cleanup or maintenance that 
needed to be done - i just didn't know how to do it.  In running pkg_check, i 
did get a lot of these:

--- .libs9-partial-gcc-libs-8.3.0p1.1 ---
lib should exist
lib is not a directory
lib/libatomic.so.3.0 should exist
lib/libatomic.so.3.0 is not a file
can't read lib/libatomic.so.3.0
lib/libestdc++.so.19.0 should exist
lib/libestdc++.so.19.0 is not a file
can't read lib/libestdc++.so.19.0

Are those problematic?  How do I fix them or should I just ignore them?

Thanks again!

Jordon


> On Aug 22, 2019, at 00:27, Isak Holmström  wrote:
> 
> Have you tried pkg_check to see failing messages for missing files? 
> 
>> On August 21, 2019 11:03:06 PM UTC, Jordon  wrote:
>> A few years ago I attempted to make a port of obs-studio for openbsd. 
>> With help from this mailing list, I got something that ran but wasn’t
>> particularly useful, as audio and video sources were not there.  I gave
>> up on that project and since then have been using that machine for
>> local development on a cgi-based website.
>> This system runs current and gets updated about once a week or so.  I
>> also try to do a ‘pkg_add -u’ regularly too.  Every time I do that, it
>> ends with this:
>> Fatal error: can't parse OpenBSD::Requiring: writing
>> /var/db/pkg/obs-studio-17.0.0/+REQUIRING: No such file or directory at
>> /usr/libdata/perl5/OpenBSD/RequiredBy.pm line 30.
>> 
>> That is the package I was making and it is no longer installed.  How
>> does pkg_add even know about it, as it isn't part of the base packages?
>> What can I do to get rid of that message?  It has been doing that for a
>> while and I am finally annoyed enough to try to fix it!
>> 
>> Jordon
> 
> --
> Isak - OBSD.xyz
> 



pkg_add -u fails on nonexistant package

2019-08-21 Thread Jordon
A few years ago I attempted to make a port of obs-studio for openbsd.  With 
help from this mailing list, I got something that ran but wasn’t particularly 
useful, as audio and video sources were not there.  I gave up on that project 
and since then have been using that machine for local development on a 
cgi-based website.
This system runs current and gets updated about once a week or so.  I also try 
to do a ‘pkg_add -u’ regularly too.  Every time I do that, it ends with this:
Fatal error: can't parse OpenBSD::Requiring: writing 
/var/db/pkg/obs-studio-17.0.0/+REQUIRING: No such file or directory at 
/usr/libdata/perl5/OpenBSD/RequiredBy.pm line 30.

That is the package I was making and it is no longer installed.  How does 
pkg_add even know about it, as it isn't part of the base packages?  What can I 
do to get rid of that message?  It has been doing that for a while and I am 
finally annoyed enough to try to fix it!

Jordon




Re: Why openbsd use only 2 of my 4 CPU ?

2018-07-25 Thread Jordon

On 07/25/2018 01:01 PM, vincent delft wrote:

Hello,

I've migrated to -current to test the auto-join, but since then, my system
is slow. Specially with libreoffice, firefox, ...

By looking at top, I've saw that only 2 CPU are actually running.

(Should I say that with OpenBSD-6.3 this was not the case.)

What can I do ?
In which direction could I search for a solution ?

The dmesg and Top are here after.

regards

ANNEXES:
--


In the name of security, hyperthreading has been turned off in -current.

https://undeadly.org/cgi?action=article;sid=20180620110722



Re: Serial port pci cards.

2018-04-08 Thread Jordon
Here’s a good start

https://man.openbsd.org/puc



> On Apr 8, 2018, at 11:19, Michael Price  wrote:
> 
> I am unwise in the ways of serial port pci cards. Should I be avoiding any
> particular brands? Any pointers to more information would be appreciated.
> 
> Michael


Re: popen from cgi program

2018-01-22 Thread Jordon

> 
> I think i tracked it down.  I have the ‘what’, just not the ‘why’.  My 
> program that i am calling in the popen() call looks for a local config file.  
> It builds the path to it with a call to std::getenv(“HOME”).  This getenv() 
> call is what is causing the segfault.  Why would this be a problem, and what 
> checks can i put around it to avoid calling it in a cgi environment?

Nevermind - i found my derp.  I was putting the return from the getenv() call 
straight into a std::string, which doesnt take too kindly to receiving null!


Re: popen from cgi program

2018-01-22 Thread Jordon

> Heh. I was poking around with ktrace last night, though you have a much more 
> elegant way of using it.
> I have run my program in the chroot from the command line like you suggest - 
> it works fine there.
> In the cgi program, it blows up after a bunch of mprotect and kbind calls.  I 
> do see a .core file mentioned but i cannot find it, so the cgi part must be 
> swallowing it.
> I made a simple little c++ program that does the popen like i am and it works 
> fine there.  It must be something in the cgi environment - permissions, 
> perhaps?  Or are there some other environmental limitations?

I think i tracked it down.  I have the ‘what’, just not the ‘why’.  My program 
that i am calling in the popen() call looks for a local config file.  It builds 
the path to it with a call to std::getenv(“HOME”).  This getenv() call is what 
is causing the segfault.  Why would this be a problem, and what checks can i 
put around it to avoid calling it in a cgi environment?


Re: popen from cgi program

2018-01-22 Thread Jordon



> Tips:
> 
> - run it from the command line (chroot /var/www /cgi-bin/whatever), watch
> for error messages in the output
> 
> - run it under ktrace (if this was running from slowcgi, something like
> "ktrace -i -p `pgrep slowcgi`", then try to call it, then ktrace -C),
> you may find some clue in the output from kdump

Heh. I was poking around with ktrace last night, though you have a much more 
elegant way of using it.
I have run my program in the chroot from the command line like you suggest - it 
works fine there.
In the cgi program, it blows up after a bunch of mprotect and kbind calls.  I 
do see a .core file mentioned but i cannot find it, so the cgi part must be 
swallowing it.
I made a simple little c++ program that does the popen like i am and it works 
fine there.  It must be something in the cgi environment - permissions, 
perhaps?  Or are there some other environmental limitations?


Re: popen from cgi program

2018-01-21 Thread Jordon

> Bingo!  I copied all the necessary libs to corresponding usr/lib dirs and got 
> the chrooted programs to run from a chroot command, but they would still not 
> work from the cgi program.  You pointing out that popen requires sh got me 
> thinking.  Sh was already in /var/www/bin but it had 000 for perms.  I make 
> it 111 and it works now!  Thanks!

Looks like I spoke too soon.  The uname and all required libs that i copied 
into the chroot is working fine.  The ping (that was already there) and my 
homemade program both work fine when manually executed in the chroot, but do 
nothing when run through popen().  How do you even debug this?


Re: popen from cgi program

2018-01-21 Thread Jordon

> popen() requires a shell. You are most likely running it in a chroot and
> don't have /bin/sh.

Bingo!  I copied all the necessary libs to corresponding usr/lib dirs and got 
the chrooted programs to run from a chroot command, but they would still not 
work from the cgi program.  You pointing out that popen requires sh got me 
thinking.  Sh was already in /var/www/bin but it had 000 for perms.  I make it 
111 and it works now!  Thanks!


popen from cgi program

2018-01-19 Thread Jordon
I am still learning cgi/web stuff and stumbled upon an issue.  I am 
trying to popen() a program to catch what it dumps to stdout.  To start 
simply, I am just trying to run uname.  I get nothing.  No errors on 
popen() or pclose(), but nothing printed.  I run the same code from a 
regular cpp program (changing the khtml_puts() to printf() and it works 
perfectly.  That makes me wonder if there is something environmental 
that I am missing, or maybe this is just not allowed.


My code is this:

  char dump[1024];
  memset(dump, 0, sizeof(dump));
  FILE *f = popen("uname -a", "r");
  if(f == NULL) {
    khtml_puts(, "popen()FAILED!");
  } else {
    khtml_puts(, "output: ");
    while (fgets(dump, sizeof(dump), f) != NULL) {
  khtml_puts(, "GOTSOMETHING!");
  khtml_puts(, dump);
    }
    int status = pclose(f);
    if(status==-1) {
  khtml_puts(, "pclose()FAILED");
    }
  }
  khtml_puts(, "done");


All I get from it is "output: done"



Also, my httpd.conf is this:

ext_addr="egress"
prefork 2
server "localhost" {
    listen on $ext_addr port 80
    root "/htdocs"
    location "/cgi-bin/*" {
    fastcgi
    root "/"
    }
}

Any ideas?



Re: Cgi shell script in httpd

2018-01-01 Thread Jordon
> 
> You are providing no information whatsoever, so let me try a shot in
> the utter dark and hope i don't hit any of the cats on your couch:

I am very new to this field so sorry for the vagueness!

> 
> Maybe you are running httpd(8) chroot(2)ed but don't have any sh(1)
> binary in the chroot?  That's a common error.

I did read about this and put sh into /var/www/bin but it still didn’t work.

> 
> By the way, putting a shell binary in a chroot (or any other
> interpreter for that matter, like PHP) is an ugly thing to do, so
> a good alternative might be to write the redirect CGI program in C
> as well (which you already managed to do for something more
> complicated), or even simpler, make it a static HTML page and tell
> httpd.conf(5) with location { no fastcgi } and types { } to simply
> serve it as text/html, even if the name ends in *.cgi or something
> like that.

This is the real answer.  If scripts a cgi programs is bad practice, I won’t do 
it.  Again, I am very new to this area of programming and I am as interested in 
the “should I” as much as the “can I”.

Thanks!

Jordon


Cgi shell script in httpd

2017-12-31 Thread Jordon
Over the last few days I have been learning the BCHS approach at web design.  I 
am not a web designer (i had to learn CSS as part of this!) but have enjoyed 
this little adventure.  My goal was to make an web interface to view data that 
i provide in a c++ library and so far i have been pretty successful.
In doing some cleaning up and reorganizing, i have renamed the cgi program.  I 
thought it would be nice to create a shell script with the old name that would 
spit out a simple page saying the name changed and providing a link to the new 
cgi app.  I made the shell script but for the life of me cannot get it to work. 
 Is this allowed/supported in httpd?  If so, any idea what I could be missing?




Re: Dumb question about updating snapshots

2017-08-26 Thread Jordon

> On Aug 26, 2017, at 4:14 AM, Stuart Henderson <s...@spacehopper.org> wrote:
> 
> On 2017-08-26, Bryan Linton <b...@shoshoni.info> wrote:
>> On 2017-08-25 13:09:14, Jordon <open...@sirjorj.com> wrote:
>>> I’ve been running snapshots on my machine for a while now.  About once or 
>>> twice a week I will interrupt the boot with ‘bsd.rd’ and run through the 
>>> ‘U’ process to get the latest builds.  The only weirdness is that it alway 
>>> defaults to a really slow mirror (i have to manually enter a different one) 
>>> and it simply doesnt work when I enter a number from the list.  Is this a 
>>> proper way to update?
> 
> For upgrades, it will default to the mirror in /etc/installurl.
> 
>>> What about when the version gets bumped?  Since the switch to 6.2, this 
>>> method doesn’t work because it doesnt give the list of packages - just the 
>>> kernel ones.  Is this expected behavior and the solution is to boot from a 
>>> flash drive or PXE from the latest 6.2 media?
>>> 
>> 
>> The older bsd.rd is probably only looking for files tagged with
>> its own version.  I.e. If you have 6.1 installed, it's looking
>> for base61.tgz and not base60.tgz or base62.tgz.
> 
> Right - you should always use a new bsd.rd to do the upgrade.
> 

Ahh… so my process of booting the current bsd.rd to install the next one is not 
recommended.  Good to know.

Thanks

Jordon



Dumb question about updating snapshots

2017-08-25 Thread Jordon
I’ve been running snapshots on my machine for a while now.  About once or twice 
a week I will interrupt the boot with ‘bsd.rd’ and run through the ‘U’ process 
to get the latest builds.  The only weirdness is that it alway defaults to a 
really slow mirror (i have to manually enter a different one) and it simply 
doesnt work when I enter a number from the list.  Is this a proper way to 
update?

What about when the version gets bumped?  Since the switch to 6.2, this method 
doesn’t work because it doesnt give the list of packages - just the kernel 
ones.  Is this expected behavior and the solution is to boot from a flash drive 
or PXE from the latest 6.2 media?

Thanks.
Jordon



no network in bsd.rd when wifi card is present

2017-04-21 Thread Jordon
My main OpenBSD system is a Shuttle SH81R4 with a 4th Gen i5.  I run the latest 
snapshot on it and once or twice a week I will boot into bsd.rd and run update. 
 A week or two ago I put a mini-pcie wifi card in it (athn0) and after getting 
some help from this mailing list, I got this system running as an Access Point. 
 I have since noticed a strange issue.

Now, when I boot into bsd.rd, I have no network.  When i try to upgrade, I will 
see the DHCPDISCOVER, DHCPOFFER, etc go by and it is all right, but when get to 
the “lets upgrade the sets” part, i get the (Unable to get list from 
ftp.openbsd.org, but that is OK) message and any attempt to actually download 
the updated packages fails.

If I ctrl+c to a prompt, i can run ‘dhclient re0’ and it looks like it 
succeeds, but when I run ‘ifconfig’, re0 does not have an ip address.  I can’t 
even ping the ip address of my router.
If I actually remove the wifi adapter (as in, open the case and physically 
remove the mini-pcie card from its slot) and try it, it works fine (though 
entering a number for a different mirror doesn’t seem to work).

Removing the pcie card every time I want to install the latest build is very 
inconvenient.  Is there a workaround for this?

Jordon



Re: OpenBSD as a non-routing access point

2017-04-12 Thread Jordon
> On Apr 12, 2017, at 3:27 AM, Stuart Henderson <s...@spacehopper.org> wrote:
>
> On 2017-04-12, Jordon <open...@sirjorj.com> wrote:
>>> rcctl enable dhcrelay
>>> rcctl set dhcrelay flags -i athn0 192.168.1.1 "assuming that is your
routers
>> address"
>>> rcctl start dhcrelay
>>>
>>> and possibly add -d (log to stderr) to see what its doing.
>>>
>>
>> Thank you!  That got it working!  So why is that necessary?  Doesnt the
bridge
>> just forward everything?  Or are DHCP requests broadcasts that dont get
>> forwarded?
>
> It shouldn't be necessary, dhcrelay is normally used when you have a
> subnet behind a router, and the DHCP server is a separate machine on a
> different subnet.
>
> Could it be a PF rule problem?
>
> Normally you would only have an IP address on one member of the bridge,
> just "up" on the others..
>

I have done nothing with PF on this machine.



Re: OpenBSD as a non-routing access point

2017-04-12 Thread Jordon
> On Apr 12, 2017, at 1:47 PM, Mihai Popescu <mih...@gmail.com> wrote:
>
> Because of titles like this post there is no clear anymore what
> someone is reffering to when one is using words like bridge, switch,
> hub, access point, router, ...
> Add the IPv6 in the mix and you think you understand the spagetti of
internet.
>
> Bleah, looking again at "non-routing access point". What about the "no
> pancake making CPU".
>
> Sorry for the rant.
>

You have a valid point.

When one buys a linksys/netgear/whatever “Wireless Access Point”, it is
often intended to be a full Internet gateway (router, NAT, DHCP, etc) that
also does wifi.

For all examples I found for making an OpenBSD access point, the OpenBSD
machine is used as the main router/DHCP server/gateway/buzzword on the
network.  I have a separate machine (currently running pfSense, though I plan
on switching it to OpenBSD soon) that is handling the routing/NAT/DHCP/etc
functionality on my network.  I just want to see if I can make my openbsd
machine an access point to this network.

I got the hostname.athn0 set up so other devices could connect to it.  I then
though that just bridging it to the ethernet NIC would make it ‘just work’
- whatever comes in one port goes out the other and vice-versa.  It turned out
that DHCP requests weren’t going though.  I saw a tutorial online that
showed enabling the ipforwarding sysctl so i tried that but it made no
difference.  The suggestion here about turning on relayctld is what made this
work for me.  I am guessing that OpenBSD does not forward broadcasts over a
bridged connection.

If there is better terminology for what I am trying to do, I am more than
interested in learning it! :)

Jordon



Re: OpenBSD as a non-routing access point

2017-04-12 Thread Jordon
> On Apr 12, 2017, at 1:54 AM, Stefan Sperling <s...@stsp.name> wrote:
> 
> On Tue, Apr 11, 2017 at 08:04:45PM -0500, Jordon wrote:
>>   /ets/hostname.athn0
>> media autoselect mode 11n media opt host ap chan 1
> 
> Is there actual whitespace between 'media' and 'opt' and between
> 'host' and 'ap' in your config file? Or is this a copy/paste error?
> 
> It should look like this:
> media autoselect mode 11n mediaopt hostap chan 1
> 

No, that must have been a copy/paste error - sorry!

Jordon



Re: OpenBSD as a non-routing access point

2017-04-11 Thread Jordon
> I'm not certain but I suspect you're athn address is outside your routers
> subnet.
>

No, they’re both on 192.168.77.x



Re: OpenBSD as a non-routing access point

2017-04-11 Thread Jordon
> rcctl enable dhcrelay
> rcctl set dhcrelay flags -i athn0 192.168.1.1 "assuming that is your routers
address"
> rcctl start dhcrelay
>
> and possibly add -d (log to stderr) to see what its doing.
>

Thank you!  That got it working!  So why is that necessary?  Doesnt the bridge
just forward everything?  Or are DHCP requests broadcasts that dont get
forwarded?

Jordon



Re: OpenBSD as a non-routing access point

2017-04-11 Thread Jordon
> What is your dhcpd.conf and have you verified it's running?
>

There is none - the OpenBSD machine that I am trying to turn into an access
point is not the DHCP server or router in my network.  With bridging enabled,
shouldn’t DHCP requests just be forwarded to the wired network, where the
actual router/DHCP server will see it and respond?

Jordon



Re: OpenBSD as a non-routing access point

2017-04-11 Thread Jordon
Ok, lets try this again…

I got the 9280 installed.  My configs are like this:

My interfaces are configured like this:

   /etc/hostname.re0
dhcp

   /ets/hostname.athn0
media autoselect mode 11n media opt host ap chan 1
nwid testytesterson
wpakey testingx
inet 192.168.77.253 255.255.255.0

   /etc/hostname.bridge0
add athn0
add re0
up

I also set the net.inet.ip.forwarding sysctl to 1

>From a different machine, if I ping 192.168.77.253, it responds.  If I unplug
the network cable going to the OpenBSD box (to re0), the pings stop
responding.  If I reconnect the cable, they start up again.  However, if I try
to connect a wireless device, I think it connects, but it doesnt pull an IP
address.  Seems to me that with ip.forwarding enabled and the bridge in place,
DHCP requests should be forwarded through.  Am I missing something?

Jordon



Re: OpenBSD as a non-routing access point

2017-04-08 Thread Jordon
> Or ar9280 may be better. Pcie devices are usually more capable too.
>

Exactly what I ordered!  And an antenna/pigtail kit.  Total price under $30.
My openbsd machine (a broadwell Shuttle system) has the mini pcie slot for it,
so no pice adapter card needed.



Re: OpenBSD as a non-routing access point

2017-04-08 Thread Jordon
> On Apr 8, 2017, at 3:38 AM, Stefan Sperling <s...@stsp.name> wrote:
>
> On Fri, Apr 07, 2017 at 05:06:22PM -0500, Jordon wrote:
>> My new wifi adapter finally arrived today (AR9271) so I want to give hostap
a
>> try with its new 802.11n support.
>
>> Am I on the right track?
>
> No. AR9271 is a USB device, and unfortunately there are bugs in the
> driver that prevent hostap from working properly with USB devices.
>
> At least in my testing, the device sends no beacons. I have not yet
> found a way to fix it and am not currently investing more time into it.
> Perhaps it will get fixed some day.
>


Dang.  Although, IIRC, beacons are what announce the presence of the access
point.  I definitely saw it on the client machine, so I think that part was
working.  But, yeah, anything beyond that is unsupported so I guess I’ll
have to get a PCIe one.

Thanks!
Jordon



OpenBSD as a non-routing access point

2017-04-07 Thread Jordon
My new wifi adapter finally arrived today (AR9271) so I want to give hostap a
try with its new 802.11n support.  Unfortunately, all the examples I’ve
found center around creating a router/AP when all I want to make is an AP - as
in, no DHCP or routing.  I just want to bridge my wired network to the
wireless one.  I want all DHCP requests from wireless devices to get passed to
my router so it assigns the address (192.168.77.x).

My interfaces are configured like this:

/etc/hostname.re0
dhcp

/ets/hostname.athn0
media autoselect mode 11n media opt host ap chan 1
nwid testytesterson
wpakey testingx
inet 192.168.77.253 255.255.255.0

/etc/hostname.bridge0
add athn0
add re0
up

A client laptop (running linux mint) sees the access point but will not
connect to it.

Am I on the right track?  Should a bridge be adequate or do I need to
configure pf to route between the interfaces?
Perhaps the configs for a simple AP-only setup would be a good example for the
faq.

Thanks
Jordon



Re: Is there something to replace zaurus?

2017-03-29 Thread Jordon
> On Mar 29, 2017, at 4:51 AM, Luke Small <lukensm...@gmail.com> wrote:
>
> I thought I read that there is an arm7 based mobile device, but I can't
> find anything about it.
>

I’m really hoping the Dragonbox Pyra could become a mobile OpenBSD device
like the zaurus was.  It is almost ready for manufacturing.

Jordon



Re: Encryption

2017-03-24 Thread Jordon
> On Mar 24, 2017, at 10:58 AM, Stefan Sperling <s...@stsp.name> wrote:
>
> On Fri, Mar 24, 2017 at 08:46:09AM -0700, Ken wrote:
>> I've read things that allude to a lack of support...
>>
>> "Much like support for RAID-5, support for encrypted filesystems is
>> experimental." - Absolute OpenBSD 2nd Edition (2013), page 166.
>>
>> But a better source than this slowly aging tome is the more regularly
>> updated website:
>>
>> https://www.openbsd.org/faq/faq14.html#softraidFDE
>>
>> Which seems to indicate FDE is supported (unless you are also doing RAID
on
>> the same device).
>>
>> All-in-all... I can see how some admins might feel like they sometimes get
>> mixed signals.
>
> Before installboot(8) was made smart enough to deal with softraid
> volumes (which happened after 2013 I believe), FDE was indeed tricky.
>
> Nowadays it's fairly easy but the installer script still does not support
> setting up disks with FDE so manual steps as shown in the FAQ are needed
> to set it up.
>

FWIW, I just did this for the first time in the last week or two.  Following
the instructions in the FAQ was easy.  It works great.

Jordon



Question on audio and video handling

2017-02-21 Thread Jordon
So I built a small Haswell system and resumed on my attempt at porting
OBS-Studio to OpenBSD.
I was able to do a short (silent) stream to twitch, so that tested out.
I am able to do window capture, so that seems ok.
The problems I am encountering involve audio capture (from a window/program or
from a mic) and video capture from webcam.

Audio:
I have a blue snowball
uaudio0 at uhub4 port 1 configuration 1 interface 0 "BLUE MICROPHONE 
Blue
Snowball" rev 1.10/1.00 addr 6
uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0
uhidev3 at uhub4 port 1 configuration 1 interface 2 "BLUE MICROPHONE 
Blue
Snowball" rev 1.10/1.00 addr 6
uhidev3: iclass 3/0, 1 report id
uhid1 at uhidev3 reportid 1: input=15, output=15, feature=0

however…
sirjorj@ghost:~ audioctl -f /dev/audio1
audioctl: /dev/audio1: Device not configured

Does that mean that a) I need to configure this mic in mixerctl or b) OpenBSD
is unable to communicate with this mic?
I also tried this with the mic on a logitech webcam I have and got the same
result.
Also, in doing window capture (OBS uses Xcomposite), is there a way to capture
the audio for that window?
For the audio in general, is there a standard interface that OpenBSD surfaces
that OBS would connect to, or would the ‘right solution’ be to modify OBS
to use sndio?

Video:
I have a couple of different logitech webcams that I tried, but was unable to
get working.  In fact, I noticed some inconsistencies with how OpenBSD
identified them.
http://marc.info/?l=openbsd-tech=148748136701754=2

When I connect my webcam (a Logitech Pro Webcam), i get the following
uvideo0 at uhub4 port 1 configuration 1 interface 0 "Logitech Logitech 
Webcam
C930e" rev 2.00/0.13 addr 6
video0 at uvideo0
uaudio0 at uhub4 port 1 configuration 1 interface 2 "Logitech Logitech 
Webcam
C930e" rev 2.00/0.13 addr 6
uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0

Whenever I try to access it (OBS or ffmpeg directly), i get errors.

sirjorj@ghost:~ ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i
/dev/video0 output.mkv
ffmpeg version git-N-75412-g523da8eac1 Copyright (c) 2000-2017 the FFmpeg
developers
  built with clang version 4.0.0
  configuration: --enable-shared --arch=amd64 --cc=cc --disable-altivec
--disable-armv5te --disable-armv6 --disable-armv6t2 --disable-debug
--disable-iconv --disable-indev=jack --disable-indev=oss --disable-lzma
--disable-mips32r5 --disable-mips64r6 --disable-mipsdspr1 --disable-mipsdspr2
--disable-mipsfpu --disable-mmi --disable-msa --disable-neon
--disable-outdev=oss --disable-outdev=sdl --disable-vfp --enable-avresample
--enable-fontconfig --enable-gpl --enable-libass --enable-libfreetype
--enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libopus
--enable-libspeex --enable-libv4l2 --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libx265 --enable-libxvid --enable-nonfree
--enable-openssl --extra-cflags='-I/usr/local/include -I/usr/X11R6/include'
--extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' --mandir=/usr/local/man
--optflags='-O2 -pipe -Wno-redundant-decls'
  libavutil  54. 31.100 / 54. 31.100
  libavcodec 56. 60.100 / 56. 60.100
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc53.  3.100 / 53.  3.100
[video4linux2,v4l2 @ 0xd8f50064800] ioctl(VIDIOC_STREAMON): Invalid argument
/dev/video0: Invalid argument

I’m guessing this means that the camera isn’t quite supported.

Thoughts?

Jordon



clang support

2017-02-17 Thread Jordon
I’ve seen a lot of emails on the lists lately about bringing clang/llvm to
the base system.  I just did a new install of current on my new haswell-based
system (yay!) but cc, cpp, and gcc still all point to gcc and not clang.  I
have been using clang from the package, so this isn’t a ‘how to i get
chang running’ question.  It is just a ‘what is the current state of base
clang support’ question.

Jordon



Re: apmd

2017-01-24 Thread Jordon
> On Jan 24, 2017, at 12:54 PM, Stefan Sperling <s...@stsp.name> wrote:
>
> On Tue, Jan 24, 2017 at 11:52:56AM -0600, Jordon wrote:
>>> OpenBSD 6.0 (GENERIC.MP) #1992: Tue Jul 26 12:52:55 MDT 2016
>>>   dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
>>> cpu0: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz ("GenuineIntel" 686-class)
>> 3.30 GHz
>>
>>
>> A ‘6600’ would be a Skylake CPU, and skylake is not yet supported.
>> I’m seeing similar issues in my Skylake laptop - sleeps find but video
>> subsystem doesn’t wake properly.
>> I know myself and several others are ready to make a nice donation when
>> Skylake support drops.
>> Until then…
>>
>> Jordon
>
> Whether you donate today or tomorrow is irrelevant to Skylake support.
>
> If you have the extra cash already, then why not just make that donation
> right now? With a donation you are not buying a service or a product,
> it is a gift you make voluntarily. Or perhaps a gift you make to lower
> your taxable income. In any case, you have your own private reasons for
> donating which nobody else should care about.
>
> You have already been given a gift by the community which you can install
> and run today, no strings attached. It is this same mindset that donations
> are usually made with. Bragging about a donation to those who receive it
and
> even tying it to conditions makes it look not like a real donation, but
more
> like an effort to buy influence.

I guess that is one way to interpret my message.
I was just referencing a thread here a few weeks ago where multiple people
were mentioning they are very much interested in Skylake support and willing
to donate to make it happen.  I am very thankful for OpenBSD and have
purchased several versions on disk as a way of saying thank you.  I was not
bragging.  When a contribution is made that significantly increases the value
of OpenBSD for me, I will show appreciation by donating.

I really like this project and would like to make it my ‘daily driver’
system.

Jordon



Re: apmd

2017-01-24 Thread Jordon
> OpenBSD 6.0 (GENERIC.MP) #1992: Tue Jul 26 12:52:55 MDT 2016
>dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
> cpu0: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz ("GenuineIntel" 686-class)
3.30 GHz


A ‘6600’ would be a Skylake CPU, and skylake is not yet supported.
I’m seeing similar issues in my Skylake laptop - sleeps find but video
subsystem doesn’t wake properly.
I know myself and several others are ready to make a nice donation when
Skylake support drops.
Until then…

Jordon



Re: pledging a portable program

2017-01-20 Thread Jordon
> OpenSSH Portable checks for the presence of pledge in configure
> (https://anongit.mindrot.org/openssh.git/tree/configure.ac#n1715) and
> if not found defines a no-op pledge function
>
(https://anongit.mindrot.org/openssh.git/tree/openbsd-compat/bsd-misc.c#n282)

I finally took some time to look into this again.

Dumb questions: what is that configure.ac file?  Is that GNU autoconf or some
other config tool?  Was it written by hand or generated?  I need to learn
about the config process and I’m not sure where to start.  I think some of
these build tools have GNU versions and BSD versions (like make).  What is the
BSD standard for config scripts?

*sigh* this is a part of the build process that I have just put off for far
too long…



Re: pledging a portable program

2017-01-16 Thread Jordon
> On Jan 16, 2017, at 4:31 PM, Darren Tucker <dtuc...@zip.com.au> wrote:
>
> On Tue, Jan 17, 2017 at 6:05 AM, Jordon <open...@sirjorj.com> wrote:
>> What is the “official" way to pledge(2) a portable program?
>
> OpenSSH Portable checks for the presence of pledge in configure
> (https://anongit.mindrot.org/openssh.git/tree/configure.ac#n1715) and
> if not found defines a no-op pledge function
>
(https://anongit.mindrot.org/openssh.git/tree/openbsd-compat/bsd-misc.c#n282)
>
> The advantage of doing it this way is that the mainline code is
> unchanged and so does not add additional maintenance burden (ie merge
> conflicts).  It also provides a hook for alternative implementation
> mechanisms although there are no drop-in replacements at the moment.
>
> --
> Darren Tucker (dtucker at zip.com.au)
> GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
>Good judgement comes with experience. Unfortunately, the experience
> usually comes from bad judgement.
>

Thank you all for the replies.  I like this approach.  I guess it means I will
finally have to learn how that pre-build config thing works!  :)

Jordon



pledging a portable program

2017-01-16 Thread Jordon
What is the “official" way to pledge(2) a portable program?

Put #ifdef __OpenBSD__ around the pledge call?

Make an #ifndef __OpenBSD__ block that defined the function to always return
0?

Something better?



Re: Funding for Skylake support

2017-01-07 Thread Jordon
> On Jan 7, 2017, at 2:19 PM, Peter Membrey <pe...@membrey.hk> wrote:
>
> Hi all,
>
> I've gotten OpenBSD up and running on a new Intel NUC, but unfortunately
Skylake isn't supported. I was able to get X working in software accelerated
mode, but it would be great to see true support for the chipset. Unfortunately
I don't have the necessary skills to work on this myself, but I am willing to
put my money where my mouth is.
>
> I realise that for a lot of people, the issue is time and not money, but
that aside, would anybody be interested in focusing on adding support for
Skylake? The deliverable would be getting Skylake support merged.
>
> Happy to discuss what sort of funding would be needed.
>
> Thanks in advance!
>
> Kind Regards,
>
> Peter Membrey
>


I second this.  OpenBSD runs really well on my TP x260 with the UEFI frame
buffer, but full Skylake support could turn it into my ‘main system’.
When Skylake support hits the tree, count me in for a donation as well.

Jordon



Re: Hardware recommendations for compact 1U firewall

2016-12-15 Thread Jordon
About a year ago i replaced my Soekris net5501 with the following system:
   Supermicro A1SAi-2550F (4 core Atom with 4 NICS + IPMI)
   Supermicro SC505-203B (1U case where the back of the mob comes out the
front)
   Kingston KVR16LSE11/4 (4GB SO-DIMM)

I also used a SATA-DOM because I was going for low power, but a USB flash
drive would work and be a lot cheaper.
Under normal usage, it pulls about 15 watts.

I have been running pfSense on it with no problems.
I also have the 8-core version of this board (2750) in my NAS which is running
FreeNAS.
I’m pretty sure that at some point while testing these boards, I ran OpenBSD
on them without any issues.

Those last families of Atoms are a bit underrated in my book.

Jordon




> On Dec 15, 2016, at 1:45 PM, Bryan Vyhmeister <br...@bsdjournal.net> wrote:
>
> On Thu, Dec 15, 2016 at 07:51:40PM +0100, Hrvoje Popovski wrote:
>> On 15.12.2016. 12:30, Stuart Henderson wrote:
>>> If you want to cut down on weight+noise at the expense of more cost
>>> and a less powerful cpu, maybe APU2 in a 1U case or something like
>>> supermicro SYS-5018A-FTN4.
>>
>> has anyone dmesg from SYS-5018A-FTN4 box? i'm interesting in intel qat
>
> There is no support for Intel QAT (sometimes called Quick Assist) in
> OpenBSD and that's not likely to change anytime soon. Some support is
> supposedly coming to FreeBSD (by way of pfSense and some commerical
> sponsorship or something) but I have not seen anything recently about
> that.
>
> Because Intel QAT is not supported, it is better to use one of the
> Supermicro A1SAi boards (for the slight speed increase) rather than the
> A1SRi-2758F that comes in the SYS-5018A-FTN4. The A1SRi boards do work
> fine though.
>
> I put together my own systems like this which only takes a few minutes
> with Supermicro parts. I use the same case which is the Supermicro
> CSE-505-203B, a few Noctua 40mm fans (which are much quieter and
> probably not necessary), and then one of the A1SAi-2750F, A1SAi-2550F,
> A1SRM-LN7F-2758F, A1SRM-LN7F-2358F, A1SRi-2758F, or A1SRi-2558F. I also
> have a few A1SAM-2550F boards but those are not booting from USB sticks
> for some reason. All of the others above work just fine. All that's left
> is some sort of storage (like a 64GB SanDisk SSD, Supermicro SuperDom,
> or USB stick with resflash) and memory (I use Kingston ECC SO-DIMMs) and
> it works great. I have quite a few of these at tower sites, datacenter
> installations, and as home and business routers. As a bonus, all of the
> above can be powered directly from 12V if you want to wire them up that
> way. I have started doing that at DC sites and to run from batteries.
>
> Where portability is needed, the CSE-505-203B fits great in any of the
> SKB short depth cases like hte SKB R4S or R6S.
>
> Below is a dmesg for the A1SRi-2758F. This particular router is running
> BGP, OSPF, and CARP on the inside as well as DNS and DHCP. It is running
> 5.8 so not the most recent (it is due to be upgraded in the next week)
> but Intel QAT does show up as:
>
> vendor "Intel", unknown product 0x1f18 (class processor subclass
Co-processor, rev 0x02) at pci0 dev 11 function 0 not configured
>
> Bryan
>
>
>
> OpenBSD 5.8-stable (GENERIC.MP) #9: Thu May 26 22:05:56 PDT 2016
>r...@amd64.example.com:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 17134739456 (16340MB)
> avail mem = 16611545088 (15842MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x7f4ee000 (53 entries)
> bios0: vendor American Megatrends Inc. version "1.1" date 01/09/2015
> bios0: Supermicro A1SAi
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S5
> acpi0: tables DSDT FACP FPDT FIDT SPMI MCFG WDAT UEFI APIC BDAT HPET SSDT
> acpi0: wakeup devices PEX1(S0) PEX2(S0) PEX3(S0) PEX4(S0) EHC1(S0)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimcfg0 at acpi0 addr 0xe000, bus 0-255
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Atom(TM) CPU C2758 @ 2.40GHz, 2400.45 MHz
> cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,RDRAND,
NXE,LONG,LAHF,3DNOWP,PERF,ITSC,SMEP,ERMS,SENSOR,ARAT
> cpu0: 1MB 64b/line 16-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.0.0.0.0.3, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Atom(TM) CPU C2758 @ 2.40GHz, 2399.99 MHz
> cpu1:
FP

Re: Laptop Recommendations?

2016-11-12 Thread Jordon
> On Nov 12, 2016, at 5:36 AM, Stefan Sperling <s...@stsp.name> wrote:
>
> On Fri, Nov 11, 2016 at 08:03:04PM -0600, jordon wrote:
>> WiFi Just Works!
>
>> iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 8260" rev 0x3a,
>> msi
>
> Uhmm, you probably wanna be running -current with this one.
> Then wifi should work even better ;-)

Wow.  I just looked up if_iwm.c on the web-cvs - you’ve been busy!

I am willing to run the latest snapshot (I did have it installed on this new
laptop for a little while) but I have one question.  I seem to remember
running a latest snapshot almost a year ago when I submitted support for a PCI
serial card (puc device).  When I was running current, there were no packages.
What is the official way to install packages when running current?  Build them
from ports?

Also, playing with the new vmm would be fun too, so there’s another reason
to run current…

Jordon



Re: Laptop Recommendations?

2016-11-11 Thread jordon
> On Nov 9, 2016, at 11:47 PM, Nathan Koch  wrote:
>
> Greetings Fair BSD Wizards,
> I am new to the lists. I am currently shopping for a new Xmas present for
myself and am looking for a laptop that's portable and lightweight. Preferably
fast, cheap (close to free),  light, and secure. If you have any
recommendations before the stormy winter hits the prairies please let me
know.
>
> Thank you.
> Nate
>
> 
> Sailing the South Saskatchewan.
>

I just (as in yesterday) got a ThinkPad x260.  I saw that FreeBSD had pretty
good support for it and I got it with the intent of running FreeBSD or OpenBSD
on it.  I went with the i5-6300U, 1080p screen, extra large battery (this
model has an internal battery AND an external one - the extra large option
sticks out a bit and tilts up the keyboard, which is nice), and minimal RAM
and HDD (cheaper to upgrade later).  I did up the RAM to 16GB right away and
will soon replace the 500GB spinning rust with an SSD.

FreeBSD and TrueOS both work pretty good (TrueOS is just too bloated/slow for
my taste),  but I think OpenBSD might be the winner for what stays on it.
WiFi Just Works!  Sleep/Resume almost works (sleeps just fine on close but
screen doesn’t wake up on open - but I can ssh into it after the failed
wake).  The trackpad is… pretty rough… but I’m used to a trackpad on a
Mac, which is by far the best of any computer I’ve ever used.

Anyway, I am just searching for the tiniest window manager that does what I
need (currently exploring cwm, as I like what I’ve read about it) and I
think I have my portable coding machine.  My ‘workflow’ is emacs in
terminal, git, llvm, and a quick web browser.  Once llvm is officially
supported in base, I will be even happier!

Anyway, here is the dmesg of it exactly as I got ig except I removed the 4GB
RAM and added a (cheaper) upgrade to 16GB myself:

OpenBSD 6.0 (GENERIC.MP) #2319: Tue Jul 26 13:00:43 MDT 2016
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16546209792 (15779MB)
avail mem = 16040271872 (15297MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xd7bfd000 (65 entries)
bios0: vendor LENOVO version "R02ET50W (1.23 )" date 09/20/2016
bios0: LENOVO 20F6CTO1WW
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP TCPA SSDT SSDT TPM2 UEFI SSDT SSDT ECDT HPET APIC MCFG
SSDT SSDT DBGP DBG2 BOOT BATB SSDT SSDT MSDM ASF! FPDT UEFI
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP8(S4) XHCI(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpihpet0 at acpi0: 2399 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2293.34 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITS
C,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,C
LFLUSHOPT,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 23MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2294.63 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITS
C,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,C
LFLUSHOPT,PT,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2294.63 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT
,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITS
C,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,C
LFLUSHOPT,PT,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2294.63 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX

Installing RackTables

2016-01-04 Thread Jordon
I’ve been trying to get RackTables running and my lack of web server
experience is not making this easy.

I started with a fresh install of 5.8 and added the racktables package.  I
then copy/pasted the ‘ln’ commands that were shown after the package
install.

At this point, the packages are installed but nothing works - I think I need
to get httpd running.  I found some basic httpd.conf examples and enabled
httpd in rc.conf.local (httpd_flags=“”) and got it to the point where it
would serve a .html file from /var/www/htdocs, so I think that is good.

Next, I think I need to get php working.  This is where I get stuck.  An email
posted here last month mentioned getting php_fpm running, but that package is
not installed on my machine.  If that is a requirement for racktables,
shouldn't pkg_add install it?

I did some searching for getting php running on httpd in openbsd and found a
lot of info on apache and nginx, but not much on the new httpd.

Am I on the right track?  Is there some obvious documentation I am missing or
is there a lot of assumed knowledge that I simply do not have?

Jordon



Re: Progress on adding support for Perle Speed8 LE

2015-12-26 Thread Jordon
> On Dec 22, 2015, at 11:40 PM, Theo de Raadt <dera...@cvs.openbsd.org>
wrote:
>
>> I originally set all the ports to PUC_COM_POW2(3) and I did communicate
>> with one of the ports to a different machine @ 115200.
>> In the next few days, I will test all the ports @ 115200 and 9600.
>
> Ok great.  We'll avoid throwing a diff at the tree, until you are
> sure.


I tested this by connecting each of the 8 ports to the serial port on a Dell
laptop also running OpenBSD.
I used cu to test each port at 9600 and 115200.  The ‘test’ was mash on
the keyboard on each side and see if letters that looked right showed up on
the other.
Based on this test, I think I have this card working.



pcidevs:

vendor  PERLE   0x155f  Perle
product PERLE   R35583  0xb008  Speed8 LE



pucdata.c:

{
{   PCI_VENDOR_PERLE, PCI_PRODUCT_PERLE_R35583, 0x1415,
0x9501 },
{   0x, 0x, 0x, 0x },
{
{ PUC_COM_POW2(3), 0x10, 0x },
{ PUC_COM_POW2(3), 0x10, 0x0008 },
{ PUC_COM_POW2(3), 0x10, 0x0010 },
{ PUC_COM_POW2(3), 0x10, 0x0018 },
},
},

{
{   PCI_VENDOR_PERLE, PCI_PRODUCT_PERLE_R35583, 0x1415,
0x9511 },
{   0x, 0x, 0x, 0x },
{
{ PUC_COM_POW2(3), 0x10, 0x },
{ PUC_COM_POW2(3), 0x10, 0x0008 },
{ PUC_COM_POW2(3), 0x10, 0x0010 },
{ PUC_COM_POW2(3), 0x10, 0x0018 },
},
},



dmesg:

puc0 at pci0 dev 9 function 0 "Perle Speed8 LE" rev 0x00: ports: 4 com
com4 at puc0 port 0 apic 2 int 18: st16650, 32 byte fifo
com4: probed fifo depth: 16 bytes
com5 at puc0 port 1 apic 2 int 18: st16650, 32 byte fifo
com5: probed fifo depth: 16 bytes
com6 at puc0 port 2 apic 2 int 18: st16650, 32 byte fifo
com6: probed fifo depth: 16 bytes
com7 at puc0 port 3 apic 2 int 18: st16650, 32 byte fifo
com7: probed fifo depth: 16 bytes
puc1 at pci0 dev 9 function 1 "Perle Speed8 LE" rev 0x00: ports: 4 com
com8 at puc1 port 0 apic 2 int 18: st16650, 32 byte fifo
com9 at puc1 port 1 apic 2 int 18: st16650, 32 byte fifo
com10 at puc1 port 2 apic 2 int 18: st16650, 32 byte fifo
com11 at puc1 port 3 apic 2 int 18: st16650, 32 byte fifo



I’m still not sure why the first four ports give the probe message and the
second four don’t.
If this is adequate testing, feel free to add this.  If more testing is
preferred, let me know what to do.

Thanks!
Jordon



Re: Progress on adding support for Perle Speed8 LE

2015-12-26 Thread Jordon
> On Dec 26, 2015, at 4:15 PM, Mark Kettenis <mark.kette...@xs4all.nl> wrote:
>
> Hi Jordon,
>
> Please send future diffs to tech@; misc@ is for trolls ;)

Will do.

>> I'm still not sure why the first four ports give the probe message
>> and the second four don't.  If this is adequate testing, feel free
>> to add this.  If more testing is preferred, let me know what to do.
>
> The card is actually based on the Oxford OX16PCI954 chip.  This chip
> has 4 integrated UARTs and an expansion bus that can be used to
> connect additional UART chips.  On your Perle card, that functionality
> has been used to add 4 more serial ports.  But they're not identical
> to the integrated chips so it isn't entirely surprising the FIFO size
> isn't the same.

Ok.  In that case, I won’t worry about it.

> Anyway, I'm integrating the changes.  Please test things after I've
> committed my changes to make sure things still work.

I just pulled in the latest i386 snapshot and installed it on my dev system
(dual core P3 Tualatin)
On booting the CD, i noticed that it identified the card but did not configure
it.
After installing and booting, it loaded it just fine.
I ran a quick test on a single port at 115200 and it worked fine.

> Thanks,
>
> Mark

Thank you much for doing this!

I also have a couple RocketPort cards but in looking at the FreeBSD driver, I
see that this is a whole different beast.  If there is enough demand for this,
I would be willing to send a card to someone interested in porting the
driver.

Jordon



Re: Progress on adding support for Perle Speed8 LE

2015-12-22 Thread Jordon
> On Dec 22, 2015, at 6:20 PM, Stuart Henderson <s...@spacehopper.org> wrote:
>
> On 2015-12-22, Jordon <open...@sirjorj.com <mailto:open...@sirjorj.com>>
wrote:
>> I have actually made some progress on this serial port card!  I looked at
how
>> FreeBSD has it configured, tried to map the values to the OpenBSD struct,
and
>> actually got something working!
>>
>>
>>
>> I added the following to pcidevs:
>>
>> vendor  PERLE   0x155f  Perle
>> vendor  COMTROL 0x11fe  Comtrol
>>
>> product PERLE   R35583  0xb008  Speed8 LE
>> product COMTROL 5002265 0x0805  RocketPort uPCI Octa
>>
>>
>>
>> I added the following to pucdata.c:
>>
>>{
>>{   PCI_VENDOR_PERLE, PCI_PRODUCT_PERLE_R35583, 0, 0 },
>>{   0x, 0x, 0, 0 },
>>{
>>{ PUC_COM_POW2(0), 0x10, 0x },
>>{ PUC_COM_POW2(0), 0x10, 0x0008 },
>>{ PUC_COM_POW2(1), 0x10, 0x0010 },
>>{ PUC_COM_POW2(1), 0x10, 0x0018 },
>>{ PUC_COM_POW2(2), 0x10, 0x0020 },
>>{ PUC_COM_POW2(2), 0x10, 0x0028 },
>>{ PUC_COM_POW2(3), 0x10, 0x0030 },
>>{ PUC_COM_POW2(3), 0x10, 0x0038 },
>>},
>>},
>>
>> And much to my surprise, it shows up (with some issues) and when i connect
2
>> of the ports with a null modem adapter, i can cu from one to another!
>> (For now, I’m not too concerned about the RocketPort card)
>>
>>
>>
>> The dmesg looks like this:
>>
>> puc0 at pci0 dev 9 function 0 "Perle Speed8 LE" rev 0x00: ports: 8 com
>> com4 at puc0 port 0 apic 2 int 18: st16650, 32 byte fifo
>> com4: probed fifo depth: 16 bytes
>> com5 at puc0 port 1 apic 2 int 18: st16650, 32 byte fifo
>> com5: probed fifo depth: 16 bytes
>> com6 at puc0 port 2 apic 2 int 18: st16650, 32 byte fifo
>> com6: probed fifo depth: 16 bytes
>> com7 at puc0 port 3 apic 2 int 18: st16650, 32 byte fifo
>> com7: probed fifo depth: 16 bytes
>> puc0: couldn't get subregion for port 4
>> puc0: couldn't get subregion for port 5
>> puc0: couldn't get subregion for port 6
>> puc0: couldn't get subregion for port 7
>> puc1 at pci0 dev 9 function 1 "Perle Speed8 LE" rev 0x00: ports: 8 com
>> com8 at puc1 port 0 apic 2 int 18: st16650, 32 byte fifo
>> com9 at puc1 port 1 apic 2 int 18: st16650, 32 byte fifo
>> com10 at puc1 port 2 apic 2 int 18: st16650, 32 byte fifo
>> com11 at puc1 port 3 apic 2 int 18: st16650, 32 byte fifo
>> puc1: couldn't get subregion for port 4
>> puc1: couldn't get subregion for port 5
>> puc1: couldn't get subregion for port 6
>> puc1: couldn't get subregion for port 7
>> "Comtrol RocketPort uPCI Octa" rev 0x01 at pci0 dev 10 function 0 not
>> configured
>
> Assuming you have one card not two connected, it looks like you should
> set the device as 4 ports not 8.

Wow.  I understood that it was 2 chips with 4 ports each, but I still set it
up as an 8 port device anyway!
After removing the bottom 4 devices and rebuilding/rebooting, it did this:

puc0 at pci0 dev 9 function 0 "Perle Speed8 LE" rev 0x00: ports: 4 com
com4 at puc0 port 0 apic 2 int 18: st16650, 32 byte fifo
com4: probed fifo depth: 16 bytes
com5 at puc0 port 1 apic 2 int 18: st16650, 32 byte fifo
com5: probed fifo depth: 16 bytes
com6 at puc0 port 2 apic 2 int 18: st16650, 32 byte fifo
com6: probed fifo depth: 16 bytes
com7 at puc0 port 3 apic 2 int 18: st16650, 32 byte fifo
com7: probed fifo depth: 16 bytes
puc1 at pci0 dev 9 function 1 "Perle Speed8 LE" rev 0x00: ports: 4 com
com8 at puc1 port 0 apic 2 int 18: st16650, 32 byte fifo
com9 at puc1 port 1 apic 2 int 18: st16650, 32 byte fifo
com10 at puc1 port 2 apic 2 int 18: st16650, 32 byte fifo
com11 at puc1 port 3 apic 2 int 18: st16650, 32 byte fifo

Much better!

>
>>
>> Now some questions:
>>
>> I first listed all 8 ports with PUC_COM_POW2(3) because I think I saw a
>> similar device (a Boca card or something) using it.  it worked fine (one
of
>> the ports was connected to a different machine an cu could pass text).  I
then
>> changed the numbers passed in (to 0, 1, 2, 3) just to see if anything
changed,
>> and the first and second ports can still talk to each other.  What exactly
>> does that value do?
>
> Sets the clock multiplier - even if this is set wrongly a null-modem
> between ports on the card will still work so be sure to test all the

Re: Progress on adding support for Perle Speed8 LE

2015-12-22 Thread Jordon
> On Dec 22, 2015, at 8:03 PM, Theo de Raadt <dera...@cvs.openbsd.org> wrote:
>
> Can you send me a pcidump -v?
>
> Look for
>
>0x002c: Subsystem Vendor ID:  Product ID: 
>
> in those listings, and try adding those to your table in the
> right place, rather than 0x with a 0x mask.
>
> That makes the driver match more accurately, in case future
> product from this company arrives in the field.
>

Well, that was interesting.  I replaced the zeroes with the Subsystem Vendor
ID and Product ID, set all the flags to 0x, and that made puc1 disappear.
A closer look revealed that there are actually 2 different Product IDs on this
card.

The Dump:

 0:9:0: unknown unknown
0x: Vendor ID: 155f Product ID: b008
0x0004: Command: 0003 Status: 0290
0x0008: Class: 07 Subclass: 00 Interface: 06 Revision: 00
0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size:
00
0x0010: BAR io addr: 0xac00/0x0020
0x0014: BAR mem 32bit addr: 0xfb001000/0x1000
0x0018: BAR io addr: 0xb000/0x0020
0x001c: BAR mem 32bit addr: 0xfb002000/0x1000
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 1415 Product ID: 9501
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 01 Line: 0c Min Gnt: 00 Max Lat: 00
0x0040: Capability 0x01: Power Management
 0:9:1: unknown unknown
0x: Vendor ID: 155f Product ID: b008
0x0004: Command: 0003 Status: 0290
0x0008: Class: 06 Subclass: 80 Interface: 00 Revision: 00
0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size:
00
0x0010: BAR io addr: 0xb400/0x0020
0x0014: BAR mem 32bit addr: 0xfb003000/0x1000
0x0018: BAR io addr: 0xb800/0x0020
0x001c: BAR mem 32bit addr: 0xfb004000/0x1000
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 1415 Product ID: 9511
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 01 Line: 0c Min Gnt: 00 Max Lat: 00
0x0040: Capability 0x01: Power Management


my additions to pucdata.c:

{
{   PCI_VENDOR_PERLE, PCI_PRODUCT_PERLE_R35583, 0x1415,
0x9501 },
{   0x, 0x, 0x, 0x },
{
{ PUC_COM_POW2(0), 0x10, 0x },
{ PUC_COM_POW2(0), 0x10, 0x0008 },
{ PUC_COM_POW2(1), 0x10, 0x0010 },
{ PUC_COM_POW2(1), 0x10, 0x0018 },
},
},

{
{   PCI_VENDOR_PERLE, PCI_PRODUCT_PERLE_R35583, 0x1415,
0x9511 },
{   0x, 0x, 0x, 0x },
{
{ PUC_COM_POW2(0), 0x10, 0x },
{ PUC_COM_POW2(0), 0x10, 0x0008 },
{ PUC_COM_POW2(1), 0x10, 0x0010 },
{ PUC_COM_POW2(1), 0x10, 0x0018 },
},
},


the dmesg:

puc0 at pci0 dev 9 function 0 "Perle Speed8 LE" rev 0x00: ports: 4 com
com4 at puc0 port 0 apic 2 int 18: st16650, 32 byte fifo
com4: probed fifo depth: 16 bytes
com5 at puc0 port 1 apic 2 int 18: st16650, 32 byte fifo
com5: probed fifo depth: 16 bytes
com6 at puc0 port 2 apic 2 int 18: st16650, 32 byte fifo
com6: probed fifo depth: 16 bytes
com7 at puc0 port 3 apic 2 int 18: st16650, 32 byte fifo
com7: probed fifo depth: 16 bytes
puc1 at pci0 dev 9 function 1 "Perle Speed8 LE" rev 0x00: ports: 4 com
com8 at puc1 port 0 apic 2 int 18: st16650, 32 byte fifo
com9 at puc1 port 1 apic 2 int 18: st16650, 32 byte fifo
com10 at puc1 port 2 apic 2 int 18: st16650, 32 byte fifo
com11 at puc1 port 3 apic 2 int 18: st16650, 32 byte fifo


I will explore this more over Christmas break.

Thanks,
Jordon



Progress on adding support for Perle Speed8 LE

2015-12-21 Thread Jordon
I have actually made some progress on this serial port card!  I looked at how
FreeBSD has it configured, tried to map the values to the OpenBSD struct, and
actually got something working!



I added the following to pcidevs:

vendor  PERLE   0x155f  Perle
vendor  COMTROL 0x11fe  Comtrol

product PERLE   R35583  0xb008  Speed8 LE
product COMTROL 5002265 0x0805  RocketPort uPCI Octa



I added the following to pucdata.c:

{
{   PCI_VENDOR_PERLE, PCI_PRODUCT_PERLE_R35583, 0, 0 },
{   0x, 0x, 0, 0 },
{
{ PUC_COM_POW2(0), 0x10, 0x },
{ PUC_COM_POW2(0), 0x10, 0x0008 },
{ PUC_COM_POW2(1), 0x10, 0x0010 },
{ PUC_COM_POW2(1), 0x10, 0x0018 },
{ PUC_COM_POW2(2), 0x10, 0x0020 },
{ PUC_COM_POW2(2), 0x10, 0x0028 },
{ PUC_COM_POW2(3), 0x10, 0x0030 },
{ PUC_COM_POW2(3), 0x10, 0x0038 },
},
},

And much to my surprise, it shows up (with some issues) and when i connect 2
of the ports with a null modem adapter, i can cu from one to another!
(For now, I’m not too concerned about the RocketPort card)



The dmesg looks like this:

puc0 at pci0 dev 9 function 0 "Perle Speed8 LE" rev 0x00: ports: 8 com
com4 at puc0 port 0 apic 2 int 18: st16650, 32 byte fifo
com4: probed fifo depth: 16 bytes
com5 at puc0 port 1 apic 2 int 18: st16650, 32 byte fifo
com5: probed fifo depth: 16 bytes
com6 at puc0 port 2 apic 2 int 18: st16650, 32 byte fifo
com6: probed fifo depth: 16 bytes
com7 at puc0 port 3 apic 2 int 18: st16650, 32 byte fifo
com7: probed fifo depth: 16 bytes
puc0: couldn't get subregion for port 4
puc0: couldn't get subregion for port 5
puc0: couldn't get subregion for port 6
puc0: couldn't get subregion for port 7
puc1 at pci0 dev 9 function 1 "Perle Speed8 LE" rev 0x00: ports: 8 com
com8 at puc1 port 0 apic 2 int 18: st16650, 32 byte fifo
com9 at puc1 port 1 apic 2 int 18: st16650, 32 byte fifo
com10 at puc1 port 2 apic 2 int 18: st16650, 32 byte fifo
com11 at puc1 port 3 apic 2 int 18: st16650, 32 byte fifo
puc1: couldn't get subregion for port 4
puc1: couldn't get subregion for port 5
puc1: couldn't get subregion for port 6
puc1: couldn't get subregion for port 7
"Comtrol RocketPort uPCI Octa" rev 0x01 at pci0 dev 10 function 0 not
configured


Now some questions:

I first listed all 8 ports with PUC_COM_POW2(3) because I think I saw a
similar device (a Boca card or something) using it.  it worked fine (one of
the ports was connected to a different machine an cu could pass text).  I then
changed the numbers passed in (to 0, 1, 2, 3) just to see if anything changed,
and the first and second ports can still talk to each other.  What exactly
does that value do?

Why do the first four ports probe to 16 bytes but not the next four?  I read
somewhere that this card has two four-port chips, so that why it is recognized
as two devices.  It’s just strange that some have the probe depth message
and some don’t.

What is up with the “couldn’t get subregion” message?  I did a search
and couldn’t find anything about that string on the Internet.



This is my first real attempt at development of this type so I am pretty happy
about this.  I would love for 5.9 to have support for this card.  I also have
a couple RocketPort cards and I could probably send one to someone if they
would want to work on it.

Jordon



Re: 8-Port Serial Port Card

2015-12-13 Thread Jordon
> On Dec 12, 2015, at 2:49 PM, Maurice Janssen <maur...@z74.net
<mailto:maur...@z74.net>> wrote:
>
> On Sat, Dec 12, 2015 at 09:54:39AM +, Craig Skinner wrote:
>> On 2015-12-07 Mon 21:30 PM |, Jordon wrote:
>>> I recently picked up a few PCI serial port cards from the junk pile at
>>> work.  My intent is to put one in my soon-to-be-retired Soekris net5501
>>> and install OpenBSD on it to turn it into an 8 port terminal switch.
>>>
>>> I tried the cards in a different PC just to see if they would work.
>>> Unfortunately, none of them were supported.
>>>
>>
>> If you want to get going quickly Jordan, Moxa PCI cards work:
>>
>> $ fgrep puc0 /var/run/dmesg.boot
>> puc0 at pci0 dev 18 function 0 "Moxa C168H" rev 0x01: ports: 8 com
>> com4 at puc0 port 0 irq 9: ns16550a, 16 byte fifo
>> com5 at puc0 port 1 irq 9: ns16550a, 16 byte fifo
>> com6 at puc0 port 2 irq 9: ns16550a, 16 byte fifo
>> com7 at puc0 port 3 irq 9: ns16550a, 16 byte fifo
>> com8 at puc0 port 4 irq 9: ns16550a, 16 byte fifo
>> com9 at puc0 port 5 irq 9: ns16550a, 16 byte fifo
>> com10 at puc0 port 6 irq 9: ns16550a, 16 byte fifo
>> com11 at puc0 port 7 irq 9: ns16550a, 16 byte fifo
>>
>> I found 3 on ebay.co.uk <http://ebay.co.uk/> & grabbed them - all with
octopus cable.
>
> Beware, Soekris boards have a 3.3 V PCI slot while the Moxa C168H
> is a 5 V PCI card.
>
> --
> Maurice

Thanks for the feedback.  Both the RocketPort and Perle cards I have feature
both notches in the connector, so I think they should work in the Soekris
board.  I would like to take a crack at porting the FreeBSD driver, though I
really don’t know what I am doing!  I pulled in CURRENT today and tried to
build it but immediately got a bunch of "ioconf.c:863: warning: initialization
from incompatible pointer type” build errors.  I may try to update again
tomorrow and see if it is any better.

Jordon



8-Port Serial Port Card

2015-12-11 Thread Jordon
I recently picked up a few PCI serial port cards from the junk pile at
work.  My intent is to put one in my soon-to-be-retired Soekris net5501
and install OpenBSD on it to turn it into an 8 port terminal switch.

I tried the cards in a different PC just to see if they would work. 
Unfortunately, none of them were supported.  Here is the info:

***

I had a pair of RocketPort uPCI Octa cards with a P/N of 5002265 They
each had the following dmesg:

unknown vendor 0x11fe product 0x0805 (class communications subclass
  miscellaneous, rev 0x01) at pci4 dev 9 function 0 not configured

***

I also had a Perle Systems card with a product number of 04003090

The dmesg from it was:

unknown vendor 0x155f product 0xb008 (class communications subclass
serial, rev 0x00)
 at pci4 dev 9 function 0 not configured
unknown vendor 0x155f product 0xb008 (class bridge subclass
miscellaneous, rev 0x00)
 at pci4 dev 9 function 1 not configured

***

I am more interested in getting the Perle card working because I already
have an 8-port cable for it (I only have a 4-port cable for the
RocketPort cards.)  It looks like FreeBSD supports the Perle card (though I
haven't tried it.
https://svnweb.freebsd.org/base/head/sys/dev/puc/pucdata.c?view=annotate#l820

My question is what would it take to get this driver ported to OpenBSD? 
Are they very different?  Or is it pretty straightforward?  Or is the
support already there but it needs the PCI IDs added to a list?  Or is
this ancient stuff with not enough demand to make it worthwhile?  If
someone is really interested in a Rocketport card, I could probably send
one to them.  As for the Perle card, I am downloading the current source
now and I intend to poke around a bit, but I really don't know what I am
doing.  My driver dev experience is limited to a very little bit of
linux coding I did at work. 


Jordon



Re: Install 5.4 onto netbook... almost

2014-04-06 Thread jordon
 the DIY possibilities.  Therefore...
 
 Dear list: What is the one line I'm missing?
 
 
 
 Plan F) - Did you try latest -current ?
 
 
 
 
 Thanks for any pointers.
 
 
 
 Devs and list need to see your dmesg output for sure (it can be posted
 somewhere as screenshots via link)
 
 
 
 Norman
 
 
 
 [1] http://www.att.com/esupport/article.jsp?sid=KB102059cv=820
 [2] http://www.darwinsys.com/openbsd/laptops.html
 [3] http://www.openbsd.org/faq/faq14.html#Boot386
 [4] http://undeadly.org/cgi?action=articlesid=20140225072408
 [5]
 http://blog.breeno.net/2014/02/creating-flexible-openbsd-usb-installer.html
 [6]
 https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man8/bless.8.html
 
 
 --
 Norman Gray  :  http://nxg.me.uk
 SUPA School of Physics and Astronomy, University of Glasgow, UK
 

Not sure if this helps, but I have OpenBSD running (very well) on an old 
Atom-based Asus eeepc netbook.
I always install it by PXE-booting the installer.  If you have never tried this 
approach, it involves a bit of
setup but works really well.

Jordon



Re: Is Soekris OpenBSD friendly?

2013-11-15 Thread jordon
I have an old net4511 running 5.4.  It’s too old/slow to route but it’s too fun 
to not have running because how many other OS’es can run on a 486 100MHz with 
32MB RAM?




On Nov 15, 2013, at 6:03 PM, SmithS smit...@hush.ai wrote:

 Greetings misc@.  After coming across a link[1] to make an OpenBSD
 router using a Soekris device, I think I will make one.  Does anyone
 else have this hardware and can verify all the components work?
 I think Intel NICs are good, but everything else?  I have never heard
 of this brand before so I want to be safe before buying.  The model
 number[2] is 6501-30
 
 [1] http://www.bsdnow.tv/tutorials/openbsd-router
 [2] https://soekris.com/products/net6501/net6501-30-board-case.html
 
 greetz,
 SmithS



Re: Is Soekris OpenBSD friendly?

2013-11-15 Thread jordon
A few years back I put m0n0wall (FreeBSD-based) on it, hooked it up to 2 
machines (1 WAN, 1 LAN) and pushed a file through it.  Its max bandwidth was 
well under my Internet connection speed.

It was replaced with a net5501.




On Nov 15, 2013, at 10:55 PM, Johan Beisser j...@caustic.org wrote:

 I'm not sure what you mean by too slow to route.
 
 I've a net4501 with 64mb of RAM that's handling all of my IP traffic
 at home. Biggest problem is swapping taking out available interrupts.
 
 Modern networks are actually just too fast for the hardware these
 days. It works fine for home stuff.
 
 On Fri, Nov 15, 2013 at 5:39 PM, jordon open...@sirjorj.com wrote:
 I have an old net4511 running 5.4.  It’s too old/slow to route but it’s too 
 fun to not have running because how many other OS’es can run on a 486 100MHz 
 with 32MB RAM?
 
 
 
 
 On Nov 15, 2013, at 6:03 PM, SmithS smit...@hush.ai wrote:
 
 Greetings misc@.  After coming across a link[1] to make an OpenBSD
 router using a Soekris device, I think I will make one.  Does anyone
 else have this hardware and can verify all the components work?
 I think Intel NICs are good, but everything else?  I have never heard
 of this brand before so I want to be safe before buying.  The model
 number[2] is 6501-30
 
 [1] http://www.bsdnow.tv/tutorials/openbsd-router
 [2] https://soekris.com/products/net6501/net6501-30-board-case.html
 
 greetz,
 SmithS



OpenBSD on Ouya/Tegra3

2013-05-23 Thread jordon
With Ouya consoles starting to make it to market, I'm wondering if
there's a chance that OpenBSD could be ported to it.  This is something
I would love to help with but have no idea where to begin.  The
documentation for the Tegra3 is available from nvidia's website, though
you have to register and then request access to the Tegra section (I
left most of the questions blank and just put I want to see the
documentation for the reasons and was granted access in about 3
minutes).

I have some microcontroller experience (PIC18 and currently playing
with a PIC32), and I did play with an ARM dev kit for a bit a long time
ago, but I have some questions on how OpenBSD/ARM works.  When I was
working with an ARM, the entire program was stored in the on-chip flash
memory - like a microcontroller.  With a larger OS like OpenBSD, what
is stored on the chip and what is loaded from external storage?  Is the
entire kernel stored on chip or just a bootloader?

As I understand, not all ARM chips are equal - each one pretty much
needs its own port, and currently BeagleBoard is the main one getting
worked on.  Right?

So... is this worth pursuing?  The idea of a $99 cube that could run
OpenBSD is pretty intriguing, but how possible is it?  Are there
licensing strings attached to Tegra3 that would make this difficult?

jordon



5.3 fixed PXE booting for me!

2013-05-02 Thread jordon
Yesterday I updated my Soekris 4511 to v5.3.  I am just amused that a new OS 
can run on a 486 100MHz with 32MB RAM and 4G CF for storage!  This was also the 
first time I have tried 'U'pgrading instead of just reinstalling.  Very simple 
procedure - well done!

Anyway, today I tried PXE-booting my Atom-based Shuttle XS36V, expecting it to 
lock up as it alway has.  Much to my surprise, it worked!

Now, I had tried to dig into this PXE booting issue before and found that it 
locked up on a system call and digging into that, I found that it was most 
likely a bug in the BIOS.  I also discovered that by ignoring the newer style 
!PXE structs and using the older PXENV+ syle ones, it worked.  I submitted all 
the info I gathered to Shuttle but never heard back from them and the one or 
two BIOS updates they released since then didn't fix it.

So anyway, thanks to whoever fixed the PXE booting for my machine.  To make my 
thanks more official, I did order a DVD set and t-shirt.

Keep up the good work!

Jorj



Userland build fails on old machine

2013-02-14 Thread jordon
Yesterday I got current on 2 machines:
 1) a Core2 Quad based shuttle
 2) a 486-based Soekris 4511.

The core2quad build the kernel and user land just fine.

Today, the 486 had a build failure with the following message:

=== libcurses
/usr/bin/awk -f /usr/src/lib/libcurses/tinfo/MKnames.awk  /usr/src/lib/l
ibcurses/Caps  names.c
cc  -O2 -pipe -g -I. -I/usr/src/lib/libcurses   -I. -I/usr/src/lib/libcu
rses  -g  -o make_keys /usr/src/lib/libcurses/tinfo/make_keys.c 
/usr/lib/libc.so.66.2: undefined reference to `ROUNDDOWN'
/usr/lib/libc.so.66.2: undefined reference to `ROUNDUP'
collect2: ld returned 1 exit status
*** Error code 1

Stop in /usr/src/lib/libcurses (line 307 of /usr/src/lib/libcurses/Makef
ile).
*** Error code 1

Stop in /usr/src/lib (line 48 of /usr/share/mk/bsd.subdir.mk).
*** Error code 1

Stop in /usr/src (line 78 of Makefile).

I am trying to figure out why this would work on one machine and not the
other.  There is still room on the CF card, so its not a storage issue.
Is 32MB RAM not enough?  Or is it some CPU feature a 486 is lacking?

Jordon



Re: Userland build fails on old machine

2013-02-14 Thread jordon
On Feb 14, 2013, at 10:47 PM, Philip Guenther guent...@gmail.com wrote:

 On Thu, Feb 14, 2013 at 5:21 PM, jordon open...@sirjorj.com wrote:
 Yesterday I got current on 2 machines:
 1) a Core2 Quad based shuttle
 2) a 486-based Soekris 4511.
 
 The core2quad build the kernel and user land just fine.
 
 Today, the 486 had a build failure with the following message:
 
 You actually got different -current with the two systems, updating on
 different sides of a commit (or the revert).
 
 
 ... -g  -o make_keys /usr/src/lib/libcurses/tinfo/make_keys.c
 /usr/lib/libc.so.66.2: undefined reference to `ROUNDDOWN'
 /usr/lib/libc.so.66.2: undefined reference to `ROUNDUP'
 collect2: ld returned 1 exit status
 *** Error code 1
 
 Yeah, there was a commit that resulted in a broken libc for a while.
 On behalf of committers, sorry about that; the responsible party's
 fingers will grow back just fine.  If the system is unhappy, reboot
 from a snapshot bsd.rd and copy a good libc.so.66.2 into place.
 
 
 Philip Guenther


Thanks for the feedback, guys.

This was a system with a stock 5.2 install.  I just updated the binutils and 
tried to build the latest.  I'm actually not even planning on installing it - I 
just want to hack on pxe.c for a bit, and as I understand, you have to build 
the whole thing to work on a little part.

Jordon



Source for drivers for basic devices

2013-02-12 Thread jordon
Today I was looking into some of the more simple devices to see how they
are implemented.  I figured the basic text ones (zero, random, null,
etc) would be a nice place to start.  I went to /usr/src/sys/dev to look
for them, but I couldn't find them.  Where is the source of these basic
devices?  Are they actual drivers like network drivers or are they some
completely different devices?

Thanks,
Jordon



Re: Source for drivers for basic devices

2013-02-12 Thread jordon
On Feb 12, 2013, at 10:02 PM, Philip Guenther guent...@gmail.com wrote:

 On Tue, Feb 12, 2013 at 5:34 PM, jordon open...@sirjorj.com wrote:
 Today I was looking into some of the more simple devices to see how they
 are implemented.  I figured the basic text ones (zero, random, null,
 etc) would be a nice place to start.  I went to /usr/src/sys/dev to look
 for them, but I couldn't find them.  Where is the source of these basic
 devices?  Are they actual drivers like network drivers or are they some
 completely different devices?
 
 Devices != drivers.  Indeed, network drivers generally do not present
 devices in /dev/.  That was one of the (early) criticisms of the BSD
 networking model: it created a new namespace for interface names.
 
 Anyway, if you're looking for the code behind a device file (a block
 device or character device file in the filesystem), you start by
 looking up its major number in the arrays in the file
 /usr/src/sys/arch/${ARCH}/${ARCH}/conf.c.  For example, /dev/zero is a
 character device with major 2, and
 /usr/src/sys/arch/amd64/amd64/conf.c has this:
 
 struct cdevsw   cdevsw[] =
 {
cdev_cn_init(1,cn), /* 0: virtual console */
cdev_ctty_init(1,ctty), /* 1: controlling terminal */
cdev_mm_init(1,mm), /* 2: /dev/{null,mem,kmem,...} */
 ...
 
 cdev_mm_init() is a macro in sys/conf.h, and if you stare there and
 work out the cpp expansion, you'll eventually look for functions
 mmopen(), mmclose(), mmrw(), etc.  For amd64, those are implemented in
 /usr/src/sys/arch/amd64/amd64/mem.c, where the code figures out which
 of the minor devices is involved in a given call by examining the
 'dev' argument to the function.
 
 
 Philip Guenther
 

An excellent explanation.  Thank you for clarifying this.

I have been studying Linux driver dev lately for work (hey, it's a step up from 
.net/c# dev!) and I am comparing it with OpenBSD.  This answer clears up a 
question I discovered today.

Thanks again.

Jordon



Building a single driver in the source tree

2012-09-14 Thread jordon
I am having trouble getting a Hifn7751 to work in an old Soekris box.  I
want to dig in and see if I can figure out what is going on but I am
very new to this.  From /usr/src/sys/dev/pci, I typed make hifn7751,
but that leads to a lot of compiler errors.  Is there some better way to
do this or do I just have to build the entire tree first before I start
working with some specific parts?

Also, where should I looked to find the answer to this?  I am very
interested in getting into OpenBSD development but I am a little
intimidated by the learning curve.

jorj



Re: Building a single driver in the source tree

2012-09-14 Thread jordon
On Sep 14, 2012, at 9:33 PM, Nick Holland n...@holland-consulting.net
wrote:

 On 09/14/12 20:16, jordon wrote:
 I am having trouble getting a Hifn7751 to work in an old Soekris box.  I
 want to dig in and see if I can figure out what is going on but I am
 very new to this.  From /usr/src/sys/dev/pci, I typed make hifn7751,
 but that leads to a lot of compiler errors.  Is there some better way to
 do this or do I just have to build the entire tree first before I start
 working with some specific parts?

 Also, where should I looked to find the answer to this?  I am very
 interested in getting into OpenBSD development but I am a little
 intimidated by the learning curve.

 jorj


 read up here: http://www.openbsd.org/faq/faq5.html (DO NOT skip the
 first section, it's probably the most important).
 Also, sounds like you need to read up on faq9.html, sounds like you come
 from another place, and are applying Linuxisms to non-Linux systems.
 (or typing randomly on the keyboard and expecting something magic to
 happen :)

 OpenBSD has a monolithic kernel...all the drivers are In There, you
 don't have separate drivers for each device.  You need to build the
 entire kernel, but not the entire OpenBSD tree.  Once you have the
 kernel built, you can poke at individual drivers all you want, and when
 you rebuild the kernel, only those parts that have changed, and things
 that depend on them, will be recompiled.

 HOWEVER, if you are having trouble with a HiFn device, you are probably
 having incorrect expectations, it's broke, or your Soekris has too small
 a power pack.  If I recall correctly (I don't have one myself, nor do I
 have much need for one), they Just Work, which is also something very
 common on OpenBSD.

 Nick.


Thanks for the reply.  I have a little FreeBSD experience, but no system-
level programming.  I though this would be an interesting thing to look
in to.  I had some PXE-boot issues with an Atom-based shuttle and I
did manage to add some debug messages to the pxeboot program and
determine that the problem was in the BIOS.  I sent the info to Shuttle
tech support and am waiting to see if anything comes of it.  Other than
that, this is my first real stab at system-level programming on an OS, so
you are absolutely right about the typing randomly on the keyboard
and expecting something magic to happen part!

Good point about the monolithic kernel part.  IIRC, FreeBSD has modules
for the drivers, so that is an interesting difference.  I have done some by-
the-book kernel and user land builds before in OpenBSD so I should be
able to get that going.

Also, good point about the power supply.  I did google this and found a
few hits from 2004 or so, but nothing much since then.  I'm just planning
on poking around and seeing if I can figure out what is going on.  It's
mainly for the learning experience more than anything else.

Thanks again.

jorj