fpcupdeluxe icon indicating copy to clipboard operation
fpcupdeluxe copied to clipboard

Enable regular builds for fpcupdeluxe on darwin-aarch64

Open michael-ring opened this issue 4 years ago • 22 comments

I have built fpcupdeluxe quite often ion the last weeks and have also have done quite a number of installs & rebuilts with it, to my knowledge it now works well on darwin-aarch64, can it get added to the regular releases on github?

michael-ring avatar Feb 17 '21 20:02 michael-ring

For sure !! It would make me very happy to be able to release a good working fpcupdeluxe. But not yet. Final tweaks are made and need to be tested. I guess a couple of days ... And, I need your help in signing naturally ... ;-)

LongDirtyAnimAlf avatar Feb 18 '21 09:02 LongDirtyAnimAlf

I think I found a reasonable way to do the signing, please ping me when you have a little spare time to test my ideas....

michael-ring avatar Feb 19 '21 09:02 michael-ring

I changed my binutils buildscript to generate signed versions of binutils for aarch64, do you need any other target? I still have to check gdb, at least for arm it does not work, I need to use x86_64 built version.... Please ignore wrong directory/filenames

/Users/ring/fpcupdeluxe/cross/bin/riscv32-none-elf/riscv32-embedded-ld
/Users/ring/fpcupdeluxe/cross/bin/riscv32-none-elf/riscv32-embedded-objcopy
/Users/ring/fpcupdeluxe/cross/bin/riscv32-none-elf/riscv32-embedded-as
/Users/ring/fpcupdeluxe/cross/bin/riscv32-none-elf/riscv32-embedded-ar
/Users/ring/fpcupdeluxe/cross/bin/avr/avr-embedded-ld
/Users/ring/fpcupdeluxe/cross/bin/avr/avr-embedded-as
/Users/ring/fpcupdeluxe/cross/bin/avr/avr-embedded-ar
/Users/ring/fpcupdeluxe/cross/bin/avr/avr-embedded-objcopy
/Users/ring/fpcupdeluxe/cross/bin/arm-none-eabi/arm-embedded-as
/Users/ring/fpcupdeluxe/cross/bin/arm-none-eabi/arm-embedded-ar
/Users/ring/fpcupdeluxe/cross/bin/arm-none-eabi/arm-embedded-ld
/Users/ring/fpcupdeluxe/cross/bin/arm-none-eabi/arm-embedded-objcopy
/Users/ring/fpcupdeluxe/cross/bin/riscv64-none-elf/riscv64-embedded-objcopy
/Users/ring/fpcupdeluxe/cross/bin/riscv64-none-elf/riscv64-embedded-as
/Users/ring/fpcupdeluxe/cross/bin/riscv64-none-elf/riscv64-embedded-ar
/Users/ring/fpcupdeluxe/cross/bin/riscv64-none-elf/riscv64-embedded-ld
/Users/ring/fpcupdeluxe/cross/bin/mipsel-sde-elf/mipsel-embedded-ld
/Users/ring/fpcupdeluxe/cross/bin/mipsel-sde-elf/mipsel-embedded-objcopy
/Users/ring/fpcupdeluxe/cross/bin/mipsel-sde-elf/mipsel-embedded-ar
/Users/ring/fpcupdeluxe/cross/bin/mipsel-sde-elf/mipsel-embedded-as


Found a fix for gdb...

michael-ring avatar Feb 19 '21 21:02 michael-ring

binutils for avr-embedded are missing, I can provide them (see above)

michael-ring avatar Feb 20 '21 19:02 michael-ring

Yes. Please make them available somewhere for me. I will zip them and put them in the right spot for fpcupdeluxe to find them on GitHub. Many thanks.

LongDirtyAnimAlf avatar Feb 20 '21 19:02 LongDirtyAnimAlf

And, if fpcupdeluxe runs ok, I would welcome a signed version of fpcupdeluxe itself, when a final version is release-ready.

LongDirtyAnimAlf avatar Feb 20 '21 19:02 LongDirtyAnimAlf

http://temp.michael-ring.org/signedtools.zip

I have started adding some extratools like st-link and avarice, keep them out if you do not like to also put those in the cross/bin tree.... also, feel free to rename them as it fits your needs, i will then adjust my buildscript accordingly.

michael-ring avatar Feb 20 '21 20:02 michael-ring

Do not yet invest too much time in this, I will have to doublecheck signed binaries for x86_64 on Darwin and some patch that needs to get applied for gdb on avr, but for this I have to also do windows builds so that others can test things work as expected....

michael-ring avatar Feb 21 '21 10:02 michael-ring

Your tools !! https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/darwinarm64crossbins_v1.1

LongDirtyAnimAlf avatar Feb 21 '21 11:02 LongDirtyAnimAlf

TnX, did some building, avr has the same issue as for Darwin-x86_64, rtl_extras asre built and faill...

Also xtensa-freertos fails:
fpcupdeluxe: info: FPCCrossInstaller (BuildModule: FPC): Building module FPC...
fpcupdeluxe: info: FPC xtensa-freertos cross-builder: Detected source version FPC (compiler): 3.3.1
fpcupdeluxe: info: FPCCrossInstaller (BuildModuleCustom: FPC): Looking for crosstools and crosslibs on system. Please wait.
fpcupdeluxe: TAny_freertos-xtensa: Found correct binary utilities in directory /Users/ring/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin
fpcupdeluxe: ERROR: Failed to get crosslibrary


Fpcupdeluxe failed due to missing cross libraries.
Looking for fpcupdeluxe cross-tools on GitHub (if any).
Going to look for the right cross-libraries. Can (will) take some time !
Looking for: CrossLibsFreeRTOSXtensa
Looking for libs in: https://api.github.com/repos/LongDirtyAnimAlf/fpcupdeluxe/releases/tags/crosslibs_v1.3
Looking for libs in: https://api.github.com/repos/LongDirtyAnimAlf/fpcupdeluxe/releases/tags/crosslibs_v1.2
Looking for libs in: https://api.github.com/repos/LongDirtyAnimAlf/fpcupdeluxe/releases/tags/crosslibs_v1.1
Looking for libs in: https://api.github.com/repos/LongDirtyAnimAlf/fpcupdeluxe/releases/tags/crosslibs_v1.0
No luck in getting then cross-tools ... aborting.

michael-ring avatar Feb 21 '21 14:02 michael-ring

Might be a case issue. Was: CrossLibsFreeRTOSxtensa.zip New: CrossLibsFreeRTOSXtensa.zip

Please test again.

LongDirtyAnimAlf avatar Feb 21 '21 16:02 LongDirtyAnimAlf

Still not working:

Looking for: CrossLibsFreeRTOSXtensa Looking for libs in: https://api.github.com/repos/LongDirtyAnimAlf/fpcupdeluxe/releases/tags/crosslibs_v1.3 ...

michael-ring avatar Feb 21 '21 16:02 michael-ring

I think you are rate-limited now. The GitHub api has rate limiting: 128 requests per hour. Please be patient ... ;-)

LongDirtyAnimAlf avatar Feb 21 '21 16:02 LongDirtyAnimAlf

I have spent quite some time on making gdb & other tools link static so that they can be codesigned without issues (don't ask.... it was a mess)... Github repo for buildscript will be:

https://github.com/michael-ring/develtools4fpc

Now that I am done I have everything codesigned for Darwin aarch64 and x86_64, next step is Windows... I have also switched building to arm-none-eabi- prefix as discussed in the other issue...

There is one opwn topic, openocd comes with tons of scripts that need to be available for it to work, the good question is where to put them....

In a standard install files end up here:

/usr/local/bin
/usr/local/share/openocd
/usr/local/share/openocd/contrib
/usr/local/share/openocd/scripts
/usr/local/share/openocd/OpenULINK

what I could do is put openocd to:

cross/bin/arm-embedded/openocd

and then put all the stuff from share in a tcl directory, also in bin:

cross/bin/arm-embedded/tcl/contrib
cross/bin/arm-embedded/tcl/scripts
cross/bin/arm-embedded/tcl/OpenULINK

I do not particulary like that solution, only plus point is that this can be distributed that way without any modification to fpcupdeluxe.

What do you think?

michael-ring avatar Feb 22 '21 16:02 michael-ring

Fpcupdeluxe puts all externals in a ccr directory, inside its own install directory. All extra modules are placed there. Perhaps it would be good to also place the new tools there ?

LongDirtyAnimAlf avatar Feb 22 '21 16:02 LongDirtyAnimAlf

why not..., it really does not matter to me, I used cross/bin because the binutils and gdb are also there. What will I have to do to create something that can be distributed to the ccr directory? Do you want me to send you zips or should I create releases for

https://github.com/michael-ring/develtools4fpc

How should the directory structure inside of the zip's / releases look like?

michael-ring avatar Feb 22 '21 16:02 michael-ring

Please create a release ! The directory structure is not that important. I will create a special (hidden) installer for these tools that can handle everything.

LongDirtyAnimAlf avatar Feb 22 '21 16:02 LongDirtyAnimAlf

Building xtensa now worked. From my point of view aarch64 is ready for prime-time, close this bug if you like......

I will create a new issue for integration develtools4fpc when I am done with testing...

michael-ring avatar Feb 22 '21 20:02 michael-ring

Thanks for all your help Michael !! Closing.

LongDirtyAnimAlf avatar Feb 23 '21 05:02 LongDirtyAnimAlf

Hello Michael,

This is the first binary I signed myself with your credentials. Would you mind testing it ? Thanks !

https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2n/fpcupdeluxe-aarch64-darwin-cocoa.zip https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2n/fpcupdeluxe-x86_64-darwin-cocoa.zip

LongDirtyAnimAlf avatar Mar 27 '21 10:03 LongDirtyAnimAlf

On aarch64 things work as expected, I get the message that the app was downloaded from the internet and after accepting that fpcupdeluxe starts and I could successfully rebuild fpc+lazaraus+embedded.

On x86_64 things do not work, this entry may help, seems like notarization is needed in addition:

https://stackoverflow.com/questions/59879731/apple-cannot-check-it-for-malicious-software

michael-ring avatar Mar 27 '21 10:03 michael-ring

fpc specific tool:

https://github.com/neurolabusc/NotarizeFPC

michael-ring avatar Mar 27 '21 10:03 michael-ring