9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Alyssa M via 9fans" <9fans@9fans.net>
To: 9fans <9fans@9fans.net>
Subject: [9fans] Hello, RPi fixes and bind -b trouble
Date: Sun, 4 Feb 2024 10:07:47 -0500	[thread overview]
Message-ID: <17070592670.E7CF6327b.7700@composer.9fans.topicbox.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2897 bytes --]

Hello Plan9People!

I finally stumbled across Richard Miller's Raspberry Pi image a while back and managed to install it on an RPi, and have been learning more about it. I've used the 9P protocol for a couple of projects, but haven't actually used Plan 9 itself until now...


So far I've patched my installation in a couple of small ways, which has been a useful exercise to get started with:

I think the v6fs support in tapefs has a bug: the last line of doread() should be
return buf+off;
rather than
return buf;
This only shows up if your reads are unaligned with block boundaries. I think v32fs.c has the same bug, but it's okay in v10fs.c.
I realise the number of people who care about this may be very small. :)


I also made a fix to exportfs.c:reply() so it works with the Linux v9fs on my other RPi, which was otherwise pretty much not working for me (???!): I got error 526 which is ESERVERFAULT - untranslatable error, which should supposedly not leak through into Linux user space, but does...
It seems there's a mismatch between the error strings that the plan 9 kernel produces and the ones that v9fs knows how to deal with, as exportfs just passes them along:
Plan 9 produces:
'foo' does not exist
in /sys/src/9/port/chan.c:namelenerror()
v9fs apparently currently expects:
file does not exist
or
file not found
in github/torvalds/linux/net/9p/error.c:p9_errstr2errno()
What I have replaces the 'nice' error string with what v9fs expects. It's not a great fix, but I'm not sure what (or where?) the fix *should* be??
I see the same problem between Ubuntu and 9front as I do between RPi Debian and Rpi Plan 9, so this seems to be a general problem. Without this fix, I couldn't actually create a file on a Plan 9 export from Linux via v9fs. It's not just a weird error message.


Currently I'm trying to build a 'drawterm' server for my experimental OS - so far I can run the clock program on Plan 9 and have it display on my window system (not the catclock - that one gives me the creeps!). I also have bitmaps and text beginning to work, but there's not enough there to run sam or rio yet.

I'm having trouble with bind-mounting my 9p server on Plan 9's /dev, though: the old /dev files are all there, but when I bind -b over it from /n only the files in the directory I'm binding show up in ls! It's like the -b is being ignored by bind(1), but if I ls /dev/null (for example) it's actually there - but after the bind I can no longer see it when I ls /dev! Very odd.
This is not actually blocking me at the moment, but if anyone has any clues about what I might be doing wrong it would save me a lot of hair-pulling?

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tbc78d29ab04652a2-M2d8b0b7bbb2f59b0acb40d34
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 3978 bytes --]

             reply	other threads:[~2024-02-04 15:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04 15:07 Alyssa M via 9fans [this message]
2024-02-04 16:41 ` [9fans] " moody
2024-02-04 16:50   ` Alyssa M via 9fans
2024-02-04 22:19     ` Alyssa M via 9fans
2024-02-22 19:45       ` Alyssa M via 9fans
2024-02-22 20:27         ` Jacob Moody
2024-02-23 12:12           ` Alyssa M via 9fans
2024-02-23 18:18             ` Jacob Moody
2024-02-25  1:01               ` Alyssa M via 9fans
2024-02-23  8:03         ` Lucio De Re
2024-02-04 16:46 ` moody

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17070592670.E7CF6327b.7700@composer.9fans.topicbox.com \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).