algorithman-de / wyoos Goto Github PK
View Code? Open in Web Editor NEWSource codes for the "Write your own Operating System" video-series on YouTube
Home Page: http://wyoos.org
License: GNU General Public License v3.0
Source codes for the "Write your own Operating System" video-series on YouTube
Home Page: http://wyoos.org
License: GNU General Public License v3.0
To load the Global Descriptor Table, the instruction “lgdt” when called from C code, gets discarded, and results in an error “Invalid asm operand: invalid expression”. This is only valid if the compiler is run in a level 2 optimised mode. If it’s not optimized, the compiler runs without any problem.
Package grub-legacy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
grub-coreboot:i386 grub-coreboot grub2-common:i386 grub-pc:i386 grub-ieee1275:i386 grub-efi-ia32:i386
grub-efi-amd64:i386 grub2-common grub-pc grub-ieee1275 grub-efi-ia32 grub-efi-amd64
E: Package 'grub-legacy' has no installation candidate
Error received on Linux Mint 19.1.
You're writing to the LbaLowPort, then the LbaMidPort, and then the LbaLowPort again. It is possible that you meant to do LbaLowPort then LbaMidPort then LbaHighPort.
After writing the gdt.cpp file and calling the class in kernel.cpp and "make run" i get this error, is there a solution to this ?but the gdt.o is created but i cant compile the .bin file
Line 35 in gdt.cpp reads: "if (limit <= 65536)". This is a reference to a memory adress, and a memory adress always start at 0. I recognize the number 65536 as 2^16 so the correct line should probably be "if (limit < 65536)", allowing for memory address from 0 to 65535. Please examine the code and check if I have noticed a bona fide bug.
If i execute the line you see above. VirtualBox is crashing and spamming my terminal with many lines but i dont know 1. Why it is crashing and 2. How can I fix this crash
Pls help me i am lost
Multimedia keys send multiple interrupts when pressed.
First the code 0xe0 and than a keycode.
This would make the code incorect for e.g.:
(multimedia) mute pressed -> 0xE0, 0x20 -> This would call OnKeyDown('d').
(keypad) '/' -> 0xe0, 0x35 -> OnKeyDown('-').
I just wanted to put this out there cuzz it took me quite some time to figure this out.
The desktop GUI is flashing in VirtualBox
The desktop and windows are not showing correctly in QEMU
ld: ./bin/kernel.o: in function fgosMain': kernel.cpp:(.text+0xda): undefined reference to
GlobalDescriptorTable::GlobalDescriptorTable()'
qemu shows with flashing text
./src/gdt.cpp: In constructor ‘GlobalDescriptorTable::GlobalDescriptorTable()’:
./src/gdt.cpp:10:22: error: cast from ‘GlobalDescriptorTable*’ to ‘uint32_t’ {aka ‘unsigned int’} loses precision [-fpermissive]
10 | i[1] = (uint32_t)this;
|
Hello, I don't know how to compile the OS. Can somebody send me a cmd/bat/sh command file to build it please? Thanks in advance.
When i start my virtual machine (im using vmware right now because virtualbox loves me (NOT)), I get the error: "AMD am79c973" after "SEND: FF FF FF FF 0A 00 02 02"
Can't open YouTube, teach me how to adapt it
I don't see windows on screen in GRAPHICSMODE
.
I've used qemu-system-i386
.
Thank you for the videos.
It would be nice if you include a license for these files to see how we can reuse them. Are they GPL, Apache, ... ?
Why don't you use the makefile ...
Originally posted by @VishnuRathore98 in #25 (comment)
'fatal error: u10073'
I am trying to implement the YouTube series "Writing your own OS".
You can find my code at "https://github.com/tiagomendes7/Build_Your_Own_OS/tree/main".
Unfortunately i came across this error and i don't know how to solve it.
I believe it has to do with the file "interruptstubs.s" and the code in the line 19 and line 20:
global _ZN16InterruptManager26HandleInterruptRequest\num\()Ev
_ZN16InterruptManager26HandleInterruptRequest\num\()Ev:
Below you can find the output of the command "make mykernel.iso":
as --32 -o loader.o loader.s
g++ -m32 -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o port.o -c port.cpp
g++ -m32 -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o gdt.o -c gdt.cpp
g++ -m32 -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o interrupts.o -c interrupts.cpp
as --32 -o interruptstubs.o interruptstubs.s
g++ -m32 -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o kernel.o -c kernel.cpp
ld -melf_i386 -T linkder.ld -o mykernel.bin loader.o port.o gdt.o interrupts.o interruptstubs.o kernel.o
ld: interruptstubs.o: in function `InterruptManager::HandleInterruptRequest0x00()':
(.text+0x0): multiple definition of `InterruptManager::HandleInterruptRequest0x00()'; interrupts.o:interrupts.cpp:(.text+0x34a): first defined here
ld: interruptstubs.o: in function `InterruptManager::HandleInterruptRequest0x01()':
(.text+0xb): multiple definition of `InterruptManager::HandleInterruptRequest0x01()'; interrupts.o:interrupts.cpp:(.text+0x35a): first defined here
make: *** [Makefile:15: mykernel.bin] Error 1
ld: interrupts.o: in function InterruptManager::InterruptManager(GlobalDescriptorTable*)': interrupts.cpp:(.text+0x111): undefined reference to
InterruptManager::HandleInterruptRequest0x00()'
ld: interrupts.cpp:(.text+0x12e): undefined reference to `InterruptManager::HandleInterruptRequest0x01()'
make: *** [Makefile:19: kernel.bin] Error 1
I dunno what's wrong
make kernel.o
make: *** No rule to make target 'kernel.o'. Stop.
I'm in part one
https://www.youtube.com/watch?v=1rnA6wpF0o4&t=746s
any help with this error would be greatly appreciated I'm assuming it's a error in the makefile
I am getting the following error when trying to compile the code at the end of video 3.
g++ -m32 -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -o gdt.o -c gdt.cpp
gdt.cpp: In constructor ‘GlobalDescriptorTable::GlobalDescriptorTable()’:
gdt.cpp:13:5: error: invalid 'asm': invalid expression as operand
13 | asm volatile("lgdt (%0)": : "p" (((uint8_t *) i)+2));
| ^~~
make: *** [Makefile:8: gdt.o] Error 1
I have tried a number of things. Tried different versions of GCC (5 and 6 as well as 10.3.0). I have also tried both 32bit and 64bit versions of gcc.
In virtual box driver works good, in qemu cursor is "jumping", but in vmware and on real hardware it does't do anything. How to fix that?
mouse.h: https://pastebin.com/AjbxGS7R
mouse.cpp: https://pastebin.com/jqC959dc
Line 53 in 22bf3f7
Should be
VideoMemory[80*y + x] = (VideoMemory[80u*y + x] & 0xFF00u) | (uint8_t)str[i];
else you end up writing to the color addresses, on most characters with more than 127 as value
I get this error when compiling 'mykernel.bin'. I double checked everything to be right multiple times, and still nothing works! Could somebody help me with this? It's very confusing... Thanks in advance.
I like your idea of the video series, keep up the good work! A couple of observations regarding the mouse. The mouse X (buffer[1]) and Y (buffer[2]) values are actually part of a 9-bit 2s complement value. Bit 8 (top bit) for X is actually in buffer[0] at bit 4, and Bit 8 (top bit) for Y is in buffer[0] at bit 5. These bits should be taken into account or you could be interpreting some values from the mouse incorrectly. Something like this should work:
/* Bit 4 of buffer[0] is X's sign bit
Bit 5 of buffer[0] is Y's sign bit */
x += buffer[1] - (0x100 & (buffer[0] << (8-4)));
y -= buffer[2] - (0x100 & (buffer[0] << (8-5)));`
Of course with code as I suggest buffer would be an array of 3 uint8_t, and x and y would have to be a signed integer big enough to hold the values you need (int16_t or int32_t).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.