Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-03

Aarch64 as CPU target for RPi3 with Linux as OS

21 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Schnell
to Alfred: While preparing fpc(laz)up for my RPi3, I did encounter an error with Lazarus. Choosing…
Alfred wrote
While preparing fpc(laz)up for my RPi3, .... Choosing a64 as CPU target

I am exited to see that there is a very cheap testing platform for a64 arch !

Question: can a64 hardware and Linux run a32 programs (like X64 systems can run X32 programs) ?

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160302/045817e7/attachment.html>

Reply by email

Michael Ring
to Michael Schnell

AFAIK This is the default mode on RPi for now, same for ODroid C2, it also currently runs a64 cpu with a a32 kernel, 'real' 64bit support will come later.

Michael

Michael Schnell wrote 17 lines
On 03/01/2016 09:45 PM, Alfred wrote: > While preparing fpc(laz)up for my RPi3, .... Choosing a64 as CPU target I am exited to see that there is a very cheap testing platform for a64 arch ! Question: can a64 hardware and Linux run a32 programs (like X64 systems can run X32 programs) ? -Michael -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160302/2cfd9fc1/attachment.html>

Reply by email

Michael Schnell
to Michael Ring
Michael Ring wrote
AFAIK This is the default mode on RPi for now, same for ODroid C2, it also currently runs a64 cpu with a a32 kernel, 'real' 64bit support will come later.

So Alfred will only be able to run 64 Bit Lazarus programs after updating the OS to a 64 bit version.

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160302/681305d9/attachment.html>

Reply by email

Bo Berglund
to Michael Schnell
Michael Schnell wrote 7 lines
On 03/02/2016 05:09 PM, Michael Ring wrote: > AFAIK This is the default mode on RPi for now, same for ODroid C2, it > also currently runs a64 cpu with a a32 kernel, 'real' 64bit support > will come later. > So Alfred will only be able to run 64 Bit Lazarus programs after updating the OS to a 64 bit version.

I asked on the RPi forum but it appears thta a 64 bit Raspbian kernel is a bit away from nos. See:
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=138385

Bo Berglund Developer in Sweden

Reply by email

Alfred
to Bo Berglund

For all RPi's I use Arch Linux.

However, at the moment, no easy Arch aarch64 distro available for RPi3. URL: https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3 Therefor, I used the general libraries to build the aarch64 cross-compiler.
URL: https://archlinuxarm.org/platforms/armv8/generic.

But, we indeed all have to wait for a 64bit kernel.

For real (industrial) applications, i will use the ODroid C2 ! Its better than the RPi3 for my purposes.

However, the main question still stands:

How to setup Lazarus to compile for Aarch64 ??
Fpc does NOT know what to do with -Pa64.
Fpc does know what to do with -Paarch64.

Reply by email

Michael Schnell
to Michael Ring: AFAIK This is the default mode on RPi for now, same for ODroid C2, it also currently runs…
Michael Ring wrote
AFAIK This is the default mode on RPi for now, same for ODroid C2, it also currently runs a64 cpu with a a32 kernel, 'real' 64bit support will come later.

So obviously the a64 hardware can run a32 code :-) .

Hence I suppose an a64 Linux distribution will come with the ability to run a32 user programs (but I did not yet read about this) .

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160303/02748113/attachment.html>

Reply by email

Bo Berglund
to Michael Schnell
Michael Schnell wrote 10 lines
On 03/02/2016 05:09 PM, Michael Ring wrote: > AFAIK This is the default mode on RPi for now, same for ODroid C2, it > also currently runs a64 cpu with a a32 kernel, 'real' 64bit support > will come later. > So obviously the a64 hardware can run a32 code :-) . Hence I suppose an a64 Linux distribution will come with the ability to run a32 user programs (but I did not yet read about this) .

That is what they say on the forum at least....
And they claim not so much is to be gained with 64 bit mode since RAM is just 1GB (currently).

Bo Berglund Developer in Sweden

Reply by email

Alfred
to Maxim Ganetsky

FYI.

All my RPi(2) FPC/Lazarus apps do run unchanged on the new RPi3, by just replacing the boot firmware with the latest firmware.

They were (cross-)compiled for ARMV7 hardfloat and run on Arch Linux.

And .... boot is fast ... and ... my apps run FAST !!! So, this makes the change towards the new RPi3 hardware a very easy one, at least for 32 bit apps.

Now we wait for 64 bit ... ;-)

Reply by email

Michael Schnell
to Bo Berglund: On Thu, 03 Mar 2016 10:53:43 +0100, Michael Schnell That is what they say on the forum at…
Bo Berglund wrote
And they claim not so much is to be gained with 64 bit mode since RAM is just 1GB (currently).

I suppose similar to X86-64, with aarch64 the speed advantage vs 32 bit is debatable.

Some applications that really do 64 bit calculation might get a lot faster

Some applications that use loops with a large code footprint might get slower, as the 64 bit code might be bigger and hence more cache loads might be necessary.

-Michael

Reply by email

Florian Klaempfl
to Alfred
Alfred wrote 6 lines
Working ! Thanks very much. I have now an aarch64 fpc(laz)up executable, compiled through Lazarus. If a 64 bit RPi3 distro is available, I will report back !!

I ordered also one in the hope using it to play with fpc aarch64. But currently it does not look good as it seems that it is not only a matter of the kernel but also the firmware. At least I didn't unwrap mine yet because of this, without aarch64 support I see no use for me in it.

Reply by email

Alfred
to Florian Klaempfl

Then, perhaps, the ODROID-C2 could be your toy for aarch64 !

Especially the eMMC connector makes it very suitable for reliable embedded (FPC) applications.
As well as its 2Gbyte SDRAM and Gigabit Ethernet.
Arch has 64 bit ready:
https://archlinuxarm.org/platforms/armv8/amlogic/odroid-c2

But, with the RPi3, you can reach a much wider audience. Which is my goal with the Pi.

Show quoted text 5 lines
I ordered also one in the hope using it to play with fpc aarch64. But currently it does not look good as it seems that it is not only a matter of the kernel but also the firmware. At least I didn't unwrap mine yet because of this, without aarch64 support I see no use for me in it.

Reply by email

Michael Schnell
to Florian Klaempfl: I ordered also one in the hope using it to play with fpc aarch64. But currently it does…
Florian Klaempfl wrote 5 lines
I ordered also one in the hope using it to play with fpc aarch64. But currently it does not look good as it seems that it is not only a matter of the kernel but also the firmware. At least I didn't unwrap mine yet because of this, without aarch64 support I see no use for me in it.

A friend of mine uses BeagleBone and he always upgrades the devices to a standard Debian distribution.

I don't see why this should not be possible / viable with RPI .

And I suppose there is an aarch64 Debian. (In any case it should be possible to build it (a time consuming process ;-) )

So this hold run on a RPI3 for testing purpose.

Supposedly some 64 Bit drivers for certain hardware on the RPI might be no yet available. but this should not hamper fpc / Lazarus testing .

-Michael

Reply by email

Mark Morgan Lloyd
to Florian Klaempfl: I ordered also one in the hope using it to play with fpc aarch64. But currently it does…
Florian Klaempfl wrote 12 lines
Am 03.03.2016 um 14:29 schrieb Alfred: > Working ! > > Thanks very much. > I have now an aarch64 fpc(laz)up executable, compiled through Lazarus. > > If a 64 bit RPi3 distro is available, I will report back !! I ordered also one in the hope using it to play with fpc aarch64. But currently it does not look good as it seems that it is not only a matter of the kernel but also the firmware. At least I didn't unwrap mine yet because of this, without aarch64 support I see no use for me in it.

So how's this set up: the same as Debian SPARC with a 64-bit kernel and 32-bit userland?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Florian Klämpfl
to Alfred: Then, perhaps, the ODROID-C2 could be your toy for aarch64 ! Especially the eMMC…
Alfred wrote
Then, perhaps, the ODROID-C2 could be your toy for aarch64 !

It is even not available yet? At least not at a reliable store in germany as far as I know.

Especially the eMMC connector makes it very suitable for reliable embedded (FPC) applications. As well as its 2Gbyte SDRAM and Gigabit Ethernet.

All this is not really needed for playing with fpc.

Reply by email

Alfred
to Alfred: While preparing fpc(laz)up for my RPi3, I did encounter an error with Lazarus. Choosing…

Hello,

I would like to inform you that Lazarus / FPC runs smooth on an Odroid-C2 under aarch64 (arch linux).

Proof:
https://drive.google.com/file/d/0B96fg3TpL5RDWnJiMUwyQ21hM00/view?usp=sharing

I hope that RPi3 will follow soon !

Many thanks for the good work !!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160318/e18e378f/attachment.html>

Reply by email

Michael Schnell
to Alfred
Alfred wrote 5 lines
Hello, I would like to inform you that Lazarus / FPC runs smooth on an Odroid-C2 under aarch64 (arch linux). Proof: https://drive.google.com/file/d/0B96fg3TpL5RDWnJiMUwyQ21hM00/view?usp=sharing

GREAT !!!

Many thanks for the good work !!!

+1 !

-Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160321/c5f11c7f/attachment.html>

Reply by email