Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2019 09:01:52 -0700
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        ticso@cicely.de
Cc:        Eugene Grosbein <eugen@grosbein.net>,  "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: MIPS future...
Message-ID:  <CAJ-VmokJopyXFKkCQGV_aEPJpJH2gG6BohdUQnv3jS-SC16hvw@mail.gmail.com>
In-Reply-To: <20190424101102.GK18788@cicely7.cicely.de>
References:  <CANCZdfpK5mPDDgpJ5PVhXF7-MixSouW8mAKkWQcaRnmYW%2Bpy0g@mail.gmail.com> <8da9f5d2-e33e-0f55-7f30-3344ccf5f0a7@grosbein.net> <20190424101102.GK18788@cicely7.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 24 Apr 2019 at 03:11, Bernd Walter <ticso@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:
> >
> > > And then there's the even larger question: how many people are still using
> > > mips32? It looks like a fair number, maybe, but I have no idea for sure, so
> > > if you do, please provide feedback on the platforms you are running FreeBSD
> > > 11 or newer on.
> >
> > I have TP-Link TL-WDR4300 https://www.tp-link.com/en/products/details/TL-WDR4300.html
> > that is MIPS32 74Kc AR9344 SOC with 8MB on-board flash and 128M RAM
> > that successfully boots to multiuser mode using very old FreeBSD 11-CURRENT.
>
> 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.

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.

> 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@apx1:~ # pkg
> ld-elf.so.1: Shared object "libssl.so.9" not found, required by "pkg"
> root@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. ;-)

> 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.

Poke me repeatedly on #freebsd-wifi ; I'll keep plodding through this
list now that I'm poking at it again.



-adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokJopyXFKkCQGV_aEPJpJH2gG6BohdUQnv3jS-SC16hvw>