Results 1 to 5 of 5

Thread: Pi4 showing 32-bit not 64-bit

  1. #1
    Join Date
    2020-Jan
    Posts
    3

    Pi4 showing 32-bit not 64-bit

    I recently install to a Raspberry Pi 4 using Kali Linux RaspberryPi 2 (v1.2), 3 and 4 64-Bit When I use grep -qP '^flags\s*:.*\blm\b' /proc/cpuinfo && echo 64-bit || echo 32-bit it replies 32-bit. Is there a further process to enable 64-bit or is it now supported yet.

  2. #2
    Join Date
    2014-Feb
    Posts
    309
    This is because you're searching for an x86_64 cpuflag in /proc/cpuinfo, which... does not exist on arm64/aarch64. Unfortunately, there isn't a cpuinfo flag that specifies 64bit on arm64.

    There are a few ways...

    You could grep dmesg output -

    systemd spits out :
    Code:
    [    3.872742] systemd[1]: Detected architecture arm64.
    uname -a will have v8 in the name:
    Code:
    Linux rpi4 4.19.93-Re4son-v8l+ #1 SMP PREEMPT Tue Jan 7 22:53:24 UTC 2020 aarch64 GNU/Linux
    You could also check the bash binary via "file" if you wanted to:
    Code:
    root@rpi4:~# file /bin/bash
    /bin/bash: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-a
    arch64.so.1, BuildID[sha1]=3951fd7c1824802b0203cfb7863bad8f9d11dab8, for GNU/Linux 3.7.0, stripped

  3. #3
    Join Date
    2020-Jan
    Posts
    3
    Yes uname -m gives aarch64. Thanks. This grep code from Kali Linux Revealed also gives 32-bit on my Virtual Machine running inside MacOS. If you change around the || at the end to put 64-bit last it gives 64-bit. Must be an error somewhere.

  4. #4
    Join Date
    2014-Feb
    Posts
    309
    It's looking for a cpuflag in cpuinfo that isn't there. That's really not a great way to check if it's 32bit or 64bit, all it actually shows is whether or not that cpuflag exists.

  5. #5
    Join Date
    2020-Jan
    Posts
    3
    Thanks for clearing this up for me.

Similar Threads

  1. Desktop Not showing
    By Konseki in forum TroubleShooting Archive
    Replies: 2
    Last Post: 2022-07-03, 12:18
  2. DVD/CD rom no longer showing....
    By doyphoto in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2014-08-11, 05:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •