From owner-freebsd-arm@freebsd.org Wed Jul 25 10:45:33 2018 Return-Path: Delivered-To: freebsd-arm@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 96D7F10472DB for ; Wed, 25 Jul 2018 10:45:33 +0000 (UTC) (envelope-from peo@nethead.se) Received: from ns1.nethead.se (ns1.nethead.se [5.150.237.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns1.nethead.se", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D0BA79146 for ; Wed, 25 Jul 2018 10:45:33 +0000 (UTC) (envelope-from peo@nethead.se) X-Virus-Scanned: amavisd-new at Nethead AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nethead.se; s=NETHEADSE; t=1532515531; bh=brNJOuBWHGgY/xHaBOVRxu0WPoRDY2hAoEGVpoJSu9U=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=MurhmIflqJ1eiqgfV3j+vvCzdoF2zHKn/Pr0dsXI0uWwu8pw9yK/oMVXN4I9WvEqi U6NFGC4I0yloBjP+hr/LoakZBYiWMviCTdQvGVd7k+gkSC4W+2MAwpkUSACnuG2MJv Uj0ADWJaPV2r5g2NxagBLTi11xQzVsmnyZWemT5o= Subject: Re: rpi3 and Adafruit GPS hat continued To: Ralph Smith Cc: freebsd-arm References: <2f55aaea-6832-7441-1011-b8288628a4a9@nethead.se> From: Per olof Ljungmark Message-ID: <61aca7dc-0c71-b697-6d57-aeded7ce780f@nethead.se> Date: Wed, 25 Jul 2018 12:45:29 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2018 10:45:33 -0000 On 07/25/18 12:35, Ralph Smith wrote: > > > Sent from my iPhone > >> On Jul 25, 2018, at 5:55 AM, Per olof Ljungmark wrote: >> >>> On 07/25/18 11:27, Per olof Ljungmark wrote: >>>> On 07/25/18 04:25, Warner Losh wrote: >>>> >>>> >>>> On Tue, Jul 24, 2018 at 1:44 PM, Per olof Ljungmark >>> > wrote: >>>> >>>> Thanks to >>>> http://freebsd.1045724.x6.nabble.com/Adding-a-GPS-Module-hat-shield-on-a-Raspberry-Pi-td6236680.html >>>> >>>> and helpful people on the list I managed to get the pi to boot by >>>> silencing the console messages in u-boot. >>>> >>>> I skipped the switch and patched rpi.h: >>>> >>>> @@ -85,10 +87,13 @@ >>>> #define CONFIG_INITRD_TAG >>>> >>>> /* Environment */ >>>> +#define CONFIG_SYS_DEVICE_NULLDEV >>>> +#define CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC >>>> +#define CONFIG_SILENT_CONSOLE_UPDATE_ON_SET >>>> #define ENV_DEVICE_SETTINGS \ >>>> - "stdin=serial,usbkbd\0" \ >>>> - "stdout=serial,vidconsole\0" \ >>>> - "stderr=serial,vidconsole\0" >>>> + "stdin=usbkbd\0" \ >>>> + "stdout=vidconsole\0" \ >>>> + "stderr=vidconsole\0" >>>> >>>> and now the pi is booting. >>>> >>>> Now to the next problem, I need to rewire TXD and RXD and add reception >>>> of the PPS signal on pin 4. The advice in the link above is not >>>> appclicable to current and rpi3. >>>> >>>> Right now uart1 is wired to the RXD and TXD pins, I want uart0. Is it >>>> recompile a dts or use gpioctl? >>>> >>>> uart0: mem 0x7e201000-0x7e201fff irq 24 on >>>> simplebus0 >>>> uart1: mem 0x7e215040-0x7e21507f irq 32 on >>>> simplebus0 >>>> uart1: console (115200,n,8,1) >>>> >>>> >>>> I'm pretty sure that you'll need to hack dts. >>> >>> Yes. Most importantly, stop the kernel from talking to the serial console. >>> >>> I've been wandering around the source and right now the theory is to >>> change /usr/src/sys/gnu/dts/arm/bcm283x.dtsi, it is the only place in >>> all the included dts files where I find a reference to the console: >>> >>> chosen { >>> stdout-path = "serial0:115200n8"; >>> }; >>> >>> Says nothing about stdin though, not anywhere. >> >> Tried stdout-path = ""; but that did not help. >> >> I'm giving up and move to rpi2 and 11.2 instead. Phew. > > Just another gotcha to worry about: be aware of the difference between the rpi2 board versions 1.1 and 1.2. They quietly changed the SOC, so FreeBSD 11.1 would not boot on the rev 1.2 board. It will boot FreeBSD 11.2, but I’ve not tried the GPS HAT on that yet. Thank you for the heads up - I have not checked yet what version of rpi2 I have, think I have one of each. I'll be back and report later.