1
0
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:
Achilleas Anagnostopoulos 2017-07-01 20:37:09 +01:00
parent 7b93d01c6e
commit 8dfc5d4e92
61 changed files with 93 additions and 114 deletions

View File

@ -1,6 +1,6 @@
package tty package tty
import "github.com/achilleasa/gopher-os/kernel/driver/video/console" import "gopheros/kernel/driver/video/console"
const ( const (
defaultFg = console.LightGrey defaultFg = console.LightGrey

View File

@ -1,10 +1,9 @@
package tty package tty
import ( import (
"gopheros/kernel/driver/video/console"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel/driver/video/console"
) )
func TestVtPosition(t *testing.T) { func TestVtPosition(t *testing.T) {

View File

@ -3,12 +3,11 @@
package goruntime package goruntime
import ( import (
"gopheros/kernel"
"gopheros/kernel/mem"
"gopheros/kernel/mem/pmm/allocator"
"gopheros/kernel/mem/vmm"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel"
"github.com/achilleasa/gopher-os/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm/allocator"
"github.com/achilleasa/gopher-os/kernel/mem/vmm"
) )
var ( var (

View File

@ -1,15 +1,14 @@
package goruntime package goruntime
import ( import (
"gopheros/kernel"
"gopheros/kernel/mem"
"gopheros/kernel/mem/pmm"
"gopheros/kernel/mem/pmm/allocator"
"gopheros/kernel/mem/vmm"
"reflect" "reflect"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel"
"github.com/achilleasa/gopher-os/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
"github.com/achilleasa/gopher-os/kernel/mem/pmm/allocator"
"github.com/achilleasa/gopher-os/kernel/mem/vmm"
) )
func TestSysReserve(t *testing.T) { func TestSysReserve(t *testing.T) {

View File

@ -1,9 +1,9 @@
package hal package hal
import ( import (
"github.com/achilleasa/gopher-os/kernel/driver/tty" "gopheros/kernel/driver/tty"
"github.com/achilleasa/gopher-os/kernel/driver/video/console" "gopheros/kernel/driver/video/console"
"github.com/achilleasa/gopher-os/kernel/hal/multiboot" "gopheros/kernel/hal/multiboot"
) )
var ( var (

View File

@ -1,6 +1,6 @@
package irq package irq
import "github.com/achilleasa/gopher-os/kernel/kfmt/early" import "gopheros/kernel/kfmt/early"
// Regs contains a snapshot of the register values when an interrupt occurred. // Regs contains a snapshot of the register values when an interrupt occurred.
type Regs struct { type Regs struct {

View File

@ -2,11 +2,10 @@ package irq
import ( import (
"bytes" "bytes"
"gopheros/kernel/driver/video/console"
"gopheros/kernel/hal"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel/driver/video/console"
"github.com/achilleasa/gopher-os/kernel/hal"
) )
func TestRegsPrint(t *testing.T) { func TestRegsPrint(t *testing.T) {

View File

@ -1,6 +1,6 @@
package early package early
import "github.com/achilleasa/gopher-os/kernel/hal" import "gopheros/kernel/hal"
var ( var (
errMissingArg = []byte("(MISSING)") errMissingArg = []byte("(MISSING)")

View File

@ -2,12 +2,11 @@ package early
import ( import (
"bytes" "bytes"
"gopheros/kernel/driver/tty"
"gopheros/kernel/driver/video/console"
"gopheros/kernel/hal"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel/driver/tty"
"github.com/achilleasa/gopher-os/kernel/driver/video/console"
"github.com/achilleasa/gopher-os/kernel/hal"
) )
func TestPrintf(t *testing.T) { func TestPrintf(t *testing.T) {

View File

@ -1,12 +1,12 @@
package kmain package kmain
import ( import (
"github.com/achilleasa/gopher-os/kernel" "gopheros/kernel"
"github.com/achilleasa/gopher-os/kernel/goruntime" "gopheros/kernel/goruntime"
"github.com/achilleasa/gopher-os/kernel/hal" "gopheros/kernel/hal"
"github.com/achilleasa/gopher-os/kernel/hal/multiboot" "gopheros/kernel/hal/multiboot"
"github.com/achilleasa/gopher-os/kernel/mem/pmm/allocator" "gopheros/kernel/mem/pmm/allocator"
"github.com/achilleasa/gopher-os/kernel/mem/vmm" "gopheros/kernel/mem/vmm"
) )
var ( var (

View File

@ -1,16 +1,15 @@
package allocator package allocator
import ( import (
"gopheros/kernel"
"gopheros/kernel/hal/multiboot"
"gopheros/kernel/kfmt/early"
"gopheros/kernel/mem"
"gopheros/kernel/mem/pmm"
"gopheros/kernel/mem/vmm"
"math" "math"
"reflect" "reflect"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel"
"github.com/achilleasa/gopher-os/kernel/hal/multiboot"
"github.com/achilleasa/gopher-os/kernel/kfmt/early"
"github.com/achilleasa/gopher-os/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
"github.com/achilleasa/gopher-os/kernel/mem/vmm"
) )
var ( var (

View File

@ -1,16 +1,15 @@
package allocator package allocator
import ( import (
"gopheros/kernel"
"gopheros/kernel/hal/multiboot"
"gopheros/kernel/mem"
"gopheros/kernel/mem/pmm"
"gopheros/kernel/mem/vmm"
"math" "math"
"strconv" "strconv"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel"
"github.com/achilleasa/gopher-os/kernel/hal/multiboot"
"github.com/achilleasa/gopher-os/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
"github.com/achilleasa/gopher-os/kernel/mem/vmm"
) )
func TestSetupPoolBitmaps(t *testing.T) { func TestSetupPoolBitmaps(t *testing.T) {

View File

@ -1,11 +1,11 @@
package allocator package allocator
import ( import (
"github.com/achilleasa/gopher-os/kernel" "gopheros/kernel"
"github.com/achilleasa/gopher-os/kernel/hal/multiboot" "gopheros/kernel/hal/multiboot"
"github.com/achilleasa/gopher-os/kernel/kfmt/early" "gopheros/kernel/kfmt/early"
"github.com/achilleasa/gopher-os/kernel/mem" "gopheros/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm" "gopheros/kernel/mem/pmm"
) )
var ( var (

View File

@ -1,12 +1,11 @@
package allocator package allocator
import ( import (
"gopheros/kernel/driver/video/console"
"gopheros/kernel/hal"
"gopheros/kernel/hal/multiboot"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel/driver/video/console"
"github.com/achilleasa/gopher-os/kernel/hal"
"github.com/achilleasa/gopher-os/kernel/hal/multiboot"
) )
func TestBootMemoryAllocator(t *testing.T) { func TestBootMemoryAllocator(t *testing.T) {

View File

@ -2,9 +2,8 @@
package pmm package pmm
import ( import (
"gopheros/kernel/mem"
"math" "math"
"github.com/achilleasa/gopher-os/kernel/mem"
) )
// Frame describes a physical memory page index. // Frame describes a physical memory page index.

View File

@ -1,9 +1,8 @@
package pmm package pmm
import ( import (
"gopheros/kernel/mem"
"testing" "testing"
"github.com/achilleasa/gopher-os/kernel/mem"
) )
func TestFrameMethods(t *testing.T) { func TestFrameMethods(t *testing.T) {

View File

@ -1,8 +1,8 @@
package vmm package vmm
import ( import (
"github.com/achilleasa/gopher-os/kernel" "gopheros/kernel"
"github.com/achilleasa/gopher-os/kernel/mem" "gopheros/kernel/mem"
) )
var ( var (

View File

@ -1,12 +1,11 @@
package vmm package vmm
import ( import (
"gopheros/kernel"
"gopheros/kernel/cpu"
"gopheros/kernel/mem"
"gopheros/kernel/mem/pmm"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel"
"github.com/achilleasa/gopher-os/kernel/cpu"
"github.com/achilleasa/gopher-os/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
) )
// ReservedZeroedFrame is a special zero-cleared frame allocated by the // ReservedZeroedFrame is a special zero-cleared frame allocated by the

View File

@ -1,13 +1,12 @@
package vmm package vmm
import ( import (
"gopheros/kernel"
"gopheros/kernel/mem"
"gopheros/kernel/mem/pmm"
"runtime" "runtime"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel"
"github.com/achilleasa/gopher-os/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
) )
func TestNextAddrFn(t *testing.T) { func TestNextAddrFn(t *testing.T) {

View File

@ -1,6 +1,6 @@
package vmm package vmm
import "github.com/achilleasa/gopher-os/kernel/mem" import "gopheros/kernel/mem"
// Page describes a virtual memory page index. // Page describes a virtual memory page index.
type Page uintptr type Page uintptr

View File

@ -1,9 +1,8 @@
package vmm package vmm
import ( import (
"gopheros/kernel/mem"
"testing" "testing"
"github.com/achilleasa/gopher-os/kernel/mem"
) )
func TestPageMethods(t *testing.T) { func TestPageMethods(t *testing.T) {

View File

@ -1,12 +1,11 @@
package vmm package vmm
import ( import (
"gopheros/kernel"
"gopheros/kernel/cpu"
"gopheros/kernel/mem"
"gopheros/kernel/mem/pmm"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel"
"github.com/achilleasa/gopher-os/kernel/cpu"
"github.com/achilleasa/gopher-os/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
) )
var ( var (

View File

@ -1,13 +1,12 @@
package vmm package vmm
import ( import (
"gopheros/kernel"
"gopheros/kernel/mem"
"gopheros/kernel/mem/pmm"
"runtime" "runtime"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel"
"github.com/achilleasa/gopher-os/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
) )
func TestPageDirectoryTableInitAmd64(t *testing.T) { func TestPageDirectoryTableInitAmd64(t *testing.T) {

View File

@ -1,9 +1,9 @@
package vmm package vmm
import ( import (
"github.com/achilleasa/gopher-os/kernel" "gopheros/kernel"
"github.com/achilleasa/gopher-os/kernel/mem" "gopheros/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm" "gopheros/kernel/mem/pmm"
) )
var ( var (

View File

@ -1,9 +1,8 @@
package vmm package vmm
import ( import (
"gopheros/kernel/mem/pmm"
"testing" "testing"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
) )
func TestPageTableEntryFlags(t *testing.T) { func TestPageTableEntryFlags(t *testing.T) {

View File

@ -1,6 +1,6 @@
package vmm package vmm
import "github.com/achilleasa/gopher-os/kernel" import "gopheros/kernel"
// Translate returns the physical address that corresponds to the supplied // Translate returns the physical address that corresponds to the supplied
// virtual address or ErrInvalidMapping if the virtual address does not // virtual address or ErrInvalidMapping if the virtual address does not

View File

@ -1,11 +1,10 @@
package vmm package vmm
import ( import (
"gopheros/kernel/mem/pmm"
"runtime" "runtime"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
) )
func TestTranslateAmd64(t *testing.T) { func TestTranslateAmd64(t *testing.T) {

View File

@ -1,12 +1,12 @@
package vmm package vmm
import ( import (
"github.com/achilleasa/gopher-os/kernel" "gopheros/kernel"
"github.com/achilleasa/gopher-os/kernel/cpu" "gopheros/kernel/cpu"
"github.com/achilleasa/gopher-os/kernel/irq" "gopheros/kernel/irq"
"github.com/achilleasa/gopher-os/kernel/kfmt/early" "gopheros/kernel/kfmt/early"
"github.com/achilleasa/gopher-os/kernel/mem" "gopheros/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm" "gopheros/kernel/mem/pmm"
) )
var ( var (

View File

@ -3,17 +3,16 @@ package vmm
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"gopheros/kernel"
"gopheros/kernel/cpu"
"gopheros/kernel/driver/video/console"
"gopheros/kernel/hal"
"gopheros/kernel/irq"
"gopheros/kernel/mem"
"gopheros/kernel/mem/pmm"
"strings" "strings"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel"
"github.com/achilleasa/gopher-os/kernel/cpu"
"github.com/achilleasa/gopher-os/kernel/driver/video/console"
"github.com/achilleasa/gopher-os/kernel/hal"
"github.com/achilleasa/gopher-os/kernel/irq"
"github.com/achilleasa/gopher-os/kernel/mem"
"github.com/achilleasa/gopher-os/kernel/mem/pmm"
) )
func TestRecoverablePageFault(t *testing.T) { func TestRecoverablePageFault(t *testing.T) {

View File

@ -1,9 +1,8 @@
package vmm package vmm
import ( import (
"gopheros/kernel/mem"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel/mem"
) )
var ( var (

View File

@ -1,11 +1,10 @@
package vmm package vmm
import ( import (
"gopheros/kernel/mem"
"runtime" "runtime"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel/mem"
) )
func TestPtePtrFn(t *testing.T) { func TestPtePtrFn(t *testing.T) {

View File

@ -1,8 +1,8 @@
package kernel package kernel
import ( import (
"github.com/achilleasa/gopher-os/kernel/cpu" "gopheros/kernel/cpu"
"github.com/achilleasa/gopher-os/kernel/kfmt/early" "gopheros/kernel/kfmt/early"
) )
var ( var (

View File

@ -3,12 +3,11 @@ package kernel
import ( import (
"bytes" "bytes"
"errors" "errors"
"gopheros/kernel/cpu"
"gopheros/kernel/driver/video/console"
"gopheros/kernel/hal"
"testing" "testing"
"unsafe" "unsafe"
"github.com/achilleasa/gopher-os/kernel/cpu"
"github.com/achilleasa/gopher-os/kernel/driver/video/console"
"github.com/achilleasa/gopher-os/kernel/hal"
) )
func TestPanic(t *testing.T) { func TestPanic(t *testing.T) {

View File

@ -1,6 +1,6 @@
package main package main
import "github.com/achilleasa/gopher-os/kernel/kmain" import "gopheros/kernel/kmain"
var multibootInfoPtr uintptr var multibootInfoPtr uintptr