Recent

Author Topic: QEMU Raspbian with FPC/Lazarus  (Read 8037 times)

ttomas

  • Full Member
  • ***
  • Posts: 245
QEMU Raspbian with FPC/Lazarus
« on: October 17, 2017, 11:08:54 am »
While waiting for Pi3 (20-42 days) from aliexpress, I try QEMU emulation.
I install QEMU,latest kernel kernel-qemu-4.4.34-jessie and latest image 2017-09-07-raspbian-stretch.zip.
Install everything (you have a lot tutorials on-line).
Raspbian  boot and work OK.
Try to crosscompile cmd application (first try with TForm), compile build is OK, but executable fail to run Access valiation on address xxxx.
I use Windows 10, fpcupdeluxe NewPascal and Trunk/Trunk build and crosscompile arm/linux from fpcupdeluxe. I try all ARM CPU processors.
I also try to run binary fpcupdeluxe-arm-linux, same problem same error only address is changed.
I need emulation for testing corsscompile app and need only display and networking. I don't need to install fpc/lazarus on emulation.
I resize image +4G and change swap file to 1GB (emulation have only 256MB RAM).

Any one have success with QEMU emulation and FPC/Lazarus?
Any hint?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: QEMU Raspbian with FPC/Lazarus
« Reply #1 on: October 17, 2017, 01:05:55 pm »
Raspbian uses ARM Hard Float everywhere, so pass -dFPC_ARMHF when building the compiler toolchain, along with -CpARMV6 (any other optimization options is up to you).

ttomas

  • Full Member
  • ***
  • Posts: 245
Re: QEMU Raspbian with FPC/Lazarus
« Reply #2 on: October 17, 2017, 10:42:01 pm »
Problem solved
Manual download CrossLibsLinuxARMRaspbian.zip and extract in cross
from https://github.com/newpascal/fpcupdeluxe/releases
and add LibraryPath when complie.
Great
Just tested mORMot sample 31 WebSockets, cross compiled client and server works fine i QEMU emulation.
TestSQL3 failed on start - investigating.

 

TinyPortal © 2005-2018