rpi4 headless experience
Mark Millard
marklmi at yahoo.com
Wed May 20 03:56:44 UTC 2020
On 2020-May-19, at 19:52, Dan Mack <mack at macktronics.com> 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 at 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
> <snip>
>
> 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)
More information about the freebsd-arm
mailing list