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.
I am trying to install GRUB2 on Mac OS X 10.12 so I can continue following the bare bones tutorial. To install it I am following the tutorial for Mac OS X on the os dev site. When I get to configure portion I copied down the command exactly and when I run it I get this:
checking build system type... x86_64-apple-darwin16.0.0
checking host system type... x86_64-apple-darwin16.0.0
checking target system type... i386-pc-elf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ../../grub-2.00/build-aux/install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for cmp... cmp
checking for bison... bison
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -ll
checking whether yytext is a pointer... yes
checking for bison... (cached) bison
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
configure: error: flex is too old. GRUB requires 2.5.35 or above
How should I update flex or am I doing something else wrong? Thanks in advance!
MajickTek wrote:Finally I found someone who is developing on my OS of preference... My main computer is an iMac and I love developing on that thing <3
Also, I am having trouble setting up my toolchain and cross-compiler. Is there a way you could send me your toolchain (e.g. gcc, binutils, grub, etc.)? I would really appreciate it.
MajickTek wrote:Finally I found someone who is developing on my OS of preference... My main computer is an iMac and I love developing on that thing <3
Also, I am having trouble setting up my toolchain and cross-compiler. Is there a way you could send me your toolchain (e.g. gcc, binutils, grub, etc.)? I would really appreciate it.
You should really try to get it building on your own computer, eventually you will be wanting to build a compiler that targets your new operating system.
com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState Compiler Development Forum
MajickTek wrote:Finally I found someone who is developing on my OS of preference... My main computer is an iMac and I love developing on that thing <3
Also, I am having trouble setting up my toolchain and cross-compiler. Is there a way you could send me your toolchain (e.g. gcc, binutils, grub, etc.)? I would really appreciate it.
Extract in /usr/local and it will be installed to /usr/local/osdev-cross/. Add /usr/local/osdev-cross/bin to PATH and you can use i686-pc-gcc etc. to build your stuff.
If I have time and there is interest I could extend this to include more useful programs, like qemu, and languages, like C++.
Hold on for a moment: are you trying to build GRUB2 using your cross-compiler so you can install it into a disk image which you can run in an emulator or virtualizer, or are you trying to install it on the Mac itself? The way you said it sounds like the latter, and that is not recommended for OS development, especially if you are at the stage of working with the Bare Bones tutorial.
You generally don't want your OS running on bare hardware until you are much farther along, and even then, unless you are really confident in your OS, you generally don't want to multiboot it on the same system you are developing on. You can, if you want to - in the bad old days the usual process was to install it on a floppy and boot live - but given the availability emulators such as Bochs and virtualizers such as Virtualbox and QEMU, doing that as part of the general development process is going to be more trouble than it is worth. I recommend that you make sure it runs well in one or more emulators first, then test it booting into hardware using a separate boot disk.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Schol-R-LEA wrote:Hold on for a moment: are you trying to build GRUB2 using your cross-compiler so you can install it into a disk image which you can run in an emulator or virtualizer, or are you trying to install it on the Mac itself? The way you said it sounds like the latter, and that is not recommended for OS development, especially if you are at the stage of working with the Bare Bones tutorial.
You generally don't want your OS running on bare hardware until you are much farther along, and even then, unless you are really confident in your OS, you generally don't want to multiboot it on the same system you are developing on. You can, if you want to - in the bad old days the usual process was to install it on a floppy and boot live - but given the availability emulators such as Bochs and virtualizers such as Virtualbox and QEMU, doing that as part of the general development process is going to be more trouble than it is worth. I recommend that you make sure it runs well in one or more emulators first, then test it booting into hardware using a separate boot disk.
I am trying to use GRUB's command line tools so I can make my os.bin into an .iso that emu can run.
MajickTek wrote:Finally I found someone who is developing on my OS of preference... My main computer is an iMac and I love developing on that thing <3
Also, I am having trouble setting up my toolchain and cross-compiler. Is there a way you could send me your toolchain (e.g. gcc, binutils, grub, etc.)? I would really appreciate it.
Extract in /usr/local and it will be installed to /usr/local/osdev-cross/. Add /usr/local/osdev-cross/bin to PATH and you can use i686-pc-gcc etc. to build your stuff.
If I have time and there is interest I could extend this to include more useful programs, like qemu, and languages, like C++.
MajickTek wrote:Finally I found someone who is developing on my OS of preference... My main computer is an iMac and I love developing on that thing <3
Also, I am having trouble setting up my toolchain and cross-compiler. Is there a way you could send me your toolchain (e.g. gcc, binutils, grub, etc.)? I would really appreciate it.