MIPS future...
Bernd Walter
ticso at cicely7.cicely.de
Tue May 21 00:33:03 UTC 2019
On Sun, May 19, 2019 at 09:01:52AM -0700, Adrian Chadd wrote:
> On Wed, 24 Apr 2019 at 03:11, Bernd Walter <ticso at cicely7.cicely.de> wrote:
> >
> > On Thu, Dec 13, 2018 at 08:04:17AM +0700, Eugene Grosbein wrote:
> > > 13.12.2018 1:15, Warner Losh wrote:
> > >
> > I'm using one of them as an AP in one location with the mini-build.
> > My other locatin was using an OpenWRT AP, but just yesterday I finally setup
> > FreeBSD-12 stable to replace the OpenWRT.
> > It was very tricky to find out what modules had to be loaded to get WiFi
> > working.
>
> I'm actively working on trying to tidy this up on -HEAD (on the MIPS
> boards) because, well, I'm back to trying to make it all work well.
> There's support for the last two chips (dragonfly, honeybee) that I
> need to finish and bring over too.
>
> > And on how to start them without loader perloading modules.
> > I finally came up with the following rc.local:
> > /sbin/kldload wlan_xauth
> > /sbin/kldload ath_hal_ar9300.ko
> > /sbin/kldload if_ath_ahb.ko
> > /sbin/kldload if_ath_pci.ko
> > sleep 1
> > /sbin/ifconfig bridge0 unplumb
> > sleep 1
> > /sbin/ifconfig bridge0 plumb
>
> Yeah. Part of the unfun part of the FreeBSD wifi experience is that
> devices take non-zero amounts of time to do stuff in deferred threads,
> so there's fun race conditions when trying to script bringing things
> up. It used to be easier - everything would block in the ioctl path
> for loading, creating/destroying interfaces, etc - but the newer
> firmware NICs have stuff deferred into async calls and they don't all
> block the ioctl path. So, sometimes you need sleeps until the
> interface has been fully loaded/plumbed.
I rewmoved the sleep and ifconfig bridge0 in favour of:
cloned_interfaces="bridge0"
#ifconfig_bridge0="addm wlan0 addm wlan1 addm arge0 up"
ifconfig_bridge0="up"
autobridge_interfaces="bridge0"
autobridge_bridge0="wlan* arge0"
The problem was that, because I load the drivers via rc.local, the
wlan interfaces came up after bridge0
> It's one of the many annoying things in my ath10k port that I'm trying
> to chip away at.
>
> > > I stopped trying it because its USB support was pretty unstable leading to random panics or just hangs and
> > > 8MB are not enough for my purposes without extra USB storage for packages and
> > > I could not even fit FreeBSD 12 base system to its internal flash due to siginficantly increased code bloat
> > > and ENOTIME to deal with troubles.
>
> I'm working on this right now too. Annoying the biggest thing I need
> help with is that we can't build without SSL because of how
> libunbound/libldns is built. It has a checked in config.h from
> configure which hard-enables SSL. Hopefully I can build
> hostapd/wpa_supplciant with the built-in crypto routines to get some
> savings.
>
> If I can get rid of needing libcrypto and libssl in the wifi AP builds
> then we save a few megabytes of space; enough to fit in 8MB again. i'm
> working on a cpio-like tool to replace cpio/libarchive because
> libarchive is also quite large (almost a megabyte + libcrypto
> depedency) which we don't need right now.
>
> >
> > Same, the instable USB support was what killed most of my ambitions with that.
> > This is a showstopper for other boards as well.
> > Don't know if this specific to atheros, but I've tested several atheros
> > based boards and USB just wasn't working well enough for a rootfs.
> > Maybe that has changed since my last test...
>
> Is this USB on the atheros chips? what's wrong with it? It /used/ to
> be enough to run a rootfs from but I haven't done that in a few years
> and there's been some changes to the USB stack since then.
I havn't tested it with 12-STABLE, when I tried an USB rootfs few years
ago, the USB drive wasn't stable and started producing IO errors after
a few hours of uptime.
This was reproduceabl witgh various kinds of USB sticks and HDD on the
TP-Link WDR-4300 with its ATH9344 as well as on various AR9331 based
boards.
> > Since it is for my own need with existing infrastructure, the TL-WDR4300
> > is using nfsroot.
> > However, there are still some issues.
> > It is bridging to the WiFi, but I like to have isolation.
> > Since it is nfsroot, I can't use normal VLANs to my gateway.
> > I should be able to use VXLAN to my normal gateway however.
> > Routing is not an option as I can't install packages/ports for dhcp:
> > root at apx1:~ # pkg
> > ld-elf.so.1: Shared object "libssl.so.9" not found, required by "pkg"
> > root at apx1:~ # which cc
> > cc: Command not found.
>
> Is this from my freebsd-wifi-build scripts? Yeah, some stuff needs
> updating again. I am working on that too. ;-)
That is a general problem with ancient packages.
The pkg binary package is outdated by at least half a year and build
against an on older OpenSSL version.
[56]apx1> ls -al /usr/lib/*ssl*
-r--r--r-- 1 root wheel 3708526 Apr 23 19:22 /usr/lib/libssl.a
lrwxr-xr-x 1 root wheel 13 Apr 23 19:22 /usr/lib/libssl.so -> libssl.so.111
-r--r--r-- 1 root wheel 590876 Apr 23 19:22 /usr/lib/libssl.so.111
-r--r--r-- 1 root wheel 3771294 Apr 23 19:22 /usr/lib/libssl_p.a
> > The rootfs is via ../root/mips_ap/ build by the freebsd-wifi-build.
> > Beside the missing cc it looks pretty much complete.
> > Maybe a normal crossbuild would get me a compiler?
>
> It won't get you one in my normal image because it's too big.
>
> >
> > That said, if I can't have a working compiler, I would try vxlan, but still
> > a working compiler would be nice to have.
>
> The FreeBSD targets for the AP have a lot of stuff removed in the
> build. I used to use an option in freebsd-wifi-build to build non-AP
> images (ie, full cross-built images) which unfortunately won't include
> a compiler until that is also added in as a cross-build target.
Ok, so that should work if I do a standard crossbuild.
> Poke me repeatedly on #freebsd-wifi ; I'll keep plodding through this
> list now that I'm poking at it again.
--
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
More information about the freebsd-mips
mailing list