Hi
I have a Pi 4 B that I use headlessly over SSH. I can't remember
whether I installed the 32-bit or 64-bit OS on it, but different
commands found on the web give different results.
$ uname -m
aarch64
$ getconf LONG_BIT
32
$ dpkg --print-architecture
armhf
Which one is right?
Adam Funk wrote to All <=-
I have a Pi 4 B that I use headlessly over SSH. I can't remember
whether I installed the 32-bit or 64-bit OS on it, but different
commands found on the web give different results.
$ uname -m
aarch64
$ getconf LONG_BIT
32
$ dpkg --print-architecture
armhf
Which one is right?
I have a Pi 4 B that I use headlessly over SSH. I can't remember whether
I installed the 32-bit or 64-bit OS on it, but different commands found
on the web give different results.
$ uname -m
aarch64
$ getconf LONG_BIT
32
$ dpkg --print-architecture
armhf
Which one is right?
The mix you have is because Raspbian (Raspberry Pi OS) can be installed with a
64-bit kernel while using 32-bit user space applications.
It is a common configuration to maximize compatibility while allowing the benefits of a 64-bit kernel.
If you want to run a fully 64-bit system on your RPi 4B, I'm afraid you got to
reinstall.
Adam Funk <a24061@ducksburg.com> wrote:
Hi
I have a Pi 4 B that I use headlessly over SSH. I can't remember
whether I installed the 32-bit or 64-bit OS on it, but different
commands found on the web give different results.
$ uname -m
aarch64
$ getconf LONG_BIT
32
$ dpkg --print-architecture
armhf
Which one is right?
That sounds like a 32 bit OS on 64 bit hardware. Not sure if uname -m is
the kernel or the hardware, but perhaps you're running a 32 bit userland on
a 64 bit kernel?
Seems that Pi OS switched to a 64 bit kernel on the Pi4 in March 2023: https://github.com/raspberrypi/firmware/issues/1795
It looks like 'getconf' returns glibc parameters, which would be 32 bit on a 32 bit userland.
Theo
17 Jul 24 15:03, you wrote to all:
$ uname -m
aarch64
This shows your kernel is 64-bit
$ getconf LONG_BIT
32
This indicates that the user applications are compiled for a 32-bit architecture.
$ dpkg --print-architecture
armhf
This shows the distribution you have installed is for the 32-bit ARM architecture
Which one is right?
The mix you have is because Raspbian (Raspberry Pi OS) can be installed with a
64-bit kernel while using 32-bit user space applications.
It is a common configuration to maximize compatibility while allowing the benefits of a 64-bit kernel.
If you want to run a fully 64-bit system on your RPi 4B, I'm afraid you got to
reinstall.
I'm starting to wonder if I just moved the SD card and external USB
drive from a 2 to a 4B when I got the 4B and kept upgrading. Would
that explain this situation?
Adam Funk <a24061@ducksburg.com> wrote:
I'm starting to wonder if I just moved the SD card and external USB
drive from a 2 to a 4B when I got the 4B and kept upgrading. Would
that explain this situation?
It looks like it was changed in an update. I think the Pi maintains
multiple kernels in /boot, so it's possible the same SD card will boot with
a 64-bit kernel on a Pi4 and 32-bit kernel on a Pi2 (especially the v1.0 Pi2 with a Cortex A7 which doesn't support 64 bit).
So it may not be that moving the card has affected it, just that the single '32 bit' Pi OS boots a different kernel depending on which hardware you put the card into.
(this has caused some troubles for build systems which use uname -m to work out whether to build 32 or 64: it returns 64, but the right answer is 32.
The same would happen with a 32 bit chroot on a 64 bit x86)
Adam Funk <a24061@ducksburg.com> wrote:
I'm starting to wonder if I just moved the SD card and external USB
drive from a 2 to a 4B when I got the 4B and kept upgrading. Would
that explain this situation?
It looks like it was changed in an update. I think the Pi maintains
multiple kernels in /boot, so it's possible the same SD card will boot with
a 64-bit kernel on a Pi4 and 32-bit kernel on a Pi2 (especially the v1.0 Pi2 with a Cortex A7 which doesn't support 64 bit).
Sysop: | Weed Hopper |
---|---|
Location: | Clearwater, FL |
Users: | 14 |
Nodes: | 6 (0 / 6) |
Uptime: | 231:35:05 |
Calls: | 55 |
Calls today: | 1 |
Files: | 50,127 |
D/L today: |
31 files (3,917K bytes) |
Messages: | 275,361 |