OS development 101 - How to make a bootloader part 3 - load kernel.c

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

ความคิดเห็น • 27

  • @foamyadampower7105
    @foamyadampower7105 3 หลายเดือนก่อน +1

    These are the best OS Dev tutorials on TH-cam, please make more !

  • @jaiyadav5934
    @jaiyadav5934 3 หลายเดือนก่อน +1

    This is the best video till now which i have found for OS development i wanted to make my own OS in my current semester. Please continue this series

  • @CallousCoder
    @CallousCoder 2 หลายเดือนก่อน

    Instead of installing cross compiler, you could install Zig and use it as a build tool (and if you have zig you may as well write your kernel in it ;) )

  • @ShadowAmitendu
    @ShadowAmitendu 3 หลายเดือนก่อน +1

    i think changing the BitRate in OBS will help with the Pixelation in the video
    BTW Nice Series

  • @Colaholiker
    @Colaholiker 2 หลายเดือนก่อน +1

    One thing that I don't understand is why everyone still uses the #ifndef style preprocessor macros. Yes, this is how K&R did it when they carved C into some stone plates. But for the last 20 years at least, all relevant compilers supported #pragma once as the first line in the .h file as a much cleaner alternative.
    Every C tutorial lists this as "yeah, you can do this, but it's not widely supported"... Yes, this may have been true at some point, but it no longer is. The big advantage of #pragma once is that you don't create arbitrary C preprocessor defines, which clutter up your global preprocessor namespace. It gets even rose, when you imagine, your project grows, and you end up with two haders using the same #define. Let's say, you gut a defs.h file in two parts of your project, both use #ifndef DEFS_H... all works well, until somehow due to massive include chains, both end up being included by one compilation unit. And then you start to figure out why it doesn't work. With #pragma once you don't need to worry about it, as the preprocessor will keep track of what has been included and what hasn't so far.

  • @pvc988
    @pvc988 3 หลายเดือนก่อน +2

    BIOS leaves boot drive id in DL register. By replacing it with your own value (0x80) you break boot process if boot drive id is anything other than 0x80.

  • @jannikwinkler3544
    @jannikwinkler3544 2 หลายเดือนก่อน +2

    I get the error: ./src/kernel.asm:4: error: parser: instruction expected
    Please help

  • @pvc988
    @pvc988 3 หลายเดือนก่อน +1

    Instead of calling nasm for each and every .asm file it's better to define %.o: %.asm rule and add .asm to .SUFFIXES. Same goes for .c files (though GNU make has some builtin rules for those) as well as final binary. The way you do it is no different that calling it from .sh or .bat file. Also, it is a good practice to declare clean as .PHONY. This way it's always processed, no matter what.
    CTRL + ` opens vscode builtin terminal.

  • @MegaTeXHaPb
    @MegaTeXHaPb 2 หลายเดือนก่อน

    Some issue I found: when you show the output of dd, the second output is 518 bytes, not 512. And all you os.bin file is 4 bytes greater than 5kB.

  • @ChandrashekarCN
    @ChandrashekarCN 3 หลายเดือนก่อน

    💖💖💖💖

  • @jamesharrison7350
    @jamesharrison7350 3 หลายเดือนก่อน

    gdb timeout when I use the "target-remote"

  • @f-8ght
    @f-8ght 3 หลายเดือนก่อน +1

    Yo what'sup bro it's not working in arch, I am on arch the qemu-system-x86_64 command what it does starts a vnc server at a port, and I have to use remmina to get to the port, why no gtk and sdl display backend's ? help needed

    • @Rsparing
      @Rsparing 3 หลายเดือนก่อน +1

      maybe use -net none?

    • @GyanPrakash-xo5gs
      @GyanPrakash-xo5gs 3 หลายเดือนก่อน +1

      Uninstall qemu and install again and select qemu-full from the package choices it gives you

    • @Rsparing
      @Rsparing 3 หลายเดือนก่อน +1

      you might also need to install them seperately

    • @pvc988
      @pvc988 3 หลายเดือนก่อน

      In Arch you get to choose which backends you want. qemu-ui-* packages are what you need.

    • @f-8ght
      @f-8ght 3 หลายเดือนก่อน

      @@Rsparingahh no it was kind of easy I just removed qemu and qemu system x86 from my arch and again I installed qemu but when prompted I chose qemu-full and yeah it was good to go

  • @carlosrpj
    @carlosrpj หลายเดือนก่อน

    Continue please

  • @anldogan5259
    @anldogan5259 3 หลายเดือนก่อน +1

    Can we use c++?

    • @pvc988
      @pvc988 3 หลายเดือนก่อน

      Yes. With some caveats. I have ports of my OS in C, C++, D, Rust, C#, my own custom D-like language and C3. C3 being the latest one.

  • @prashlovessamosa
    @prashlovessamosa 3 หลายเดือนก่อน +1

    please upload faster I cannot waait for next part.

  • @metl_play
    @metl_play 3 หลายเดือนก่อน

    Because I had the error:
    -bash: ../binutils-2.43/configure: Permission denied
    I had to make configure excecutable with:
    chmod +x ../binutils-2.43/configure
    Took me a long second to realize, might just happened to me because I use ubuntu through wsl.

    • @metl_play
      @metl_play 3 หลายเดือนก่อน

      for gcc I had to do the same thing but after chmod -x ../gcc-14.2.0/configure and ../gcc-14.2.0/*/configure still gave me permission error i didn't cared an chmod +x everything

  • @sookuuSok
    @sookuuSok หลายเดือนก่อน

    U could show how it boots

  • @metamud8686
    @metamud8686 2 หลายเดือนก่อน

    KENREL_H vs KERNEL_H in kernel.h

  • @metl_play
    @metl_play 3 หลายเดือนก่อน +1

    ok just at the end I have ld segmentation fault at the line
    i686-elf-gcc $(FLAGS) -T ./src/linkerScript.ld -o ./bin/kernel.bin -ffreestanding -O0 -nostdlib ./build/completeKernel.o
    everything else worked fine now