# Pi 3 - install armv6 or armv7?



## spork (Dec 5, 2020)

I bought yet another Pi, but did not do enough research.

Apparently the 3 is aarch64/armv8, and as such, has fewer packages available, including the rather important (for my use) raspberrypi-userland tools.

Before I give in and install some awful Linux that's going to give me a headache, is it possible to install either the armv6 or armv7 images on a Pi 3? After having a quick look at Raspbian/Raspberry Pi OS, it seems they are actually using 32-bit images for the newer boards, which kind of surprised me, but apparently there is some way to do this (I am very new to arm, so I'm just thinking amd64 vs. i386 and backwards compatibility here).


----------



## diizzy (Dec 5, 2020)

If you're looking for pre compiled packages you're better off waiting for 13.0-RELEASE or setting up your own package repo specially if you're on 13-CURRENT. 
That being said, my RockPro64 SBC works really well even compiling natively although you should use external storage and have 2Gb of RAM as bare minimum (depending on what you're going to compile).


----------



## spork (Dec 6, 2020)

Well, unless there's some trick to it, neither the RPI2 nor RPI-B (armv6 and armv7) would boot, just the rainbow screen on the pi and no further LED activity after the initial sd card probe.

The problem with misc/raspberrypi-userland tools is that apparently in linux world, they just have stuck with 32-bit arm builds of everything for the newer pi line, so as of now, it just doesn't build when running armv8/aarch64. And without either those tools or a freebsd kernel module to talk to the camera, there's no further options...


----------



## George (Dec 6, 2020)

I found armv7 images on an ftp mirror, e.g.
ftp://ftp1.freebsd.org/pub/FreeBSD/releases/arm/armv7/ISO-IMAGES/
Probably you would need to use a GENERICSD image, then.


There is sysutils/u-boot-rpi3-32 as well. It has this comment:


> This is useful for using the camera hardware, as
> misc/raspberrypi-userland does not support aarch64.



I would also read/ask in the arm mailing list. E.g.


> FYI: even under aarch64 FreeBSD, one can install an armv7 world in its own directory tree and chroot to it and run armv7 software (world material, ports, etc., not kernel.


Which u-boot for rpi3? u-boot-rpi3-32 or the old one?


----------



## spork (Jan 2, 2021)

This sounds like it's well beyond my pay grade, lol. 

I just bought this and from my VERY limited understanding of the platform, this replaces the boot loader and that just sounds like a recipe for a noob to brick it.


----------



## tux2bsd (Jan 2, 2021)

I have a small project I thought a pi would be perfect for, was going to rush out and buy a pi kit, I'm glad I didn't.

Unfortunately I don't know what to use as an alternate (would need to import pine64 SBC where I am).

I could run the service on an existing pi that's running a Debian derivatative but want an excuse to run FreeBSD for this set purpose.


----------



## mark_j (Jan 2, 2021)

spork said:


> I bought yet another Pi, but did not do enough research.
> 
> Apparently the 3 is aarch64/armv8, and as such, has fewer packages available, including the rather important (for my use) raspberrypi-userland tools.
> 
> Before I give in and install some awful Linux that's going to give me a headache, is it possible to install either the armv6 or armv7 images on a Pi 3? After having a quick look at Raspbian/Raspberry Pi OS, it seems they are actually using 32-bit images for the newer boards, which kind of surprised me, but apparently there is some way to do this (I am very new to arm, so I'm just thinking amd64 vs. i386 and backwards compatibility here).


Pi3 is both 32 & 64 bit. Use the 32bit if it has more packages. Use FreeBSD12 because it also has more packages. In fact, probably R11 has even more?
If you can't find a package you can cross-build.


----------



## mark_j (Jan 2, 2021)

tux2bsd said:


> I have a small project I thought a pi would be perfect for, was going to rush out and buy a pi kit, I'm glad I didn't.
> 
> Unfortunately I don't know what to use as an alternate (would need to import pine64 SBC where I am).
> 
> I could run the service on an existing pi that's running a Debian derivatative but want an excuse to run FreeBSD for this set purpose.


Why do you say this? FreeBSD runs fine on rpi. You might find it a struggle with a gui (i have no experience running the pi that way), but otherwise it's been rock-solid, for years.
There may not be all the packages that are available for x64 but then you can always build them yourself.


----------



## tux2bsd (Jan 2, 2021)

> Why do you say this?


I haven't seen good install documentation yet.  Only rpi4 is available where I am, in store.  If I can source an rpi3, maybe I'll still be able to do that.


> You might find it a struggle with a gui (i have no experience running the pi that way)


This has nothing to do with anything and doesn't make sense.


> FreeBSD runs fine on rpi.


Good to know.

edit: "Raspberry Pi 3 Model B+" has been ordered so I'll find out in a few weeks.


----------



## tux2bsd (Jan 2, 2021)

```
https://freebsdfoundation.org/freebsd-project/resources/installing-freebsd-for-raspberry-pi/
https://wiki.freebsd.org/arm/Raspberry%20Pi#How_to_Boot_the_Raspberry_Pi
```
If anyone wants to add to this list as good Raspberry Pi 3 known good howto that'd be good (done as code as this forum's URL handling is sub optimal).


----------



## diizzy (Jan 2, 2021)

You'll have much better experience in general with RK3399 (RockPro64 and/or Rock Pi4(a)) however...


----------



## mark_j (Jan 3, 2021)

tux2bsd said:


> This has nothing to do with anything and doesn't make sense.


Well to clarify, running the GUI with requirements like good graphics support, good DE support might be problematic (especially as compared to linux).
I had to guess you were meaning RPI4 (not supported well in 12R, better in 13C), considering this topic is about RPI3...


----------



## freeBSDn (Jan 3, 2021)

I don't have any RPi3's but I got a RPi4 for Christmas, to play with, albeit it's running current-13.0.

Wrote this image:
FreeBSD-13.0-CURRENT-arm64-aarch64-RPI3-20201210-7578a4862f0.img.xz
to Lexar 128GB SDXC.

It's running nginx, mysql, php,fpm. It runs great.



```
last pid:  9040;  load averages:  0.20,  0.18,  0.17     up 0+07:02:01  01:09:39
23 processes:  1 running, 22 sleeping
CPU:  0.0% user,  0.0% nice,  0.2% system,  0.0% interrupt, 99.8% idle
Mem: 6912K Active, 565M Inact, 16K Laundry, 145M Wired, 75M Buf, 170M Free
Process id to show (+ for all):
  PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
9029 freebsd       1  20    0    14M  3496K CPU1     1   0:00   0.10% top
9023 freebsd       1  20    0    20M  8104K select   3   0:00   0.01% sshd
1126 root          1  20    0   193M   800K kqread   0   0:01   0.00% php-fpm
2438 root          1  20    0    13M   384K nanslp   0   0:00   0.00% cron
1012 root          1  20    0    13M  1420K select   2   0:00   0.00% syslogd
9020 root          1  25    0    20M  8072K select   3   0:00   0.00% sshd
9024 freebsd       1  20    0    14M  3960K pause    1   0:00   0.00% csh
  809 root          1  20    0    11M   976K select   1   0:00   0.00% devd
  747 root          1  52    0    13M  1140K select   2   0:00   0.00% dhclient
1099 root          1  20    0    20M  2652K select   1   0:00   0.00% sshd
  808 _dhcp         1  20    0    13M  1392K select   0   0:00   0.00% dhclient
  744 root          1  20    0    13M  1136K select   2   0:00   0.00% dhclient
2460 root          1  52    0    13M   712K ttyin    0   0:00   0.00% getty
1109 www           1  52    0    12M     0B pause    0   0:00   0.00% <fcgiwrap>
1122 www           1  52    0    20M     0B kqread   3   0:00   0.00% <nginx>
1128 www           1  52    0   193M     0B accept   2   0:00   0.00% <php-fpm>
1127 www           1  52    0   193M     0B accept   1   0:00   0.00% <php-fpm>
1121 root          1  52    0    20M     0B pause    2   0:00   0.00% <nginx>
1108 www           1  52    0    13M   688K piperd   3   0:00   0.00% daemon
1112 www           1  52    0    12M     0B accept   2   0:00   0.00% <fcgiwrap>
1113 www           1  52    0    12M     0B accept   1   0:00   0.00% <fcgiwrap>
1114 www           1  52    0    12M     0B accept   2   0:00   0.00% <fcgiwrap>
1115 www           1  52    0    12M     0B accept   1   0:00   0.00% <fcgiwrap>
```


----------



## ajmcc (Jan 4, 2021)

For the RPi4B, up to and including the 8GB model, use:
FreeBSD-13.0-CURRENT-arm64-aarch64-RPI-20201224-3cc0c0d66a0-255241.img

If booting off SD card this is all you need. If booting off USB SSD, you need the RPi Sept 3rd EEPROM update, and a modified DTB file on the DOS partition, as per D26853.

This is WIP of course, in due course the patch should no longer be needed as and when either RPi fix their code or a workaround is put in by the U-Boot/FreeBSD devs.

EDIT: The latest 'master' release of the RPi firmware, dated 2021-01-04, has an updated version of the DTB file (bcm2711-rpi-4-b.dtb), which reportedly fixes USB boot without requiring the patch.

My dmesg.

(PS. Sorry to digress from the original topic but other posters started it  )


----------

