I would like to +1 Amnon here,

Although, If you're looking forward to implementing a Kernel in Go, there
is a project called GopherOS (https://github.com/gopher-os/gopher-os/) that
can be of help to you.

In order to generate the .o file, you can refer to the make file here:
https://github.com/gopher-os/gopher-os/blob/master/Makefile#L56 and
additionally use the make file for building and loading your Kernel too.

Best,

--
Nasir Hussain

On Sat, Aug 29, 2020 at 8:34 PM Amnon <amno...@gmail.com> wrote:

> Go is not the best language to write a kernel on. But some people have
> done it as an intellectual exercise.
> Look at https://github.com/ycoroneos/G.E.R.T
> Or https://github.com/f-secure-foundry/tamago
> Or read
> https://speakerdeck.com/achilleasa/bare-metal-gophers-can-you-write-an-os-kernel-in-go
>
> It is quite a bit of work. But you will learn a fair bit along the way.
>
>
> On Saturday, 29 August 2020 14:32:08 UTC+1, saurav deshpande wrote:
>>
>> Hello, I was trying to write a basic kernel in golang. Before actually
>> implementing anything in the kernel.go file I wanted to see how go build
>> cross compiler can be used.
>> I am currently using :
>> *go version go1.15*  *linux/amd64*
>>
>> I wrote 3 files: a *loader* (*boot.asm*)file, a *linker(linker.ld) *file
>> and an *kernel(kernel.go)* file.
>> I want to run the kernel on virtual machine, arch: linux-32bit.
>> I need step wise help to successfully running this kernel.
>> how to compile it with go build and generate a ".o" file,then using
>> linker.ld to link boot.s and kernel.o.
>> I tired the makefile format of gopher os but didnt get anywhere, so
>> thought if someone could help me from scratch.
>> Thank you.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/7d6979b3-d9ed-481b-b47f-fcf83eae4092o%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/7d6979b3-d9ed-481b-b47f-fcf83eae4092o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAG9C_MeRotQ-jX7GJ9L%3DAqwMzwj8qNfQbFQrz7NxH_mqm_omuA%40mail.gmail.com.

Reply via email to