Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Armadaxp toolchain incorrectly using vfpv3-d16 flag? #5283

Open
1 task done
ta264 opened this issue May 25, 2022 · 5 comments
Open
1 task done

Armadaxp toolchain incorrectly using vfpv3-d16 flag? #5283

ta264 opened this issue May 25, 2022 · 5 comments
Labels

Comments

@ta264
Copy link
Contributor

ta264 commented May 25, 2022

Is this a new Bug?

  • I checkd that the bug hasn't been reported before

Package Name

syno-armadaxp

Package Version

All

Device Model

DS414

Device Architecture

ARMv7

Firmware Version

7.0.1

What happened?

The toolchain for armadaxp is setting -mfpu=vfpv3-d16.

TC_EXTRA_CFLAGS = -mhard-float -mfpu=vfpv3-d16

I think this is incorrect based on the output of

$ cat /proc/cpuinfo
Processor       : Marvell PJ4Bv7 Processor rev 2 (v7l)
processor       : 0
BogoMIPS        : 1332.01

processor       : 1
BogoMIPS        : 1332.01

Features        : swp half thumb fastmult vfp edsp vfpv3 tls
CPU implementer : 0x56
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0x584
CPU revision    : 2

Hardware        : Marvell Armada XP Development Board
Revision        : 0000
Serial          : 0000000000000000

Note it reports vfpv3 but not vfpv3d16.

Compare with the output on an Armada370 DS115j:

# cat /proc/cpuinfo
Processor       : Marvell PJ4Bv7 Processor rev 1 (v7l)
BogoMIPS        : 795.44
Features        : swp half thumb fastmult vfp edsp vfpv3 vfpv3d16 tls
CPU implementer : 0x56
CPU architecture: 7
CPU variant     : 0x1
CPU part        : 0x581
CPU revision    : 1

Hardware        : Marvell Armada-370
Revision        : 0000
Serial          : 0000000000000000

This does report vfpv3d16 and so needs the -mfpu=vfpv3-d16 flag.

I think the armadaxp toolchains should be using -mfpu=vfpv3 like armada375 does:

TC_EXTRA_CFLAGS = -mhard-float -mfpu=vfpv3

This is relevant to .NET apps, which currently required support for full vfpv3. Currently I believe this is only causing issues for armada370. There have been intermittent reports of .NET apps failing on armadaxp, alpine and alpine4k. I believe these issues are all due to outdated libraries on DSM and can be worked around via a chroot style wrapper.

I think I have a working Radarr for CPUs that only support vfpv3-d16 based on a custom .NET build and I am trying to work out which architectures this needs to be used for.

Reproduction steps

See https://github.com/SynoCommunity/spksrc/blob/a6da5d8e312b3755c157ce0ff248289a9a63a773/toolchain/syno-armadaxp-7.0/Makefile#L12

Install Log

N/A

Service Log

No response

Other Logs

No response

@mreid-tt
Copy link
Contributor

mreid-tt commented Apr 15, 2023

@hgy59, I came across this older issue and I was wondering of it's current applicability and impact on the dotnet-based packages.

EDIT: From previous reports it doesn't seem to affect persons running Sonarr v4 and Radarr on armadaxp archs (#5574 (comment)).

@mreid-tt
Copy link
Contributor

@th0ma7, any thoughts on this older bug report?

@th0ma7
Copy link
Contributor

th0ma7 commented Oct 13, 2024

I'm no expert in this, and would require in depth testing to confirm and validate potential impacts on other armv7 archs part of the same generic arch packaging.

@hgy59
Copy link
Contributor

hgy59 commented Oct 13, 2024

If we have packages that rely on the vfpv3-d16 flag, we need to consider the following:

  • we must not build generic ARMv7 packages
  • for each arm7 toolchain we must validate the related TC_EXTRA_CFLAGS in the toolchain Makefile

So far we build generic armv7 packages with the armada38x Toolchain
This includes the following archs (and TC_EXTRA_CFLAGS):

DSM6.2.4:

  • alpine (-mfloat-abi=hard -mtune=cortex-a15 -mfpu=neon-vfpv4 -mthumb)
  • alpine4k (-mfloat-abi=hard -mtune=cortex-a15 -mfpu=neon-vfpv4 -mthumb)
  • armada370 (-mhard-float -mfpu=vfpv3-d16)
  • armada375 (-mhard-float -mfpu=vfpv3-d16)
  • armada38x (-D__ARM_PCS_VFP=1)
  • armadaxp (-mhard-float -mfpu=vfpv3-d16)
  • monaco (-mcpu=cortex-a9 -march=armv7-a -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9)

DSM 7.1:

  • alpine (-mfloat-abi=hard -mtune=cortex-a15 -mfpu=neon-vfpv4 -mthumb)
  • alpine4k (-mfloat-abi=hard -mtune=cortex-a15 -mfpu=neon-vfpv4 -mthumb)
  • armada370 (-mhard-float -mfpu=vfpv3-d16)
  • armada375 (-mhard-float -mfpu=vfpv3-d16)
  • armada38x (-D__ARM_PCS_VFP=1)
  • armadaxp (-mhard-float -mfpu=vfpv3-d16)
  • monaco (-mcpu=cortex-a9 -march=armv7-a -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9)
  • comcerto2k (-mfloat-abi=hard -mtune=cortex-a15 -mfpu=neon-vfpv4 -mthumb)

DSM 7.2:

  • alpine (-mfloat-abi=hard -mtune=cortex-a15 -mfpu=neon-vfpv4 -mthumb)
  • alpine4k (-mfloat-abi=hard -mtune=cortex-a15 -mfpu=neon-vfpv4 -mthumb)
  • armada38x (-D__ARM_PCS_VFP=1)
  • monaco (-mcpu=cortex-a9 -march=armv7-a -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9)

@th0ma7
Copy link
Contributor

th0ma7 commented Oct 13, 2024

noting maybe related #6176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants