ChanceM / pfSense-pkg-zerotier

pfSense package to support zerotier.
107 stars 47 forks source link

arm support (netgate devices) #13

Open 1ARdotNO opened 2 years ago

1ARdotNO commented 2 years ago

What would it take to get a arm64 version of this, that works on the netgate devices? Is it just a matter of changing names of references? or would something have to be built from scratch?

ChanceM commented 2 years ago

I believe we would just need to package it on a arm64 FreeBSD install. I tried and failed to run an arm64 VM and the prebuilt image on my Proxmox host, but couldn't get it up and running. I have a couple of RPi in a drawer might be able to try it on one of those.

1ARdotNO commented 2 years ago

That would be awesome :-)

1ARdotNO commented 2 years ago

I did some testing of my own, and have gotten arm64 to run on proxmox, though not the most speedy in the emulation it works Proxmox config:

arch: aarch64
bios: ovmf
boot: order=virtio0
cores: 4
efidisk0: disk10TB-2:104/vm-104-disk-1.raw,size=64M
kvm: 1
memory: 2048
name: arm64-freebsd12.3-jenkinsworker
net0: e1000=2A:FD:C5:CC:B9:3C,bridge=vmbr0
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=86b46f6b-a616-4538-8228-798b4c3a7522
sockets: 1
vga: serial0
virtio0: disk10TB-1:104/vm-104-disk-0.qcow2,size=5243712K

using the image http://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/12.3-RELEASE/aarch64/Latest/FreeBSD-12.3-RELEASE-arm64-aarch64.qcow2.xz

basically I used that config, and then had proxmox generat a disk, then extracted the qcow2 from the link above, and renamed it and replaced the disk proxmox added. The detached and reattached it from the webgui using VIRTIO for storage to have it fix the "size=" parameter itself.

EDIT: also use the "xterm.js" console instead of the default one for remote control EDIT2: ran out of disk space, to increase it I followed, https://people.freebsd.org/~rodrigc/doc/handbook/disks-growing.html with some changes due to errors, expand disk in proxmox first then do this:

#fir GPT tables after proxmox expand
gpart recover vtbd0
#Show current status
gpart show /dev/vtbd0
#Expand the partion number 3 to 15GB
gpart resize -i 3 -a 4k -s 15G vtbd0
#Show status to confirm changes
gpart show /dev/vtbd0
#Run the growfs service once, to grow the filesystem, the command listed on the page does not work, most likely due to the filesystem being mounted, the service thing takes care of all of that :-)
service growfs onestart

Hope this helps you :-) I'll also try builøding it in my end and report back results.

1ARdotNO commented 2 years ago

I have an arm64 built, (it took close to 3 hours to build on my emulated VM 😅 ) For reference, if anybody needs it it is here https://github.com/OvrAp3x/pfSense-pkg-zerotier/releases/tag/arm64 Feel free to repost it if you want

cemoz101 commented 1 year ago

Any chance someone can help me install this to netgate? Never installed a package manually before. I would most appreciate it. Thank you. :)

1ARdotNO commented 1 year ago

Any chance someone can help me install this to netgate? Never installed a package manually before. I would most appreciate it. Thank you. :)

@cemoz101 Warning; Do this at your own risk, but it worked fine for me. Note: Might not work on ALL netgate devices, this was compiled for arm64v7 (If i remember correctly :-) ) Run these commands from the command line using ssh with your pfsense instance Install my pre-compiled arm64 build from here;

pkg add https://github.com/OvrAp3x/pfSense-pkg-zerotier/releases/download/arm64/pfSense-pkg-zerotier-0.00.1.pkg
pkg add pfSense-pkg-zerotier-0.00.1.pkg
cemoz101 commented 1 year ago

ok thank you :)