#
✕ nick:kloenk
#asahi-dev · 2022-02-01 15:21
kloenkyeah, I think using fat32, and fixing it ourself if needed is best. but I think then it's better to at least vendor that properly as an active project, and not as a dependency
#asahi-dev · 2022-02-01 13:56
kloenkmaster does build, but it's not block based. so also a pain in the ass
#asahi-dev · 2022-02-01 13:52
kloenkwell core_io does not build, seems like that does not work as well
#asahi-dev · 2022-02-01 13:37
kloenkmarcan: I just discovered that the fat32 crate is eol. the author recomends rust-fatfs
#asahi-dev · 2022-02-01 10:10
kloenkI don't know how to, but if someone can create it, i think it's a good idea. I want to name the crate "nogpt" (as it has no_std support)
#asahi-dev · 2022-02-01 10:08
kloenkChaosPrincess: are you on matrix? maybe we should create a new room for this
#asahi-dev · 2022-02-01 10:08
kloenkwant to work together on it?
#asahi-dev · 2022-02-01 10:08
kloenkChaosPrincess: mind showing it to me? I think I want to write a crate, which has std support, but as default does not use std
#asahi-dev · 2022-02-01 10:05
kloenkyes, just discovered that. Now reading the uefi specs :)
#asahi-dev · 2022-02-01 10:02
kloenkThe thing that is blocking my mind right now is how to get the size of the drive. Is this reported by nvme?
#asahi-dev · 2022-02-01 09:10
kloenkand matrix<->irc bridge creates funny texts again :)
#asahi-dev · 2022-02-01 09:10
kloenk[j"ey](https://matrix.to/#/@irc_oftc_j=60ey:petabyte.dev): yeah, but I favour the "cargo vender` route, as vendor cleans the crates, we don't need the CI configurations and stuff like that from the dependencies
#asahi-dev · 2022-02-01 08:42
kloenkYes, parsing the table in C, and just giving rust the starting address should also work. Will have to think about it
#asahi-dev · 2022-02-01 08:28
kloenkmaybe I will just write a new gpt libary with a friend together
#asahi-dev · 2022-02-01 08:20
kloenkDoesn't look like there is a usable gpt crate. all I found wanted to use std
#asahi-dev · 2022-02-01 08:08
kloenkSadly I only have my main mac, on which I'm very very dependend, so can only write theoreical code :)
#asahi-dev · 2022-02-01 08:01
kloenkok, hoped I could already do something
#asahi-dev · 2022-02-01 07:56
kloenkmarcan: here is how vendor of fat32 looks like: https://github.com/Kloenk/m1n1/commit/8b45c4ccd97e1d115af7087ac5c3f15cb1f0a06a
#asahi-dev · 2022-02-01 07:43
kloenkI think I'm still not sure how to do fat. Where to read files from? direct nvme? Where should the file be stored/which name? What should I do with the file after verifying it?
#asahi-dev · 2022-01-31 09:15
kloenkNixos already uses a ed25519 key for binary signing. I wonder if it would be possible to reuse that. But that's for the far far future :)
#asahi-dev · 2022-01-31 09:06
kloenkThe fat library says it does not need alloc, so even all is stack based
#asahi-dev · 2022-01-31 08:55
kloenkkettenis: Totally agree not to pull the world. But I also see no advantage in reinventing the wheel, and writing an own fat driver, if there is somtihg good usable available
#asahi-dev · 2022-01-31 08:54
kloenkI would have set rust alloc onto the dlalloc used by the C portions
#asahi-dev · 2022-01-31 08:02
kloenkI think alloc still has an advantag, for strings and CStrings for ffi and so. It should be fairly simple to implement
#asahi-dev · 2022-01-31 07:18
kloenkThe ed25519 lib is not completely no_std. The batch feature needs alloc. So probably will create a globalAlloc next, and then try to add the crates as a dependency for testing
#asahi-dev · 2022-01-31 07:03
kloenkYeah, no worries. Thanks for the answers so far :)
#asahi-dev · 2022-01-31 07:02
kloenkOk, will try that
#asahi-dev · 2022-01-31 07:01
kloenkYes rustc is basically a compile, but cargo handles all the cross compile stuff. That’s why I would prefer it
#asahi-dev · 2022-01-31 07:00
kloenkCargo config to use the vendor dir, and the vendor dir, created by cargo
#asahi-dev · 2022-01-31 06:59
kloenkI can try with submodules though
#asahi-dev · 2022-01-31 06:59
kloenkmarcan: Cargo would download it from crates.io
#asahi-dev · 2022-01-31 06:58
kloenkmarcan: Totally agree. I’m from the nix side.
#asahi-dev · 2022-01-31 06:58
kloenkmarcan: Yes, that’s possible. But not that good with submodules. What about a dist make target, which creates a tarball?
#asahi-dev · 2022-01-31 06:54
kloenkThe submodule stuff is actually why I can’t currently build it with one command on my Linux machine. My builder does not copy the submodule
#asahi-dev · 2022-01-31 06:52
kloenkWould you be willing to change to meson for that? I saw how to call rustc from kbuild. I’m damaged for life xP
#asahi-dev · 2022-01-31 06:44
kloenkmarcan: I have my boring lecture tomorrow again. Should I try to covert adt to rust, or build some fat support (if fat, where to hook it?)
#asahi-dev · 2022-01-27 10:33
kloenkHi, trying to hack a bit on m1n1 right now. The path argument to adt_get_reg (type int), does it always have the size 8? or is it dynamic?