[fpc-pascal] How to build for arm6 in RaspberryPi on arm7?
Bo Berglund
bo.berglund at gmail.com
Mon Sep 14 09:30:11 CEST 2020
On Wed, 09 Sep 2020 23:47:28 +0200, Bo Berglund via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:
>OK, I conducted an experiment tonight, it took a while:
>
>1) Grabbed a new SDcard and wrote PiOS Lite on it.
>
>2) Configured the SDcard in another RPi4 where I can access all of the
>new SD and put my favourite .bashrc and init scripts etc on it.
>
>3) Then I put my installation script for Fpc/Lazarus on it and edited
>it so it would install 3.0.4 and 2.0.8 and specified the Armv6 target
>when it ran.
>
>4) The full installation including installing subversion and all
>dependencies before retrieving the fpc and lazarus sources via svn and
>building both and crteating the menu desktop entry took 18 minutes.
>
>5) Inside Lazarus I then used OnLinePackageManager to install the
>extra packages I need all the time.
>
>6) Finally I retrieved the sources for my test project too and opened
>it and built it successfully.
>
>And this version works in both RPi4 and RPiZeroW! :-)
>
>BOTTOM LINE:
>------------
>For development targeting any RPi version install fpc and lazarus
>using the ARMv6 flags to make in both cases.
>
>What are the ramifications of not using a higher ARMvx number?
>Will the application perform worse and if so in what way?
>
>I am not working on projects that need high perfoprmance in terms of
>speed anyway. I just want as snappy a dev IDE (==Lazarus) as
>possible...
>
>Back to my original dev RPi4:
>-----------------------------
>Fpc and Lazarus were built using make in the source dirs and using the
>ARMv7 flag.
>Now I would like to change it to be like the one described above.
>So can I just enter the 3.0.4 source dir and execute a make clean
>followed by the make commands used when building for ARMv6?
>
>What about make install in FPC? Will it overwrite whatever stuff it
>wrote into ~/lib/fpc/3.0.4 and ~/share/...?
>
>Is this the proper way to change the installation from v7 to v6?
Progress update (from the Fpc make thread):
-------------------------------------------
I proceeded to create a script that rebuilds fpc using the info
obtained here.
I applied it on the rpi4-dev machine where fpc was installed as ARMv7.
Took 10 minutes to complete the three steps.
> make clean
> make all
> make install
Then I built the test application and copied it over to the PiZero
where it did work just fine! No more exceptions!
So I can confirm that this rebuild method works.
--
Bo Berglund
Developer in Sweden
More information about the fpc-pascal
mailing list