Help,Setting up environment to compile VC kernel in windows

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
0xCC
Posts: 15
Joined: Sun Sep 09, 2018 2:07 am

Help,Setting up environment to compile VC kernel in windows

Post by 0xCC »

Hello
most of the tutorials in this forums or google either use linux tools to compile like gcc and grub-rescue to generate the iso or they are using Visual C in windows and pass it to grub-rescue too.
that process is a little exhausting with a lot of debugging, So i need a way to use compile a kernel using Visual Studio (VC) and create and iso with a boot loader (like grub) in windows.
thank you.
User avatar
TheCool1Kevin
Posts: 24
Joined: Fri Oct 14, 2016 7:37 pm
Location: Canada
Contact:

Re: Help,Setting up environment to compile VC kernel in wind

Post by TheCool1Kevin »

You can usee grub-mkrescue under the Windows Subsystem for Linux environment, and you can invoke it from the normal windows command line by:

Code: Select all

ubuntu -c "grub-mkrescue /mnt/c/..."
This, of course, assumes you've set up WSL correctly, and that you've installed Ubuntu for WSL from the Windows Store.

This beauty of this is that you can now pass the command to Visual Studio to execute after build, allowing for seamless integration. You can also now execute arbitrary Linux commands from the Windows command prompt, again, streamlining workflow.

So, to use Grub with the Visual Studio Build System, just add a Post Build event to execute the grub-mkrescue.

However, on the off chance you decide that this is too complicated, well you can use the syslinux bootloader instead, however, this is highly discouraged.

I would personally recommend you use Visual Studio Code instead.

~ Kevin
LiquiDOS, my weird hobbyist OS.
"Strive for progress, not perfection" - Anonymous
0xCC
Posts: 15
Joined: Sun Sep 09, 2018 2:07 am

Re: Help,Setting up environment to compile VC kernel in wind

Post by 0xCC »

TheCool1Kevin wrote:..
Thank you. This is the best solution so far but i read that WSL is available in win10 only ,i'm using win8.1 :/
you talked about "syslinux bootloader " is possible to create iso with kernel in windows with that ?
0xCC
Posts: 15
Joined: Sun Sep 09, 2018 2:07 am

Re: Help,Setting up environment to compile VC kernel in wind

Post by 0xCC »

still looking for an answer.
is there any other way without linux ? (does not have to be grub)
User avatar
TheCool1Kevin
Posts: 24
Joined: Fri Oct 14, 2016 7:37 pm
Location: Canada
Contact:

Re: Help,Setting up environment to compile VC kernel in wind

Post by TheCool1Kevin »

0xCC wrote:still looking for an answer.
is there any other way without linux ? (does not have to be grub)
Yes, syslinux is possible. The COSMOS project uses that to compile their ISO images.
I highly suggest you find an alternative. You may want to look into Vagrant for near seamless integration. I used to use Vagrant for many of my projects until I upgraded (for free) to Windows 10. Furthermore, what's so bad about a free Windows 10 upgrade?

Best regards, Kevin
LiquiDOS, my weird hobbyist OS.
"Strive for progress, not perfection" - Anonymous
DiggDug
Posts: 10
Joined: Wed Oct 10, 2018 12:08 pm

Re: Help,Setting up environment to compile VC kernel in wind

Post by DiggDug »

Just to be clear by your original post on this thread, you are wanting a way to create an ISO file under the Windows Host. And then you want to make it bootable ?
Hopefully I have that right, if not, then please disregard my reply.

If true, then here is a program I use on my windows host to create ISO files. You can even attach a bootable BIN / IMG file to it and it will boot up. Tested this many times and it works on legacy hardware and even in virtualbox. This will not boot up on modern computers that have UEFI Class 3 Firmware. This only works with Legacy ( CSM ) mode hardware and older. So if you can't get it to boot on your physical computer, double check your BIOS.

IMGBURN
http://www.imgburn.com/

That latest update is June 2013. But still usable to this day.

Here is a youtube tutorial on how to use it and make it bootable.

https://www.youtube.com/watch?v=lizhzDX7-AI


Hope this helps.

digg
Post Reply