• Re: Inconsistent results for checking whether the OS is 32 or 64 bit

    From Theo@3:770/3 to Adam Funk on Mon Jul 22 11:35:18 2024
    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)

    Theo
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adam Funk@3:770/3 to Theo on Mon Jul 22 14:27:57 2024
    On 2024-07-22, Theo wrote:

    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).

    Right.


    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.

    Well, if I had done a fresh install on a 4B, I would have picked the
    64-bit option, so the 32-bit userland is a vestige of that.


    (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)

    Ouch. Fortunately I haven't run into that.


    --
    With the breakdown of the medieval system, the gods of chaos, lunacy,
    and bad taste gained ascendancy. ---Ignatius J Reilly
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to Theo on Mon Jul 22 21:17:02 2024
    On 22/07/2024 11:35, Theo wrote:
    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).

    Yes there are multiple kernels, and on suitable machines you can change
    from 32 to a 64 bit kernel by putting this in line /boot/config.txt

    arm_64bit=1

    ---druck
    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)