Seems a little bit weird but using a 32bit RPIOS bookworm image, in a Pi4 it uses a 64bit kernel (kernel8) and 32bit userland, in practice this will work fine, its something that appears counter intuitive as the image is named 32bit and there are 32bit kernels that work on the Pi4.
The arm_64bit kernel flag in config.txt doesn't exist by default, at least for the lite image.
I guess the only impacts are the difference in performance, difference in kernel memory usage and having to take care when detecting if 32-bit or 64-bit that you don't accidentally check the kernel (or cpu) rather than the userland.
Userland 32 bit
getconf LONG_BIT
32
dpkg --print-architecture
armhf
[and yet dpkg --print-foreign-architectures -> arm64, would a 64 bit program work in a 32 bit userland?]
Kernel 64 bit
arch
aarch64
uname -a
Linux bla 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
lscpu
Architecture: aarch64
....
....
The arm_64bit kernel flag in config.txt doesn't exist by default, at least for the lite image.
I guess the only impacts are the difference in performance, difference in kernel memory usage and having to take care when detecting if 32-bit or 64-bit that you don't accidentally check the kernel (or cpu) rather than the userland.
Userland 32 bit
getconf LONG_BIT
32
dpkg --print-architecture
armhf
[and yet dpkg --print-foreign-architectures -> arm64, would a 64 bit program work in a 32 bit userland?]
Kernel 64 bit
arch
aarch64
uname -a
Linux bla 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
lscpu
Architecture: aarch64
....
....
Statistics: Posted by pidd — Tue Dec 26, 2023 12:07 am