# Raspberry Pi 3 img?



## Psypro (Mar 11, 2016)

https://mobile.twitter.com/zxombie/stat ... 5373414400

Any one got the image working?


----------



## Psypro (Mar 11, 2016)

I tried 2 x times but I can't get it to work. Only I get color boot screen. Not any sign of freebsd FreeBSD.


----------



## Psypro (Mar 11, 2016)

I can get raspbian to load with this Raspberian pi 3, but not this freebsd FreeBSD image.


----------



## Phishfry (Mar 11, 2016)

Are you using serial console for output? Most ARM boards with HDMI will only work via console.


----------



## cpm@ (Mar 14, 2016)

Please, take a look on the freebsd-arm mailing list.

https://lists.freebsd.org/pipermail/freebsd-arm/2016-March/013330.html


----------



## Psypro (Mar 20, 2016)

Nobody at the ARM list seems to get it to boot. cpm, have you got it booting?


----------



## cpm@ (Mar 21, 2016)

Psypro said:


> Nobody at the ARM list seems to get it to boot. cpm, have you got it booting?



Please, stay tuned and join to the freebsd-arm mailing list 

https://lists.freebsd.org/pipermail/freebsd-arm/2016-March/013352.html

Test FreeBSD on RaspberryPi3 with https://people.freebsd.org/~andrew/arm64/rpi3-20160306.img.xz or build your own from source
https://github.com/zxombie/freebsd/tree/arm64-rpi3.


----------



## Psypro (Mar 22, 2016)

So inside the OpenBSD topic on the maling list, it was a post about FreeBSD booting pi3. 

Will you still need usb console?


----------



## cpm@ (Mar 22, 2016)

Psypro said:


> So inside the OpenBSD topic on the maling list, it was a post about FreeBSD booting pi3.
> 
> Will you still need usb console?



Read the following clarification: https://wiki.freebsd.org/FreeBSD/arm/Raspberry Pi#How_to_Boot_the_Raspberry_Pi


----------



## Psypro (Mar 23, 2016)

I got raspberry pi3 to somewhat boot on Freebsd FreeBSD 

Any idea to get further?



```
+ޥ}�fLB
         b)!��R��!
                    ���rd�2rNv�M�H���52H�����O�4!H��+iC���u9c� �6+q֑+
�u��y�����S9�x�)J�u�SȪA�i�9�!�j�6N,��+d�����)k�!e�!��E��6��n�D)��o1��VV�UJq+��)Ib�S޶�Lш�C��)UP
                                 }��)���(���)&m���0|*Lb�`����ʧJbB1�!��HZ+��%����k���#BL������
#
#
#
#
#
#
# #################################Consoles: pl011 console
FreeBSD Raspberry Pi 3 loader
Booting kernel at 0x200000, size 9714192
DTB: 0xc35000 0xffffff8000a35000
entry: 0x201000 9400003d ffffff8000a38000
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #183 113a7cb(arm64-rpi3)-dirty: Fri Mar  4 16:28:43 GMT 2016
    andrew@zapp:/usr/obj/arm64.aarch64/usr/home/andrew/freebsd/repo/head-git/sys/GENERIC arm64
FreeBSD clang version 3.7.1 (tags/RELEASE_371/final 255217) 20151225
WARNING: WITNESS option enabled, expect reduced performance.
FreeBSD/SMP: Multiprocessor System Detected: 1 CPUs
random: entropy device external interface
ACPI: Table initialisation failed: AE_NOT_FOUND
ACPI: Try disabling either ACPI or apic support.
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
bcm28360: <Broadcom bcm2836>
intc0: <BCM2835 Interrupt Controller> mem 0x3f00b200-0x3f00b3ff on simplebus0
generic_timer0: <ARMv7 Generic Timer> irq 72,73,75,74 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 19200000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 19200000 Hz quality 1000
bcm_dma0: <BCM2835 DMA Controller> mem 0x3f007000-0x3f007eff irq 24,25,26,27,28,29,30,31,32,33,34,35 on simplebus0
mbox0: <BCM2835 VideoCore Mailbox> mem 0x3f00b880-0x3f00b8bf irq 1 on simplebus0
uart0: <PrimeCell UART (PL011)> mem 0x3f201000-0x3f201fff irq 65 on simplebus0
uart0: console (115200,n,8,1)
sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0x3f300000-0x3f3000ff irq 70 on simplebus0
mmc0: <MMC/SD bus> on sdhci_bcm0
pmu0: <Performance Monitoring Unit> irq 81 on simplebus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
mmcsd0: 64GB <SDHC SL64G 8.0 SN 2A4BBB5E MFG 10/2015 by 3 SD> at mmc0 41.6MHz/4bit/65535-block
Release APs
APs not started
WARNING: WITNESS option enabled, expect reduced performance.
Trying to mount root from ufs:/dev/mmcsd0s2a []...
WARNING:  was not properly dismounted
warning: no time-of-day clock registered, system time will not be set accurately
Setting hostuuid: d8e41b72-e3b8-11e5-b647-5df02d5ef121.
Setting hostid: 0x4993b884.
No suitable dump device was found.
Starting file system checks:
mount: /dev/mmcsd0s2a: R/W mount of / denied. Filesystem is not clean - run fsck.: Operation not permitted
Mounting root filesystem rw failed, startup aborted
ERROR: ABORTING BOOT (sending SIGTERM to parent)!
Mar  6 16:33:11 init: /bin/sh on /etc/rc terminated abnormally, going to single user mode
Enter full pathname of shell or RETURN for /bin/sh:
# random: unblocking device.
```


----------



## Psypro (Mar 23, 2016)

Trying: `fsck /dev/mmcsd0s2a`


----------



## Psypro (Mar 23, 2016)

It works. But how can I get network? Does wired or wireless network work with FreeBSD?


```
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #183 113a7cb(arm64-rpi3)-dirty: Fri Mar  4 16:28:43 GMT 2016
    andrew@zapp:/usr/obj/arm64.aarch64/usr/home/andrew/freebsd/repo/head-git/sys/GENERIC arm64
FreeBSD clang version 3.7.1 (tags/RELEASE_371/final 255217) 20151225
WARNING: WITNESS option enabled, expect reduced performance.
FreeBSD/SMP: Multiprocessor System Detected: 1 CPUs
random: entropy device external interface
ACPI: Table initialisation failed: AE_NOT_FOUND
ACPI: Try disabling either ACPI or apic support.
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
bcm28360: <Broadcom bcm2836>
intc0: <BCM2835 Interrupt Controller> mem 0x3f00b200-0x3f00b3ff on simplebus0
generic_timer0: <ARMv7 Generic Timer> irq 72,73,75,74 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 19200000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 19200000 Hz quality 1000
bcm_dma0: <BCM2835 DMA Controller> mem 0x3f007000-0x3f007eff irq 24,25,26,27,28,29,30,31,32,33,34,35 on simplebus0
mbox0: <BCM2835 VideoCore Mailbox> mem 0x3f00b880-0x3f00b8bf irq 1 on simplebus0
uart0: <PrimeCell UART (PL011)> mem 0x3f201000-0x3f201fff irq 65 on simplebus0
uart0: console (115200,n,8,1)
sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0x3f300000-0x3f3000ff irq 70 on simplebus0
mmc0: <MMC/SD bus> on sdhci_bcm0
pmu0: <Performance Monitoring Unit> irq 81 on simplebus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
mmcsd0: 64GB <SDHC SL64G 8.0 SN 2A4BBB5E MFG 10/2015 by 3 SD> at mmc0 41.6MHz/4bit/65535-block
Release APs
APs not started
WARNING: WITNESS option enabled, expect reduced performance.
Trying to mount root from ufs:/dev/mmcsd0s2a []...
warning: no time-of-day clock registered, system time will not be set accurately
Setting hostuuid: d8e41b72-e3b8-11e5-b647-5df02d5ef121.
Setting hostid: 0x4993b884.
No suitable dump device was found.
Starting file system checks:
Mounting local file systems:.
Setting hostname: rpi3.
Setting up harvesting:[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
Feeding entropy:random: unblocking device.
.
Starting Network: lo0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
Starting devd.
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Creating and/or trimming log files.
Starting syslogd.
Clearing /tmp (X related).
Updating motd:.
Mounting late file systems:.
Starting sendmail_submit.
Starting sendmail_msp_queue.
Starting cron.
Starting background file system checks in 60 seconds.

Sun Mar  6 16:36:42 UTC 2016

FreeBSD/arm64 (rpi3) (ttyu0)

login:
```


----------



## Phishfry (Mar 23, 2016)

I would imagine with this being a brand new platform the ethernet might not be supported yet, but I would bet that wireless networking works.
The RA-Link USB sticks are dirt cheap and work at 802.11G. Range is not so great but for basic usage it works. I have had net/hostapd running a home AP on my BBB.

https://www.freebsd.org/cgi/man.cgi?run(4)

I am not recommending you go buy one but if you have one I would have to try that option personally.


----------



## rswennen (Apr 25, 2016)

I tried the image but can't get FreeBSD booted on pi3. 
dd'ed the img to SD-card but got only the rainbow screen.

Someone an idea?


----------



## philo_neo (May 2, 2016)

cpm said:


> Please, stay tuned and join to the freebsd-arm mailing list
> 
> https://lists.freebsd.org/pipermail/freebsd-arm/2016-March/013352.html
> 
> ...




Hi,
me too i try to setup my raspberry PI3, i download the image (/rpi3-20160306.img.xz) but it doen't boot !
I use the command `dd` on SD card UHS class 1, may be there are issue about creating the table partition:
1/ MSdos
2/ BSD
Where found a good distribution ? because i download a lot of image and try it !
I've tested my raspberry with debian64 and it work fine.
some one can tell me the solution, for use FreeBSD with 64 bits instruction ?
*
Regards
Philippe


----------



## s_mitu (May 3, 2016)

This image(rpi3-20160306.img.xz) cannot use HDMI port yet. You need to use the serial console  (you'll need a USB to TTL Serial Cable).

An another image (built based on HardenedBSD ) from freebsd-current ML

https://lists.freebsd.org/pipermail/freebsd-current/2016-April/060515.html

This image cannot use HDMI port too, but LAN port works.


----------



## cpm@ (May 5, 2016)

philo_neo said:


> Hi,
> me too i try to setup my raspberry PI3, i download the image (/rpi3-20160306.img.xz) but it doen't boot !
> I use the command `dd` on SD card UHS class 1, may be there are issue about creating the table partition:
> 1/ MSdos
> ...



Please, take a look to this article written by s_mitu.


----------



## Mark W (May 15, 2016)

I had been trying both the rpi2 and rpi3 images on my rpi3 the last few weeks. Last week. Built the rpi3 image from source without difficulty.  I still didn't see anything on console.  I read that it only works with the serial debug console. So I bought the FTDI serial cable. Tried it today and nothing.  I tried the rpi2 image too and also nothing on serial. 

As a basis to just make sure the serial interface works I tried booting Raspbian.  At first I got garbage. Then I saw a comment to add force_turbo=1 to config.txt and Raspbian boots fine and I get a login prompt over serial.  So the basic serial interface works. 

I have no idea where to go from here. I really would like to work with FreeBSD on the raspberry Pi but I can't seem to get any version to boot. 

I just ordered a raspberry Pi 2 to check as a basis whether the Pi 2 version boots on that. After that I've got nothing up my sleeve. 

Can anyone help get me unstuck?

Mark


----------



## Phishfry (May 15, 2016)

I just bought a RPI2 as I am learning GPIO's and they are the most common board used in examples..
Everything works out of the box including HDMI. The RPI2 is only supported via FreeBSD -CURRENT. So you have some spurious error messages associated with using a testing version. The most recent version works as expected for me.


You should be able to see the boot text of the RPI2 via UART console -with no storage media installed.
Start there and then try FreeBSD Arm build once you see screen output working..


----------



## philo_neo (May 26, 2016)

nobody can tell me when FreeBSD's OS are avaible with HDMI support, there are a fixed date ?


----------



## rbp3 (May 26, 2016)

I think its a ton of people waiting for a working RPi3 image with HDMI support.


----------



## Ozfer (May 27, 2016)

I am desperately waiting on this as well. I am holding off on buying ras pi until this is available.


----------



## Ozfer (May 28, 2016)

Arm64 is the future I would not be surprised if 10 years from now the norm is many cored arm desktops/laptops with only SSDs and everyone will forget disks and disk drives.... and windows could quite possibly be dead


----------



## Phishfry (May 28, 2016)

I bought 4 different ARM board variants before I really asked my self 'what was I doing'. The first board a Beaglebone is the most capable of the lot and it is very well supported all the way down to a LCD touchscreen supported in FreeBSD.

The newer better faster philosophy might be fine for desktops but for experimenter boards speed is not really a consideration. They are not made to provide a desktop but can pull it off if needed. The current focus seems to be an embedded computer and not a desktop from what I can see. GPIO's and IoT and the such.

Until ARM64 gets a PCIe bus or some real fabric I see no real improvement for my needs. A USB bus is not what I see for the future. Problem is there is no one company pushing for standardization and it's a hodge-podge of 40 dollar boards. Intel might be evil but compared to mayhem they look better.


----------



## Psypro (Aug 17, 2016)

I asked this question to arm about fragmentation, got this answer:

"
Thanks for your interest.

You are quite correct that there is always room for improvement.
I can understand that having over 400 companies building ARM-based SOCs can seem like fragmentation, and can be frustrating when trying to navigate.
However, we see this as differentiation and choice for end customers.  You may have to hunt around a bit, but you will find a supplier who meets your requirements and help you do what you want to achieve.

And I do not agree that "choice" is hurting the ARM ecosystem.
In 2015 there were 15 billion ARM based chips shipped.
ARM's customers had an over 99% market share in smartphones.  And more than 90% share in tablets.
There are over 100 low cost development boards enabling 100,000's developers to create new applications from games to internet of things.
The latest Raspberry Pi 3 now comes with a Cortex-A53 and costs only $35.
..........
"


----------



## ronaldlees (Aug 19, 2016)

Ozfer said:


> Arm64 is the future I would not be surprised if 10 years from now the norm is many cored arm desktops/laptops with only SSDs and everyone will forget disks and disk drives.... and windows could quite possibly be dead



Intel seems to be giving up on doing mobile, and I read that they have opened their foundaries (starting with 10 nm, and then also for 7 nm lithographies) - to those who want to build ARM mobile devices.  Samsung has (apparently) been negotiating for use of Intel's foundry to do their own mobile (smartphone) SoCs.  

One of the problems is heat, which worsens as the lithography gets ever smaller.  10 nm litho allows twice as much stuff in the same space, but generates about the same heat. Current chips are mostly 20 - 40 nm (Pi3 SoC is 40 nm).  If the same die size is filled to max, the heat doubles (less a little for thermal tech). Heat will be ever more problematic as the geometries shrink, even for mobile SoC devices.  AFAIK Intel's CISC chips are quicker to heat, due to higher area/function ratios.  So, yes, I think ARM is not stopping anytime soon (maybe that's why Japan's SoftBank is buying them out).


----------



## philo_neo (Aug 20, 2016)

Hi,
I think that Motorola is not dead, may be help Motorola with the developers free world (opensource), and also  the legend reborn if this last create an processor multi cores = may be to counter ARM processor, i don't forgot the time of 6800 processor....


----------



## SuperDaveAU (Sep 12, 2016)

Sorry to bump this thread, but where are we with this?
I would love to get 10.3 working on my RP3.


----------



## acheron (Sep 12, 2016)

10.3 will never work on your RPI3


----------



## SuperDaveAU (Sep 12, 2016)

acheron said:


> 10.3 will never work on your RPI3


Can you explain to a lowly FreeBSD beginner why that is?


----------



## acheron (Sep 12, 2016)

10.3 is in maintenance mode, no new features will be added to it. Support for RPI3 will first land in -CURRENT and probably MFC'ed to 11-STABLE.


----------



## SuperDaveAU (Sep 12, 2016)

acheron said:


> 10.3 is in maintenance mode, no new features will be added to it. Support for RPI3 wil first land in -CURRENT and probably MFC'ed to 11-STABLE.



Ahh I see. So would it be unreasonable to see a version out for RPi3 before this using some sort of pre-release?
Also, is it assumed that the 11.0 release will support it out of the box?


----------



## acheron (Sep 12, 2016)

The RPI3 is still not in CURRENT, so not in -STABLE, so not in 11.0-RELEASE.


----------



## SuperDaveAU (Sep 30, 2016)

Ok, so where can I find any information on who is working on it within the FreeBSD team?
Or is there any 3rd party information that breaksdown the process to get this working on the RPI3?


----------



## SirDice (Sep 30, 2016)

https://wiki.freebsd.org/arm64


----------



## cpm@ (Oct 17, 2016)

Initial (limited) support for RPi3 has been landed in HEAD.

https://lists.freebsd.org/pipermail/freebsd-arm/2016-October/014831.html


----------



## hulleyrob (Nov 2, 2016)

raspbsd.org has a new image for the Pi3 and has most packages available and working.


----------



## Phishfry (Nov 2, 2016)

Crochet has RPi3 support now for easy crossbuilding on -CURRENT.


----------



## hulleyrob (Nov 2, 2016)

Yeah I believe that image was built using crochet.


----------



## Alathar (Feb 16, 2017)

I can't get my RPi3 to budge with the FreeBSD / RaspBSD image.  It boots and runs Raspbian just fine, so I know the hardware is good.  I even created my raspbian image using the same method and the same SD card that failed with FreeBSD.  If I understood the process correctly, this should have worked - so maybe I have a basic misunderstanding somewhere?
I downloaded FreeBSD-aarch64-12.0-GENERIC-313109M.img.gz from www.raspbsd.org onto my Intel FreeBSD 10.1 system and gunzipped it.  I SFTP'ed it to a Windows system (since I don't have an SD interface on my FreeBSD system) and did
\local\bin\dd bs=1M if=FreeBSD-aarch64-12.0-GENERIC-313109M.img of=\\.\e: --progress
and it counted off 1900-some blocks.  At that point, I expected to see a FAT32 file system with the low-level boot files, but Windows just says something about needing to format the device before it can be used (which I did not do).  With the Raspbian image, I can definitely see the low-level boot files on the FAT32 part of the device.  When I put this SD card in the PI3, I don't even see a flicker on the green light.  It is clearly not seeing an MBR or filesystem that it recognizes.  Did I do something wrong?  Is it possible that the image is corrupted?  What should I expect to see after doing the dd to \\.\e:?  Shouldn't I be able to see the low-level boot files at that point?  Is there another way entirely to get to where I want to be?  Anyway - any pointers or clues will be appreciated.


----------



## Phishfry (Feb 16, 2017)

I'm not sure about the generic ARM64 images.
There has been some recent RPI3 updates including support for SMP on crochet though.
RPi3 is still in early stages. There also had been some churn with a newer u-boot version I have seen on the mailing list.
It's in working order now with a SMP kernel.
Thanks to both Gonzo and Diane and everybody else involved.


----------



## acheron (Feb 16, 2017)

You should see a fat partition with Windows, it means you didn't burn the image correctly.


----------



## -Rozi- (Feb 21, 2017)

Hmm, the image from http://www.raspbsd.org (r313109) works on my new RPi3. 

However, I get random crashes (signal 4 = illegal instruction, signal 11 = segmentation fault) while compiling ports, the world etc.

I eventually managed to compile all ports I need, since `make build` can continue where it left off.

Unfortunately, compiling the world can't make it thru. The CPU temperature rises to about 75°C when `make buildworld`, or 85°C when `make -j4 buildworld` is invoked.

Is anybody else getting the core dumps while compiling?
Is it possible to limit the speed of CPU? The `sysctl dev.cpu.0` does show that _powerd_ is dynamically adjusting CPU speed.
I shall install CentOS or Raspbian in the following days to stress test my hardware.


----------



## acheron (Feb 21, 2017)

The coredump was fixed by https://svnweb.freebsd.org/base?view=revision&revision=313772
I have no clue for the second point.


----------



## Alathar (Feb 24, 2017)

I hope someone can help.  I've got FreeBSD-aarch64-12.0-GENERIC-313109M.img.gz from raspbsd.org with SHA256 of 3A192593804B70783C0233B0FC2F11BC76892C8C9A29FAA19722CF5CD0CA96D6 which I confirmed with Brad.  When I unzip it, I get a file of 1949999616 bytes with SHA256 of ed3c54e3a293b086dab4b7f2b002e52bb5f074788ff85c6a2afca2c54dcbed5a.  The thing is, the first 1790 bytes of that file are all zero!  That seems unlikely to be a FAT file system no matter how I copy it on to my SD.  Unless my 313109M is different than your 313109 (no M?  Is that possible?) than this seems impossible.  I used the same process to write the NOOBS and that worked fine, so I don't think my process or utility is faulty.  But I'm totally at a loss as to how I could start with a file of the right SHA256 hash value and expand it without error to a file that starts with 1790 zero bytes and still be using the same bits as everyone else is.  Is there some way to get my hands on 313772?


----------



## Alathar (Feb 24, 2017)

-Rozi- said:


> Hmm, the image from http://www.raspbsd.org (r313109) works on my new RPi3.
> 
> However, I get random crashes (signal 4 = illegal instruction, signal 11 = segmentation fault) while compiling ports, the world etc.
> 
> ...


What about cooling instead of limiting the CPU speed?  Do you have the heat sink kit?  What about a tiny bit of active cooling?


----------



## -Rozi- (Feb 24, 2017)

Alathar said:


> I hope someone can help.  I've got FreeBSD-aarch64-12.0-GENERIC-313109M.img.gz from raspbsd.org with SHA256 of 3A192593804B70783C0233B0FC2F11BC76892C8C9A29FAA19722CF5CD0CA96D6 which I confirmed with Brad.  When I unzip it, I get a file of 1949999616 bytes with SHA256 of ed3c54e3a293b086dab4b7f2b002e52bb5f074788ff85c6a2afca2c54dcbed5a.  The thing is, the first 1790 bytes of that file are all zero!  That seems unlikely to be a FAT file system no matter how I copy it on to my SD.  Unless my 313109M is different than your 313109 (no M?  Is that possible?) than this seems impossible.  I used the same process to write the NOOBS and that worked fine, so I don't think my process or utility is faulty.  But I'm totally at a loss as to how I could start with a file of the right SHA256 hash value and expand it without error to a file that starts with 1790 zero bytes and still be using the same bits as everyone else is.  Is there some way to get my hands on 313772?



That's OK. I confirm the same SHA-256, and the file does begin with zeros as you described. Using Win32DiskImager I can write it to a microSD card that boots in RPi3 just fine. (I don't know about HDMI, as I attach using RS-232 cable to get the console.)


----------



## -Rozi- (Feb 24, 2017)

Alathar said:


> Is there some way to get my hands on 313772?



I send an e-mail to RaspBSD maintainer a couple of days ago asking the same. No reply. Not sure I got the right address, though.

So, I did it myself:

Installed the VirtualBox

Set-up a FreeBSD-11-amd64 guest
Installed git
Installed crochet: mkdir crochet && git clone https://github.com/freebsd/crochet.git crochet
Checked-out FreeBSD-12-CURRENT (r314132): svnlite checkout crochet/src
Installed all required tools (preferably from ports collection; pkg repository is outdated for RPi3 builds):
aarch64-binutils-2.27_6,1
u-boot-rpi3-2017.01

Made a new config: cp crochet/config.sh.sample crochet/rpi3.config.sh
Edited crochet/rpi3.config.sh to suit my needs. If only I could get the configuration file from RaspBSD for a head start. 

Build the IMG file: cd crochet && ./crochet.sh -c rpi3.config.sh
Unfortunately, all U-Boot partition filenames were uppercase 8+3 FAT, so the image didn't boot. I fixed that by hand by comparing boot partitions between my and RaspBSD image. It booted then.

It took me a day, but it was fun.  Much to my wife's dismay. 

My observations about FreeBSD-aarch64-12.0-GENERIC-314132 after the first few hours:

Occasionally, it displays some diagnostic trace dump on the console about lock order reversal. Looks like some debugging stuff.

powerd does not start: powerd: no cpufreq(4) support -- aborting: No such file or directory

So far no core dumps. But I didn't have time to do some real stress-testing yet.


----------



## -Rozi- (Feb 24, 2017)

Alathar said:


> What about cooling instead of limiting the CPU speed?  Do you have the heat sink kit?  What about a tiny bit of active cooling?



I do have a heat-sink kit. But it seemed that the core dumps on r313109 were not caused by the temperature. Because I got some core dumps soon after the start of the "make -j4 buildworld" before CPU got hot.

Plus, the frequency of core dumps did increase, when I ran some USB intensive operations in parallel (like grep or find on the root partition).

I disconnected everything (no Ethernet, no USB) to keep interrupts as low as possible, and ran "make buildworls" in a single thread, without other activities in parallel. The build actually survived about 8 hours until it hit some error in the source code. It couldn't last for an hour before this. If I would manually heat the CPU meanwhile, and the build would remain stable, it could be a proof of an interrupt issue rather than a thermal one.


----------



## Alathar (Feb 24, 2017)

-Rozi- said:


> That's OK. I confirm the same SHA-256, and the file does begin with zeros as you described. Using Win32DiskImager I can write it to a microSD card that boots in RPi3 just fine. (I don't know about HDMI, as I attach using RS-232 cable to get the console.)


OK!  Well, that must be the problem, then.  I'd have not thought of that without your help.  Yes, I am trying to use the HDMI console.  Actually, I was hoping to boot it completely headless, and do everything via SSH.  Maybe I'll just unplug the HDMI and keyboard and mouse and see what happens with Ethernet only.  You see, I only have ONE USB/RS-232 adapter....  So if I plug that into the PI, then I don't have an RS-232 capable laptop anymore...  So, maybe I'll have to go out and buy a second USB/RS-232 adapter - which seems a little silly: Pi3 <-> USB <-> RS-232 splicer <-> USB <-> laptop....  And I still don't understand why Windows doesn't see the FAT32 boot partition...  Mystery upon mystery...  But THANK YOU for this help!  I really appreciate it.


----------



## -Rozi- (Feb 24, 2017)

Alathar said:


> OK!  Well, that must be the problem, then.  I'd have not thought of that without your help.  Yes, I am trying to use the HDMI console.  Actually, I was hoping to boot it completely headless, and do everything via SSH.  Maybe I'll just unplug the HDMI and keyboard and mouse and see what happens with Ethernet only.  You see, I only have ONE USB/RS-232 adapter....  So if I plug that into the PI, then I don't have an RS-232 capable laptop anymore...  So, maybe I'll have to go out and buy a second USB/RS-232 adapter - which seems a little silly: Pi3 <-> USB <-> RS-232 splicer <-> USB <-> laptop....  And I still don't understand why Windows doesn't see the FAT32 boot partition...  Mystery upon mystery...  But THANK YOU for this help!  I really appreciate it.



I was able to make RPi3 from RaspBSD operational without a serial console. It's like shooting birds at night, but I had some success:

Boot it with Ethernet connected.
Go to your DHCP server and see what IP your RPi negotiated. If your dynamic DNS registration works you should be able to "ping rpi3". "rpi3" is the default hostname. Remember to flush your local DNS cache if necessary.

SSH to raspberry@rpi3 or raspberry@<ip address>
sudo root
Configure static IP, etc. and reboot ...
I was dismayed not to have HDMI support at first too. But when I thought about it - the serial console is so much better for headless embedded solutions. You can connect to your RPi using a laptop and a cheap USB-to-serial cable. Makes it easy to service it in-place at those remote corners of your house.

I am using USB-to-serial cable like this: https://www.adafruit.com/products/954 (got mine from China web store for less than $5 - but waited for it to arrive more than a month)

Instructions are here: http://elinux.org/RPi_Serial_Connection


----------



## Alathar (Feb 24, 2017)

OK.  Time for me to eat some crow.  It was my process all along.  The windows dd is apparently just not the tool for the job.  I switched from using "dd" to Win32 ImageWriter, and now it boots just fine, and shows a FAT32 file system from windows.  Hopefully, someone can learn from my experience!  Do not use windows "dd" to write the .img file to the SD card.  Use ImageWriter instead.  I booted it with and without the HDMI/USB keyboard.  It is running with neither right now - I booted it with only network and power, and am managing it via SSH.

Thanks to all who took the time to read and consider my situation!

Now - in the meantime, I got rather fond of the Raspbian GUI environment.  Might have to buy myself another Pi for that as this one has a purpose.  Is there a project to get that running on RaspBSD?  Maybe I could contribute?


----------



## Alathar (Feb 24, 2017)

Maybe this isn't the right group to be chronicling this, but I wanted to document this somewhere.  "pkg update" ran out of space in /tmp, which I was was a memory disk, so I simply dismounted it, then I was able to do the "pkg update" (after following the directions on http://www.raspbsd.org/raspberrypi.html to make sure that I got the FreeBSD 11 packages and for the right processor architecture).


----------



## mentaluproar (Mar 5, 2017)

I can't get pkg working at all.  I also ran out of space in /tmp when building octoprint from git.

Has anyone been able to get BSD to boot via USB?  I can do it with Linux.  SD cards are slow and unreliable, so I'd like to skip them.


----------



## -Rozi- (Mar 5, 2017)

mentaluproar said:


> I also ran out of space in /tmp when building octoprint from git.



Turning off all RAM mounted filesystems in /etc/fstab is one of my first things to do when preparing an RPi. Even pkg install fail on me when /tmp is so small. 



mentaluproar said:


> I can't get pkg working at all.



Following the instructions published at RaspBSD, I can get pkg to bootstrap and work. Here are the instructions:


> To bootstrap pkg, run:
> 
> 
> ```
> ...


----------



## mentaluproar (Mar 5, 2017)

I tried those raspBSD instructions.  It didn't work.  I'll give you the error message when I get home later.  I'm leaving it building ports right now.


----------



## -Rozi- (Mar 5, 2017)

mentaluproar said:


> I tried those raspBSD instructions.  It didn't work.  I'll give you the error message when I get home later.  I'm leaving it building ports right now.



Keep in mind the 313109 release is unstable. I got random core dumps while compiling: Raspberry Pi 3 img?

The 313772 indeed fixed the crashing. Unfortunately, images I prepare using crochet does not load I2C and bcm2835_cpufreq0 drivers. Brad Davis of RaspBSD must have tweaked the image somehow. I am trying to get thru to him to get some help...


----------



## acheron (Mar 5, 2017)

The cpufreq problem is probably fixed by https://svnweb.freebsd.org/base?view=revision&revision=314672


----------



## -Rozi- (Mar 5, 2017)

acheron said:


> The cpufreq problem is probably fixed by https://svnweb.freebsd.org/base?view=revision&revision=314672



I shall give it a try. However, this patch is an hour fresh, but the image released on RaspBSD is one-month old.

I hope this is "the" customisation RaspBSD made to the r313109 to render cpufreq operational on RPi3.


----------



## mentaluproar (Mar 6, 2017)

I was able to make octoprint compile by using an external USB drive with a 2 gig partition as the replacement /tmp.  ran fine after that.


----------



## mentaluproar (Mar 8, 2017)

Has anyone been able to get the camera working in 64 bit mode?


----------



## acheron (Mar 8, 2017)

It's not possible as of today, the VCHI interface was designed for a 32-bit OS.


----------



## mentaluproar (Mar 8, 2017)

So there's no way to run this without building it to run the SOC in 32bit mode?


----------



## acheron (Mar 8, 2017)

Yes


----------



## mentaluproar (Mar 8, 2017)

I cant get firefox running on this either.  seg fault


----------



## -Rozi- (Mar 9, 2017)

acheron said:


> The cpufreq problem is probably fixed by https://svnweb.freebsd.org/base?view=revision&revision=314672



Nope, it does not fix it. Comparing dmesg:

The RaspBSD image loads the I2C and bcm2835_cpufreq0 device drivers.
Stock FreeBSD 12.0-CURRENT r314948 still doesn't. I believe I should configure kernel or U-Boot somehow to force it to load bcm2835_cpufreq0.


```
# service powerd start
Starting powerd.
powerd: no cpufreq(4) support -- aborting: No such file or directory
/etc/rc.d/powerd: WARNING: failed to start powerd
```


----------

