ArmV8 / Aarch64 / ARM64... what would it take?

Want a new feature? Discuss what you would like to see in Ultibo.
Gavinmc42
Posts: 1367
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Gavinmc42 » Sat Apr 21, 2018 2:36 am

If you want to compile fpc/Lazarus from the source using RPi, get a real HD with a swap partition on it or it will take several hours and it can kill the SD card.


Thanks for the headsup pi33.
I have been thinking about this now that a real Aarch64 Linux OS is working well enough for native developing on.
Just been catching up on SD card technology, not exactly inspiring.
Gavinmc42
Posts: 1367
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Gavinmc42 » Sat Apr 21, 2018 1:36 pm

Been living in Gentoo Aarch64 land for a week now :D
Serious OS storage upgrades needed $$ :(
emerge, ebuild.... whole new OS to learn, eek.

Came across lots of benchmarks, the Pi3B+ has much better networking speeds.
Pi3B+ could serve lots of Ultibo kernels for updating?

But I also now paid attention to USB to Ethernet Dongles especially 1Gbs ones.
Does anyone know if the Zero's can use them in Ultibo?
Gavinmc42
Posts: 1367
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Gavinmc42 » Tue Apr 24, 2018 12:11 pm

https://github.com/newpascal/fpcupdelux ... sbins_v1.0

Having fun in Aarch64 fpc land.
Googling suggests people have got fpc running in Aarch64, but I have yet to see proof ;)

Gentoo uses different build methods than Debian :(

There is a fpcupdeluxe for Aarch64 but it requires svn as first step.
So about to try Bamarni's oldish Pi64 build on an old Pi3.
https://github.com/bamarni/pi64

I am assuming if Lazarus/FPC can be got running on Pi Aarch64 then Ultibo can port too.
This would mean ARMv8A + NEON code can be tested before porting to baremetal?
At this point in time ignorance is bliss :lol:
User avatar
Ultibo
Site Admin
Posts: 1932
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Ultibo » Wed Apr 25, 2018 12:12 am

Gavinmc42 wrote:There is a fpcupdeluxe for Aarch64 but it requires svn as first step.
So about to try Bamarni's oldish Pi64 build on an old Pi3.
https://github.com/bamarni/pi64

I am assuming if Lazarus/FPC can be got running on Pi Aarch64 then Ultibo can port too.

You're going about this a very long way around, why don't you just cross compile FPC for Aarch64 Linux from a working installation on i386 or x86_64 Linux?

PS. Might be time for a new thread, this one is about porting Ultibo core to Aarch64, not about Aarch64 Linux ;)
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1367
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Gavinmc42 » Wed Apr 25, 2018 12:38 am

You're going about this a very long way around, why don't you just cross compile FPC for Aarch64 Linux from a working installation on i386 or x86_64 Linux?


I tried that first, keep getting a x86 version, I suspect the build instructions are wrong.
Seems to be holes in the build process.
fpcupdeluxe seems to expect stuff the Gentoo64 does not come with as standard.
Getlazarus setup.sh is also a bit dated.
In the last week or so I must have made about 20 FPC builds :lol:

I was hoping a Aarch64 Laz/FPC build would then allow an Aarch64 Ultibo build.
That way I can compare Linux Aarch64 against Ultibo Aarch64 builds.
Hoping Aarch64 FPC will help towards getting Aarch64 Ultibo going.

A lot of ML/CV stuff is in C code, so translate that to fpc and test on Pi in Linux before doing it in Ultibo.

ArmV8 / Aarch64 / ARM64... what would it take?

Probably more guess work, more learning or someone who knows what they are doing ;)

FPC Aarch64 support is new too, perhaps later than fpc 3.0.0.
But as you know fpc requires a 3.0.0.binary to build later versions.
You are probably right, I will have to cross compile version 3.0.0 on a x86 box to aarch64.

Lots for me to learn, I did hope fpcupdeluxe would work out of the box.
I suspect it may if all the prerequisite are met.
Lots of source code is showing up when fpcupdeluxe runs, but not an Aarch64 compiler.

Getlazarus setup.sh looks to be the most agnostic script.
If I compare the x86 Linux one to the Raspberry version, I might get more clues.
Gavinmc42
Posts: 1367
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Gavinmc42 » Wed Apr 25, 2018 12:57 am

But if you want to run Ultibo on Pi Gentoo64 right now, this shows how to get 32bit Laz/fpc on 64bit Pi's.
So 32bit Ultibo should just work too.

https://github.com/sakaki-/gentoo-on-rp ... too-System.

This probably means 32bit Ultibo code may run on 64bit Ultibo kernels?
Perhaps any 32bit library code? Perhaps the VC4 stuff, C libs etc.
User avatar
Ultibo
Site Admin
Posts: 1932
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Ultibo » Wed Apr 25, 2018 1:23 am

Gavinmc42 wrote:I tried that first, keep getting a x86 version, I suspect the build instructions are wrong.
Seems to be holes in the build process.
fpcupdeluxe seems to expect stuff the Gentoo64 does not come with as standard.
Getlazarus setup.sh is also a bit dated.

I wouldn't bother with fpcupdeluxe or Getlazarus, just download and install the official 3.0.4 FPC (not Lazarus) onto i386 or x86_64 Linux, install the toolchain for Aarch64 Linux and cross compile an Aarch64 Linux version of FPC. Once you have that you can use it to build everything else directly on Aarch64 Linux.

Gavinmc42 wrote:I was hoping a Aarch64 Laz/FPC build would then allow an Aarch64 Ultibo build.

The ultiboinstaller.sh script won't work on Aarch64 Linux but only because it requires a few modifications. First it needs to know what the output of "uname -m" is in order to detect the architecture and then it needs to know where to download a minimal FPC stable for that architecture (which is exactly what would be built above) and finally it needs the relevant checks added so it builds for Aarch64 instead of ARM, i386 or x86_64.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1367
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Gavinmc42 » Wed Apr 25, 2018 10:07 am

Does this make any sense?
http://pilotlogic.com/sitejoom/index.ph ... m-64-linux

First a cross compiler needs to be made and then fpc 3.0 must be cross compiled and then fpc can be native compiled on the Pi?
User avatar
Ultibo
Site Admin
Posts: 1932
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Ultibo » Thu Apr 26, 2018 2:34 am

Gavinmc42 wrote:Does this make any sense?
http://pilotlogic.com/sitejoom/index.ph ... m-64-linux

First a cross compiler needs to be made and then fpc 3.0 must be cross compiled and then fpc can be native compiled on the Pi?

I'm not sure what the deal is with CodeTyphon but it probably won't help you in this case.

Just do a normal build of the fpc source using make with appropriate parameters, it should be OS_TARGET=linux and CPU_TARGET=aarch64 and for the install pass you pass it something like $HOME/fpc for the INSTALL_PREFIX parameter.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1367
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: ArmV8 / Aarch64 / ARM64... what would it take?

Postby Gavinmc42 » Thu May 17, 2018 8:35 am

https://github.com/raspberrypi/userland/issues/460

Bit more on the 64 to 32 bit pointer issue for the VC4.
Fixable in Paul's OMXMMAL code?

Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 1 guest