Skip to content
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

[kernel] Create UNIX named socket as regular file for FAT compatibility w/Nano-X #2218

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

ghaerr
Copy link
Owner

@ghaerr ghaerr commented Feb 3, 2025

Allows Nano-X to function on FAT filesystems, requested in discussion #1810 (reply in thread).

Nano-X now creates and attaches its UNIX socket to a regular file (/tmp/nxsock in this case) rather than requiring a Named Socket file type, as is standard in Linux/UNIX. This exception is being made for ELKS so that Nano-X can run client/server on FAT filesystems.

The bind and connect operations in the UNIX socket driver are now configured in net/unix/af_unix.c using "#define USE_IFREG 1" to turn on using a regular file instead of a named socket/pipe for the client/server connection. For strict UNIX comptability, the define can be set to 0 and a named socket/pipe will be used.

@tyama501, I have tested this on QEMU, this should now allow you to run Nano-X client/server on PC-98. Be aware that the special ifdef CONFIG_ARCH_PC98 in nanox/srvmain.c may have to be removed in the !NONETWORK (i.e. client/server) case in order to work on PC-98. I didn't test with those in, as I'm testing on IBM PC. It is possible those defines must remain in the NONETWORK case. If so, please submit a PR after you have everything working. I have tested with two nxclocks running, as well a single nxclock and nxtetris, using the shell script previously described for starting them.

@ghaerr ghaerr merged commit 241c67a into master Feb 3, 2025
1 check passed
@ghaerr ghaerr deleted the nxfat branch February 3, 2025 07:13
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.

1 participant