Recent

Author Topic: 32 bit Raspbian binary -> 64 bit Raspberry OS and Pinebook Pro ?  (Read 398 times)

dieselnutjob

  • Full Member
  • ***
  • Posts: 176
Hi
I produce binaries for my customers compiled with fpc and fpgui.
I currently supply 32 bin Intel Windows, 32 and 64 bit Intel Linux and Raspbian (which I guess means armhf/Linux).

I am actually using my Pi for something else so probably need to buy another one, but I am quite tempted to get a Pinebook Pro, and there's 64 bit Raspberry Pi OS coming soon as well.

Do I need to do supply separate armhf and aarch64 binaries (and is aarch64 the correct term for 64 bit Raspberry Pi OS)?
or
Is there a way to run armhf binaries on an aarch64 OS?

If I buy a Pinebook Pro instead of a new Pi is that essentially the same thing?

so if I compile and test binaries on a Pinebook Pro does that mean that they are also good for a customer with a 64 bit Pi?

Is it hard to cross compile armhf binaries on an aarch64 OS? or maybe even run armhf fpc on aarch64?

The application is fairly self contained.  It access files on the hard drive using normal fpc commands, a serial port through an FTDI R232 chip on /dev/ttyUSBx, and a local x-windows server using fpgui and that's about it.

thanks, DNJ

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8611
  • FPC developer.
Re: 32 bit Raspbian binary -> 64 bit Raspberry OS and Pinebook Pro ?
« Reply #1 on: June 16, 2020, 06:14:18 pm »
Afaik 64-bit arm has mostly been developed with an Ubuntu install, rather than Rasbian (Raspbian 64-bit is a recent development).

So easiest is to try with a arm 64-bit ubuntu image for the RPI3/4

MarkMLl

  • Hero Member
  • *****
  • Posts: 1118
Re: 32 bit Raspbian binary -> 64 bit Raspberry OS and Pinebook Pro ?
« Reply #2 on: June 16, 2020, 06:56:44 pm »
I can't comment on that specific hardware, but I've successfully shared common binaries between an Rpi (running Raspbian and Debian) and something in the same form factor which I /think/ had a RockChip CPU.

On a PC running Debian (or a derivative), it is of course possible to run 32-bit programs on a 64-bit system using Multiarch and judicious installation of 32-bit libraries. Right now it's anybody's guess how well that would work on aarch64, I'd suggest trying it and being prepared to engage with the various OS mailing lists.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

dieselnutjob

  • Full Member
  • ***
  • Posts: 176
Re: 32 bit Raspbian binary -> 64 bit Raspberry OS and Pinebook Pro ?
« Reply #3 on: June 17, 2020, 01:00:02 pm »
this document https://wiki.ubuntu.com/ARM/RaspberryPi suggests that multiarch works on 64 bit linux on a Pi.  Have I understood it correctly?

If I used multiarch to run 32 bit fpc and lazarus on a 64 bit Pi linux does that mean that it will produce 32 bit binaries that would also run on a 32 bit Pi ?

I guess that I need to ask the same questions over on the Pinebook forums.
« Last Edit: June 17, 2020, 01:21:34 pm by dieselnutjob »

PascalDragon

  • Hero Member
  • *****
  • Posts: 1966
  • Compiler Developer
Re: 32 bit Raspbian binary -> 64 bit Raspberry OS and Pinebook Pro ?
« Reply #4 on: June 17, 2020, 01:20:20 pm »
this document https://wiki.ubuntu.com/ARM/RaspberryPi suggests that multiarch works on 64 bit linux on a Pi.  Have I understood is correctly?

I used multiarch to run 32 bit fpc and lazarus on a 64 bit Pi linux does that mean that it will produce 32 bit binaries that would also run on a 32 bit Pi ?

It should. Only potential problem could be library dependencies that might be different between distributions (e.g. a Debian using an older version of a library or so).

I guess that I need to ask the same questions over on the Pinebook forums.

The question will simply be what you'll have to setup in the Pinebook's Linux distribution to enable multiarch support.

 

TinyPortal © 2005-2018