From 4b75ea421dfb33f0dd3dbd75c66c249fa45bb3f1 Mon Sep 17 00:00:00 2001 From: Greg Bowne Date: Mon, 17 Jul 2023 22:35:29 -0700 Subject: [PATCH] some minor fixes to kernel --- kernel | Bin 8956 -> 0 bytes src/boot/linker.ld | 29 ++++++++--------------------- src/kernel/kernel.bin | Bin 0 -> 5236 bytes src/kernel/linker.ld | 21 +++++++++++++++++++++ src/kernel/print.c | 5 +++++ src/linker.ld | 8 -------- 6 files changed, 34 insertions(+), 29 deletions(-) delete mode 100755 kernel create mode 100755 src/kernel/kernel.bin create mode 100644 src/kernel/linker.ld create mode 100644 src/kernel/print.c delete mode 100644 src/linker.ld diff --git a/kernel b/kernel deleted file mode 100755 index 0be1a9a80b8be76655d84ea30edf40b6a13f1fe2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8956 zcmeHN%}x_h6h5UzM!LZmNfQW7x5pOlh@E>`!Kf1uNwZ`Ud(a zK0;rD7a+ir`hEA#!KN7#7w$YK`Eu_0nRCy4_wLU9dhq_RR4R$el9WZQ2Ar);A8ANk z9>`0n$||%7V~uZ>fcS|uQOQw;z9tYO9%D@~&e~dE5OY|A6JVU0@yS!*dnF*ounF$V z_!88g;;eCenRSZdy8rfBnrwgRw~5m*9fhwJ`a%uu^S)R33I#O=tns=qYEEOo7%&Em z0b{@zFb0ePW55_N28;n?z!)$Fi~(c77%&Em0b{@zFb0ePW55_N28@CKlmVSPb5kGDDL_x*U=P4Hcx z-e%X3iRQZrzMJdQU6vI;>&J|rb_q8BOMZBJ4fdl2dxLf^{O@(H=kg_LoqTw6^lo3G zZYR!Ss9{He6KJN;79}Dt+ E0R+ZtnE(I) diff --git a/src/boot/linker.ld b/src/boot/linker.ld index 5615df3..b01bd5f 100644 --- a/src/boot/linker.ld +++ b/src/boot/linker.ld @@ -1,21 +1,8 @@ - ENTRY(main) - -SECTIONS { - . = 0x7c00; - - .text : { - *(.text) - } - - .rodata : { - *(.rodata) - } - - .data : { - *(.data) - } - - .bss : { - *(.bss) - } -} \ No newline at end of file +ENTRY(boot) + SECTIONS { + . = 0x7c00; + .text : { + *(.text) + } + /* Add other sections as needed */ + } \ No newline at end of file diff --git a/src/kernel/kernel.bin b/src/kernel/kernel.bin new file mode 100755 index 0000000000000000000000000000000000000000..9a52566f6e6a8b3fc1e93b914f8d9d33e46383fc GIT binary patch literal 5236 zcmeHL&1zFo5T5+B)>=FH4@CZ}I!lX;uUEJY#_F%p%S zgi%5!k=z>&E0dB$Wn8YwU|3HuPm_>CSn3rhQ*pRG_&o&FyNIdGQ(qkE4Y*6vk4(_^ zQpF}L1C{~HfMvikU>UFsSOzQumI2FvWxz6E8TcOtR(Fn8S|{=22WZmw1EzH{^l3NW zZnu|r_K*9R_?Gzj3$Wt>LcYN4zTE#1zqh~URr0l}m(;c7Ld9)1OZn`|D9Un+1`>I_ zERi<@k&&Tz{5_TmcaY;A;3K+^5ioaS;9Ye7df#Fz#^3!j(9fuGM?fJq18pG}>;()y z^Bo<-UBVFRd}aFiD)$m!c^CeIq!$(*C&w4P^^)r+XVfD#@o?&Xc({N&55g^k*@R4Y zwh}Rk29Viq91G%HHx6IUod+cryiDYv8*{^PE-`FOdfytCv-aS58M~6Rc25|@T*sJx z5$VT9M#Q{tI2x6w!G(m7-(hrr20w<+=ZhFi*=zV-MdhX5DES)RNoTV2a~UVQw6v1S zIk~y{Ov(|**_xSB1y4KmyrYYoep$I&oy$(uE&1Vnr>W7VAflSvRqd|B>qh8{=A^wX zEs9qCy{l@}HeBtB@`}!@hFkSS`8DmSg1@QijauDn=xtGjnpX7+I$`Llp09&{^q_3k)4*An1@1Nh9Wl5RVxEcPjO2hTb})3N zcNS;v&WHLIGl6@kW=8+!ee0Bi-L6Uwjh8>V_18?CWHG8DsZ9G literal 0 HcmV?d00001 diff --git a/src/kernel/linker.ld b/src/kernel/linker.ld new file mode 100644 index 0000000..6f90a30 --- /dev/null +++ b/src/kernel/linker.ld @@ -0,0 +1,21 @@ +ENTRY(kernel_main) + +SECTIONS { + . = 0x100000; + + .text : { + *(.text) + } + + .rodata : { + *(.rodata) + } + + .data : { + *(.data) + } + + .bss : { + *(.bss) + } +} \ No newline at end of file diff --git a/src/kernel/print.c b/src/kernel/print.c new file mode 100644 index 0000000..b9e1680 --- /dev/null +++ b/src/kernel/print.c @@ -0,0 +1,5 @@ +#include "kernel.h" + +void print_string(const char* str) { + // Your code to print the string to the screen goes here +} \ No newline at end of file diff --git a/src/linker.ld b/src/linker.ld deleted file mode 100644 index b01bd5f..0000000 --- a/src/linker.ld +++ /dev/null @@ -1,8 +0,0 @@ -ENTRY(boot) - SECTIONS { - . = 0x7c00; - .text : { - *(.text) - } - /* Add other sections as needed */ - } \ No newline at end of file