For NetBSD/aarch64eb and armeb, framebuffer seems byte-swapped to CPU,
which was initially configured to little-endian mode by firmware and
switched to big-endian mode by kernel. Therefore, ARGB8888 fb becomes
BGRA8888, for example.
For Linux and FreeBSD, use alpha offset set by fb drivers. I cannot
test them. Sorry.
For wscons on NetBSD, unfortunately, alpha offset and size are not
set by (most?) fb drivers (they are 0). Therefore, we need to guess
them from offsets and sizes of red, green, and blue.
For NetBSD/aarch64eb and armeb, framebuffer seems byte-swapped to CPU, which was initially configured to little-endian mode by firmware and switched to big-endian mode by kernel. Therefore, ARGB8888 fb becomes BGRA8888, for example.
For Linux and FreeBSD, use alpha offset set by fb drivers. I cannot test them. Sorry.
For wscons on NetBSD, unfortunately, alpha offset and size are not set by (most?) fb drivers (they are 0). Therefore, we need to guess them from offsets and sizes of red, green, and blue.