Re: Problem building GCC 8.2.0 amd64-to-i386 cross-compiler

2018-09-24 Thread Daniel Corbe

at 11:43 PM, Katherine Rohl  wrote:




***
/usr/bin/ld: build/genmodes.o: relocation R_X86_64_32 against `a local  
symbol' can not be used when making a shared object; recompile with -fPIC

***



Have you tried following the compiler’s advice and rebuilding with -fPIC




Problem building GCC 8.2.0 amd64-to-i386 cross-compiler

2018-09-24 Thread Katherine Rohl
I need to build a GCC cross-compiler targeting i386-pc-elf. I'm running 
into problems with the build on OpenBSD 6.3.


I've already successfully built a binutils-2.31.1 for i386-pc-elf.

Trying to use the GCC 4.9.4 package (as GCC 4.2 is too old to build GCC 
8), my configure is:


CC=egcc CXX=eg++ ../gcc-8.2.0/configure --prefix=/usr/local/gcc-i386 
--target=i386-pc-elf --with-gmp=/usr/local


And I'm just running gmake -j7. The error I get is in this build log: 
https://pastebin.com/k0ygAN5t


***
/usr/bin/ld: build/genmodes.o: relocation R_X86_64_32 against `a local 
symbol' can not be used when making a shared object; recompile with -fPIC

***

If I use the clang that's built into OpenBSD, I get a bunch of C errors 
that presumably mean that you can't do it with clang. Here is the build 
log: https://pastebin.com/Dv5gQ4aS


My configure for that is:

CC=clang CXX=clang ../gcc-8.2.0/configure --prefix=/usr/local/gcc-i386 
--target=i386-pc-elf --with-gmp=/usr/local


Has anyone ran into this problem before, and if so, what do I need to do 
to build my cross-compiler on OpenBSD? Apologies if this is not the 
right place to ask.




USB Ethernet adapter

2018-09-24 Thread Bogdan Kulbida
Dear Community,

Please don’t judge that hard, but I’m trying to see if I can set-up a
network gateway with one of the old’ish servers I have here. It was running
OBSD just fine for a looong time but has only one network interface.

It does have few extra USB ports, ta-da...
Anyway, what USB network interface would you recommend that would run
smoothly with the OBSD 6.3?

Much appreciated all your efforts.

Thank you.
-- 
---
Best regards,
Bogdan Kulbida
Founder and CEO, Konstankino LLC 
+1.802.793.8295


Re: Which really small, portable and lightweight system/device is usable running OpenBSD?

2018-09-24 Thread Jake Champlin
On Mon, Sep 24, 2018 at 09:13:48AM +, Tim Jones wrote:
> > Can confirm, typing on mine currently. Have to use an external wifi 
> > adapter, but most everything else works just fine. It's a little on the 
> > slow side, but it does well enough for daily computing.
> 
> 
> Out of interest, did you find a OpenBSD friendly USB-C WIFI adapter or are 
> you using an adapter ?

Using a small USB-C to USB-A adapter



Re: hijack client DNS query to localhost cache in the router 

2018-09-24 Thread Craig Skinner
On Sun, 23 Sep 2018 12:21:36 +0800 Fung wrote:
> simple router build with OpenBSD
> Wan a.b.c.d
> Lan 192.168.0.1/24
> Unbound run for DNS cache in 127.0.0.1
> 
> 
> we want:
> no mater a client pc set dns to any address (  8.8.8.8 or 9.9.9.9 )
> all clients' dns query are redirect to the localhost cache in the
> router 
> 
> 
> Can we achieve using pf.conf?

Yes Fung;- block everything in & out, then permit only what you want:

ext_if="blah"
lan_if="blah"


set skip on lo
set block-policy drop


match in all scrub ( random-id reassemble tcp )


match out on $ext_if inet \
from $lan_if:network \
to any \
nat-to $ext_if


block in all
block in log on $ext_if
block return in on $lan_if
block return out

# DNS:

# Notify/query:
pass out on $ext_if inet proto {udp, tcp} \
from $ext_if port > 1023 \
to any port domain \
user {_nsd, _unbound}


# Let LAN clients query us:
pass in on $lan_if inet proto {udp, tcp} \
from $lan_if:network port > 1023 \
to $lan_if port domain \
user root \
modulate state


# debug:
pass out inet proto {udp, tcp} \
from any port > 1023 \
to any port domain \
group hostmasters


block in from no-route
block in from $bogon
block return out to $bogon
block on ! lo inet6

antispoof for {lo0, $lan_if, $ext_if} inet


Configure 'domain-name-servers' in dhcpd.conf(5).


Cheers,
-- 
Craig Skinner | http://linkd.in/yGqkv7



Re: Which really small, portable and lightweight system/device is usable running OpenBSD?

2018-09-24 Thread Tim Jones
> Can confirm, typing on mine currently. Have to use an external wifi adapter, 
> but most everything else works just fine. It's a little on the slow side, but 
> it does well enough for daily computing.


Out of interest, did you find a OpenBSD friendly USB-C WIFI adapter or are you 
using an adapter ?