FreeBSD ARM for Raspbery Pi


30 posts   Page 1 of 2   1, 2
by ezyclie » Fri Jan 18, 2013 10:20 am
Hi,

For anyone who is interested to try FreeBSD10-CURRENT for arm please download it here: http://www.freebsdarm.org

Keep in mind that this img based on FreeBSD10-CURRENT which is the “bleeding edge” of FreeBSD development and not ready for production yet.
Posts: 5
Joined: Fri Jan 18, 2013 6:29 am
by ezyclie » Fri Jan 18, 2013 12:37 pm
Sorry my server is down due to ethernet cable fault, I will fix it tomorrow.
Posts: 5
Joined: Fri Jan 18, 2013 6:29 am
by Cloudcentric » Fri Jan 18, 2013 1:01 pm
ezyclie wrote:Hi,

For anyone who is interested to try FreeBSD10-CURRENT for arm please download it here: http://www.freebsdarm.org

Keep in mind that this img based on FreeBSD10-CURRENT which is the “bleeding edge” of FreeBSD development and not ready for production yet.


Is this related to this posting ??

viewtopic.php?f=56&t=18770&p=246974&hilit=freebsd#p246974
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by ezyclie » Sun Jan 20, 2013 4:24 am
Hi,

The server is up now, sorry for any inconvenience due to cable fault.

Yes, its related to your post.
Posts: 5
Joined: Fri Jan 18, 2013 6:29 am
by Spid » Sun Jan 20, 2013 1:10 pm
Great it bots up fine and has USB P'n'P, but when try to install 'pkg' it fails.

I have never use BSD but willing to learn...
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm
by ezyclie » Sun Jan 20, 2013 1:44 pm
Hi, you can try with buikding ports yoursel eg: # cd /usr/ports/www/hiawatha && make install clean to install hiawatha webserver
Last edited by ezyclie on Sun Jan 20, 2013 1:46 pm, edited 1 time in total.
Posts: 5
Joined: Fri Jan 18, 2013 6:29 am
by ezyclie » Sun Jan 20, 2013 1:45 pm
Hi, you can try with building ports (pkg) yourself eg: # cd /usr/ports/www/hiawatha && make install clean to install hiawatha webserver
Posts: 5
Joined: Fri Jan 18, 2013 6:29 am
by Spid » Sun Jan 20, 2013 2:43 pm
ezyclie wrote:Hi, you can try with building ports (pkg) yourself eg: # cd /usr/ports/www/hiawatha && make install clean to install hiawatha webserver


I will come back to it when documentation is available, without a means of downloading packages it is just a basic command line.

Thanks for the effort............
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm
by JungleBoogie » Mon Jan 21, 2013 7:57 pm
I also posted this on the raspberrypi post....

Just so you know, friends…it appears that ntp is not enabled at boot

Add this in an /etc/rc.conf
ntpdate_enable=”YES”
ntpdate_flags=”-u -b”
ntpdate_hosts=”north-america.pool.ntp.org*”

* pick your correct location
http://support.ntp.org/bin/view/Servers/NTPPoolServers


When I booted up, it had a date of 15 January, fwiw.
Happy Hacking!
Posts: 35
Joined: Thu Sep 06, 2012 12:06 am
Location: Simi Valley, California
by jwhitehorn » Tue Jan 22, 2013 2:01 am
This is great news! I look forward to trying it out soon. :)
User avatar
Posts: 51
Joined: Mon Jan 07, 2013 7:25 pm
Location: Tulsa, OK
by Nr90 » Tue Jan 22, 2013 2:07 am
ezyclie wrote:Sorry my server is down due to ethernet cable fault, I will fix it tomorrow.

I guess there are some things that can bring down even something as stable as a BSD server ;)
Posts: 213
Joined: Sat Nov 26, 2011 12:39 pm
by Unhban » Tue Jan 22, 2013 3:52 pm
I'm trying to do a
Code: Select all
freebsd-update fetch

but getting
Code: Select all
Fetching public key from update.FreeBSD.org... failed.
No mirrors remaining, giving up.

I can ping update.FreeBSD.org
Code: Select all
ping update.FreeBSD.org
PING update2.FreeBSD.org (149.20.53.21): 56 data bytes
64 bytes from 149.20.53.21: icmp_seq=0 ttl=50 time=168.187 ms
64 bytes from 149.20.53.21: icmp_seq=1 ttl=50 time=169.580 ms

So if I now do a
Code: Select all
freebsd-update -v debug fetch

and get
Code: Select all
Fetching public key from update.FreeBSD.org... fetch: http://update.FreeBSD.org/10.0-CURRENT/arm/pub.ssl: Not Found
failed.
No mirrors remaining, giving up.

and do a
Code: Select all
fetch -vvv http://update.FreeBSD.org/10.0-CURRENT/arm/pub.ssl

I get
Code: Select all
scheme:   [http]
user:     []
password: []
host:     [update.FreeBSD.org]
port:     [0]
document: [/10.0-CURRENT/arm/pub.ssl]
---> update.FreeBSD.org:80
looking up update.FreeBSD.org
connecting to update.FreeBSD.org:80
requesting http://update.FreeBSD.org/10.0-CURRENT/arm/pub.ssl
>>> GET /10.0-CURRENT/arm/pub.ssl HTTP/1.1
>>> Host: update.FreeBSD.org
>>> User-Agent: fetch libfetch/2.0
>>> Connection: close
>>>
<<< HTTP/1.1 404 Not Found
<<< Date: Tue, 22 Jan 2013 15:27:48 GMT
<<< Server: Apache/2.2.15 (FreeBSD) mod_ssl/2.2.15 OpenSSL/0.9.8q DAV/2
<<< Content-Length: 222
<<< Connection: close
content length: [222]
<<< Content-Type: text/html; charset=iso-8859-1
<<<
offset 0, length -1, size -1, clength 222


404 Not Found

Not Found
The requested URL /10.0-CURRENT/arm/pub.ssl was not found on this server.

fetch: http://update.FreeBSD.org/10.0-CURRENT/arm/pub.ssl: Not Found

Is it too early for this to be in place for the Pi or something broken please? :)
Posts: 53
Joined: Sun Oct 14, 2012 10:58 am
by JungleBoogie » Tue Jan 22, 2013 6:56 pm
I don't think it fully setup. I was able to successfully fetch, extract, and update but can't whereis <package> or pkg_add -r <package>.
Happy Hacking!
Posts: 35
Joined: Thu Sep 06, 2012 12:06 am
Location: Simi Valley, California
by zxombie » Wed Jan 23, 2013 6:37 am
Unhban wrote:I'm trying to do a
Code: Select all
freebsd-update fetch


There is no support in the freebsd-update infrastructure for either ARM or development branches (e.g. 10-CURRENT). As such freebsd-update will fail on the Raspberry Pi.

JungleBoogie wrote:I don't think it fully setup. I was able to successfully fetch, extract, and update but can't whereis <package> or pkg_add -r <package>.

There is no official FreeBSD packages on any ARM platform. Also the pkg_* tools are deprecated on 10-CURRENT and has been replaced by pkgng.
Posts: 3
Joined: Wed Jan 23, 2013 6:23 am
by Unhban » Wed Jan 23, 2013 1:53 pm
Ta! Well now I've sorta followed the guide here to get the package manager pkg installed:

https://mebsd.com/make-build-your-freeb ... nager.html

I did a
Code: Select all
portsnap fetch update

This took some time (especially Verifying Snapshot) and installed 67Mb.

It told me at the end I should do
Code: Select all
portsnap extract

This made all the directories for all the packages and again took some time (in fact it took so long I almost lost the will to live).

Then I looked at my memory to see if I was close to full, but not so (this on a 4Gb card). It had gone up from 6% to 41%
Code: Select all
df -k
Filesystem     1024-blocks    Used   Avail Capacity  Mounted on
/dev/mmcsd0s2a     3155932 1185288 1718172    41%    /
devfs                    1       1       0   100%    /dev
tmpfs               523736       4  523732     0%    /tmp


Then I did a portsnap update command but it came back with already up to date. So back to the commands given in the URL:
Code: Select all
cd /usr/ports/ports-mgmt/pkg
make install clean

which all seemed to work well and took about ten minutes.

It suggested I did
Code: Select all
pkg2ng

which took a second to do. Using this command means that you now use the command pkgng and not pkg to update/add packages.

That's as far as I got owing to time problems (took over two hours!). Hope it helps someone.
Posts: 53
Joined: Sun Oct 14, 2012 10:58 am
by Spid » Wed Jan 23, 2013 3:47 pm
Thanks zxombie will try, this but first had to update the Time Setting, thank you jungleboogie ;)


portsnap fetch update

67MB download as above and took about 30 minutes and then received warning message on last two lines ;

/usr/ports was not created by portsnap.
You must run "portsnap extract" before running " portsnap update

Therefore undertook portsnap extract which creates the directories, seems going OK !
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm
by Unhban » Wed Jan 23, 2013 4:42 pm
Note from Dr Matthew J Seaman re. converting pkg to pkgng using pkg2ng:

Beware that running pkg2ng converts your system to use pkgng. This
makes the old pkg_tools commands (pkg_info, pkg_version, pkg_delete
etc.) useless -- they'll do nothing but whinge about a corrupted package
database. Once you've then started using pkgng to install or upgrade
packages, there isn't an easy way to revert to the old pkg_tools. So be
sure you mean it if you choose to run it.


Wish I hadnt done it now!
Posts: 53
Joined: Sun Oct 14, 2012 10:58 am
by zxombie » Wed Jan 23, 2013 10:50 pm
Unhban wrote:It suggested I did
Code: Select all
pkg2ng

which took a second to do. Using this command means that you now use the command pkgng and not pkg to update/add packages.

That's as far as I got owing to time problems (took over two hours!). Hope it helps someone.


You only need to tun pkg2ng if you have existing packages installed. After you do this you use the pkg command to manage packages on your system. pkg2ng will convert from the old pkg_* tools to the new pkg command so, for example, rather than running pkg_info you would run "pkg info". pkgng is the name of the project to rewrite the package management tools for FreeBSD, the command's name is pkg.
Posts: 3
Joined: Wed Jan 23, 2013 6:23 am
by Unhban » Thu Jan 24, 2013 2:40 pm
Thanks zxzombie for the correction, that explained it nicely.

I've just put nano on:
Code: Select all
cd /usr/ports/editors/nano
make install clean

When libiconv options came up I took them both.

It seemed to do some cleaning of memory at the end
Code: Select all
Installing nano-2.2.6... done
===>  Cleaning for pkg-1.0.6
===>  Cleaning for gettext-0.18.1.1
===>  Cleaning for libtool-2.4.2
===>  Cleaning for libiconv-1.14
===>  Cleaning for nano-2.2.6

and so memory usage went down from 44% to 43%, on a 4Gb SD card.

There was one message about a third the way through that said something to the effect of
Code: Select all
Run libtool --finish /usr/local/lib

At the end I just ran up nano and it worked OK, so will ignore this command for now!
Posts: 53
Joined: Sun Oct 14, 2012 10:58 am
by Unhban » Thu Jan 24, 2013 5:24 pm
Next!

I thought I'd have a look around and see if there were any repositories holding packages for the Pi. I found one on this page:
http://kernelnomicon.org/

With your browser have a look at
http://people.freebsd.org/~gonzo/arm/pkg/

You'll see what packages are available at the moment, not too many but as mentioned it does have git.

However, after I did a
Code: Select all
echo 'PACKAGESITE: http://people.freebsd.org/~gonzo/arm/pkg/' > /usr/local/etc/pkg.conf
pkg update

I got
Code: Select all
pkg: /repo.txz: Invalid URL scheme

Tried a few things but still the same. No matter, from the command line I did a
Code: Select all
setenv PACKAGESITE http://people.freebsd.org/~gonzo/arm/pkg/

and voila! pkg update command worked.

Of course, the official repository will eventually come on-line (?) so the above will need to be changed. I think the preference is to use the command
Code: Select all
setenv PACKAGESITE

(which sets it to nothing), and put the new repo site address in the /usr/local/etc/pkg.conf file and delete all else there, to start off with.
Posts: 53
Joined: Sun Oct 14, 2012 10:58 am
by rjgould » Tue Mar 19, 2013 5:51 pm
ezyclie wrote:Hi,

For anyone who is interested to try FreeBSD10-CURRENT for arm please download it here: http://www.freebsdarm.org

Keep in mind that this img based on FreeBSD10-CURRENT which is the “bleeding edge” of FreeBSD development and not ready for production yet.
Thanks for this.

Can I ask did you follow a set of instructions to produce the image? I'm curious if it would be particularly difficult to prepare an image for a 16GB card for example?
Posts: 1
Joined: Tue Mar 19, 2013 5:49 pm
by pettefar » Thu Mar 21, 2013 3:37 pm
I'm running this - the 8GB version. Having fun. I did a portsnap fetch to get the /usr/ports stuff.

Looking for gmake now so I can build an xymon client.

Cheers,

Nick
Dublin
User avatar
Posts: 16
Joined: Thu Jul 12, 2012 9:53 pm
by pettefar » Sun Mar 24, 2013 1:47 pm
I found gmake in the /usr/devel directory so made that OK and then made the freeBSD xymon client which is running fine now!

I am currently installing python from /usr/ports/lang.

Reported RAM is only 128MB - is this 256/2 and 128 for swap? Need to utilise the full 512MB of modern Pis.
User avatar
Posts: 16
Joined: Thu Jul 12, 2012 9:53 pm
by pettefar » Tue Mar 26, 2013 3:51 pm
ssh keeps sort of closing down. After a reboot I can log in from various places but after a while it will only allow two logins and all others are refused. After "/etc/rc.d/netif restart" it works properly again for a while.
User avatar
Posts: 16
Joined: Thu Jul 12, 2012 9:53 pm
by pettefar » Tue Mar 26, 2013 4:04 pm
I have installed python. Is there a GPIO library or utility available?

$ uname -a
FreeBSD bsdpi 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r248313M: Fri Mar 15 13:42:19 SGT 2013 root@fbsd10:/usr/obj/arm.armv6/usr/src/sys/RPI-B arm
$
$ python -V
Python 2.7.3
$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/local/lib/python2.7/site.pyc matches /usr/local/lib/python2.7/site.py
import site # precompiled from /usr/local/lib/python2.7/site.pyc
# /usr/local/lib/python2.7/os.pyc matches /usr/local/lib/python2.7/os.py
import os # precompiled from /usr/local/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /usr/local/lib/python2.7/posixpath.pyc matches /usr/local/lib/python2.7/posixpath.py
import posixpath # precompiled from /usr/local/lib/python2.7/posixpath.pyc
# /usr/local/lib/python2.7/stat.pyc matches /usr/local/lib/python2.7/stat.py
import stat # precompiled from /usr/local/lib/python2.7/stat.pyc
# /usr/local/lib/python2.7/genericpath.pyc matches /usr/local/lib/python2.7/genericpath.py
import genericpath # precompiled from /usr/local/lib/python2.7/genericpath.pyc
# /usr/local/lib/python2.7/warnings.pyc matches /usr/local/lib/python2.7/warnings.py
import warnings # precompiled from /usr/local/lib/python2.7/warnings.pyc
# /usr/local/lib/python2.7/linecache.pyc matches /usr/local/lib/python2.7/linecache.py
import linecache # precompiled from /usr/local/lib/python2.7/linecache.pyc
# /usr/local/lib/python2.7/types.pyc matches /usr/local/lib/python2.7/types.py
import types # precompiled from /usr/local/lib/python2.7/types.pyc
# /usr/local/lib/python2.7/UserDict.pyc matches /usr/local/lib/python2.7/UserDict.py
import UserDict # precompiled from /usr/local/lib/python2.7/UserDict.pyc
# /usr/local/lib/python2.7/_abcoll.pyc matches /usr/local/lib/python2.7/_abcoll.py
import _abcoll # precompiled from /usr/local/lib/python2.7/_abcoll.pyc
# /usr/local/lib/python2.7/abc.pyc matches /usr/local/lib/python2.7/abc.py
import abc # precompiled from /usr/local/lib/python2.7/abc.pyc
# /usr/local/lib/python2.7/_weakrefset.pyc matches /usr/local/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /usr/local/lib/python2.7/_weakrefset.pyc
import _weakref # builtin
# /usr/local/lib/python2.7/copy_reg.pyc matches /usr/local/lib/python2.7/copy_reg.py
import copy_reg # precompiled from /usr/local/lib/python2.7/copy_reg.pyc
# /usr/local/lib/python2.7/traceback.pyc matches /usr/local/lib/python2.7/traceback.py
import traceback # precompiled from /usr/local/lib/python2.7/traceback.pyc
# /usr/local/lib/python2.7/sysconfig.pyc matches /usr/local/lib/python2.7/sysconfig.py
import sysconfig # precompiled from /usr/local/lib/python2.7/sysconfig.pyc
# /usr/local/lib/python2.7/re.pyc matches /usr/local/lib/python2.7/re.py
import re # precompiled from /usr/local/lib/python2.7/re.pyc
# /usr/local/lib/python2.7/sre_compile.pyc matches /usr/local/lib/python2.7/sre_compile.py
import sre_compile # precompiled from /usr/local/lib/python2.7/sre_compile.pyc
import _sre # builtin
# /usr/local/lib/python2.7/sre_parse.pyc matches /usr/local/lib/python2.7/sre_parse.py
import sre_parse # precompiled from /usr/local/lib/python2.7/sre_parse.pyc
# /usr/local/lib/python2.7/sre_constants.pyc matches /usr/local/lib/python2.7/sre_constants.py
import sre_constants # precompiled from /usr/local/lib/python2.7/sre_constants.pyc
import encodings # directory /usr/local/lib/python2.7/encodings
# /usr/local/lib/python2.7/encodings/__init__.pyc matches /usr/local/lib/python2.7/encodings/__init__.py
import encodings # precompiled from /usr/local/lib/python2.7/encodings/__init__.pyc
# /usr/local/lib/python2.7/codecs.pyc matches /usr/local/lib/python2.7/codecs.py
import codecs # precompiled from /usr/local/lib/python2.7/codecs.pyc
import _codecs # builtin
# /usr/local/lib/python2.7/encodings/aliases.pyc matches /usr/local/lib/python2.7/encodings/aliases.py
import encodings.aliases # precompiled from /usr/local/lib/python2.7/encodings/aliases.pyc
# /usr/local/lib/python2.7/encodings/ascii.pyc matches /usr/local/lib/python2.7/encodings/ascii.py
import encodings.ascii # precompiled from /usr/local/lib/python2.7/encodings/ascii.pyc
Python 2.7.3 (default, Mar 24 2013, 14:48:16)
[GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd10
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/local/lib/python2.7/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/local/lib/python2.7/lib-dynload/readline.so
>>>help()
help> modules

Please wait a moment while I gather a list of all available modules...

Abort trap (core dumped)
$
Nick
Dublin
User avatar
Posts: 16
Joined: Thu Jul 12, 2012 9:53 pm