# Building FreeBSD for Kirkwood



## balanga (Jun 21, 2017)

In my quest to get FreeBSD running on a GoFlex Home unit, I have made some progress, largely due to help from Phishfry, and through the use of a USB serial connector can see how the thing boots up. It's currently booting up to Linux Debian from a USB stick. Now I'd like to get it to boot up to FreeBSD and, as I understand it, I need to build FreeBSD for Kirkwood. This has already been done with instructions here. These instructions are for use with FreeBSD 8.2, so I'm not sure if anything would need changing. Can anyone advise?


----------



## diizzy (Jun 21, 2017)

Unfortunately Kirkwood hasn't received much love for the last years and I'm pretty sure ARMv5 support is pretty much dropped/being dropped by now. Last time I heard something about it a user reported silent corruption over USB. ARMv5 is "dying" and I would honestly recommend you to run LEDE (www.lede-project.org) on it, there's a patch on GitHub which bumps the kernel to Linux 4.9. I also have a port of Samba 4 (partial port, smbd works) if you're interested.


----------



## Phishfry (Jun 21, 2017)

I wanted to repost this just to let you know has booted recently.
https://lists.freebsd.org/pipermail/freebsd-arm/2017-April/015993.html

Here is the beginning of that thread.
https://lists.freebsd.org/pipermail/freebsd-arm/2017-March/015979.html

When he says rip out the IPSEC_NAT_T in the kernel all he means is remove this line from the kernconf before compiling.

You might use tftp to boot up off NFS so you might want to get that running.


----------



## Phishfry (Jun 21, 2017)

Looking at FreeBSD /src/sys/arm files I see the DB-88F6XXX kernconf he speaks of. So not sure which you would use here.
Maybe not DOCKSTAR but DB-88F6XXX is used.

Looking here the GoFlex Home is a sister product to GoFlex Net:
https://archlinuxarm.org/platforms/armv5/seagate-goflex-home
So these instructions should be spot on.


----------



## balanga (Jun 22, 2017)

diizzy said:


> Unfortunately Kirkwood hasn't received much love for the last years and I'm pretty sure ARMv5 support is pretty much dropped/being dropped by now. Last time I heard something about it a user reported silent corruption over USB. ARMv5 is "dying" and I would honestly recommend you to run LEDE (www.lede-project.org) on it, there's a patch on GitHub which bumps the kernel to Linux 4.9. I also have a port of Samba 4 (partial port, smbd works) if you're interested.


The point is I have Linux running at the moment so updating the kernel doesn't give anything.I just want to have FreeBSD running on my GoFlex Home unit.


----------



## balanga (Jun 22, 2017)

Phishfry said:


> I wanted to repost this just to let you know has booted recently.
> https://lists.freebsd.org/pipermail/freebsd-arm/2017-April/015993.html
> 
> Here is the beginning of that thread.
> ...



I have `tftpd` running on my FreeNAS box. At the moment a client would download `gpxelinux.0` so presumably that needs to be changed.. 

Can I use Crochet to try building this? I don't really know how to get started.... or do I simply use `make -j 8 buildworld TARGET_ARCH=arm`, copy the resultant filesystem to a USB stick and then plug my device into the GoFlex Home unit?


----------



## balanga (Jun 22, 2017)

I'm trying to follow the instructions

and immediately hit a problem


```
Obtain the source
Use csup to grab the source for FreeBSD if you don’t already have it. Check here for the available release tags.

[LIST=1]
[*]*default host=cvsup8.freebsd.org
[*]*default base=/var/db
[*]*default prefix=/usr
[*]*default release=cvs tag=RELENG_8_1
[*]*default delete use-rel-suffix
[*]*default compress src-all
[/LIST]
```

I don't know what `csup`is as the link takes me nowhere.

Anyone know what `csup` is/does?


----------



## Phishfry (Jun 22, 2017)

I believe its `cvsup` you are looking for.

Those instructions you are using look outdated. cvsup is not used anymore.
You need to try with this post:
https://lists.freebsd.org/pipermail/freebsd-arm/2017-March/015979.html

So first set your environment then patch and build uboot and then pick up on the above:
`make buildworld TARGET_ARCH=arm
make buildkernel TARGET_ARCH=arm KERNCONF=DB-88F6XXX`

Remember you must drop a line from the kernconf.

You need to thoroughly study this:
https://wiki.freebsd.org/FreeBSD/arm/crossbuild


----------



## balanga (Jun 22, 2017)

Phishfry said:


> You need to try with this post:
> https://lists.freebsd.org/pipermail/freebsd-arm/2017-March/015979.html



That link points to: https://wiki.freebsd.org/FreeBSDMarvell from which there are almost 100 choices. Any chance of a quick hint? None of the links there stood out as the obvious choice.


----------



## Phishfry (Jun 22, 2017)

I have never successfully crossbuilt an Arm image by hand. I have stalled at the image stage and never went back. I am learning more about disk arrangements so maybe I will finish my Tegra TK1 post on FreeBSD one day.
You can use the top part of this as an example of the envirnoment. Below pound signs is junk. You will have to edit for Arm5.
https://forums.freebsd.org/threads/57694/

Sorry I can't be more help.


----------



## balanga (Jun 23, 2017)

balanga said:


> That link points to: https://wiki.freebsd.org/FreeBSDMarvell from which there are almost 100 choices. Any chance of a quick hint? None of the links there stood out as the obvious choice.



I have just noticed that the link in the post on the mailing list, ie https://lists.freebsd.org/pipermail/freebsd-arm/2017-March/015979.html includes a ':' at the end which doesn't resolve - https://wiki.freebsd.org/FreeBSDMarvell:

I've only just noticed this, in fact the link I posted above did not have the ':' so maybe caused some confusion..

Anyway, I've been running `make -j 8 buildworld TARGET_ARCH=arm` using src from FreeBSD 11.0-RELEASE for the last four hours and don't know how much longer I should expect it to run. We'll see...


----------

