FreeBSD on AmigaOne X5000

Justin Hibbits jrh29 at alumni.cwru.edu
Mon Jan 22 04:39:05 UTC 2018


Hi Al,

With the device tree addition of the PHY information, on the Linux
cyrus device tree, Ethernet works just fine on FreeBSD, so there's no
problem when using my modified tree.

I also tested today loading the radeonkms driver, and it loaded just
fine, so maybe the crash was a fluke.  It of course needs more
testing.

- Justin

On Thu, Jan 18, 2018 at 8:02 PM, Al Zick <al at familysafeinternet.com> wrote:
> Hi Justin,
>
> I don't know if this helps, but there is work being done to get the X5000
> built in network ports working in both AmigaOS and Linux. I know the issue
> he had/has with the PHY hookups. Honestly, I am not sure which one of you
> are further along, so I don't know if that helps.
>
> I will be installing FreeBSD on my X5000. I will let you know when I get it
> installed and then I will start testing.
>
> Kind Regards,
> Al
>
>
>
>
>
> On Jan 18, 2018, at 12:11 PM, Justin Hibbits wrote:
>
>> Hi Al,
>>
>> FreeBSD runs pretty well on the AmigaOne X5000, but there are some
>> gotchas right now.  It needs a minor change to the dts in order to use
>> the ethernet controller, and you currently have to make an
>> execute-in-place uImage, for 64-bit kernels anyway.
>>
>> The former is impossible to work around, because the device tree is
>> just incorrect with regard to the PHY hookups (it lists TBI
>> connections, but the AmigaOne X5000 uses rgmii, which puts all
>> connections through dtsec0's mdio).  You can find my working device
>> tree at https://people.freebsd.org/~jhibbits/cyrus_p5020_amiga2.dtb .
>>
>> The latter I'm currently working on, and plan to have ubldr loading
>> 64-bit kernels in the next couple weeks, so we won't need to build
>> uImages.  But, for now, the way I do it is:
>>
>> buildkernel with KERNCONF=QORIQ64
>>
>> Using NetBSD's 'mkubootimage' (easy enough to build on FreeBSD with
>> some minor tweaks to the source), run:
>>
>> mkubootimage -A powerpc -C none -T kernel -O linux -a 0x3ffffc0 -e
>> <entrypoint from readelf -h> -N "FreeBSD AmigaOne X5000"
>> amiga64.uImage /path/to/built/kernel
>>
>> Then I can boot that image via either dhcp or sata (Be sure to load it
>> to 0x3ffffc0, for some reason uboot doesn't copy the image when loaded
>> to the default loadaddr of 0x01000000).
>>
>> Booting from SATA you need to create an MBR partition scheme, and the
>> first partition must be FAT, since uboot doesn't know how to read
>> FreeBSD disklabels and UFS.  I made two partitions: 128MB FAT to put
>> the kernel, ubldr, and dtb; and the rest of my disk is a BSD disklabel
>> volume, partitioned like a normal FreeBSD system.  You would put the
>> dtb and uImage in the FAT partition, and set the uboot bootargs
>> environment variable to 'vfs.root.mountfrom=ufs:/dev/ada0s2a'
>> (assuming /dev/ada0s2a is the root you create, as my example is)
>>
>>
>> As for what you can do to help, that depends on your skill set.
>>
>> If you're happy in the kernel:
>> * I have some patches to drm2 so it can load the radeonkms driver, but
>> it crashes due to TLB synchronization issues between the two cores,
>> that might be interesting to look at.
>> * Performance improvements:  CPU0 is seeing a very high decrementer
>> interrupt count, measured with vmstat -i.  I think this might be uboot
>> messing up the clock frequency information populating, but I'm not
>> sure.  Maybe test that.
>> * There are still device drivers missing for things like the XMOS and
>> CPLD.
>>
>> If you'd prefer userspace, once you have FreeBSD installed, and able
>> to use the network:
>> * Build a kernel with ZFS (just add "options ZFS" to the QORIQ config,
>> or create your own), and test building everything with poudriere.
>> Report any bugs and panics you see.  Just hammer away.
>> * It's pretty boringly stable up in userspace, so it's hard for me to
>> think of anything more.
>>
>> Let me know what you're interested in, and I can point you to
>> somewhere you can help.
>>
>> Glad to see interest in this!
>>
>> - Justin
>>
>> On Wed, Jan 17, 2018 at 5:20 PM, Al Zick <al at familysafeinternet.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> Would it be possible to find out about how much progress has been made on
>>> the FreeBSD port to the AmigaOne X5000 in the last few months and if
>>> there
>>> is anything that I can do to help?
>>>
>>> Kind Regards,
>>> Al
>>>
>>>
>>> _______________________________________________
>>> freebsd-ppc at freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
>>> To unsubscribe, send any mail to "freebsd-ppc-unsubscribe at freebsd.org"
>
>


More information about the freebsd-ppc mailing list