[?]Help Making OS [?] (Linker Error)
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: [?]Help Starting OS [?]
Yeah but using AT&T with as makes everything standard and the same.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: [?]Help Starting OS [?]
And using the Intel syntax for everything makes it the same plus more convenient for you
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- GeniusCobyWalker
- Member
- Posts: 65
- Joined: Mon Jan 12, 2009 4:17 pm
Re: [?]Help Starting OS [?]
I got (Code::Blocks) GCC, NASM, Bochs.Well, they are pretty much the same. I recommend GCC, NASM (well, that's me), Bochs.
What now?
Also im using Ubuntu i386 AMD64 does that matter?
Full Knowledge in:
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: [?]Help Starting OS [?]
Now the fun begins. Start reading the Intel manuals before anything else. After that, look around the wiki and you'll know what to do. It's normal to be confused at the begining . If you still have problems, come back here and ask for more directions.GeniusCobyWalker wrote:What now?
Anyway, you've got a pretty strange background... Zilog assembly and stuff like Blender? I mean I played around with Blender myself but that's it... You will find that OSDeving is a lot different than application programming, espeically that of OpenGL & such. Nonetheless, I wish you good luck
Ubuntu i386 AMD64? I doubt there's such a platform Do you mean your CPU is an AMD64?Also im using Ubuntu i386 AMD64 does that matter?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- GeniusCobyWalker
- Member
- Posts: 65
- Joined: Mon Jan 12, 2009 4:17 pm
Re: [?]Help Starting OS [?]
No it is Ubuntu 64 Bit.
Full Knowledge in:
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: [?]Help Starting OS [?]
Ok, but it can't be both i386 and AMD64. i386 stands for "Intel 80386" (although the AMD64 architecture is backwards-compatible with the i386). Anyway, it's fine what you have
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- GeniusCobyWalker
- Member
- Posts: 65
- Joined: Mon Jan 12, 2009 4:17 pm
Re: [?]Help Starting OS [?]
Does anybody know how to start a project for this in Code::Blocks?
How do I go about compiling it?
If anyone thinks I shouldn't use code::blocks what should I use?
How do I go about compiling it?
If anyone thinks I shouldn't use code::blocks what should I use?
Full Knowledge in:
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: [?]Help Starting OS [?]
You probably shouldn't be using an IDE to begin with. IDEs tend to control your applications for you and you don't want that for OSes; use command lines and makefiles. If you like nifty user interfaces, get an editor, otherwise use a simple UTF-8 text editor. You will find a list of editors on the wiki, as well as IDEs, but I would not recommend any of those unless you know what you're doing (and even so it's kind of pointless)...
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: [?]Help Starting OS [?]
Personally, I'd disagree with that. Though I don't get Eclipse (the IDE of choice for me) to manage every facet of my OS project for me, I find it's helped simplify development a lot. I DO use a makefile (with autoconf), but Eclipse has a view for managing and executing makefile targets that's much easier to manage than continuously opening a bash shell. File/project management, class/object views, dependencies, and content-assist across multiple files, and compiler integration are just some of the useful advantages an IDE can offer that a text editor with command shell cannot, even in the case of OS development. But to each their own...
"Sufficiently advanced stupidity is indistinguishable from malice."
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: [?]Help Starting OS [?]
IDEs will work, but so will basic makefiles. Here is a simple one to get you started:
That will build a 32-bit ELF with all the .c and .s files in the directory. Make sure you also provide a linker script. Take a look at the bare bones tutorial for more info.
IDEs will work, but I prefer makefiles because I can easily create a script that will run my makefile, report any errors, copy my kernel to my disk image, and then run my emulator. Probably possible in an IDE as well, but idk how to set it up.
Code: Select all
CC = gcc
CFLAGS = -m32 -ffreestanding -nostdlib -nodefaultlibs -mcmodel=large -DBUILDING_KERNEL
ASM = nasm
ASMFLAGS =
LD = ld
LDFLAGS = -T linkerscript.ld --strip-all -nostdlib -nodefaultlibs
BIN = (Insert directory where you put compiled executables)
OUTPUT = (Insert name of output)
CSOURCES = $(wildcard *.c)
CHEADERS = $(wildcard *.h)
ASMSOURCES = $(wildcard *.s)
COBJECTS = $(patsubst %.c,%.o, $(CSOURCES))
ASMOBJECTS = $(patsubst %,%.o, $(ASMSOURCES))
.PHONY : all clean
all: $(BIN)$(OUTPUT)
clean:
rm -f *.o
$(BIN)$(OUTPUT): $(COBJECTS) $(ASMOBJECTS)
$(LD) $(LDFLAGS) -o $(BIN)$(OUTPUT) $(COBJECTS) $(ASMOBJECTS)
$(COBJECTS) : $(CSOURCES) $(CHEADERS)
$(CC) -c $(CFLAGS) -o $@ $(patsubst %.o,%.c, $@)
$(ASMOBJECTS) : $(ASMSOURCES)
$(ASM) -f elf32 $(ASMFLAGS) -o $@ $(patsubst %.o,%, $@)
$(CSOURCES) :
$(ASMSOURCES) :
$(CHEADERS) :
IDEs will work, but I prefer makefiles because I can easily create a script that will run my makefile, report any errors, copy my kernel to my disk image, and then run my emulator. Probably possible in an IDE as well, but idk how to set it up.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: [?]Help Starting OS [?]
I'd have serious trouble with people who
- can't compile code
- can't figure how to create a project
- can't distinguish i386 and amd64
- uses colours and therefore haven't read the forum rules.
So either this is cotton returning or you should really consider starting with something easier than an OS.
- can't compile code
- can't figure how to create a project
- can't distinguish i386 and amd64
- uses colours and therefore haven't read the forum rules.
So either this is cotton returning or you should really consider starting with something easier than an OS.
- GeniusCobyWalker
- Member
- Posts: 65
- Joined: Mon Jan 12, 2009 4:17 pm
Re: [?]Help Starting OS [?]
Still need help.
How do I make these files in Ubuntu
How do I make these files in Ubuntu
Full Knowledge in:
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: [?]Help Starting OS [?]
http://forum.osdev.org/viewtopic.php?f=1&t=16944GeniusCobyWalker wrote:Still need help.
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.google.com
- GeniusCobyWalker
- Member
- Posts: 65
- Joined: Mon Jan 12, 2009 4:17 pm
Re: [?]Help Starting OS [?]
Thanks for the links Combuster sorry that I haven't read them before.
Also fixed the signature (NO COLOURS).
How do I make these files?
(Unfamiliar with Ubuntu's file system)
I will use GEdit instead of Code::Blocks now
I will continue reading "Bare Bones" while waiting for a response.
Also fixed the signature (NO COLOURS).
How do I make these files?
(Unfamiliar with Ubuntu's file system)
I will use GEdit instead of Code::Blocks now
I will continue reading "Bare Bones" while waiting for a response.
Full Knowledge in:
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
GML, Ti-Basic, Zilog Z80 Assembly, SX28 Assembly and Blender
Experience in:
C++,OpenGl,NDS C++,Dark Basic,Dark Basic Pro,Dark Gdk and PSP Coding
Using:
Ubuntu ,GEdit ,NASM ,GCC ,LD ,Bochs
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: [?]Help Starting OS [?]
You mean how do you run a makefile? Look at the docs for make ( http://www.gnu.org/software/make/manual/make.html ).How do I make these files?
Basically, you just run make in the directory where your makefile is located. Here is a shell script that will let you do that without opening a terminal:
Code: Select all
#! /bin/sh
make