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

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

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

Postby Gavinmc42 » Mon Jan 15, 2018 2:57 am

Baremetal C tutorial for Aarch64, any clues for us?
https://www.raspberrypi.org/forums/view ... 2&t=201556
Gavinmc42
Posts: 1420
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Fri Mar 23, 2018 5:49 am

I noticed there is some rtl code in the ultibo/core/fpc/units/armv8-ultibo folder.
Is 64bit Ultibo working?
User avatar
Ultibo
Site Admin
Posts: 2079
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

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

Postby Ultibo » Fri Mar 23, 2018 10:14 am

Gavinmc42 wrote:I noticed there is some rtl code in the ultibo/core/fpc/units/armv8-ultibo folder.
Is 64bit Ultibo working?

There is no change in status as yet, the RTL and the Packages all build in aarch64 but we are missing some code in the boot units (BootRPi3, PlatformRPi3, PlatformARMv8).

I can assure you we'll announce it when it is done ;)
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1420
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Fri Mar 23, 2018 11:58 am

Code: Select all

{$IFDEF CPUAARCH64}
asm
 //To Do
end;
{$ENDIF CPUAARCH64}


Ok, now I see what I missed, two options for Pi3's, arm and aarch64.

https://github.com/swarren/rpi-3-aarch64-demo
No change to armstubs for 2 years :o
https://github.com/raspberrypi/tools

The VC4 will need recompiling to 64bit or can aarch64 run the 32bit code?
Find out after it boots into 64bit mode.
Wonder if that's why latest bootcode.bin is much bigger, getting 64bit ready?
Or is it start.elf configuring the ARM cpu?

Arch Linux has gone mainstream for 64bit verson?
https://archlinuxarm.org/platforms/armv ... berry-pi-3

The VC4 code ie framebuffer mailbox etc would need to be 64 bit too?
Gavinmc42
Posts: 1420
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Tue Apr 17, 2018 8:30 am

In case anyone missed it, there is a new Aarch64 Gentoo that runs on the Pi3B+ :D
https://www.raspberrypi.org/forums/view ... 4&t=188448

Gentoo has totally different installs from Debian Linux's, but Sakaki really knows her stuff.
https://www.raspberrypi.org/forums/view ... 4&t=211121

Spent the weekend playing with it and doing 64bit benchmarking :P
Some issues I need to identify, SD card or USB drive, not sure yet.

Not stable enough for Desktop daily use but It seems rock solid, perhaps ok for headless compiling Aarch64 code?
Gavinmc42
Posts: 1420
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Tue Apr 17, 2018 1:14 pm

So used to any old card working with Ultibo.
Gentoo requires a good uSD card and don't try USB stick booting.

Aarch64 coding can commence :D
User avatar
Ultibo
Site Admin
Posts: 2079
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

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

Postby Ultibo » Tue Apr 17, 2018 11:43 pm

Gavinmc42 wrote:Aarch64 coding can commence :D

So you'll be providing some steps on how to build Ultibo FPC and Lazarus on Gentoo Aarch64?
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1420
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Wed Apr 18, 2018 12:09 am

So you'll be providing some steps on how to build Ultibo FPC and Lazarus on Gentoo Aarch64?


Or I may just link to a wiki on how to get 32bit Laz running on 64bit Gentoo
https://www.raspberrypi.org/forums/view ... 4&t=188448
https://github.com/sakaki-/gentoo-on-rp ... too-System

The question I have in my head is if 32bit apps work does the 32bit VC4 stuff work too?

Once there is an ebulid for a 64bit FPC compiler the rest should follow.
Very early days but I don't think there is going to be big issues any more.
But I'm lucky I don't understand enough to get an idea of how hard it is :P

Learning non Debian Linux is a pain but like most things it is only hard the first time.
I expect 64bit Pi Linux OS distributions to pop up all over now.
Like most great things they only succeed when there is a Champion.
For Ultibo that would be you, for 64bit Linux on Pi's that would be Sakaki.

I did try the Ultiboinstaller script, expecting miracles :D
Rewrite that for Gentoo and it will probably just work, FPC is so clean it seems to build everywhere.

But the Hardware interface is going to be tricky, Gentoo is using the vc4-fkms-v3d mesa stuff.
How that translates to Ultibo I have no idea, but if you or someone can figure it out for Aarch64 then it will work for AArch32?

Anyway Aarch64 is here, useful and 32bit still works, sort of :lol:
And Sakaki might be interested enough to do a 64bit ebuild of FPC for us.
Gavinmc42
Posts: 1420
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Wed Apr 18, 2018 6:38 am

https://www.getlazarus.org/setup/making/

Nobody has done a minimal fpc for Aarch64 yet?
https://github.com/newpascal/fpcupdelux ... ag/v1.6.0o
Option for full AArch64 everything :o
Let me see if it crashes and burns :lol:
pik33
Posts: 788
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

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

Postby pik33 » Fri Apr 20, 2018 7:10 pm

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.
I compiled FPC ald Lazarus from the source on 32-bit Raspbian several times and I killed 2 of them doing this. Too much swapping.

Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 0 guests