1

I'm attempting to create a C kernel initially following this tutorial: http://wiki.osdev.org/Bare_Bones However, my system doesn't have i586-elf-gcc or i586-elf-ld. I'm really not sure where I can find these, or whether they are already on my computer. I have gcc and binutils installed with pacman.

ls /usr/bin/ | grep gcc

Outputs

gcc
gcc-ar
gcc-nm
gcc-ranlib
i686-pc-linux-gnu-gcc
i686-pc-linux-gnu-gcc-4.7.0
i686-pc-linux-gnu-gcc-ar
i686-pc-linux-gnu-gcc-nm
i686-pc-linux-gnu-gcc-ranlib
winegcc

I don't mind compiling if I have to, but would prefer a binary.

1 Answers1

2

Arch Linux is compiled for i686 and x86_64 therefore you wont find packages for i586 in it.

You can however follow these instruction http://wiki.osdev.org/OS_Specific_Toolchain or http://wiki.osdev.org/GCC_Cross-Compiler to build a i586 version, as far as I remember I did it in Arch Linux so its possible.

But unless you working on OS kernel that is not for your hobby, using gcc is good enough.

Good luck :)

Dmitry Kudryavtsev
  • 16,354
  • 4
  • 25
  • 32
  • My main problem is I don't seem to be able to either build elfs or link the files as I get a "Invalid or unsupported excecutable format" when trying to run code compiled with the generic gcc or ld. – Max Smashdidypwned Lay Jun 05 '12 at 07:40
  • 1
    Here is a snippet of my old Makefile, maybe it will help http://pastebin.com/n2nn8NWv You can of course compile gcc, I did it and made my self gcc-i386-elf – Dmitry Kudryavtsev Jun 05 '12 at 07:45