Text Truncated

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.
jrfritz

Re:Text Truncated

Post by jrfritz »

You did a mistake....you think the bootloader works...but it dose not. Just wait a min while it's loading the floppy and loading the a20 and you'll see you get a bogus mem agian.
jrfritz

Re:Text Truncated

Post by jrfritz »

Ok...I found that the bogus mem happends before the disk loading...i'll post more on what's going on later.
jrfritz

Re:Text Truncated

Post by jrfritz »

Whenever I try to jmp to 0x100000 I still get a bogus mem error.
pskyboy

Re:Text Truncated

Post by pskyboy »

Hmm, thats odd it seems to work fine for me

Peter
jrfritz

Re:Text Truncated

Post by jrfritz »

I'm going to try GRUB.
jrfritz

Re:Text Truncated

Post by jrfritz »

Grub is too much...I like mostly programming my sources...so i'd know where everything is....

hanoi...could I see your bootsector/loader?
Whatever5k

Re:Text Truncated

Post by Whatever5k »

You shouldn't give up that quick...Why is GRUB too much? Too hard to install? There are many docs out there which can help you, and they also can tell you what GRUB will do...
It will put your kernel at 1 MB and give you the control...
jrfritz

Re:Text Truncated

Post by jrfritz »

I like NASM source and knowing my code...I can't even get it to compile...never mind grub for now...

i'd like to see hanoi's bootloader.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Text Truncated

Post by df »

i have a grub floppy thats ready to go based on the last release (0.93, iirc). all you need to do is copy your kernel to a:\kernel.bin... no hassles.

grub rocks. writing a bootsector/bootloader is a waste of time imo. time better spent on the OS.
all the hard work is done in grub, eg: getting it to boot on machines with buggy bios, etc. its had wide testing... how many different machines has your bootsector been tested on? :)
-- Stu --
Whatever5k

Re:Text Truncated

Post by Whatever5k »

I agree with df, use GRUB and concentrate on your kernel. If I remember right, you still haven't implemented a memory manager, but worry about your bootloader
jrfritz

Re:Text Truncated

Post by jrfritz »

I now again get at text truncated...here is my compiling:

# Simple way to compile

nasm -f bin ../source/boot/boot.asm -o ../bins/boot.bin
nasm -f elf ../source/kernel/kernelasm.asm -o ../source/object/kernelasm.o
gcc -c ../source/kernel/kernel32.cpp -o ../source/object/kernel32.o
gcc -c ../source/kernel/idt.cpp -o ../source/object/idt.o
gcc -c ../source/kernel/error.cpp -o ../source/object/error.o
gcc -c ../source/kernel/fstdio.cpp -o ../source/object/fstdio.o
gcc -c ../source/kernel/x86.cpp -o ../source/object/x86.o
gcc -c ../source/kernel/string.cpp -o ../source/object/string.o
gcc -c ../source/kernel/keys.cpp -o ../source/object/keys.o
gcc -c ../source/kernel/irq.cpp -o ../source/object/irq.o

# Put kernelasm.o first so it IS loaded first!
ld -Tlink.ld -o ../source/temp/kernel32 ../source/object/kernelasm.o ../source/object/kernel32.o ../source/object/idt.o ../source/object/error.o ../source/object/fstdio.o ../source/object/x86.o ../source/object/string.o ../source/object/keys.o ../source/object/irq.o
objcopy -R .note -R .comment -S -O binary ../source/temp/kernel32 ../bins/kernel32.sys

cat ../bins/boot.bin ../bins/kernel32.sys > fritzos.img

# delete the temp files
sh deltemp.sh

here is my link.ld:
OUTPUT_FORMAT("binary")
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 = .;
}

and here is my error:
kernelasm.o: relocation truncated to fit: R_386_16 .text

It's not text trunctated...relocation truncated.
Whatever5k

Re:Text Truncated

Post by Whatever5k »

Show us your kernelasm.o please
jrfritz

Re:Text Truncated

Post by jrfritz »

[attachment deleted by admin]
Whatever5k

Re:Text Truncated

Post by Whatever5k »

Check if extern functions like "start_textmode" or "LoadingGDTMsg" contain 16-bit code...
jrfritz

Re:Text Truncated

Post by jrfritz »

When I comment out the GDT it works... ???

No those do not contain 16-bit stuff...those are all C functions
Post Reply