Skip to content

Fix for kernel 4.2: don't use 64 bits syscalls/types #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: hexagon
Choose a base branch
from

Conversation

quic-mathbern
Copy link

The currently Linux kernel version supported by qemu is based on upstream kernel 4.2 1.

However, the 64 bits syscalls from musl are not implemented by Hexagon kernel 4.2. And the time_t type is now 64 bits for all archs on musl (not only the 64 bits archs), so we also need to force our own type size here for kernel 4.2.

Furthermore, we need to refrain from using faccessat2, as this was only added at kernel 5.8.

The currently Linux kernel version supported by qemu is based on
upstream kernel 4.2 [1].

However, the 64 bits syscalls from musl are not implemented by Hexagon
kernel 4.2. And the time_t type is now 64 bits for all archs on musl
(not only the 64 bits archs), so we also need to force our own type size
here for kernel 4.2.

Furthermore, we need to refrain from using faccessat2, as this was only
added at kernel 5.8.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux.git/log/?h=bcain/boot_qemu

Signed-off-by: Matheus Tavares Bernardino <[email protected]>
@quic-mathbern quic-mathbern self-assigned this May 9, 2025
@androm3da
Copy link

This provides compatibility with 4.2 and doesn't introduce problems when building with/for 6.x?

Is this statement true? The linux userspace programs built with this new musl will work well when using qemu-hexagon on a modern x86_64 kernel.

If it's not the case maybe we want an ifdef in this file? Or maybe we want to create a separate target branch for this PR?

@androm3da
Copy link

This provides compatibility with 4.2 and doesn't introduce problems when building with/for 6.x?

Is this statement true? The linux userspace programs built with this new musl will work well when using qemu-hexagon on a modern x86_64 kernel.

AFAICT this is the case - I ran some tests this weekend with this musl change and it seemed to work well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants