TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

RISC-V OS using Rust: Filesystems

242 pointsby pavehawk2007about 5 years ago

10 comments

webgoatabout 5 years ago
I&#x27;ve been following along while building an armv7a kernel and I really like how you go back and refactor old parts to match newer rust features like your change to using cargo instead of a makefile and inlining asm files into the rust binary.<p>My only criticism is that sometimes there&#x27;s parts in your tutorial that are missing but present in your os. When going through chapter 3&#x2F;4 I think you skipped over explaining your kmalloc implementation. It&#x27;s fine that you do since I feel your tutorial should be more about navigating embedded rust than learning os basics, but a note about this task being implemented at some point would&#x27;ve helped.
评论 #23160914 未加载
StanAngeloffabout 5 years ago
Excellent series of posts. I&#x27;ve been following along with no prior Rust or OS programming knowledge and have found it immensely refreshing.
评论 #23156722 未加载
Animatsabout 5 years ago
I&#x27;d like to see a clone of the QNX kernel, which is very tiny, implemented in Rust. It has no drivers or file systems in kernel space; those are all user processes. But it offers a POSIX-like API. Unlike L4, you don&#x27;t have to run another OS on top of it to do anything.<p>This would be good for embedded applications on Raspberry Pi sized machines, where the Arduino environment is too weak and Linux is too much.
评论 #23163318 未加载
评论 #23164081 未加载
a1369209993about 5 years ago
A couple of minor, but very irritating errors:<p>&gt; The singly-indirect pointer can address 1,024 * 1,024 &#x2F; 4 = 1,024 * 256 = 262 KiB of data.<p>256 kilobytes, not 262 &#x27;kibi&#x27;bytes.<p>&gt; 1,024 * 256 * 256 = 67 Mi<p>&gt; 1,024 * 256 * 256 * 256 = 17 Gi<p>64 and 16 respectively.
评论 #23158637 未加载
评论 #23164464 未加载
sl1ck731about 5 years ago
Is there a significant limitation in using Rust on the stable branch? Every interesting tutorial, book, or tool I find seems to use nightly. I know it shouldn&#x27;t be a big deal but it &quot;feels dirty&quot; and perhaps I should just view nightly as any other language&#x27;s &quot;stable&quot;.
评论 #23159852 未加载
评论 #23159961 未加载
评论 #23160006 未加载
评论 #23164754 未加载
评论 #23160137 未加载
marricksabout 5 years ago
This looks awesome! Yesterday I just started another OS rust walk through and now I have a hard choice between that and this.<p>Any thoughts on this[1] walkthrough in comparison? This one looks more explicitly up to date.<p>[1] <a href="https:&#x2F;&#x2F;os.phil-opp.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;os.phil-opp.com&#x2F;</a>
评论 #23156716 未加载
bogomipzabout 5 years ago
I had a question of the about a passage under the section: &quot;Our OS&#x27;s Filesystem Read Process&quot; where the author states:<p>&gt;&quot;Recall that the block driver makes a request and sends it off to the block device. The block device services the request and then sends an interrupt when it&#x27;s finished. We don&#x27;t really know when that interrupt will come, and we can&#x27;t wait around for it. This is why I decided to make the file system reader a kernel process. We can put this kernel process in the waiting state so it won&#x27;t be scheduled until the interrupt is received from the block device&quot;<p>Then further down: &gt;&quot;Now, when we handle the block device&#x27;s interrupt, we have to match the watcher and awaken it.&quot;<p>Is the watcher here similar to the filesystem driver at the VFS layer in Linux i.e the ext4&#x2F;xfs etc? I believe this is how Linux handles it - the file system driver creates a block IO request and hands it off to the actual block device driver and when the block device driver get&#x27;s invoked on an interrupt from the disk the block device driver informs the filesystem driver that the IO request is now complete correct?
loegabout 5 years ago
The minix fs seems to be basically the classic Unix FS design, like UFS&#x2F;FFS or Ext2, prior to the concept of cylinder groups (at least, per this description and Wikipedia&#x27;s) and without some of the more advanced features of those filesystems (softupdates, directory trees, etc).
评论 #23158552 未加载
jeffdavisabout 5 years ago
Is the asm!() macro going to stabilize? It seems important to ever make a real OS, right?
评论 #23156845 未加载
评论 #23156801 未加载
评论 #23157314 未加载
fluffythingabout 5 years ago
This is awesome. I&#x27;ve been following along for a while, so please keep it up.<p>I wish someday we&#x27;ll get something like the ESP32 boards but with RISCV.
评论 #23159640 未加载
评论 #23171431 未加载
评论 #23160688 未加载