Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mohammadhb/gootloader

Create your bootloader with Go.
https://github.com/mohammadhb/gootloader

assembly boot bootloader driver go golang

Last synced: about 1 month ago
JSON representation

Create your bootloader with Go.

Awesome Lists containing this project

README

        

![alt text](https://github.com/mohammadhb/gootloader/blob/master/logo.png)

# Gootloader
Create bootloaders with Go.

## Getting Started

Start with creating a Bootloader with your config :
```go

bl := Bootloader{
Name: "myBootloader",
Arch: 1, // Bootloader Architecture
ModeBit: 16, // Bootloader Bit Mode
Loaddest: 0x7C00, // Destination of loading of bootloader in Memory
}

```

Maybe Print a Message :
```go

message := "Dear BIOS, Load me into ram and give the control flow to me please"
bl.print(message)

```
Create Your Bootloader :
> This generates `bl.name`.asm file
```go

bl.create();//AKA final file for bootloader

```
## Hello World Example

in main.go file :

```go

package main

import (
gootloader "github.com/mohammadhb/gootloader"
)

func main() {

bl := gootloader.Bootloader{
Name: "MyFirstBootloader",
}

bl.Print("Hello World!")
bl.Create()

}

```
> run go run main.gp

## Emulate and Testings the Bootloader

After you create your bootloader using `.create()`
You can use

```bash
nasm boot.asm -f bin -o boot.bin && qemu-system-i386 -fda boot.bin
```

> Caution : You must install nasm and qemu in your device to be able to emulate your bootloader (qemu-system-i386 is x86 arch in this example)