From owner-freebsd-arm@freebsd.org Mon Jan 23 20:18:16 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F171CBEC09 for ; Mon, 23 Jan 2017 20:18:16 +0000 (UTC) (envelope-from dmarquess@gmail.com) Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F39CFA0 for ; Mon, 23 Jan 2017 20:18:15 +0000 (UTC) (envelope-from dmarquess@gmail.com) Received: by mail-yw0-x22d.google.com with SMTP id v200so147385656ywc.3 for ; Mon, 23 Jan 2017 12:18:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UX3xz0ZvQvTH8FiZh61/xR33dmEeOrcoAonpCygN9vg=; b=hP6JE2qz4AFGNfIyCNXd6Y2GRMBJrqiHXhc+L4kA+SRpl6zKZyrWeU+A7kzK+uNOfU g7JJoTRfIkTM0W7KcpN7iyxnl59ZRWqzGkWSEqhsv9sBt8UWfyHCdSrKy0t2n6WJLC4M Zi1VxhzGR41DmdMh1DGtV1OjXLAJHrDvgsklyPwoL4w5/Vy70/W9Cm8G/20BlydU2Onv nyjLGljdR1NmQqQnhBXrNbIc3Flp6TZkXv/PkNFfLcL3FzuyVUaP3H1OeF/TuyxnVAje SEQUfFppTjRKlO5cBLZ9YyJxtQVGZYvaai5046tQ1FLNtT1NO2HcUnLhW4493qL7ycli V/Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UX3xz0ZvQvTH8FiZh61/xR33dmEeOrcoAonpCygN9vg=; b=MM1RND9WP/kqSWgcarQznTgx1Jz/JA6Vfr8Pfjjwp7+AiqTAebCDUPtXQu+dGfG0Xp 49b9C5k2IF9rsbHbRZRwNgQRjETqWIfEN7A4sKS+8MyO7ZmTBLhe6JKafDxVngNfEpty jZWbVvEz9CJipIzpjHgfB/AkFRNNh1SLu68ertpWeTtxpaXTO9sjosme6JDywGHbXJDJ PgA1GlL0G4u1euwSZOkvmycYbqaGJffNBGls6Ef/HadjfzZQlmQ8Yo/EBHXuLBAKqaGr odXSiG5oUvX18/8CNwGdA/ESQ8zDN3MBNUqxRrsXzG6nznFNU1R598UHmM1+jK/ZAHDN 4MNw== X-Gm-Message-State: AIkVDXJfTFy7YUDmz9NEnwe06KA2RLG2CUe1//nCZuVav1OFfP9Qj1s19rmS25/M4J52IXO4c73KjboZpBAl7A== X-Received: by 10.129.52.6 with SMTP id b6mr23174063ywa.113.1485202695210; Mon, 23 Jan 2017 12:18:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.13.231.135 with HTTP; Mon, 23 Jan 2017 12:18:14 -0800 (PST) In-Reply-To: References: <48f8cbc1-3814-b9f6-0e3a-ebe97466d1df@selasky.org> <20170122190659.GA62786@bluezbox.com> From: Dustin Marquess Date: Mon, 23 Jan 2017 14:18:14 -0600 Message-ID: Subject: Re: Getting the kernel to let go of my UART! To: Oleksandr Tymoshenko Cc: Hans Petter Selasky , "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2017 20:18:16 -0000 Okay, maybe the console thing was a red herring then. It's not marking it as a console at all anymore, but something is still locking the baud rate to 115200. Even though stty and minicom are both set to 9600, anything set/received at 9600 doesn't work/is garbled. If I set it to 115200, it works fine. I had wrongly assumed it was because of it marking it as a console (since the console line in dmesg said 115200). Device map? enable_uart=1 aka core_freq= maybe? I'll try tinkering.. -Dustin On Mon, Jan 23, 2017 at 12:24 AM, Dustin Marquess wrote: > On Sun, Jan 22, 2017 at 1:06 PM, Oleksandr Tymoshenko > wrote: >> Dustin Marquess (dmarquess@gmail.com) wrote: >>> On Sunday, January 22, 2017, Hans Petter Selasky wrote: >>> >>> > On 01/22/17 06:07, Dustin Marquess wrote: >>> > >>> >> [Sorry if this is somewhat of a dupe, I have yet to find a solution] >>> >> >>> >> I've been running FreeBSD on my Pi 3s for a little over a month now, >>> >> first using gonzo's SMP code + a home cross-compiled kernel, and then >>> >> I moved to the HardenedBSD images. All of them work great except one >>> >> issue that's driving me nuts... >>> >> >>> >> The downside to the Pi 3 vs some other boards is that there's really >>> >> only one UART tied to the GPIO pins. I'm trying to feed my Pi 3 with >>> >> a GPS board. >>> >> >>> >> 1st issue: The NMEA stream upsets U-boot. Fine, compiled my own and >>> >> that's "fixed". >>> >> >>> >> 2nd issue: Even with a USB keyboard attached and HDMI output >>> >> connected, FreeBSD still wants to steal the first uart (ttyu0) as a >>> >> console port. I thought that would be fine as long as I use "-m -n >>> >> -q" in the boot config to disable kernel output and then "conscontrol >>> >> delete ttyu0". Well, that KIND of works. It seems to work fine when >>> >> using 115200bps, but trying to change the baud rate to match the GPS >>> >> unit doesn't seem to work at all, I'm guessing because it's still set >>> >> as an available console? >>> >> >>> >> hint.uart.0.flags="0x0" doesn't work, as it still marks it as a >>> >> console. console="efi" seems to be the only setting that works, >>> >> "vidconsole" and "nullconsole" both don't work. >>> >> >>> >> Is there a way to stop the kernel from trying to claim the UART as a >>> >> console? >>> >> >>> > >>> > I think so, have a look in /etc/ttys and comment out the ttyu0 line. >>> > >>> > Sadly, I already did that. There's no getty running, but dmesg still shows >>> the kernel marking it as a console. >> >> Just a random idea, try adding hw.fdt.console=foo0 to /boot/loader.conf >> This should force uart_cpu_fdt_probe to fail. > > Wow, I think that actually did the trick! > > Thank you so very much, I've been pulling my hair out of this for > probably 2 weeks now! > > -Dustin