# Raspberry Pi 2



## Jayton Garnett (Feb 6, 2015)

So I've just received my Pi2 and the standard 10.1 image from the official site doesn't boot.
Should it?

Last time I built the source using crochet, but I thought it would be easier to use the official image.

Has anyone else got one yet and tried it out?


----------



## Jayton Garnett (Feb 7, 2015)

Well I replaced start*.elf fix*.dat and bootcode.bin and now get the colourful boot screen and red LED on the board, but nothing more.

EDIT: Forgot to say I replaced those files with the latest firmware files from github, which were updated 3 days ago.


----------



## Trackzero (Feb 9, 2015)

Did exactly the same and also got the 'rainbow' screen.. Let me know if you have any luck finding a solution. I'll do the same of course ;-)

Cheers!

Rick


----------



## tetragir (Feb 9, 2015)

Hi all,

I also got to the "rainbow screen", but no further, and I'm also looking for a solution. I'll update once I've found one.

Tetragir


----------



## mmediouni (Feb 9, 2015)

The Raspberry Pi 2 uses a different CPU, a Cortex-A7 (quad-core) with a different PERI_BASE for the ARM(not for the VC4 which was able to support 1GB of RAM on an old Pi since the beginning).
-- that is expected, even GNU/Linux has two different kernels, kernel.img for BCM2835, kernel7.img for BCM2836.


----------



## mmediouni (Feb 9, 2015)

It is weird that an old blob (start.elf) does not print the rainbow screen (because all my VC4-side programs only needed updating bootcode.bin or adding the good RAM settings to my own one).


----------



## mmediouni (Feb 9, 2015)

tetragir said:


> Hi all,
> 
> I also got to the "rainbow screen", but no further, and I'm also looking for a solution. I'll update once I've found one.
> 
> Tetragir


It should not be easy as U-boot needs first to have BCM2836 support...


----------



## tetragir (Feb 9, 2015)

mmediouni said:


> It should not be easy as U-boot needs first to have BCM2836 support...


I understand, I guess we'll have to wait until it happens.
Thanks for clarifying this.


----------



## Jayton Garnett (Feb 9, 2015)

I found on the Raspberry Pi forums someone asking the same question and it was said the uboot needs to be updated, I'm not sure if this is a trivial thing for the devs or not, I suspect not and probably not on their top prioritories. I'm hoping it will be fairly soon, as I'd like to crack it open and start using it, I really don't want to use raspbian or some other inferior OS. So for now I'm just running my original Pi (which seems to crash every few days).


----------



## mmediouni (Feb 10, 2015)

Jayton Garnett said:


> I found on the Raspberry Pi forums someone asking the same question and it was said the uboot needs to be updated, I'm not sure if this is a trivial thing for the devs or not, I suspect not and probably not on their top prioritories. I'm hoping it will be fairly soon, as I'd like to crack it open and start using it, I really don't want to use raspbian or some other inferior OS. So for now I'm just running my original Pi (which seems to crash every few days).



It should be not too hard as only the CPU has changed][(only CPU cache routines and company, every driver works the same without modification][(except changing the address base).


----------



## mmediouni (Feb 10, 2015)

Plan 9 is already ported to the BCM2836, with GPIO,video,USB,and all!
Really, I see bringing FreeBSD to the Pi2 as a one-day effort.


----------



## tetragir (Feb 11, 2015)

mmediouni said:


> Plan 9 is already ported to the BCM2836, with GPIO,video,USB,and all!
> Really, I see bringing FreeBSD to the Pi2 as a one-day effort.


Let's hope that it'll happen soon.
I'll test it happily.


----------



## Jayton Garnett (Feb 12, 2015)

I think its more of a case that a dev(s) would need to get one and make the changes required.

Fingers crossed they have one on order / just need to fire it up


----------



## kgadek (Feb 15, 2015)

Is anyone working or willing to work on this one? I can't help with implementation, but if any donation is required (for buying RPi 2), I could participate.


----------



## tobik@ (Feb 15, 2015)

See this thread on freebsd-arm https://lists.freebsd.org/pipermail/freebsd-arm/2015-February/010230.html 

In short, yes somebody is working on it.


----------



## pez (Mar 20, 2015)

anyone know if there's been any progress on this?


----------



## sgeos (Mar 20, 2015)

I'm pretty sure the Raspberry Pi 2 can not boot FreeBSD yet.  As far as I have been able to determine, BCM2836 support and u-boot support are being worked on but are not ready.  Competing priorities for the developer's time are unclear.


----------



## tetragir (Mar 22, 2015)

In the meantime, NetBSD has added support for the Pi2.
The announcement: https://blog.netbsd.org/tnf/entry/raspberry_pi_2_support_added


----------



## Nasim (Apr 27, 2015)

Hi ,
Just got my Raspberry Pi 2 and noticed that FreeBSD won't work on it, is there any new news on it?


----------



## tobik@ (Apr 28, 2015)

https://wiki.freebsd.org/FreeBSD/arm/Raspberry Pi#What_works

https://wiki.freebsd.org/FreeBSD/arm/Raspberry Pi 2 image


----------



## Nasim (Apr 29, 2015)

Dear Tobik,
Thanks for the links, however in the instruction provided in the second link, where did you got rpi2.img from? The truncate only limits its size.


----------



## tobik@ (Apr 30, 2015)

No, `truncate` creates an empty image of the given size (it does this when the filename you give it does not exist). It is filled in the next steps.


----------



## Nasim (Apr 30, 2015)

Dear Tobik
I tried the instruction, freebsdFreeBSD comes up but its fails to load the kernel:
	
	



```
Kernel args: [null]
```
And it turns off. Is there anything that I am missing in the instructions?
Thanks.


----------



## loos (May 3, 2015)

HDMI issue has been fixed.

Build an image with a fresh -head and it will work.

The RPi 2 port is very new and under heavy development, a few things might not work yet, so, be aware of slippery floor.


----------



## raycherng (May 12, 2015)

FreeBSD 11-CURRENT Raspberry Pi 2 snapshot image is coming

ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/


----------



## Bex (May 12, 2015)

Booted it and managed to run it for a short while before it went into panic, and after that it panics quite frequently. I'll get a screen shot next time. Not very stable currently. Is there any chance to get the 10-STABLE running on the Raspberry Pi 2?


----------



## tobik@ (May 12, 2015)

Bex: I get a panic after writing something bigger than a few bytes to the SD card. Do you get this panic as well?

```
sdhci_bcm0-slot0:  Controller timeout
sdhci_bcm0-slot0: ============== REGISTER DUMP ==============
sdhci_bcm0-slot0: Sys addr: 0x0067ae00 | Version:  0x00009902
sdhci_bcm0-slot0: Blk size: 0x00000200 | Blk cnt:  0x0000001a
sdhci_bcm0-slot0: Argument: 0x02617d40 | Trn mode: 0x0000193a
sdhci_bcm0-slot0: Present:  0x01ef0106 | Host ctl: 0x00000003
sdhci_bcm0-slot0: Power:    0x0000000f | Blk gap:  0x00000000
sdhci_bcm0-slot0: Wake-up:  0x00000000 | Clock:    0x00000307
sdhci_bcm0-slot0: Timeout:  0x0000000e | Int stat: 0x00000000
sdhci_bcm0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
sdhci_bcm0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci_bcm0-slot0: Caps:     0x00000000 | Max curr: 0x00000001
sdhci_bcm0-slot0: ===========================================
mmcsd0: Error indicated: 1 Timeout
g_vfs_done():mmcsd0s2a[WRITE(offset=20398571520, length=32768)]error = 5
growfs: wtfs: write error: 39840960: Input/output error
mmcsd0: Error indicated: 1 Timeout
g_vfs_done():mmcsd0s2a[READ(offset=65536, length=4096)]error = 5
panic: failed to unsuspend writes on /
cpuid = 1
KDB: enter: panic
[ thread pid 664 tid 100065 ]
Stopped at      $d.7:   ldrb    r15, [r15, r15, ror r15]!
db>
```
This is on FreeBSD 11.0-CURRENT r282767.

The same SD card works fine under Linux. So I don't think that the card is faulty.
I wonder if putting the root file system on a USB stick for now will be more stable.


----------



## loos (May 13, 2015)

Tobik,

Could you try the patch at https://lists.freebsd.org/pipermail/freebsd-arm/2015-May/011313.html ?

Let me know if this helps.


----------



## tobik@ (May 13, 2015)

loos said:


> Tobik,
> 
> Could you try the patch at https://lists.freebsd.org/pipermail/freebsd-arm/2015-May/011313.html ?
> 
> Let me know if this helps.


I does, thank you. I applied your(?) patch to r282823 and was able to successfully execute `service growfs start`, bootstrap pkg, and install a couple of packages now.


----------



## Bex (May 13, 2015)

That's the one I had as well. I'll give the patch a go.


----------



## brd@ (May 14, 2015)

Everything is stable for me as of a few weeks ago.

Official images are available from: http://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/


----------



## Rami (May 15, 2015)

Today I installed *v11.0* *for* *raspberry Pi 2* *and it works *brilliantly: ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0

No errors, kernel panic or anything. It has so far an uptime of 7 hours, and no issues at all.

Wifi dongle (Vilros) was detected, however I had to `cp /boot/loader.rc.sample /boot/loader.rc` as well as tweak the /boot/loader.conf for the wifi dongle, mine was just:


```
legal.realtek.license_ack=1
if_urtwn_load="YES"
```

and a reboot aftewards.

So far, wireless works (standard ifconfig and wpa_supplicant setup). SSH works. 2-factor Google authenticator works.

If you have any questions, please let me know.

Cheers from London
Rami


here: /


----------



## Rami (May 17, 2015)

Are you able by any chance to test the sd card in another rpi2? Just to discard any hardware/power supply issue?

(might be that you are already using that rpi2 for other images, so it might not be useful my reply!)




bthomson said:


> I tested this image: http://ftp.freebsd.org/pub/FreeBSD/...URRENT-arm-armv6-RPI2-20150509-r282694.img.xz
> 
> However, it goes into boot loop for me. Here is the log:
> 
> ...


----------



## Jefrey S. (May 17, 2015)

Not sure it's the right place to ask but I'm a recent FreeBSD convert with a few days experience on other hardware and never really had any issues. Been trying to get the Pi 2 version up to just having a desktop and browser, but failing at the first hurdle because 11.0 is telling me that xorg-minimal doesn't exist for it. Any clues..?


----------



## tetragir (May 18, 2015)

Jefrey S. said:


> Not sure it's the right place to ask but I'm a recent FreeBSD convert with a few days experience on other hardware and never really had any issues. Been trying to get the Pi 2 version up to just having a desktop and browser, but failing at the first hurdle because 11.0 is telling me that xorg-minimal doesn't exist for it. Any clues..?


Hi,
FreeBSD 11.0-CURRENT for RaspberryPi 2 is still experimental and therefore it does not guarantees 100% functionality.

About x11/xorg-minimal, if you are trying to install it with pkg, it is possible that it is not available from packages, maybe you should try compiling from ports, although it would take some time, given that the CPU is not powerful enough.

If you want to use your RPi2 to browse the internet (or just to have a GUI...), my guess is that Linux is ideal for you (Raspbian, etc.).


----------



## Jefrey S. (May 18, 2015)

Totally aware of how experimental it is, and I just happen to prefer FreeBSD where possible and find it an interesting alternative in general. I know it exists for 10.1 on the older Pi so assumed I was likely doing something wrong here. Guess I can dig out my model B 512mb revision and play around with that in the meantime. Perhaps I will have a shot at compiling it. I have four devices at this point running FreeBSD and am very keen on getting it going on the Pi 2 as I enjoy figuring out alt-OS's. There's just a lot of things about FreeBSD that appeal to me, and I think it will make a great companion to the Pi 2 some day. Everyone working on it? Keep at it!


----------



## NewGuy (May 18, 2015)

I tried running FreeBSD 11-Current on my Raspberry Pi 2 today. The first time I started it up, the Pi was headless. Networking and OpenSSH were running and I could connect to the Pi over the network. I couldn't get logged in though. Tried a bunch of different passwords, including an empty password (just pressed Enter), but could not get logged in remotely.

Later I hooked the Pi up to a monitor and tried booting FreeBSD 11. The Pi shut itself off after about 20 seconds. I tried half a dozen times to boot the Pi with and without any devices attached. It always shut off within 20 seconds and provided no video output.

What I found weird was the first time the Pi obviously booted okay since it was accepting remote login attempts. But all future boot ups crashed in seconds, resulting in the Pi shutting off.

Does FreeBSD's ARM port do anything to change its files or disk layout? Trying to figure out why the OS would only boot once and then crash on each subsequent boot.

Also, am I correct that the password is blank and that it is not possible to login remotely with the default image?


----------



## junovitch@ (May 18, 2015)

NewGuy said:


> ....
> Does FreeBSD's ARM port do anything to change its files or disk layout? Trying to figure out why the OS would only boot once and then crash on each subsequent boot.
> ...



Assuming you are using the ARM images, the /etc/rc.d/growfs script kicks in on first boot to resize the partition and file system fit the disk.

See https://svnweb.freebsd.org/base/head/etc/rc.d/growfs?view=markup


----------



## bthomson (May 19, 2015)

Rami said:


> Are you able by any chance to test the sd card in another rpi2? Just to discard any hardware/power supply issue?



Thanks, that solved the problem! Motherboard USB power is enough for RPI1, but not for RPI2!

So it is working splendidly now, thanks to everyone for your hard work! It is very much appreciated.



NewGuy said:


> What I found weird was the first time the Pi obviously booted okay since it was accepting remote login attempts. But all future boot ups crashed in seconds, resulting in the Pi shutting off.



The same thing often happens with the Pi 1 images as well. It is not so reliable just yet, give it time.


----------



## NewGuy (May 19, 2015)

I recopied my FreeBSD 11-Current image to the microSD card and gave it another try. This time it worked. I realized what probably happened before was FreeBSD turns off the Pi's external light while Raspbian leaves the light on, so it looks like the Pi is powering off. It takes a while for my montor to detect a signal from the Pi when its running FreeBSD too, so the combination of a blank monitor and no light make it seems like the Pi wasn't on-line. So the first time around I probably interrupted the Pi's power while the file system resize was in progress.

Anyway, I got the Pi running, set up an account I can ssh into and things seem to be running smoothly.

At this point the one thing I feel I am missing is ZFS. When the Pi is running Raspbian, I can access my ZFS-managed devices. It seems the FreeBSD 11 image doesn't include a ZFS module or the kernel source code.

Does anyone here know if the FreeBSD ZFS module will build on the Pi? Or if there is a repository where I can download a pre-built ZFS arm module? I'd rather not have to rebuild the kernel from scratch on the Pi.

I'd like to head off any comments about ZFS not working well with the Pi's limited hardware. I've been managing 2TB of data on my Pi using Raspbian and ZFS for a month now without any problems.

Update: I was able to install the zfs module by downloading the FreeBSD source code and compiling the following modules in the sys/modules direcotry: opensolaris, zlib and zfs. Copying the resulting .k* files to the /boot/kernel directory allowed me to load the ZFS module and access my external hard drive that is managed by ZFS.

Further, I have discovered that while I can access this external drive, some copy operations cause my Pi to completely hard crash. For example, I can copy any one file I like, but copying a whole directory (ie cp * /to/destination/) brings down the operating system.

I'm also noticing sometimes files I create on the root partition (formatted with UFS) do not always survive the crash. Perhaps UFS isn't syncing in time to save its data before the crash happens. Still working on this.

Memory consumptionis fairly low, the whole Os, ZFS included, is using around 200MB of RAM.

Second update: I have found I am able to create/move/delete many files at once on either my ZFS volume OR the UFS partition. The crash only happens, it seems, when I try to bulk copy files from one file system to the other, in either direction. I can, for example, unpack the ports tree or copy the kernel source code around to various locations, so long as I stay within the boundaries of the respective file systems.


----------



## bthomson (May 19, 2015)

Thanks for your reports, NewGuy! It is good to know that ZFS can be installed, but is unstable for some reason. I hope the crash did not harm your ZFS pool!

I will share some of my observations having run the Pi 2 for an evening... Surprisingly, I found the network I/O performance was actually worse than the Pi 1 unless the device is running in turbo mode, and then it was almost the same (but still a little bit worse).

Unfortunately the performance is much worse than I'd hope, maxing out at less than 10 megabits/s (about 10% of the theoretical maximum of the 10/100 adapter). While trying to figure out the cause I discovered it is probably because unlike Linux, FreeBSD is using PIO mode instead of DMA mode for USB transfers. See the links below for some more info. Since this is not a CPU limitation, the beefier Pi 2 does not improve the situation.

So I was not so impressed with Pi 2 on FreeBSD at this point. Oh well, maybe one day.

http://kernelnomicon.org/?p=275#comment-5394
https://lists.freebsd.org/pipermail/freebsd-arm/2013-July/006012.html
https://lists.freebsd.org/pipermail/freebsd-arm/2013-July/006008.html


----------



## NewGuy (May 19, 2015)

The crashes do not appear to have harmed my ZFS zpool, thanks for the concern. The pool passed its scrub test.

I found some further interesting quirks with running FreeBSD+Pi+ZFS. Since there aren't any official packages for the ARM architecture, I decided to download the ports tree and install software from there. I ran into these interesting issues:

1. `portsnap fetch` does not work, portsnap(8) reports the server's meta-data is wrong and refuses to download the ports tree. I checked my portsnap configuration file and it is the same as my portsnap config file on other FreeBSD servers where portsnap works.

2. I downloaded and unpacked a tarball of the ports collection. This tarball unpacked fine on the ZFS volume. I could then go into the ports tree, open Makefiles, cat patches and confirm everything is there. However...

3. When I try to run `make` in any of the port directories, make reports no target was found. If I then try to open the Makefile, it is empty. `ls -l` shows the file is still the same size, but `vi` and `cat` show an empty file.

4. I was curious to see if this meant ZFS was not writing data properly or not reading data properly where the Makefiles were concerned. I exported my ZFS pool and imported it on another operating system (also running on the Pi). The data is definitely there and readable from Raspbian on the same ZFS volume. so the files which appeared empty in FreeBSD are there and whole and readable in Raspbian.

I'm not quite sure what to make of this. It seems I can create files, many files, and read them on the ZFS volume from FreeBSD. I can read them, I can export/import the pool and read the data from another OS. However, running `make` on three different ports all resulted in errors of "no target found" and I was unable to read the Makefile from within FreeBSD again. I can read the files fine in Raspbian though.

A `zpool scrub` shows the pool is fine. I haven't seen anything quite like this before. It seems FreeBSD+ZFS+RPi works about 95%, but data is sometimes corrupted while being read/accessed. Long story short: FreeBSD+ZFS appears to work on the Pi, but I wouldn't trust it.

Update: Wondering if this might be an allocation/versioning issue. Raspbian is probably using an older version of ZFS and it used 512 byte allocations. FreeBSD reports it wants 4096 byte allocations and runs a newer version. Planning to test this idea with another (spare) drive to see if I can duplicate the problem and/or find a solution.


----------



## NewGuy (May 21, 2015)

Another update: I decided to experiment to see if the system crashes I was experiencing on FreeBSD 11-Current (arm) were due to incompatibilties between the Raspbian ZFS file system and the FreeBSD implmentation.

I grabbed a spare hard drive and plugged it into my Raspberry Pi 2 running Raspbian. I formatted the disk with ZFS and copied a directory tree onto the new ZFS volume. This worked fine and I could access my files, copy them back, etc.

Then I swapped out my Raspbian SD card for my FreeBSD card and booted the same Pi. I imported the new ZFS volume and found I could browse the file system, but copying more than one file at a time to or from the ZFS volume  would cause the operating system to immediately crash. In other words, I've reproduced the copying crash using multiple external drives at this point.

My next step was to destroy the Raspbian-created ZFS file system and create a new file system on the same external drive using FreeBSD's implementation of ZFS. The file system was created. Here is where it gets interesting.

With the FreeBSD-created ZFS volume I was able to copy large trees of files to the ZFS volume from my UFS partition. However, when I tried to copy files back _from_ the ZFS volume to my UFS partition, the operating system immediately crashed.

I booted into FreeBSD again and performed another experiment, and this is where it goes from interesting to just plain weird. I copied kernel soruce code onto the ZFS volume. If I go into any directory and run "cat Makefile" I can see the contents of the Makefile. However, if I run "make" then it spits out an error saying there is no target. If I run "cat Makefile" again, there is no data in the Makefile. The command "ls -l" shows the file is still its full, normal size, but I cannot read any data in the file, it appears to contain zero bytes. I thought the file might be truncated, but it's not. If I use

```
zfs umount MyData
zfs mount MyData
```
and go back into the same source code directory, the Makefile is there and I can read it and edit it. But if I run "make" again the contents of the Makefile disappear until I umount/mount the ZFS pool again.


To sum up, there are three problems here:
1. FreeBSD and Raspbian have slightly incompatible ZFS implementations.
2. Running "make" on source in a ZFS pool temporarily wipes the Makefile. This makes it impossible to build ports or kernel modules or other items from source code in ZFS. Building source using "make" on UFS does work.
3. Copying _to_ a ZFS volume works, but copying from ZFS to UFS causes an immediate and total system failure.

Question 1: Can anyone else reproduce these problems?

Question 2: Which mailing list or component team should I bring this up to? I'm not sure if these issues qualify as Make bugs, ZFS bugs or ARM bugs.


----------



## SmallVoice (Jun 18, 2015)

> Also, am I correct that the password is blank and that it is not possible to login remotely with the default image?



Hi Newguy, I'm trying to run freebsdFreeBSD on my Raspberry Pi 2. I wrote the image FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20150601-r283896.img to my microsd card, it booted and SSH responded, but I wonder what's the default user name and password?


----------



## NewGuy (Jun 19, 2015)

The username is root and the default password is blank. However, root logins are blocked through OpenSSH by default. You need to boot up the Pi with a keyboard and monitor attached and create a new user account before you can login remotely.


----------



## SmallVoice (Jun 19, 2015)

NewGuy said:


> The username is root and the default password is blank. However, root logins are blocked through OpenSSH by default. You need to boot up the Pi with a keyboard and monitor attached and create a new user account before you can login remotely.


Thanks, now I can login through SSH with an ordinary username.


----------



## demiurgent (Jun 23, 2015)

I've gone ahead and put both FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20150601-r283896.img and FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20150618-r284544.img on microSD cards, installed them in my RPi 2, and booted with a monitor and keyboard plugged in. However, both are requiring passwords -- leaving it blank for the root password isn't working, even from console. Is there some other trick or hoop I may be missing?


----------



## zapata (Jun 24, 2015)

According to arm_create_user() in src/release/tools/arm.subr the logins are:

```
login: root
password: root

login: freebsd
password: freebsd
```
The 2nd should work over ssh.


----------



## wd8kni (Aug 6, 2015)

It's got to be simple.
Headless Pi2.
Burnt the image.
Booted up and `ssh`'d to box with user/password of "freebsd"/"freebsd".
`su -`

Won't accept root password of root as above message says.

What am I missing?


----------



## cpm@ (Aug 8, 2015)

The RPi wiki page states as follows:


> 2015-06-26: The default passwords for the images are freebsd/freebsd and root/root



I'm not sure if the passwords has been changed since then, but in case of doubt, you can ask in the freebsd-arm mailing list.


----------



## wd8kni (Aug 8, 2015)

cpm said:


> The RPi wiki page states as follows:
> 
> I'm not sure if the passwords have been changed since then, but in case of doubt, you can ask in the freebsd-arm mailing list.


Thanks for the response, these were the passwords that other reported to work on June 24th.
All of my servers are FreeBSD so really want this to work. I have 5 Pi2 that I use for other networking stuff, so wanted to get them off Linux and on BSD also. I have been following threads on this subject for months before I felt it might be ready. It surely it is not if we can't even get default passwords without joining a mail list. How can Linux get this working and we can't... wish I had more time. Thanks for the suggestion. Fred


----------



## sysconfig (Aug 8, 2015)

wd8kni said:


> It surely it is not [ready] if we can't even get default passwords without joining a mail list. How can Linux get this working and we can't... wish I had more time. Thanks for the suggestion. Fred



You are being a bit dramatic. 11-CURRENT works just fine on RPi2, and now you know the possible password combinations. (Another one I have come across  a couple of weeks ago: root with empty password)  If you _really_ were as keen to get it running as you say, you wouldn't let this put you off. This has very little to do with FreeBSD vs Linux. Plus, you could mount the image and customise things like passwords before booting it on the RPi2.


----------



## wd8kni (Aug 8, 2015)

Actually not dramatic at all, sure there are lots of things I could do to get this to work. But the simplest thing is to put the Raspberrian SD card back into the Pi2 till someone dealing with this image can write up something with passwords that work. BTW, if you don't know the root password that was set on the image you don't have as you called it "works just fine on RPi2".   Here is a device that has hit the world by storm, has sold 2.5 million units in 2 months, and FreeBSD will be one of the last OS to run on it.  Even winblows runs on it. BTW I am not a Linux guy been on Unix for the last 30 years... am also not inexperienced, just don't have time for another project that needs fixed before I can use it, when I can wait till someone publishes the information they should have already published. Fred


----------



## acheron (Aug 9, 2015)

wd8kni said:


> Actually not dramatic at all, sure there are lots of things I could do to get this to work. But the simplest thing is to put the Raspberrian SD card back into the Pi2 till someone dealing with this image can write up something with passwords that work. BTW, if you don't know the root password that was set on the image you don't have as you called it "works just fine on RPi2".   Here is a device that has hit the world by storm, has sold 2.5 million units in 2 months, and FreeBSD will be one of the last OS to run on it.  Even winblows runs on it. BTW I am not a Linux guy been on Unix for the last 30 years... am also not inexperienced, just don't have time for another project that needs fixed before I can use it, when I can wait till someone publishes the information they should have already published. Fred


Did you opened a PR for this issue?


----------



## jem (Aug 11, 2015)

I'm just about to order a Pi 2 to have a play around with.

Is it possible to run one with only the FAT partition containing the bootloader on the SD card, while the entire FreeBSD installation resides on a USB storage device (flash stick or HDD)?  Can the SD-card based loader be configured to find the kernel/modules and root filesystem on a different device?


----------



## TzunTzai (Aug 25, 2015)

NewGuy said:


> I recopied my FreeBSD 11-Current image to the microSD card and gave it another try. This time it worked. I realized what probably happened before was FreeBSD turns off the Pi's external light while Raspbian leaves the light on, so it looks like the Pi is powering off. It takes a while for my montor to detect a signal from the Pi when its running FreeBSD too, so the combination of a blank monitor and no light make it seems like the Pi wasn't on-line. So the first time around I probably interrupted the Pi's power while the file system resize was in progress.
> 
> Anyway, I got the Pi running, set up an account I can ssh into and things seem to be running smoothly.
> 
> ...




This is exactly what I was looking for. I'm replacing my previous ZFS backup server with FreeBSD on the Raspberry Pi 2. Although, instead of using cp to backup files, I'm using an rsync script.


----------



## NewGuy (Aug 25, 2015)

TzunTzai, have you been able to get files copied between UFS and ZFS devices? I'd like to know if the ZFS issues I experienced have been fixed in more recent releases.


----------



## joancatala (Oct 23, 2015)

I can confirm that 11-CURRENT is working on Raspberry Pi 2.

I downloaded the last image: ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0 (look for the version for RPI2)
I burned my microSD card.
I turn on the Raspberry Pi 2 and it starts correctly, a bit slow, but starts.

I'll do some changes and installations and I'll publish an article on my web site.
Thanks to everybody.


----------



## Flávio Martins Prado (Nov 4, 2015)

I am using 11.0 on raspi2 and I am very happy with it.
But I tried to build an image with crochet on 10.2 and it fail to download the /usr/src ... I need to use the same version on my desktop to build it, or I am missing something?


----------



## ronaldlees (Nov 10, 2015)

Flávio Martins Prado said:


> I am using 11.0 on raspi2 and I am very happy with it.
> But I tried to build an image with crochet on 10.2 and it fail to download the /usr/src ... I need to use the same version on my desktop to build it, or I am missing something?



No, you don't need the same version of source as what was used to build your desktop.  Crochet (and CURRENT FreeBSD) are really coming together to make easy-bake SD images for ARM SoC boards.

For the source, just do a:

`pkg install subversion
   svn co https://svn0.us-west.freebsd.org/base/head /home/ronald/src`

Note that the server occasionally times out.  That may be what happened to you.

Then, in the crochet directory, change config.sh and modify one line: 
	
	



```
FREEBSD_SRC=/home/ronald/src
```

That way, you can keep your /usr/src intact.  Crochet will use the home dir src.

BTW:  Using the latest source (as shown above) adds the raspi2 capability, or so it seems. It didn't work for me on FreeBSD 10.2.  I've built images for Raspi2, cubieboard2, and beaglebone with CURRENT source and Crochet, and I think it's really starting to shine.


----------



## junovitch@ (Nov 11, 2015)

ronaldlees said:


> ...
> `pkg install subversion
> svn co https://svn0.us-west.freebsd.org/base/head /home/ronald/src`
> ....



Please just use svn.FreeBSD.org now. That is a geographically distributed mirror that should just work. See https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/svn.html for more info.


----------



## ronaldlees (Nov 14, 2015)

junovitch@ said:


> Please just use svn.FreeBSD.org now. That is a geographically distributed mirror that should just work. See https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/svn.html for more info.


Thanks!  Have made a note in my crib-book.


----------



## ArtyBerne (Nov 20, 2015)

I want to know the details about the Raspberry Pi2. What are specifications of it?
What are all of its hardware component?
Also how it is different from Raspberry Pi?
What interfaces it includes?


----------



## tetragir (Nov 20, 2015)

Hi ArtyBerne, welcome to the forums.
You can find information about the Raspberry Pi and Pi 2 all over the internet.
The offical website: https://www.raspberrypi.org/
Wikipedia website: https://en.wikipedia.org/wiki/Raspberry_Pi


----------



## NewGuy (Dec 21, 2015)

I tried the latest snapshot for FreeBSD-CURRENT on the Raspberry Pi 2. The latest image does not boot on my Pi, images from earlier in the year do. Anyone else experiencing the same issue?


----------



## kattenjanson (Dec 22, 2015)

NewGuy said:


> I tried the latest snapshot for FreeBSD-CURRENT on the Raspberry Pi 2. The latest image does not boot on my Pi, images from earlier in the year do. Anyone else experiencing the same issue?


Seeing the same issue here with FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151217-r292413.img but havent had much time to investigate. I can only do headless boots connecting through ssh as well, so it kind of hampers my investigation attempts. Will try the image from november a bit later today to see if i can get that one to boot though.


----------



## SirDice (Dec 22, 2015)

Keep in mind that 11-CURRENT is a development version, which doesn't even build properly at certain times. You are bound to run into issues. Also note that ARM is still a Tier 2 platform but there's work being done on getting it to a Tier 1 status.

In short, expect breakage. Update often. Test to your heart's content. Report issues on the mailinglists.


----------



## idatum (Dec 28, 2015)

While trying to install gonzoua/freebsd-gpio for Python on a Raspberry Pi2 Model B, I got a build error due to an incorrect path:

```
unable to execute '/nxb-bin/usr/bin/cc': No such file or directory/nxb-bin/usr/bin/cc
```
Note the /nxb-bin directory. I took a look at /usr/local/lib/python2.7/_sysconfigdata.py, and the incorrect path is there (e.g.

```
'CC': '/nxb-bin/usr/bin/cc',
```

By removing /nxb-bin from all paths in _sysconfigdata.py, I was able to build and install the python gonzoua/freebsd-gpio.

Could this be caused by the installation of python2.7, without a required dependency?

I'm using FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151217-r292413.img.

Thanks - Joel


----------



## acheron (Dec 28, 2015)

idatum said:


> Could this be caused by the installation of python2.7, without a required dependency?


This isn't a dependency problem. To build packages for embedded arch (mips, arm, aarch64...) and to speed up the build process we use what we call 'native-xtools' (amd64 binaries that runs inside the arm jail thanks to binmisc). The native-xtools includes the compiler and a bunch of userland binaries (cf https://github.com/freebsd/poudriere/blob/master/src/share/poudriere/jail.sh#L358) and are stored in a 'non standard' location: /nxb-bin/. Some ports (python, perl, gnustep and maybe ruby) hardcode the full compiler path used at build stage in their 'config' file. There is no solution yet, you need to manually remove the nxb-bin prefix.


----------



## ronaldlees (Jan 19, 2016)

loos said:


> HDMI issue has been fixed.
> 
> Build an image with a fresh -head and it will work.
> 
> _The RPi 2 port is very new and under heavy development, a few things might not work yet, so, be aware of slippery floor_.



While iI've subscribed to various FreeBSD mailing list over the years, the activity on arm-freebsd is very impressive and encouraging.  The rate of change (especially relative to the Pi and Pi2) is going to make things bumpy for a while.  Finally got into the act myself, with a Pi2, and have been having fun.  Running Xorg with the i3 wm (or wmaker) is pretty smooth.  Some architecture related problems (part of that high  rate-of-change) need to be ironed out before the bigger apps will run.  The graphical browsers (like Webkit/Arora) compile OK, but seem to crash with issues that are IMO architecture-porting related.  But, it's all coming together very quickly.

I suggest that anybody with an ARM device should subscribe to the list - of course most of you who have bothered to visit this sub-forum have already done so...


----------



## NewGuy (Jan 19, 2016)

ronaldlees, Can you confirm whether ZFS support is implemented in the ARM port yet? Using ZFS modules was considered an add-on six months ago.


----------



## SirDice (Jan 20, 2016)

As far as I know there's no ZFS on ARM.


----------



## NewGuy (Jan 20, 2016)

I know ZFS can be compiled on ARM, I'm asking if anyone knows if it is enabled by default.


----------



## Zilon (Jan 20, 2016)

I am using an image from http://raspbsd.org/raspberrypi.html on my RPi2. ZFZ seems not to be enabled


----------



## Phishfry (Jan 21, 2016)

The NAS4Free site seems to say it was added to their ARM build.

http://forums.nas4free.org/viewtopic.php?t=8441

Starting ZFS support from 9.3.0.2.1353-20150306. (both Raspberry Pi and ODROID-C1)


----------



## Muahdib (Feb 17, 2016)

NewGuy said:


> Further, I have discovered that while I can access this external drive, some copy operations cause my Pi to completely hard crash. For example, I can copy any one file I like, but copying a whole directory (ie cp * /to/destination/) brings down the operating system.
> 
> ...
> 
> Second update: I have found I am able to create/move/delete many files at once on either my ZFS volume OR the UFS partition. The crash only happens, it seems, when I try to bulk copy files from one file system to the other, in either direction. I can, for example, unpack the ports tree or copy the kernel source code around to various locations, so long as I stay within the boundaries of the respective file systems.



Not sure if you played around with this, but I would restrict the ARC cache to a certain amount of memory (like, 100 or 200MB). It's not a real hardlimit, si it can go higher, but it would level of around this point. You get kernel panics when you are memory constraint and you do not limit the ARC. 

It may occur more often when you cross-filesystem copy your data, I imagine reading in UFS and writing to ZFS may wreak a little havoc in cache use.

best


----------



## NewGuy (Feb 19, 2016)

I will give limiting ARC a try the next time I can get FreeBSD -CURRENT to boot on my Pi. The last month the images for the RPi2 haven't been working for me, so I'll try later when we get closer to the 11.0 release date.

Update: My experiment with the Raspberry Pi 2 and FreeBSD -CURRENT continued this week. I downloaded the latest snapshot and was pleased to see FreeBSD -CURRENT boots on the RPi2 again. Everything seems to work and I was able to connect to the headless Pi.

Few other observations: 

1. The current snapshot of FreeBSD runs very very slowly on the Pi compared to earlier snapshots and compared to Raspbian. It's sluggish enough I wonder if only one of the four CPU cores is being accessed. Everything works, it just takes about five times longer with FreeBSD than Raspbian.

2. The ZFS utilities are included in the snapshot, but the kernel modules are not. This seems weird as there are references and userland utilities for ZFS scattered throughout the file system, but no kernel modules. I tried compiling the ZFS and OpenSolaris kernel modules from HEAD and neither of them compile. This seems to be a compatibility issue between the clang compiler and the latest source code.


----------



## gnoma (Apr 26, 2018)

Hello,

Since Raspberry Pi 2 can run ZFS are there any theoretical limitations that may stop it from booting from a zpool? 

Did anybody tried to create such image? I'm willing to try these days since I got my new Raspberry Pi 2 but still if somebody already did it I would appreciate  a hint or two. 

Thanks


----------

