Comments (6)
By the way, I am on an Ubuntu 12.04 machine.
QEMU emulator version 1.0 (qemu-kvm-1.0)
NASM version 2.09.10
Cross compiled gcc exactly as prescribed.
from os-tutorial.
Hi ChanderG:
I just tried compiling and running it:
$ make run
i386-elf-gcc -ffreestanding -c kernel.c -o kernel.o
i386-elf-ld -o kernel.bin -Ttext 0x1000 kernel_entry.o kernel.o --oformat binary
i386-elf-ld: warning: cannot find entry symbol _start; defaulting to 0000000000001000
cat bootsect.bin kernel.bin > os-image.bin
qemu-system-i386 -fda os-image.bin
As you see, the 0x1000 is pretty much the default. Please make sure that you're using the correct syntax for your version of ld
.
I'd suggest trying to set breakpoints in kernel.c to see if it's really jumping into it, or modify bootsect.asm
to print KERNEL_OFFSET
just before jumping into it, and check that it's really 0x1000
"Screen flickering" looks like the CPU is triple faulting and restarting over and over again. You can check that by using the qemu flag -d guest_errors,int
and looking for a triple kernel panic-like dump.
Debugging this is pretty hard, I know. Good luck!
from os-tutorial.
After trying to print KERNEL_OFFSET, It gave me 0x0000 (using print_hex)
This is the first few lines of my boot.asm
:
[org 0x7c00]
KERNEL_OFFSET equ 0x1000
mov bx, KERNEL_OFFSET
call print_hex
call println
jmp $
What is going wrong?
from os-tutorial.
When looking at my os-image.bin
in xxd
, I can see that it only goes up to offset 0x00000270 (plus some). When looking at kernel.bin
the same way, it is placed at 0x00000200 in os-image.bin
. I'm going to change KERNEL_OFFSET to see if that helps.
from os-tutorial.
Now the system hangs after printing "loading kernel into memory."
from os-tutorial.
Hi firestar115, thanks for your comment.
Unfortunately this is not the right place to discuss problems with your code, but rather to open issues related to the github project.
I'd suggest writing on the osdev forum where they will help you understand what's going on.
Regards,
Carlos
from os-tutorial.
Related Issues (20)
- 14-checkpoint: Program received signal SIGTRAP, Trace/breakpoint trap HOT 4
- Problem with example 14 on real machine HOT 1
- cross-compiler for M1 MacBook? HOT 10
- Difference in binary code between the book and my PC HOT 2
- PLEASE CONTINUE !!!!!
- Multiple definition of 'idt' and 'idt_reg' HOT 1
- 3 - jump opcode causes a problem
- File driver fat32 HOT 4
- To whom it may concern! HOT 1
- Result displayed on the terminal itself HOT 1
- 11-Cross Compiler: GCC not compiling HOT 1
- I have a question about 13 kernel bare bones HOT 2
- Share my Makefile to everyone(macOS 13.5) HOT 1
- 05-bootsector-functions-strings/boot_sect_print_hex.asm
- [Open letter] long-standing problems with this tutorial and its consequences due to good SEO HOT 8
- Linker Error! HOT 1
- Print function will print to random locations
- Tut
- An OS from scratch started with this tutorial HOT 1
- Error: unable to disambiguate: -no-PIE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from os-tutorial.