Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Build on Windows without the WSL #118

Closed
steveklabnik opened this issue Dec 6, 2017 · 9 comments · Fixed by #125
Closed

Build on Windows without the WSL #118

steveklabnik opened this issue Dec 6, 2017 · 9 comments · Fixed by #125

Comments

@steveklabnik
Copy link
Member

One major thing holding back intermezzOS development is that I'm on Windows now. Getting a native windows build would be key.

http://forum.osdev.org/viewtopic.php?f=1&t=27605 might be a part of the puzzle.

@feliwir
Copy link

feliwir commented Dec 10, 2017

What's wrong with WSL? I do all my OS development like that

@steveklabnik
Copy link
Member Author

steveklabnik commented Dec 11, 2017 via email

@LaylBongers
Copy link

Could something like this be an option?
https://github.com/phil-opp/blog_os/tree/master/docker

It's still a big dependency (likely bigger than WSL) but it's probably easier to set up.

@steveklabnik
Copy link
Member Author

It's another option, but I still expect a native windows build.

@steveklabnik
Copy link
Member Author

I am personally giving up on this in the interest of being able to move forward with the project again. I'd still love to have this, but it's basically blocking me from getting anything done, which is causing a lack of movement on the project overall.

The perfect is the enemy of the good.

@phil-opp
Copy link
Contributor

phil-opp commented Mar 6, 2018

I'm currently working on a second edition of the Writing an OS in Rust series, which will work natively on Linux, Windows, and macOS. Instead of GRUB, we use an own bootloader written in Rust inline assembly. This bootloader already does most of the setup (e.g. the switch to long mode), so that the tutorials can start at the Rust level and nasm is no longer needed. We also use LLD for linking, which is now shipped with Rust, so everything should work out of the box. Maybe this is useful for intermezzOS too.

The basics are nearly done, there is just one last issue that LLD is not found on macOS: rust-lang/rust#48772. For Windows, it should work already (the CI is green at least). I plan to write a blog post on this as soon as the macOS build works too.

You can try the new edition at https://os.phil-opp.com/second-edition/. Beware that this is still beta content and things might change in the future. If you have any feedback, please tell me (e.g. in phil-opp/blog_os#360).

@steveklabnik
Copy link
Member Author

oh my @phil-opp !!!!!!

That is super amazing. Given that I was already adapting the bootloading stuff from you before, maybe I should port to that when it's ready.

At the moment, I'm trying to sort out how to find time in my schedule to work on intermezzOS generally, and to get back into the swing of things. The combo of switching to Windows and expending all of my writing energy really set intermezzOS back over the last year, but now that that's winding down, I'm really eager to start writing code again.

Are you planning on documenting the bootloader, etc? or are you gonna keep it a black box? I'll have to consider how I feel about this for intermezzOS's goals; I'm of two minds. It'd be amazing to get started without any asm, but knowing how that stuff works is good. At the same time, we also treat GRUB/etc as a black box, so this is really just shifting that boundary slightly.

We also use LLD for linking, which is now shipped with Rust,

I was wondering about this, but since alex described it as "for the wasm target only" I wasn't sure if there was a way to use it otherwise, and hadn't had the time to dig in. So exciting!

@phil-opp
Copy link
Contributor

phil-opp commented Mar 6, 2018

Awesome to see you back at osdev!

Are you planning on documenting the bootloader, etc?

Yes, I'm planning a small “Writing a Bootloader” sub-series, linked from the main post. So people can look behind the curtain if they like, but are not forced to write assembly right at the beginning. It will take some time to write this, since the bootloader is just a hacky prototype at the moment, but I definitely plan to do it.

@steveklabnik
Copy link
Member Author

Awesome to see you back at osdev!

<3

It will take some time to write this, since the bootloader is just a hacky prototype at the moment, but I definitely plan to do it.

Cool. I want to talk it over with @ashleygwilliams but, the more I think about it, the fact that we treat GRUB as magic means that I think we should treat this as magic, and just point to that. If you'd like a hand, please let me know! I don't know much about the details of bootloaders, but I'd be happy to try to pitch in if you'd like it. I gotta give back somehow

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants