Page 2 of 3
Re:Text Truncated
Posted: Wed Jan 01, 2003 6:12 pm
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.
Re:Text Truncated
Posted: Wed Jan 01, 2003 6:39 pm
by jrfritz
Ok...I found that the bogus mem happends before the disk loading...i'll post more on what's going on later.
Re:Text Truncated
Posted: Wed Jan 01, 2003 10:33 pm
by jrfritz
Whenever I try to jmp to 0x100000 I still get a bogus mem error.
Re:Text Truncated
Posted: Thu Jan 02, 2003 10:34 am
by pskyboy
Hmm, thats odd it seems to work fine for me
Peter
Re:Text Truncated
Posted: Thu Jan 02, 2003 10:53 am
by jrfritz
I'm going to try GRUB.
Re:Text Truncated
Posted: Thu Jan 02, 2003 11:50 am
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?
Re:Text Truncated
Posted: Thu Jan 02, 2003 11:53 am
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...
Re:Text Truncated
Posted: Thu Jan 02, 2003 11:55 am
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.
Re:Text Truncated
Posted: Thu Jan 02, 2003 12:12 pm
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?

Re:Text Truncated
Posted: Thu Jan 02, 2003 12:46 pm
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
Re:Text Truncated
Posted: Thu Jan 02, 2003 12:52 pm
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.
Re:Text Truncated
Posted: Thu Jan 02, 2003 12:57 pm
by Whatever5k
Show us your kernelasm.o please
Re:Text Truncated
Posted: Thu Jan 02, 2003 1:00 pm
by jrfritz
[attachment deleted by admin]
Re:Text Truncated
Posted: Thu Jan 02, 2003 1:04 pm
by Whatever5k
Check if extern functions like "start_textmode" or "LoadingGDTMsg" contain 16-bit code...
Re:Text Truncated
Posted: Thu Jan 02, 2003 1:06 pm
by jrfritz
When I comment out the GDT it works... ???
No those do not contain 16-bit stuff...those are all C functions