Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Help improving the installation guide and support hardware lists



On Thu, 28 May 2020 15:35:56 +0100
Robert Swindells <rjs%fdy2.co.uk@localhost> wrote:

> Running an earmv6 or earmv7 userland should work now, they use a
> different page size to aarch64, 8Kb vs 4KB, but this should be handled
> correctly by jemalloc().
> 
> The thing that is missing is getting the system to use the correct
> architecture for pkgsrc.

OK, so from what I can see, NetBSD-9 built for aarch64 does not include
multi-lib GCC like it does for sparc64, hence you can't just run
"gcc -m32 ...". If I understand you correctly, the only way to do it is
to unpack 32-bit userland in chroot and work there. I don't know if
there is a good use case for running 32-bit applications with 64-bit
kernel (maybe to accommodate non-open source binaries, or reduce
memory usage?), I was just curious if 32-bit mode was supported on
NetBSD aarch64.


> >- How do you build 32-bit image? I tend to use
> >  "build.sh -m evbarm -a earmv7hf" but had to add hacks to mk.conf as
> >  parts of NetBSD use older assembly and fail to build with specific
> >  -mcpu flags, so need to use -mtune instead.
> >
> ># RPI3 CPU: cortex-a53
> ># RPI4 CPU: cortex-a72
> >.if empty(CPUFLAGS:M-march=*) && empty(CPUFLAGS:M-mcpu=*)
> >CPUFLAGS+=-mcpu=cortex-a53
> >#CPUFLAGS+=-mcpu=cortex-a72
> >.else
> >CPUFLAGS+=-mtune=cortex-a53
> >#CPUFLAGS+=-mtune=cortex-a72
> 
> Again, using AArch64 compiler options in a ARM build isn't really
> supported. The cross toolchain in an earmv7hf build will be 32-bit.
> 

Why are they aarch64 compiler options? If I'm using earmv7hf
cross-compiler and passing "-mcpu=cortex-a53" it should generate 32-bit
object files but optimized for this CPU. These are valid ARM compiler
options:

https://gcc.gnu.org/onlinedocs/gcc-7.4.0/gcc/ARM-Options.html#ARM-Options


Home | Main Index | Thread Index | Old Index