From owner-freebsd-mips@freebsd.org Tue May 21 00:33:03 2019 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14E4015975DB for ; Tue, 21 May 2019 00:33:03 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [195.149.99.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "raven.bwct.de", Issuer "raven.bwct.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C1C96B227 for ; Tue, 21 May 2019 00:33:01 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.15.2/8.15.2) with ESMTPS id x4L09xUE040676 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 21 May 2019 02:10:00 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cicely.de; s=default; t=1558397401; bh=VG23za1ugHe9vf5Z6VOygK/I5fXCGPtw7ENrLNwv1Rc=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To; b=lNHBO8NbzR4b3UXvVkKj9hA4zugEsnt7MG+FfbtS1dNeC+oVqpW44Nl2V9C3wNnIU NueBvdlex7yNM51OmTgvy8X/oU2ba/rY4wtsJkxQ7jO1tEspSiUqbu6NovluTYhISE JIiyC8Ek4tj5Cl3C+Bc0LO2v0VzF5+OJwOkBUIHc= Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id x4L09mfJ024196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 May 2019 02:09:48 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.15.2/8.15.2) with ESMTP id x4L09lrA043001; Tue, 21 May 2019 02:09:47 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.15.2/8.15.2/Submit) id x4L09kOZ043000; Tue, 21 May 2019 02:09:46 +0200 (CEST) (envelope-from ticso) Date: Tue, 21 May 2019 02:09:46 +0200 From: Bernd Walter To: Adrian Chadd Cc: ticso@cicely.de, Eugene Grosbein , "freebsd-mips@freebsd.org" Subject: Re: MIPS future... Message-ID: <20190521000946.GP26231@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <8da9f5d2-e33e-0f55-7f30-3344ccf5f0a7@grosbein.net> <20190424101102.GK18788@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 12.0-STABLE amd64 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=4.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de X-Rspamd-Queue-Id: 8C1C96B227 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cicely.de header.s=default header.b=lNHBO8Nb X-Spamd-Result: default: False [-2.24 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; HAS_REPLYTO(0.00)[ticso@cicely.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[cicely.de:+]; MX_GOOD(-0.01)[mx1.bwct.de]; NEURAL_HAM_SHORT(-0.47)[-0.470,0]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:21461, ipnet:195.149.99.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.965,0]; R_DKIM_ALLOW(-0.20)[cicely.de:s=default]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cicely.de]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[3.99.149.195.list.dnswl.org : 127.0.20.0]; R_SPF_NA(0.00)[]; IP_SCORE(-0.00)[country: DE(-0.01)] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 00:33:03 -0000 On Sun, May 19, 2019 at 09:01:52AM -0700, Adrian Chadd wrote: > On Wed, 24 Apr 2019 at 03:11, Bernd Walter 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@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. ;-) 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 http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.