1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00

262 Commits

Author SHA1 Message Date
Achilleas Anagnostopoulos
38e5afbc76 Merge pull request #2 from achilleasa/setup-ci
Setup CI and coverage tools
2017-03-26 09:50:53 +01:00
Achilleas Anagnostopoulos
cc1f2e6016 Setup CI and coverage tools 2017-03-26 09:48:12 +01:00
Achilleas Anagnostopoulos
8c41bf6404 Merge pull request #1 from achilleasa/implement-text-console
Implement VGA text console driver
2017-03-26 09:42:45 +01:00
Achilleas Anagnostopoulos
f72eacc4fb Define VGA console
The VGA console frame buffer is mapped to the physical address 0xB8000.
2017-03-26 09:37:54 +01:00
Achilleas Anagnostopoulos
b513f2f332 Define console interface 2017-03-26 09:33:17 +01:00
Achilleas Anagnostopoulos
590d4f1363 Set -o pipefail to catch go compilation errors 2017-03-23 08:51:32 +00:00
Achilleas Anagnostopoulos
95569d2982 Implement Makefile for building, running and debugging the kernel
The makefile provides the following targets:
- kernel
- iso
- run
- gdb

It sniffs the OS type and when running on non-linux hosts it uses
vagrant ssh and runs make with the above targets inside the vagrant box.

The kernel build process consists of the following steps:
1) Compile arch-specific (only x86 for now) assembly files.
2) Run go build -n to obtain the build commands for our kernel. The
makefile sets the build target to 386/linux so that our current rt0
implementation does not need to switch to long-mode.
3) The build commands are then patched to:
  - use build/ as the output directory
  - force the go linker to use external link mode and to place its output files
  (--tmpdir) to the build folder. By forcing external link mode, the go
  linker will emit a single go.o file which can be used by ld.
4) We run our own link step and use ld to link the rt0 .o files with the
go.o file and provide a custom linker script to ensure that our
multiboot record is located at the top of the kernel image so that grub
can find it.

The ISO build process sets up a minimal folder structure for building a
bootable ISO (basically the kernel image plus a grub configuration) and
runs grub-mkrescue to produce the ISO file.

Both the run and the gdb targets assume that qemu is installed. The gdb
target starts qemu, attaches the debugger and sets a breakpoint to the
rt0 entrypoint.
2017-03-23 07:24:49 +00:00
Achilleas Anagnostopoulos
865f46c467 Define kernel entry-points in Go 2017-03-23 07:10:01 +00:00
Achilleas Anagnostopoulos
5b47048397 Implement rt0 assembly boot code for x86 arch 2017-03-23 06:50:41 +00:00
Achilleas Anagnostopoulos
1a094f511e Define Vagrantfile for building gopher-os on non-linux hosts 2017-03-23 06:50:38 +00:00
Achilleas Anagnostopoulos
3a1a8b4185 Update .gitignore 2017-03-23 06:50:13 +00:00
Achilleas Anagnostopoulos
1630e9562c Initial commit 2017-03-23 06:50:13 +00:00