box86 icon indicating copy to clipboard operation
box86 copied to clipboard

Question about ODROID target

Open MichaIng opened this issue 1 year ago • 4 comments

For which particular Odroid SBC is the ODROID target meant?

It sets build flags for ARM Cortex-A9 and VFPv4, which seems conflicting, since the Cortex-A9 supports VFPv3 only and optionally: https://en.wikipedia.org/wiki/Comparison_of_ARM_processors#ARMv7-A

The only 2 ODROID SBCs with a Cortex-A9 are Odroid U2 and U3 with a Samsung Exynos 4412 with VFPv3: https://en.wikipedia.org/wiki/ODROID

The much more relevant (32-bit) Odroid XU3/XU4/MC1/HC1/HC2 (all same SoC) have Cortex-A7 and Cortex-A15 (big.LITTLE), Odroid C0/C1/C1+ (all same SoC) have Cortex-A5. These both have a VFPv4, so no issues with that part.

I have not much insights about what the compiler does with the flags, so I want to evaluate whether it still makes sense to use the ODROID target for above SBCs, or better just use generic ARM_DYNAREC, and in case whether it makes sense to add two new targets for these more relevant Odroid SBCs?

MichaIng avatar May 22 '24 13:05 MichaIng

The ODROID target was the XU4. You can do a PR with more odroid target if you want.

ptitSeb avatar May 22 '24 13:05 ptitSeb

Does it make sense to name the target ODROIDXU4 then, leaving ODROID as alias for backwards compatibility?

Since Cortex-A9 is older than the other 3 CPUs, it is probably a feasible minimal compatible flag. However, for the XU4, gcc 4.9 added support for e.g. -mcpu=cortex-a15.cortex-a7 to optimise for this big.LITTLE combinations. If you do not want to keep support for older gcc versions, shall I update it? I can test build and binary as well here.

For a Odroid C1 target, I first need to find someone who is able and open to test the binary, since I have no C1, just provide install options for them 🙂.

MichaIng avatar May 22 '24 14:05 MichaIng

Yeah, you can update, that sounds reasonable to me.

ptitSeb avatar May 22 '24 15:05 ptitSeb

PR open for the first part: #970

I decided to not leave the ODROID target for backwards compatibility. IMO it is better when everyone directly recognises this change and selects the appropriate new target instead. Quite possible that some used the ODROID target, while others would have matched better, and as an alias for ODROIDXU4, when now -mcpu=cortex-a15.cortex-a7 is used, it will work even less well or not at all on other ODROID SBCs. However, if you wish to keep the ODROID target, as alias or with its old options, I will of course re-add it.

I'll add an ODROID-C1 target with a dedicated PR.

MichaIng avatar Jun 17 '24 20:06 MichaIng

Can this ticket be closed now?

ptitSeb avatar Aug 11 '24 13:08 ptitSeb

Yes can be closed. I'll add another ODROID-C1 target, but that is unrelated.

MichaIng avatar Aug 11 '24 21:08 MichaIng