Mkisofs usage help
Re: Mkisofs usage help
Ok. I will use a cross compiler.
Can someone point me to a ready binary for windows or share theirs?
I am a newbie in OS Development and don't quite understand what to in the GCC cross compiler tutorial.
Can someone point me to a ready binary for windows or share theirs?
I am a newbie in OS Development and don't quite understand what to in the GCC cross compiler tutorial.
All a good OS needs to do is to run Linux inside QEMU
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: Mkisofs usage help
That's bad again, firstly it's quite possible that the "pre compiled" compiler may not integrate well with your environment, secondly building a cross compiler it teaches you a lot of things you will need in your later stages and thirdly, it makes you familiar with your environment.StartOS wrote:Ok. I will use a cross compiler.
Can someone point me to a ready binary for windows or share theirs?
I am a newbie in OS Development and don't quite understand what to in the GCC cross compiler tutorial.
The tutorial is very verbose, detailed and well written. Some of best people on this forum have worked on it. Read it carefully step by step, and you should be able to get a working cross compiler.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: Mkisofs usage help
It is just not written as a series of steps. And I am a real begginer. I never before did low-level programming I just did make some useful windowed programs like a text editor, basic mail client.Bender wrote:The tutorial is very verbose, detailed and well written. Some of best people on this forum have worked on it. Read it carefully step by step, and you should be able to get a working cross compiler.
Everything that is written in this tutorial is totally new for me. I didn't use cygwin and do not even know how build a regular compiler not talking about a cross-compiler.
I tried using ghost-i686-elf-tools from http://wiki.osdev.org/GCC_Cross-Compile ... Toolchains, but it requires some dll for the dependencies listed in http://www.ghostkernel.org/documentation/toolchain.
Can someone explain how this stuff works or just give a link to an newb-friendly tutorial?
All a good OS needs to do is to run Linux inside QEMU
-
- Member
- Posts: 283
- Joined: Mon Jan 03, 2011 6:58 pm
Re: Mkisofs usage help
TBH, I think you would find life a lot easier if you used Linux (maybe installed in a Virtual Machine) rather than Windows for OS development. Not saying that it can't be done in Windows but it does make life more difficult.
I know it sounds harsh, but if you can't follow the instructions to create a cross-compiler then you are going to find OS development very challenging. So I would stick with it as a very good introduction to the tools that you need to use.
I know it sounds harsh, but if you can't follow the instructions to create a cross-compiler then you are going to find OS development very challenging. So I would stick with it as a very good introduction to the tools that you need to use.
Re: Mkisofs usage help
How the **** did this reached there. The Ghost Kernel is one of max's projects. You should not use it! Don't misunderstand me; max is an excellent developer, but precompiled binaries are the hell on Earth.StartOS wrote:I tried using ghost-i686-elf-tools from http://wiki.osdev.org/GCC_Cross-Compile ... Toolchains, but it requires some dll for the dependencies listed in http://www.ghostkernel.org/documentation/toolchain
This will be a somewhat lengthy post. I'll try to explain you what does the wiki perfectly explains. If this doesn't solutions the problem, I don't know what will.. I'll try to explain you the basics of cross-compilation, using the wiki . Before proceding, remember to read all the post before doing anything, specially the caveats at the end.
First of, why do you/I need a cross-compiler?
First of all, get the lastest GCC sources. Extract them somewhere . Do the same with the lastest binutils sources. Do not mix both extracted folders!The Holy OSDev Wiki wrote: You need to use a cross-compiler unless you are developing on your own operating system. The compiler must know the correct target platform (CPU, operating system), otherwise you will run into trouble. If you use the compiler that comes with your system, then the compiler won't know it is compiling something else entirely. Some tutorials suggest using your system compiler and passing a lot of problematic options to the compiler. This will certainly give you a lot of problems in the future and the solution is build a cross-compiler.
The wiki says that you'll now need to "decide" your [link=http://wiki.osdev.org/Target_Triplet]Target Triplet[/link]. Let's just use i686-elf for this guide. Now, let's prepare for the build! This either can or cannot is a damn hard part for Cygwin/MinGW users. You'll have to get through your GNU on Windows environment. You'll need the following packages:
- GCC
- G++
- GNU Make
- GNU Bison
- GNU Flex
- GNU Diffutils
Code: Select all
cd gcc-src
./contrib/download_prerequisites
We're ready! Let's start by creating some pretty folders (this is mandatory!). If you're still in gcc-src, run this:
Code: Select all
cd ..
mkdir gcc-bld
mkdir binutils-bld
Just to be sure, take this religiously . If, by some reason, your terminal session is closed (power outage, etc..), you must refollow the following paragraph again.
We need to do some exports. This will allow the build system to understand where you want to build the cross-compiler. Never mind to avoid this step! We'll export three variables, first of all, $PREFIX. It is where your cross-compiler will be installed. Reserve a folder somewhere in your system for this. Let's say it's $HOME/cross (change this to your needs). Let's export it!:
Code: Select all
export PREFIX="$HOME/cross"
Code: Select all
export TARGET="i686-elf"
We are fully prepared, it's compile time! Run this exactly exactly as shown! We'll compile binutils first. Assuming you're still where I left you, do this. (Note: this assumes binutils sources are in a directory called binutils-src. In real world, it probably won't. Just modify the script to use the correct paths ):
Code: Select all
cd binutils-bld
../binutils-src/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror
make
make install
It's time for GCC, finally! Run:
Code: Select all
cd ../gcc-bld
../gcc-src/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers
make all-gcc all-target-libgcc
make install-gcc install-target-libgcc
Once done, you'll have your fresh, just baked cross-compiler ready for the go. We'll just modify $PATH so that it can be accessed from anywhere:
Code: Select all
export PATH="$PREFIX/bin:$PATH"
I'll just post a few more caveats and exit:
- Use tar to extract the archives. Don't use a Windows-specific tool. It may change Unix-newlines ("\n") to stupid Windows-newlines ("\n\r"). This is not any good, as compilation can get pretty messy really fast.
- Don't stop the compilation (either voluntarily or not), neither close your MinGW terminal! It may be very difficult to recover from this, as you'll have to start from zero!.
- Follow what the people on this forum say you. Don't persist on using "easy" prebuilt-compilers. They'll cause you lots of problems.
- If you have the oportunity, install (either as dual-boot or single OS) a Linux distribution. If you really like OSDev, this will help you a lot!
Happy New Code!
Hello World in Brainfuck :[/size]
Hello World in Brainfuck :
Code: Select all
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
Re: Mkisofs usage help
Very Big Thanks KemyLand!
Now I understand what I have to do.
Now I understand what I have to do.
All a good OS needs to do is to run Linux inside QEMU
Re: Mkisofs usage help
Oh no!!!
I get:
Makefile:743: recipe for target 'ar.exe' failed
make[4]: *** [ar.exe] Error 1
make[4]: Leaving directory '/cygdrive/c/Users/ABC/Documents/0Hack/XCompiler/binutils-bld/binutils'
Makefile:974: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/cygdrive/c/Users/ABC/Documents/0Hack/XCompiler/binutils-bld/binutils'
Makefile:625: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/cygdrive/c/Users/ABC/Documents/0Hack/XCompiler/binutils-bld/binutils'
Makefile recipe for target 'all-binutils' failed
make[1]: *** [all-binutils] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/ABC/Documents/0Hack/XCompiler/binutils-bld'
Makefile:835: recipe for target 'all' failed
make: *** [all] Error 2
I get:
Makefile:743: recipe for target 'ar.exe' failed
make[4]: *** [ar.exe] Error 1
make[4]: Leaving directory '/cygdrive/c/Users/ABC/Documents/0Hack/XCompiler/binutils-bld/binutils'
Makefile:974: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/cygdrive/c/Users/ABC/Documents/0Hack/XCompiler/binutils-bld/binutils'
Makefile:625: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/cygdrive/c/Users/ABC/Documents/0Hack/XCompiler/binutils-bld/binutils'
Makefile recipe for target 'all-binutils' failed
make[1]: *** [all-binutils] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/ABC/Documents/0Hack/XCompiler/binutils-bld'
Makefile:835: recipe for target 'all' failed
make: *** [all] Error 2
Last edited by StartOS on Mon Aug 17, 2015 4:30 am, edited 1 time in total.
All a good OS needs to do is to run Linux inside QEMU
Re: Mkisofs usage help
I still think that you would find life easier if you stopped messing about with Windows and CygWin and used Linux to do your development. But perhaps you enjoy a challenge.
-
- Member
- Posts: 307
- Joined: Wed Oct 30, 2013 1:57 pm
- Libera.chat IRC: no92
- Location: Germany
- Contact:
Re: Mkisofs usage help
Incoming "Windows vs. Linux" war?iansjack wrote:I still think that you would find life easier if you stopped messing about with Windows and CygWin and used Linux to do your development. But perhaps you enjoy a challenge.
But seriously, using Windows for OSdev makes your life even harder. This isn't a necessity; you can use Linux instead. It's a shame that the most popular Desktop OS in the world doesn't have a single compiler that runs in the native environment and is capable of producing ELF-binaries. The Unix-environments for Windows lead often to issues, for example when using Makefiles.
Some prejudgments against Linux and what's wrong with them:
- hard to install: obviously wrong, it's as easy as Windows and OS X, thanks to GUI installers (for several years now)
- hard to use: most distros offer a GUI; Terminals aren't hard to use, and when OSdeving on Windows, you use them, too! (probably for more than a decade)
- no software: by searching a little you'll find something that suits your needs. In my 2.5 years of using Linux I've never had any issues with software I couldn't replace.
- no games: Thanks to Valve, since the Steam client port 2 years ago there are a lot of games (including AAA titles) that run on Linux; 54 out of my 68 games run on Linux. Note: I'm buying games regardless of the OS they run on, as I have a decent iMac with Windows.
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: Mkisofs usage help
....and if you want Windows alongside Linux, you can run it inside a VM or dual boot.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: Mkisofs usage help
I'm not making any recommendations about Linux as a general purpose Operating System, and certainly don't intend to start a Linux/Windows flame war. There are other forums for such discussions. (I actually use Windows, Linux, and OS X in about equal measures.) I'm only commenting on its suitability for this particular purpose - OS development.
Even if it were hard to install/configure (which it isn't) that would be irrelevant. Let's face it, if you can't manage a mature OS like Linux then your chances of managing your own immature OS are pretty minimal. If for no other reason, Linux is ideal for OS development because it is the environment assumed by most of the better tutorials/guides. This is a case in point; the OP is having difficulty creating a cross-compiler. If they used Linux they should have no problem following the step-by-step instructions in this Wiki. There is a far better selection of free development tools available for the Linux platform than there is for Windows. And the "natural" executable file format for Linux is one that ties in nicely with the use of Grub as a boot-loader. (This latter seems to be the root of the OP's problems.)
None of these are insurmountable in Windows but, unless you are very familiar with the tools you are using, they require more work than in Linux. OS development is hard enough without putting additional obstacles in your way. Anyway, I've made the point twice in this thread so I'll try to refrain from making it again.
Even if it were hard to install/configure (which it isn't) that would be irrelevant. Let's face it, if you can't manage a mature OS like Linux then your chances of managing your own immature OS are pretty minimal. If for no other reason, Linux is ideal for OS development because it is the environment assumed by most of the better tutorials/guides. This is a case in point; the OP is having difficulty creating a cross-compiler. If they used Linux they should have no problem following the step-by-step instructions in this Wiki. There is a far better selection of free development tools available for the Linux platform than there is for Windows. And the "natural" executable file format for Linux is one that ties in nicely with the use of Grub as a boot-loader. (This latter seems to be the root of the OP's problems.)
None of these are insurmountable in Windows but, unless you are very familiar with the tools you are using, they require more work than in Linux. OS development is hard enough without putting additional obstacles in your way. Anyway, I've made the point twice in this thread so I'll try to refrain from making it again.
Re: Mkisofs usage help
I pulled out my hair when reading the most recent replies. Wasted my 15 minutes writing that guide, then NT + the subnormal of MinGW fucks it up .
Linux/Unix/*BSD/your T.V. is a better development platform than Windows. Let's remember Windows is a General-purpose OS, but "optimized" for non-developer end users. If some compiler works well in there, it's MSVC(++).
This is also GNU's fault both for creating Unix-dependent software (what I can call non-portable software), and being extremist in Free Software, to the point as to claiming that because Windows NT is not free software, porting software to it "violates" the user's freedoms. That's just ironical. The main project that supports free software is opposed to give its users the freedom to use their software were they want. BSD people at least understand what they're talking about . GNU justifies all this with the false fact that GNU Software is only intended to run on a GNU system (compile that on BSD, or even Sortix 0.9 if you like ).
Linux/Unix/*BSD/your T.V. is a better development platform than Windows. Let's remember Windows is a General-purpose OS, but "optimized" for non-developer end users. If some compiler works well in there, it's MSVC(++).
This is also GNU's fault both for creating Unix-dependent software (what I can call non-portable software), and being extremist in Free Software, to the point as to claiming that because Windows NT is not free software, porting software to it "violates" the user's freedoms. That's just ironical. The main project that supports free software is opposed to give its users the freedom to use their software were they want. BSD people at least understand what they're talking about . GNU justifies all this with the false fact that GNU Software is only intended to run on a GNU system (compile that on BSD, or even Sortix 0.9 if you like ).
Happy New Code!
Hello World in Brainfuck :[/size]
Hello World in Brainfuck :
Code: Select all
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
Re: Mkisofs usage help
If the FSF made that claim it would certainly be a problem. Do you have a link for such a claim? As far as I can see there is nothing to prevent people from porting GNU software to Windows (other than the fact that it is not a particularly easy excercise).
As to chastising them because they target their tools at Unix-like OSs, that is just crazy.
As to chastising them because they target their tools at Unix-like OSs, that is just crazy.