From owner-freebsd-arm@freebsd.org Wed May 20 04:46:32 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B63FC2FE556 for ; Wed, 20 May 2020 04:46:32 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from mail.macktronics.com (coco.macktronics.com [209.181.253.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49RgFN07xYz4fbs for ; Wed, 20 May 2020 04:46:31 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from olive.macktronics.com (unknown [209.181.253.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.macktronics.com (Postfix) with ESMTPS id 0EB45B28; Tue, 19 May 2020 23:46:31 -0500 (CDT) Date: Tue, 19 May 2020 23:46:30 -0500 (CDT) From: Dan Mack X-X-Sender: mack@localhost.local To: Mark Millard cc: freebsd-arm Subject: Re: rpi4 headless experience In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (GSO 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 49RgFN07xYz4fbs X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=macktronics.com; spf=pass (mx1.freebsd.org: domain of mack@macktronics.com designates 209.181.253.65 as permitted sender) smtp.mailfrom=mack@macktronics.com X-Spamd-Result: default: False [-1.40 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.62)[-0.622]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.181.253.64/29:c]; NEURAL_SPAM_SHORT(0.02)[0.019]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[macktronics.com,none]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:209.181.252.0/23, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2020 04:46:32 -0000 Fair point. I was just folling the wiki which said - RPI4 users, use the RPi3 version :-) No worries, I can wait. Sorry for the noise. Dan On Tue, 19 May 2020, Mark Millard wrote: > > On 2020-May-19, at 19:52, Dan Mack wrote: > >> >> Thanks for that info - this is my first foray into fbsd on arm so I might be messing something up. As a test I swapped in an alpine linux sdcard and booted the same rpi4-4 and this is what it reports for cpu and memory. What the heck am I doing wrong? :-) >> >> # alpine >> >> Booting Linux on physical CPU 0x0000000000 [0x410fd083] >> Linux version 5.4.12-0-rpi4 (buildozer@build-3-11-aarch64) version 9.2.0 (Alpine 9.2.0)) #1-Alpine SMP PREEMPT Thu Jan 16 Machine model: Raspberry Pi 4 Model B Rev 1.1 >> >> pi4f:~# cat /proc/cpuinfo >> processor : 0 >> BogoMIPS : 108.00 >> Features : fp asimd evtstrm crc32 cpuid >> CPU implementer : 0x41 >> CPU architecture: 8 >> CPU variant : 0x0 >> CPU part : 0xd08 >> CPU revision : 3 >> >> processor : 1 >> BogoMIPS : 108.00 >> Features : fp asimd evtstrm crc32 cpuid >> CPU implementer : 0x41 >> CPU architecture: 8 >> CPU variant : 0x0 >> CPU part : 0xd08 >> CPU revision : 3 >> >> processor : 2 >> BogoMIPS : 108.00 >> Features : fp asimd evtstrm crc32 cpuid >> CPU implementer : 0x41 >> CPU architecture: 8 >> CPU variant : 0x0 >> CPU part : 0xd08 >> CPU revision : 3 >> >> processor : 3 >> BogoMIPS : 108.00 >> Features : fp asimd evtstrm crc32 cpuid >> CPU implementer : 0x41 >> CPU architecture: 8 >> CPU variant : 0x0 >> CPU part : 0xd08 >> CPU revision : 3 >> >> Hardware : BCM2835 >> Revision : c03111 >> Serial : 100000002b2bb8fd >> Model : Raspberry Pi 4 Model B Rev 1.1 >> >> pi4f:~# cat /proc/meminfo >> MemTotal: 3890684 kB >> MemFree: 3739844 kB >> >> >> Since others are not seeing the memory discrepency, more investigation is warranted on my end. >> >> Take care. >> >> Dan > > I just realized that your original message said: > > "Just tried the latest FreeBSD on RPI image on my rpi4-4GB system." > > There is no such image for the RPi4. Looking at: > > https://lists.freebsd.org/pipermail/freebsd-snapshots/2020-May/000698.html > > shows: > > o 13.0-CURRENT aarch64 GENERIC > o 13.0-CURRENT aarch64 RPI3 > o 13.0-CURRENT aarch64 PINE64 > o 13.0-CURRENT aarch64 PINE64-LTS > o 13.0-CURRENT aarch64 PINEBOOK > o 13.0-CURRENT aarch64 ROCK64 > o 13.0-CURRENT aarch64 ROCKPRO64 > > Treating an RPi4 as a RPi3 is not going to > make everything work: it does not have > the right variant of u-boot, for example. > > The following lists installed files from ports: > > sysutils/u-boot-rpi[34] > sysutils/rpi-firmware > > The installations of the 2 prots only puts the files > someplace so they (or some) can later be copied to the > msdos file system involved. > > # ls -ldT /usr/local/share/u-boot/u-boot-rpi[34]/* > -rw-r--r-- 1 root wheel 124 Apr 25 00:16:57 2020 /usr/local/share/u-boot/u-boot-rpi3/README > -rw-r--r-- 1 root wheel 37 Apr 25 00:16:55 2020 /usr/local/share/u-boot/u-boot-rpi3/metadata > -rw-r--r-- 1 root wheel 499824 Apr 25 00:16:54 2020 /usr/local/share/u-boot/u-boot-rpi3/u-boot.bin > -rw-r--r-- 1 root wheel 124 Apr 25 13:28:34 2020 /usr/local/share/u-boot/u-boot-rpi4/README > -rw-r--r-- 1 root wheel 37 Apr 25 13:28:34 2020 /usr/local/share/u-boot/u-boot-rpi4/metadata > -rw-r--r-- 1 root wheel 506360 Apr 25 13:28:34 2020 /usr/local/share/u-boot/u-boot-rpi4/u-boot.bin > > If you replaced the u-boot.bin in the msdos file system > with the rpi4 one the memory might well show correctly. > > There is also: > > # ls -ldT /usr/local/share/rpi-firmware/* > . . . > -rw-r--r-- 1 root wheel 89 Jan 30 13:26:19 2020 /usr/local/share/rpi-firmware/config.txt > -rw-r--r-- 1 root wheel 147 Jan 30 13:26:19 2020 /usr/local/share/rpi-firmware/config_rpi3.txt > -rw-r--r-- 1 root wheel 135 Jan 30 13:26:20 2020 /usr/local/share/rpi-firmware/config_rpi4.txt > -rw-r--r-- 1 root wheel 110 Jan 30 13:26:19 2020 /usr/local/share/rpi-firmware/config_rpi_0_w.txt > . . . > > where you would need to copy the config_rpi4.txt content > to the config.txt in use on the msdos file system. > > There are other files for the RPi4 from the list as well. > I've not checked a rpi3 snapshot do know if the snapshot > has copies of RPi4 specific files: > > -rw-r--r-- 1 root wheel 5888 Jan 30 13:26:31 2020 /usr/local/share/rpi-firmware/armstub8-gic.bin > -rw-r--r-- 1 root wheel 40659 Nov 22 09:06:45 2019 /usr/local/share/rpi-firmware/bcm2711-rpi-4-b.dtb > -rw-r--r-- 1 root wheel 6193 Nov 22 09:06:45 2019 /usr/local/share/rpi-firmware/fixup4.dat > -rw-r--r-- 1 root wheel 3089 Nov 22 09:06:45 2019 /usr/local/share/rpi-firmware/fixup4cd.dat > -rw-r--r-- 1 root wheel 9181 Nov 22 09:06:45 2019 /usr/local/share/rpi-firmware/fixup4db.dat > -rw-r--r-- 1 root wheel 9183 Nov 22 09:06:45 2019 /usr/local/share/rpi-firmware/fixup4x.dat > -rw-r--r-- 1 root wheel 2775076 Nov 22 09:06:45 2019 /usr/local/share/rpi-firmware/start4.elf > -rw-r--r-- 1 root wheel 775872 Nov 22 09:06:45 2019 /usr/local/share/rpi-firmware/start4cd.elf > -rw-r--r-- 1 root wheel 4582664 Nov 22 09:06:45 2019 /usr/local/share/rpi-firmware/start4db.elf > -rw-r--r-- 1 root wheel 3536680 Nov 22 09:06:45 2019 /usr/local/share/rpi-firmware/start4x.elf > > in the msdosfs file system. > > Note (where config.txt is a copy/variant of > config_rpi4.txt by content): > > # more /boot/efi/config.txt > arm_control=0x200 > arm_64bit=1 > dtoverlay=disable-bt > dtoverlay=mmc > device_tree_address=0x4000 > kernel=u-boot.bin > armstub=armstub8-gic.bin > > So, without armstub8-gic.bin being present > in the msdos file system, the RPi4 config.txt > content would then specify a missing file. > Similarly for u-boot.bin . > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > >