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

Want a new feature? Discuss what you would like to see in Ultibo.
haiqu
Posts: 252
Joined: Mon Oct 31, 2016 5:09 am
Location: Brisbane

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

Postby haiqu » Thu Nov 10, 2016 8:46 am

BeagleBone Black was all the rage about 5 years ago but looks a bit dated now. I'll stick with the cheapies.

BTW I didn't see any RasPi support in the 4.9 kernel. Maybe the next one.
Make mine a Pi with source.
Gavinmc42
Posts: 1560
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Fri Nov 11, 2016 2:44 am

I would have expected more in arch/arm64 for the Pi3 but you are right 4.9 RC4 looks similar to 4.8.6.
There is Zero support in 4.9, in the device tree, now a specific dts file for Zero, fixes i2s and LED.
Time to fire up buildroot?

Suse SLES is totally different but I might have a look in it anyway.

Hey 4.8.7 got released overnight, hard to keep up to date sometimes.

bcm2837 dts files are in the arch/arm64/boot/dts/broadcom folder even in 4.8.7.
Maybe this is what Linus was saying when he meant Pi3 support, putting 2837 in arm64.
Yep, checked with 4.4.31, no Pi3 in arch/arm64/boot/dts/broadcom

interesting setups in the ns2.... files, clocks, reg addresses
So does a 4.8.x kernel just work on Pi's(4.9 for Zero) without RPF making a tweaked version?
haiqu
Posts: 252
Joined: Mon Oct 31, 2016 5:09 am
Location: Brisbane

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

Postby haiqu » Fri Nov 11, 2016 3:19 am

Ah yeah, found it. Thanks.

I'm using the Sunxi (Allwinner) bleeding-edge dev tree and for a moment thought that they might have taken it out so that the competition couldn't use their build tools. But it looks like the driver overlays are all there.
Make mine a Pi with source.
Gavinmc42
Posts: 1560
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Mon Nov 14, 2016 7:59 am

Is there an example in the new release that works for the Aarch64/ARMv8?
What is the compiler option to make an assembly file output?

So many new toys to play with, lucky the bouncing boxes times out, else I would still be staring at it :P
User avatar
Ultibo
Site Admin
Posts: 2189
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

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

Postby Ultibo » Mon Nov 14, 2016 10:27 am

Gavinmc42 wrote:Is there an example in the new release that works for the Aarch64/ARMv8?

The 64-bit support is very raw, at this stage the compiler has been updated to include the aarch64-ultibo target plus we've added the toolchain (as, ld etc) but the boot and platform modules (some of the most fundamental bits of the RTL) do not have any 64-bit code so it isn't possible to create a working project yet.

Having said that we deliberately made QEMU one of the supported 64-bit targets in the hope of speeding up the process, I'm sure you can appreciate how long it takes to get working when each cycle involves code, compile, swap SD card, reboot, check result, code, compile etc etc, having QEMU to try out initial code should cut many hours from the process.

So you can convert any QEMU or RPI3 project to an ARMv8/AARCH64 project by changing the project options to look like this:

QEMU 64-bit.png
QEMU 64-bit.png (23.02 KiB) Viewed 2305 times

This will actually compile and can be loaded using the Tools, Run in QEMU... option from the menu. The result will be exactly what I posted here viewtopic.php?f=10&t=329

Gavinmc42 wrote:What is the compiler option to make an assembly file output?

You can pass -a to FPC to tell it not to delete the generated assembler files, or you can run objdump on a compiled project to get an assembler listing of the contents (see viewtopic.php?f=10&t=306&p=1318&hilit=objdump#p1318)
Ultibo.org | Make something amazing
https://ultibo.org
haiqu
Posts: 252
Joined: Mon Oct 31, 2016 5:09 am
Location: Brisbane

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

Postby haiqu » Mon Nov 14, 2016 2:36 pm

Ultibo wrote:
So you can convert any QEMU or RPI3 project to an ARMv8/AARCH64 project by changing the project options to look like this:

QEMU 64-bit.png

This will actually compile and can be loaded using the Tools, Run in QEMU... option from the menu. The result will be exactly what I posted here viewtopic.php?f=10&t=329



I actually tried the "Hello World!" program and got:

"Guest has not initialized the display (yet)."

Guess I need to update the rtl ...

Edit: Nope, that didn't help. What haven't I done?
Make mine a Pi with source.
haiqu
Posts: 252
Joined: Mon Oct 31, 2016 5:09 am
Location: Brisbane

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

Postby haiqu » Mon Nov 14, 2016 7:58 pm

Aha, I figured it out. You have to click View->Serial0 in Qemu.
Make mine a Pi with source.
Gavinmc42
Posts: 1560
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Tue Nov 15, 2016 2:03 am

Haiqu, thanks for figuring that out, so we have serial console output in Aarch64, good enough for lots of debugging.
Saved me from asking and looking stupid again ;)
There is now so much stuff in Ultibo to learn.

QEMU is going to be so useful Garry.
Yep compile, copy to SD, boot in Pi, debug, etc does take time.

The core 64bit stuff is there, the rest will fall like domino's now :lol:
It will help for porting to other CPU/SBC's too.

Found the assembly options.
Project - Project Options - Compiler Options - Custom Options - All Options ....

Hmm back in the old days, you had only a few choices, map, asm, list......
Fanfold printouts and highlighters, where's that "grumpy old man" Smiley?
Gavinmc42
Posts: 1560
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Wed Jan 04, 2017 4:05 am

I was going through a back issue of Linux Mag and came across this.
http://performance.linaro.org/

All about getting performance on 64bit ARM and QEMU stuff.

With uEFI, uBoot, Grub2 now working on Pi's maybe Linaro will adopt Pi's as a Platform?
What's that line from the Castle?

http://www.linaro.org/downloads/
Check the bottom of the page
Interested in bare-metal development for ARM embedded processors?
We’re working with ARM to also supply a Cortex-R and Cortex-M bare-metal build with yearly major releases and quarterly updates


Will Ultibo get there first?
Is it just RTL's needing to be ported to Cortex R/M's?
Gavinmc42
Posts: 1560
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

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

Postby Gavinmc42 » Wed Jan 04, 2017 11:42 am

Make sure you don't OTP the USB boot mode on the Pi3.
It does not work with Opensuse Aarch64 on SDcard yet :(
https://en.opensuse.org/HCL:Raspberry_Pi3

Opensuse worked well enough to play one game of mahjong, if a bit slow.
Not sure if it has accelerated graphics, mesa?
Might have to get another Pi 3 :P

Opensuse forums are a pain to navigate :(
Might have to borrow a work Pi3 to see if I can get 64bit Laz/Fpc working.
Bleeding edge stuff again.

Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 1 guest