Kernel will not boot
Kernel will not boot
My operating system kernel will not boot, and I think it is because the kernel loader (the assembly code that calls the main function) will not link with the kernel. Any help would be appreciated.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Still not as worse as:Brynet-Inc wrote:What is with first time posters?
Do they honestly think we can read minds? and/or access their source code just by concentrating "really really hard"?
AusZero, Try diagnosing the issue yourself.. most emulators have debugging capabilities that help..
"My compiler says my source code has an error. How can I fix this?"
My OS is Perception.
It doesn't seem to link.
I'm using Windows XP, DJGPP, nasm, C++ ,and Assembly.
I have used many different bootloaders (which haven't worked by the way), but now I'm using this one: http://www.osdever.net/downloads/bootse ... ootf02.zip.
I'm using Windows XP, DJGPP, nasm, C++ ,and Assembly.
I have used many different bootloaders (which haven't worked by the way), but now I'm using this one: http://www.osdever.net/downloads/bootse ... ootf02.zip.
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
It would help if you pasted here the commands you use to compile your code, and the error you are receiving.
My OS is Perception.
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Can you post the contents of your link.ld file, the loader code, and the commands used to "compile" your code? (You have already posted the command you use to link the kernel.)
My OS is Perception.
The link.ld file:
The loader code:
The commands used to compile the kernel: gxx -c kernel.cpp -fno-builtin -fno-rtti -fno-exceptions
I got some of this off of a tutorial.
Code: Select all
OUTPUT_FORMAT("binary")
ENTRY(start)
SECTIONS
{
.text 0x100000 :
{
code = .; _code = .; __code = .;
*(.text)
. = ALIGN(4096);
}
.data :
{
data = .; _data = .; __data = .;
*(.data)
. = ALIGN(4096);
}
.bss :
{
bss = .; _bss = .; __bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
}
Code: Select all
[BITS 32]
[global start]
[extern _main]
start:
call _main
cli
hlt
I got some of this off of a tutorial.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
where do you set up the stack?Code: Select all
[BITS 32] [global start] [extern _main] start: call _main cli hlt
- 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:
uhm, have you read Getting Started ?AusZero wrote:What do you mean?