Comments (42)
I'll leave this here, because this page is what Google shows for "xorriso windows"
https://github.com/PeyTy/xorriso-exe-for-windows
from book.
I propose we get together a .zip package containing all the tools needed to start kernel developing.
I like this idea.
from book.
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.
from book.
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.
from book.
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.
from book.
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:
I've build grub2 binaries myself using msys2. Which doesn't really work, so you might want to try something else than grub-mkrescue to create the iso on windows
from book.
The problem is that the binaries you need are special ones compiled just for cross-compiling. Installing mingw-w64-x86_64-gcc
will not give you a gcc capable of creating a kernel.
from book.
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?
By the way where exactly is gcc required to build the kernel?
Isn't it just enough to do: multirust add-target x86_64-unknown-linux-gnu ??
from book.
Most of this seems to have become irrelevant with the introduction of ubuntu userspace in windows 10.
from book.
Yes, it's certainly much easier with it. That said, Windows 10 is pretty new, so can we really assume it?
from book.
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.
from book.
There's currently a bug blocking rustc from running on Windows: microsoft/WSL#258
from book.
Anyone succeded on doing this? grub-mkrescue? ...
from book.
Yes it works without any issues on bash for windows. For grub-mkrescue you need to install the package "grub2-common"
from book.
No. I want for cygwin so i can get it for , school since it will be portable
from book.
grub-mkrescue can't be compiled with cygwin or msys, so no it isn't possible
from book.
Hmm Are you sure? Because last time it was more like "grub cant be compiled in windows" . Turns out , it can.
from book.
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
from book.
@feliwir hmm dosent seem it dosent , im just gonna change to windows bash
from book.
@amanuel2 yes thats by far the easiest&best solution for os development on windows right now
from book.
@feliwir yep , i just builded it. Well , right now trying to figure out how to create your own pure cout << like object using namespaces
from book.
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.
from book.
@LaylConway No dont close it.. If any other people have question they can always ask!
from book.
@amanuel2 This is an issue focused on solving a specific problem with the guide, not an open-ended Q&A issue.
from book.
@LaylConway Yea , and? Btw checkout https://github.com/Bone-Project/BoneOS
from book.
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.
from book.
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 grub-mkrescue
.
from book.
@ketsuban I actually use Windows as my primary platform now, and so have wanted to make stuff work regardless.
from book.
Hey guys, I might come a bit late, but it IS possible to build an ISO using grub-mkrescue
on windows !
To do it you will need an Ubuntu 16.04 machine (virtual or not, doesn't matter) and copy the folder /usr/lib/grub/i386-pc
to the /usr/lib/grub
folder on Bash For Windows. It's as easy as that !
I've asked the guys at LSW to include an option to download the grub binaries, hope they will add that in the future !
from book.
If you have bash-for-windows, you can just apt-get install grub-pc-bin
iirc
from book.
If you have bash-for-windows, you can just apt-get install grub-pc-bin iirc
Tried that and sadly it fails :/
Might be a problem with my LSW though
from book.
Bash For Windows.
I did get stuff working on Bash for Windows, but I'd also like a native build. intermezzOS/kernel#118
from book.
Hi! I might take a look at getting this to work. I came up with a few ways to help reduce dependencies:
- Switch over from Make to a python build script (python is very readily available for windows). I have this almost finished in my clone locally.
- Switch from nasm to the
global_asm
macro. Also done in clone locally. - Switch from an explicit invocation of
ar
to lettingrustc
do it for us. I'm a bit confused about this one - the book does not use ar. Any help would be appreciated here.
Grub does distribute files from their ftp server for windows. Here's what it contains: https://i.imgur.com/qmzazD9.png.
Unfortunately, this does not include grub-mkrescue
. It does include grub-mkimage
though. Maybe this is similar/a subsitute?
from book.
No, itβs not a valid substitute. I think the author knows about those grub binaries for windows already
from book.
Ok. I think with the changes I've proposed just qemu and grub-mkrescue will be required.
from book.
I am a fan of reducing dependencies; ideally, someday, this would all be 100% rust and just use cargo
. one motivation is for exactly this kind of cross-platform issue.
@Restioson I'd be interested in seeing your diffs. My rough feels:
- I'd rather switch to say, a custom Cargo subcommand in Rust than add a Python dependency.
- Getting rid of nasm would be excellent
π - "Switch from an explicit invocation of ar to letting rustc do it for us" I... am not sure what this is.
reducing dependencies is good, even if we can't get 100% of the way there.
from book.
I haven't finished completely. I'm mostly done, except I don't know what the invocation of ar
is for... see response to 3
- Perhaps a justfile/cargo make or something similar? I just pulled python out of thin air since rustc uses a python buildscript too and it was easy for me to prototype.
- Personally, I'm not really sure what the invocation of
ar
in thebuild.rs
does :L. The book only mentionsld
. I think rustc should be able to do most of this for us anyway. Theoretically we can just build it as a library crate with a customlayout.ld
from book.
Personally, I'm not really sure what the invocation of ar in the build.rs does
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.
from book.
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.
from book.
Looks like it should be able to support building a bootable image with help of objcopy.
from book.
The output of bootimage --target
produces a bootimage.bin
that's runnable. bootimage
does all the work of invoking cargo, etc, so that's just one command to build, no need for make or anything :)
from book.
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.
from book.
Related Issues (20)
- [2.3] Toolchain install on Mac OSX
- unknown --nmagic command after setting the $PATH HOT 8
- Translations to Spanish HOT 3
- Latex error... HOT 3
- Book index page needs styles HOT 2
- Review "setting up a development environment"
- "What tools do we use" is awkward
- update for new bootimage HOT 2
- problems with compilation HOT 4
- problems with running qemu HOT 3
- Copy button incorrectly copies to clipboard HOT 2
- Paging explanation HOT 2
- re-sync book with kernel code
- OSX Install Script - Can't unzip objconv HOT 1
- OSX Install Script - can't build grub HOT 1
- some errors in the intro
- Docker appendix?
- update book for new bootloader version
- update theme directory
- Some changes needed in 'creating our first crate'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from book.