-
Notifications
You must be signed in to change notification settings - Fork 79
Building on windows #53
Comments
I like this idea. |
Added a note on qemu, redistributing it probably is more trouble than it's worth. It's easily installed and isn't just a simple single executable. |
I've found more online references to GRUB2 being build-able under windows Cygwin, it may be worth a try but it will definitely take more time than I have spare for this week. |
I've stopped working on getting a toolset together for windows, as I switched to Arch myself. I still think a pre-packaged set of tools would be useful to have however. |
I use Msys2 windows 10 which allows to use the package manager pacman. Every required binary can be installed using: pacman -S mingw-w64-x86_64-(binary) (e.g. pacman -S mingw-w64-x86_64-nasm). The only missing binary i have right now is grub-mkrescue, but I'll ask the msys2 maintainers if they might be so kind and add it as a package EDIT: |
The problem is that the binaries you need are special ones compiled just for cross-compiling. Installing |
yeah, but on mingw it is no problem to compile gcc (or any other package for that matter) as a cross compiler. Also multirust is official supporting msys2 as buildsystem, see the multirust repository. I've also found official grub2 binaries for windows: ftp://alpha.gnu.org/gnu/grub/grub-2.02~beta2-for-windows.zip . They contain grub-mkimage and grub-mkstandalone but not grub-mkrescue for some reason, so maybe it would be viable to use those commands instead of grub-mkrescue? |
Most of this seems to have become irrelevant with the introduction of ubuntu userspace in windows 10. |
Yes, it's certainly much easier with it. That said, Windows 10 is pretty new, so can we really assume it? |
Having used the subsystem a little bit, I can tell you it's still quite rough. I would be careful relying on it for now. |
There's currently a bug blocking rustc from running on Windows: microsoft/WSL#258 |
Anyone succeded on doing this? grub-mkrescue? ... |
Yes it works without any issues on bash for windows. For grub-mkrescue you need to install the package "grub2-common" |
No. I want for cygwin so i can get it for , school since it will be portable |
grub-mkrescue can't be compiled with cygwin or msys, so no it isn't possible |
Hmm Are you sure? Because last time it was more like "grub cant be compiled in windows" . Turns out , it can. |
Grub itself can be built, but last time i checked on msys grub-mkrescue didn't compile. You can of course get the sources and check for yourself |
@feliwir hmm dosent seem it dosent , im just gonna change to windows bash |
@amanuel2 yes thats by far the easiest&best solution for os development on windows right now |
@feliwir yep , i just builded it. Well , right now trying to figure out how to create your own pure cout << like object using namespaces |
Perhaps this should be closed in favor of a guide for setting up Ubuntu on Windows for kernel development? It's going to be a better experience in almost every way than messing your way around windows itself. |
@LaylConway No dont close it.. If any other people have question they can always ask! |
@amanuel2 This is an issue focused on solving a specific problem with the guide, not an open-ended Q&A issue. |
@LaylConway Yea , and? Btw checkout https://github.com/Bone-Project/BoneOS |
This isn't the time or the place for advertising projects. My point is that this issue isn't meant to be for asking questions, it's for exploring and implementing a specific solution to a certain problem. Given that by now the problem has moved I'm closing this issue as it's not relevant anymore. |
I disagree with this issue being closed - while the Linux subsystem on Windows 10 can and should be the primary recommendation for following intermezzOS due to ease of use, it mustn't be the only one. Not everyone is on Windows 10, for one - I used to be, but starting with Insider Preview build 14958 it bluescreens so frequently on my machine that I can't even finish installing/upgrading. I ended up going back to Windows 7. Fortunately setting things up on Windows seems mostly doable with only instructions on installing MSYS2 and cross-compiling Binutils. The bit I haven't yet worked out is how to get |
@ketsuban I actually use Windows as my primary platform now, and so have wanted to make stuff work regardless. |
Hey guys, I might come a bit late, but it IS possible to build an ISO using I've asked the guys at LSW to include an option to download the grub binaries, hope they will add that in the future ! |
If you have bash-for-windows, you can just |
Tried that and sadly it fails :/ |
I did get stuff working on Bash for Windows, but I'd also like a native build. intermezzOS/kernel#118 |
Hi! I might take a look at getting this to work. I came up with a few ways to help reduce dependencies:
Grub does distribute files from their ftp server for windows. Here's what it contains: https://i.imgur.com/qmzazD9.png. |
No, it’s not a valid substitute. I think the author knows about those grub binaries for windows already |
Ok. I think with the changes I've proposed just qemu and grub-mkrescue will be required. |
I am a fan of reducing dependencies; ideally, someday, this would all be 100% rust and just use @Restioson I'd be interested in seeing your diffs. My rough feels:
reducing dependencies is good, even if we can't get 100% of the way there. |
I haven't finished completely. I'm mostly done, except I don't know what the invocation of
|
OH! I remember now, sorry. So, I was trying to replace some of the make stuff with build scripts to get rid of make. HOWEVER At the same time you popped up, this happened over on the kernel repo: intermezzOS/kernel#118 (comment) I think working toward adopting phil's stuff is probably the best path forward, as it completely eliminates all of this. |
Ooh, that looks super nice! I totally agree, I'm just wondering how images to run in qemu will be built... Does his bootloader project include something that could help with that? I think we still need to get rid of make and perhaps replace it with Cargo-make or Just. |
Looks like it should be able to support building a bootable image with help of objcopy. |
The output of |
The second edition now builds on Windows: https://ci.appveyor.com/project/steveklabnik/kernel (still gotta fix gnu, but that's a different issue and I'll deal with it soon). I'm not working on the first edition anymore, so I'm going to give this a close. If someone wants to send in a PR to fix up the first edition, please feel free, but it seems like a lot of effort for very little reward. |
I'll leave this here, because this page is what Google shows for "xorriso windows" https://github.com/PeyTy/xorriso-exe-for-windows |
Setting up the build on windows isn't actually that hard once you've got the right binaries. Getting the binaries however are the problem. I propose we get together a .zip package containing all the tools needed to start kernel developing. Here's a list of the tools we would need binaries of:
Rust
: Extremely easy to install and set up, doesn't have to be includedqemu
: Easy to install, perhaps we should include it anyways though. If not then at least drop a link to it on the windows specific page (edit: because it's not a simple self-contained tool that's easily installed, let's avoid including it)nasm.exe
: Pre-compiled already available, I still think we should bundle itx86_64-elf-ld.exe
: Should be just a compile of binutils awaymake.exe
: Available through msys2, I still think we should bundle itgrub-mkrescue
: A nightmare to get it seems, I've heard rumors it builds under cygwin but couldn't confirm. If there's alternative ways to set up the image that would be great.xorriso
: Windows alternatives exist but if we can just get xorriso it would be nice, I haven't looked much into this.The text was updated successfully, but these errors were encountered: