ulmer1 wrote:I've as well been struggling with it in the past. However, recently retried and did it in less than a day! That's why I want to encourage you to do it yourself, it really yields a satisfactory experience when you're done.
Since you've not already made it to the system calls, why did you fail? Maybe building autotools?
Yeah, there was a silly mistake by me as I use WSL2, I have mistaken the PATH variables, so there were a lot of problems related to autotools. Even though the lib is built, it seems that I am linking it wrong, when including stdio from Newlib and using printf, the linked complains that printf is not defined. The 15 stubs in Newlib were implemented on a minimal level, as described on the RedHat website. But still, undefined reference to printf...
I link like this :
i686-elf-ld -T link.ld libc.a libg.a libm.a libnosys.a -o kernel kernel.o
Am I linking it wrong?
--UPD
Yes, I was doing it wrong, the libraries should go after the file, so correct will be :
i686-elf-ld -T link.ld -o kernel kernel.o libc.a libg.a libm.a libnosys.a