dom96 / nimkernel Goto Github PK
View Code? Open in Web Editor NEWA small kernel written in Nim
License: Other
A small kernel written in Nim
License: Other
Not an issue, just a question.
I can build the nakefile but trying to run the nakefile generates an error stating that string.h cannot be found. I'm pretty sure my cross compiler is fine because I can build the bare bones sample from OS dev. Any ideas on what I'm missing?
I'm thinking it is related to this line in nim.cfg: --passc:"-w -I$lib -ffreestanding -O2 -Wall -Wextra"
What should $lib resolve to?
/build/path/nimkernel/nimcache/stdlib_system.c:12:20: fatal error: string.h: No such file or directory
Hello,
I had some experiment with you code, that was fun and thank for creating this example. I try to use Clang with you kernel with exact config you do, some function broken weirdly and loop QEMU BIOS when i use flag like -d:release or -opt:speed the kernel goes to that state, but it totally fine without any -d or -opt.
I trace the culprit belong to this line : https://github.com/ArjunRangga/nimkernel/blob/clang/ioutils.nim#L77 , when it invoked by kmain.
Here my code : https://github.com/ArjunRangga/nimkernel/tree/clang .
Do you had idea what happen ? or I miss something? Anyways, It pass compilation either with flags or not.
Hi. I wonder if it would be possible to integrate this nimkernel with the nimble package manager. Would it be possible to integrate nimkernel with the nimble package manager?
It's a curious and technical question, I'd be happy with any answer to this doubt I have
./nakefile run
/tmp/ccDbBZ4I.s: Assembler messages:
/tmp/ccDbBZ4I.s:51: Error: invalid instruction suffix for push' /tmp/ccDbBZ4I.s:56: Error: invalid instruction suffix for
push'
/tmp/ccDbBZ4I.s:58: Error: invalid instruction suffix for push' /tmp/ccDbBZ4I.s:62: Error: invalid instruction suffix for
pop'
Could this project be adapted for the RaspberryPi?
What would be the needed steps to take to convert it?
Thanks
Hello, is this project and all the tools needed supported in windows?
Hey @dom96, why not try --gcc.linkerexe, through this you might not need to list all *.o files passed to the compiler for linking, which means when you add some new modules, you can just run and there is no need to figure out all the compiled result just like writing a Makefile when using C. :-)
Actually, I have just written a kernel on riscv, which is highly inspired by your awesome proj. Thanks a lot :P
Below is the compile flags of my little kernel when building:
https://github.com/sslime336/nimkernel-riscv/blob/master/nakefile.nim#L69-L70
Probably this repo isn't maintained anymore, but doesn't compile because nimcache/stdlib_system.o
and nimcache/stdlib_unsigned.o
referenced in nakefile.nim are nowhere to be found.
I managed to make it work by linking all *.o files in nimcache, but QEMU gets stuck at boot.
Nice proof of concept though.
Hey, ive run into an issue trying use the nakefile. the nakefile does compile, but when using the run task, it errors:
Linking...
.
$HOME/cross-tools/lib/gcc/i686-elf/11.2.0/../../../../i686-elf/bin/ld: cannot find nimcache/stdlib_system.nim.c.o: No such file or directory
The object file that its looking for is not in nimcache, but there is a file named @m..@[email protected]@[email protected]@[email protected]
and its corresponding c file. I tried copying both files and renaming them to what the nakefile wants, and it sorta bypasses the error but throws a warning and then another error:
$HOME/cross-tools/lib/gcc/i686-elf/11.2.0/../../../../i686-elf/bin/ld: warning: section `.bss' type changed to PROGBITS
Done.
sh: 1: qemu-system-i386: not found
Isnt this file just a necessary file that the nim compiler generates? It doesn't seem to be doing much, just defining nim structures in c.
When I run ./nakefile run
I get an error saying the system module needs appendString()
My screen
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.