mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
Use pwd as a workspace; move sources to src/gopheros and rewrite imports
By setting up pwd as a Go workspace, we can trim import paths from something like "github.com/achilleasa/gopher-os/kernel" to just "kernel". These changes make forking easier and also allows us to move the code to a different git hosting provider without having to rewrite the imports.
This commit is contained in:
23
src/gopheros/kernel/hal/hal.go
Normal file
23
src/gopheros/kernel/hal/hal.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package hal
|
||||
|
||||
import (
|
||||
"gopheros/kernel/driver/tty"
|
||||
"gopheros/kernel/driver/video/console"
|
||||
"gopheros/kernel/hal/multiboot"
|
||||
)
|
||||
|
||||
var (
|
||||
egaConsole = &console.Ega{}
|
||||
|
||||
// ActiveTerminal points to the currently active terminal.
|
||||
ActiveTerminal = &tty.Vt{}
|
||||
)
|
||||
|
||||
// InitTerminal provides a basic terminal to allow the kernel to emit some output
|
||||
// till everything is properly setup
|
||||
func InitTerminal() {
|
||||
fbInfo := multiboot.GetFramebufferInfo()
|
||||
|
||||
egaConsole.Init(uint16(fbInfo.Width), uint16(fbInfo.Height), uintptr(fbInfo.PhysAddr))
|
||||
ActiveTerminal.AttachTo(egaConsole)
|
||||
}
|
||||
Reference in New Issue
Block a user