Welcome! Log In Create A New Profile

Advanced

FreeBSD/NAS4Free on GoFlex net?

Posted by workingman 
FreeBSD/NAS4Free on GoFlex net?
June 07, 2015 05:48PM
Hi guys,

Thanks to all the fabulous people here I've been using debian on my 3 goflex net machines quite happily for several years now but after virtualizing my asterisk servers I have a free pair of them to play with.

After seeing that an ARM build of NAS4Free was available for the Raspberry Pi I was quite excited to think I might be able to have the same NAS software I run just about everywhere else running on the GoFlex. http://sourceforge.net/projects/nas4free/files/NAS4Free-ARM/

So far I've tried to chainload the uboot.img included in the RPi image with no success - tried to rebuild uboot from bodhi's github tree to include the bootelf command but my kwboot testing failed. I believe due to bootrom v1.1 and I don't really know why I only have v1.1 since I thought all my uboot environment was up to date with bodhi's U-Boot 2014.07-tld-2 (Sep 20 2014 - 00:58:11).

GoFlexNet> md ff00003c
ff00003c: 00000111

Any interest around here in getting BSD kernels booting on kirkwood? I am a willing and hopefully capable tester!
Re: FreeBSD/NAS4Free on GoFlex net?
June 07, 2015 09:44PM
workingman,

> Any interest around here in getting BSD kernels
> booting on kirkwood? I am a willing and hopefully
> capable tester!

What does the BSD rootfs look like? if you could show the top level content of this I might be able to help in getting it booted. For example, these or their equivalences:

ls -l /
ls -l /boot
ls -l /lib/modules

I'm not familiar with BSD, so basically I'd like to see the kernel files and the rootfs structure.

And about bootrom, some older GFNets don't have the right bootrom for kwboot. So unfortunately yours are ones in that product line.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 06/07/2015 11:02PM by bodhi.
Re: FreeBSD/NAS4Free on GoFlex net?
June 09, 2015 07:39PM
Hey Bodhi!

Thanks for the response. Not sure I can show you everything you want to see though.

Apparently the uboot that they include with the RPi NAS has all the goodness but I'm not getting it to chainload correctly.

From this site - http://blog.khubla.com/freebsd/how-does-the-crochet-freebsd-arm-boot-work I found this blurb:

U-Boot is a very capable boot loader, that can boot a variety of architectures, of which one is ARM. In the case of Wandboard, however a couple changes are needed to the configuration. The patch files are here. The primary requirements are:

U-Boot needs to be configured to read ELF binaries
U-Boot needs to be configured to include the U-Boot API, a feature which ubdlr requires.
The Makefile needs to be changed, to include libc specifically

When I try to do magic at the uboot I can list the first fat partition that they use to store their uboot and the ubdlr files which can then speak UFS the native BSD filesystem. At least I think that's what they're doing.

GoFlexNet> usb start
GoFlexNet> fatls usb 0:1
17840 bootcode.bin
524 config.txt
6129 fixup.dat
2341 fixup_cd.dat
9179 fixup_x.dat
16121 rpi.dtb
2626392 start.elf
540376 start_cd.elf
3583560 start_x.elf
352868 uboot.img
106 uenv.txt
9 bootvers
260634 ubldr

Any fatload magic you could share I'm willing to try!

Thanks again....
Re: FreeBSD/NAS4Free on GoFlex net?
June 10, 2015 12:00AM
workingman,

> Apparently the uboot that they include with the
> RPi NAS has all the goodness but I'm not getting
> it to chainload correctly.

I don't think you can use the rPi rootfs, if that's what you are trying to do. And I don't think chainloading that u-boot will work, either. If BSD require UFS file system then our GoFlex Net u-boot needs to either have that capability (I'd doubt we can do this), or load the kernel from Ext or FAT file system on that separate partition (which seems to to be the requirement here).

The bottom line is we need to see and understand where the kernel files, and how the BSD rootfs is stored, and then tell u-boot to load it. If the kernel files format is something special like ELF binaries then we need to rebuild the GoFlex Net u-boot if it does not have that capability already.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: FreeBSD/NAS4Free on GoFlex net?
June 10, 2015 07:03PM
No problem!

I'll whip up a new rootfs with kernel on the fat partition.

Will let you know what that does... funny thing is that the rootfs is all held in a ramdisk

/dev/xmd0 on / (ufs, local, noatime, acls)
/dev/xmd0 120M 34M 86M 28% /

the rootfs tarball should be able to live happily on a fat partition.
Re: FreeBSD/NAS4Free on GoFlex net?
June 13, 2015 11:25AM
I forgot all about 8.3 naming on fat partitions...

GoFlexNet> fatls usb 0:1 /rootfs/
./
../
boot/
2161096 boot-upd.xz
conf/
75939840 mdlocal.uzi
14831616 mfsroot.uzi
36 version

supposed to be .uzip files

GoFlexNet> fatls usb 0:1 /rootfs/boot/
./
../
kernel/
defaults/
zfs/
582 loader.con

supposed to be loader.conf..

GoFlexNet> fatls usb 0:1 /rootfs/boot/kernel/
./
../
193256 geom_xmd.ko
8128055 kernel
15427 opensola.ko

supposed to be opensolaris.ko...

I hope to have time this weekend to work on this properly and not just try chucking the RPi root at the device to see what sticks.
Re: FreeBSD/NAS4Free on GoFlex net?
June 15, 2015 12:12AM
workingman,

FreeBSD wiki:
https://wiki.freebsd.org/FreeBSD/arm

Looks like we'll need new u-boot version to support bootelf. This kernel file has elf headesr:
/rootfs/boot/kernel/kernel

However, according to this, we don't need bootlef if using NetBSD image:
https://code.google.com/p/beagleboard-freebsd/wiki/BuildingAndBooting

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 06/15/2015 12:54AM by bodhi.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: