-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: hexagon
Are you sure you want to change the base?
Conversation
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 If it's not the case maybe we want an |
AFAICT this is the case - I ran some tests this weekend with this |
This fixes errors like: include/endian.h:26:41: error: '&' within '|' [-Werror,-Wbitwise-op-parentheses] Signed-off-by: Matheus Tavares Bernardino <[email protected]>
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]>
cbeab28
to
00070d8
Compare
Sorry to hijack this PR for a question, but I'm confused and it seems relevant: Is the implication here that |
No: thankfully, QEMU's behavior matches the kernel's.
We have an effort ongoing to boot linux in system emulation mode. We have yet to publish all of the bits needed for this, unfortunately. And ignoring that issue, the linux kernel that we have available booting in QEMU is very old (v4.2), from before this change to the kernel 32/64-bit time changes. Having this bootable hexagon kernel available to the community would be nice, because among other things it would likely make it easier to upstream musl because then musl devs can see how musl behaves with a real hexagon linux kernel (and not a hexagon kernel emulated by the x86_64 one). With this PR, we were trying to make a musl that solves this problem but IIRC this PR was not intended/designed to be compatible with both 64-bit and 32-bit time. So it can't be applied as-is. I think the solution for our time woes is either to rebase our old kernel changes on newer releases (and once that works, land those changes upstream). But we just aren't there yet. |
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.