From owner-freebsd-mips@freebsd.org Sun May 19 16:02:07 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 590F815B193F for ; Sun, 19 May 2019 16:02:07 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78E6A6AA39 for ; Sun, 19 May 2019 16:02:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-yb1-xb29.google.com with SMTP id x7so531224ybg.5 for ; Sun, 19 May 2019 09:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c8rxPZYkYlFcgjoOKD+qpleMC4xEtAwQsMUsj9thkqI=; b=a2aUOsWJBiA5/FurivjVfU+me8jwTmrn708DloyzI/UxbeVt0Al/7N2t0AZc13E64z 81lcxQA+6KdkNFRq6NyP4rDCvl6b3TeT2Gce/5mqcqGd+Y+CmqyONmgh7U4kMcmd+W3D NG/4x5f+RDyGKn/6IVd3swKU+1UZxVO/Oje9hlYa6KZE8kpEnB7x1uM/hKreE/6eUXO/ l+0JckX/hhLzb8rudztiTWjvLyJwe8CSdShEqru1UB/WFIUoBnDtgqvw1jbeikLGHR1k YOId7djciIy9YcRBgIoagDM4EB8esE7a2fmlj46mkOEvy9SofsuvsLHgmoR3wiXRjHIk ISPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c8rxPZYkYlFcgjoOKD+qpleMC4xEtAwQsMUsj9thkqI=; b=IFqTcGY/8jAcMOKpQOGmtjgQ5QqssPTwvSBMuhQwvleQktGTaCM3g66y9tea1MDy8q 2T8+xmikhgnWQi86+cg52jcyxUqvjMeuN9g7Zi8feinzPQA8AxYwJYepC2R7XByeCVuo 0LRXq6COFFao9zzcxNtJd2p6KdIUnG3qkyKo2uPr0GDl2QjMfSXWtzeOmRBjQPU/DLxp NOnqVDl9jpgPcb0CRenuMSBHo1Y+BBKqWRF7O4dOhqt+1rExgEtaSHExcbZlsu/BHx6q 48AXwqCIQL1IotU0ye9+FC99RTpm3zBLn/YHpT1v7MU6H+iZpuBXVEqMLwhWkV8WYOsI I/mw== X-Gm-Message-State: APjAAAVp+325rNTqgz/+dYzYribAA5JFbX+Auefu3iddYUPZydCASQ+l 6zV0O/1WvcQL78z1FTR5svZP7eEwm8ZQCwNgBPGowQ== X-Google-Smtp-Source: APXvYqz7Trdx5eUWXrzh6WwgbpqxNwAi4rh2Ifigv0vHk2d+xSfDuLj9u+6A2+7o1F5lu4VV6HMOYJmIfnv/xeSfvKk= X-Received: by 2002:a5b:2ce:: with SMTP id h14mr32233435ybp.193.1558281724724; Sun, 19 May 2019 09:02:04 -0700 (PDT) MIME-Version: 1.0 References: <8da9f5d2-e33e-0f55-7f30-3344ccf5f0a7@grosbein.net> <20190424101102.GK18788@cicely7.cicely.de> In-Reply-To: <20190424101102.GK18788@cicely7.cicely.de> From: Adrian Chadd Date: Sun, 19 May 2019 09:01:52 -0700 Message-ID: Subject: Re: MIPS future... To: ticso@cicely.de Cc: Eugene Grosbein , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 78E6A6AA39 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=a2aUOsWJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2607:f8b0:4864:20::b29 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-6.96 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-mips@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[9.2.b.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.98)[ip: (-9.29), ipnet: 2607:f8b0::/32(-3.26), asn: 15169(-2.27), country: US(-0.06)]; RCVD_COUNT_TWO(0.00)[2] 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: Sun, 19 May 2019 16:02:07 -0000 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: > > > > > 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