FreeBSD on Pine64 experience

ArnoB freebsd at rgbaz.eu
Tue Feb 21 15:35:04 UTC 2017



On 20-02-17 12:46, Milan Obuch wrote:
> Hi,
>
> some time ago I've got Pine64 board with 1 GB RAM. I decided to put
> FreeBSD on it as I saw arm64 architecture being worked on. First I
> tried to build u-boot, it worked somehow, but I was not able to find
> out the way boot works here, and did not find much time to play
> afterwards.
>
> As I found http://www.raspbsd.org/pine64.html I decided to try it out.
> There are two images, however, none worked for me out of the box. I
> realised it was because my SD card was slightly smaller than 2 GB so
> image does not fit in, but I just created gpart structure mostly the
> same as was the image, just with a bit smaller UFS partition, copied EFI
> partition as full device with dd, null mounted ufs device from image
> and copied it to my newly created filesystem.
>
> It worked, I can boot and play with it. I decided to try native rebuild
> as a stress/stability test. It was a bit challenging, but basically it
> worked. First I create some workspace on my nfs server for it, so I can
> mount_nfs both /usr/src and /usr/obj directories. I know there is
> plenty of space necessary for buldworld/buildkernel.
>
> First trouble was our src tree is not yet fully equipped for buildworld
> on arm64. There is no working linker yet, I think, make buildworld
> bails out with request to install aarch64-binutils. I found it is not
> possible to build it from ports because of missing linker, so
> installing precompiled package was possibly the only option at this
> point. It was not straightforward either, but after deleting md
> filesystems for /tmp, /var/log and /var/tmp (they was not big enough
> for some temporary file, and I decided to free memory as well at an
> expence of slower access to files affected) from /etc/fstab and reboot
> I was able to execute
>
> env ABI=FreeBSD:11:aarch64 pkg install aarch64-binutils
>
> which installed both pkg and aarch64-binutils packages. I know from my
> earlier attempts to cross compile world for arm64 it was enough to
> build world, but it was not enough for native build. Trouble was our
> build environment is sanitized and aarch64-binutils package is
> installed into /usr/local/aarch64-freebsd/{bin,lib} directories, so
> they are not in path. I did not find other way to get it working
> without too much fussing with makefiles et all, but simple crude hack
> worked - I created links with
>
> ln -s /usr/local/aarch64-freebsd/bin/* /bin
>
> Nothing more was necessary for native buildworld/buildkernel to
> succeed. At this point after nfs mounting /usr/port I was able to build
> ports.
>
> When trying installworld, it proceeded almost flawlessly, just at the
> end following error was reported:
>
> ===> etc (install)
> ===> etc/newsyslog.conf.d (install)
> ===> etc/sendmail (install)
> cd /usr/src/etc/../share/man; make makedb
> makewhatis /usr/share/man
> makewhatis /usr/share/openssl/man
> <jemalloc>: /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/tsd.h:687:
> Failed assertion: "tsd_booted" *** Signal 6
>
> Remaining steps, make delete-old, mergemaster and make delete-old-libs
> all completed successfully, with mergemaster being painfully slow
> due /var/tmp/temproot being od SD card.
>
> Now I am running newly built 12-CURRENT on Pine, I looks like it works
> well. Just a small nit - my 'uname -a' now prints
>
> FreeBSD pine 12.0-CURRENT FreeBSD 12.0-CURRENT #0: Mon Feb 20
> 00:47:55 CET 2017     root at tiny.dino.sk:/usr/obj/usr/src/sys/GENERIC
> arm64
>
> Originally it was 12.0-CURRENT #<svn revision number> - does anybody
> know where this revision number is being lost? Could it be somehow
> caused by fact my src tree was 'svn checkout'ed on another machine
> (i386)?
>
> Regards,
> Milan
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
>
Great! thanks a lot for sharing!

gr
arno


More information about the freebsd-arm mailing list