-
Notifications
You must be signed in to change notification settings - Fork 18
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
build(d1): automate building D1 oreboot SD card images #273
Comments
started on this; i was hoping we could do something similar to the |
also, we probably need to download prebuilt oreboot artifacts from GitHub Releases or something — we can't depend on oreboot as a bin dep, because it needs post-build processing, which I believe oreboot does with an xtask. |
cc @jspngh, you might be interested in this as well? |
Yes, indeed! I'm not too far away from reading data from SD cards in mnemos itself, so it would be nice to have a Anyway, having a self-contained iso file that can be used like usual (just
Then when a user plugs in the SD card into the computer, they can work with the filesystem (e.g., add forth scripts?). |
@jspngh oh, that's fantastic, i didn't realize you were that far along on reading from the SD card! the eventual goal is definitely to be able to build an image with a filesystem and put some user mode programs on there as well (maybe a forth program launcher/task browser, and/or an init system type thing). so, a way to provide other files you want on the fs is probably the next step once we have a nice way to build a bootable ISO! |
i think we could probably produce a significantly smaller mnemos binary, with a little work. the D1 kernel binaries aren't built with if we can't jam a size-optimized kernel with most of that stuff disabled into 32k, though, we could also consider writing a separate bootloader that doesn't use the actual mnemos kernel. the async runtime probably results in generating a lot of code. since a stage 0 wouldn't be running arbitrary user tasks (it's just doing DRAM initialization, loading the kernel from SD, and maybe printing stuff to the UART for debugging), we could maybe use some of the existing platform HAL stuff we've written but leave behind the async executor, timer wheel, and other big stuff like that. but, for now, oreboot works fine too, so my first pass at a boot image builder will just use your oreboot fork. |
I've added a release, we should be able to start using this URL If you have any suggestions for improvement, I'm happy to hear it.
That would be neat, especially if we could use the existing drivers. I don't know how it would work without an async executor though, since the drivers also contain
Yep, that sounds like the easiest way forward. |
Now we can also get rid of the |
lovely, thank you! i haven't had much time to spend on the actual build script yet, but this will be very helpful! |
there are some instructions in https://github.com/tosc-rs/mnemos/blob/main/platforms/allwinner-d1/README.md explaining how to make a bootable SD card for the D1 using MnemOS + Oreboot. currently, this is accomplished by using
dd
to write the oreboot and mnemOS binaries directly to the SD device.it would be cool if we could add some automation for producing a bootable ISO image or similar that can then be written to a SD card, similar to how our build process can produce x86_64 bootable images. ideally, this would:
xtask
-style tool for building images, or a separate crate that outputs the image as a build target (the way we build x86 images (The text was updated successfully, but these errors were encountered: