0

I currently try to build a Debian package for the armhf (ARMv7) architecture, but I want the build script to recognize the architecture itself. The problem is, that I can not find the architecture, that APT uses to retrieve the package from a repository.

In my case, APT uses armhf, when it retrieves packages.

When I run uname -m, I get armv7 as a result. A grep -rn armhf /etc does not show any appearance of armhf, relevant for APT to choose from.

So, where can I get (Debian 9 (Stretch) or Armbian next) a reliable source for that information from the system that is independent of the architecture (my script should run also on i686, amd64, armel & arm64)?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
themole
  • 363
  • 3
  • 12

1 Answers1

0

The answer is

dpkg --print-architecture

This gives you the architecture Debian is selecting for packages. I'm not sure what happens on multi-architecture systems (i686 and amd64), but this can be separated quite easily.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
themole
  • 363
  • 3
  • 12