All Projects → Lucretia → bare_bones

Lucretia / bare_bones

Licence: other
Ada Bare Bones OS development tutorial source code

Programming Languages

Ada
118 projects
Makefile
30231 projects
assembly
5116 projects
shell
77523 projects

Projects that are alternatives of or similar to bare bones

stm32mp1-baremetal
Baremetal framework and example projects for the STM32MP15x Cortex-A7 based MPU
Stars: ✭ 43 (-41.89%)
Mutual labels:  bare-metal, baremetal
saturn
A microkernel based operating system developed from scratch. This repository also includes all Saturn services and applications.
Stars: ✭ 21 (-71.62%)
Mutual labels:  osdev, baremetal
rackshift
RackShift 是开源的裸金属服务器管理平台,功能覆盖裸金属服务器的发现、带外管理、RAID 配置、固件更新、操作系统安装等。
Stars: ✭ 467 (+531.08%)
Mutual labels:  bare-metal, baremetal
hftrx
Embedded firmware for ham radio transceivers
Stars: ✭ 27 (-63.51%)
Mutual labels:  bare-metal, baremetal
biefircate
Running x86-16 or x86-32 code from x86-64 UEFI; _very experimental_ • mirror of https://gitlab.com/tkchia/biefircate • developer notes at https://gitlab.com/tkchia/biefircate/-/blob/main/doc/NOTES.asciidoc
Stars: ✭ 47 (-36.49%)
Mutual labels:  osdev, baremetal
Toaruos
A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
Stars: ✭ 4,687 (+6233.78%)
Mutual labels:  osdev, baremetal
metalnetes
Create and manage multiple Kubernetes clusters using KVM on a bare metal Fedora 29 server. Includes helm + rook-ceph + nginx ingress + the stock analysis engine (jupyter + redis cluster + minio + automated cron jobs for data collection) - works on Kubernetes version v1.16.0 - 1.16.3 was not working
Stars: ✭ 37 (-50%)
Mutual labels:  bare-metal, baremetal
mdk
A bare metal SDK for the ESP32 & ESP32C3
Stars: ✭ 38 (-48.65%)
Mutual labels:  bare-metal, baremetal
X86 Bare Metal Examples
Dozens of minimal operating systems to learn x86 system programming. Tested on Ubuntu 17.10 host in QEMU 2.10 and real hardware. Userland cheat at: https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly ARM baremetal setup at: https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-setup 学习x86系统编程的数十个最小操作系统。 已在QE…
Stars: ✭ 3,985 (+5285.14%)
Mutual labels:  bare-metal, baremetal
duckOS
Yet another hobby x86 UNIX-like operating system written in C and C++. Features a dynamically linked userspace, an in-house c standard library, and more! And yes, it runs DOOM.
Stars: ✭ 250 (+237.84%)
Mutual labels:  osdev, baremetal
android-cuberto-dialog-design
This is an implementation inspired by beautiful design by Cuberto on his Dribble page, which can be found here https://dribbble.com/shots/3206606-Landing-page-wip
Stars: ✭ 15 (-79.73%)
Mutual labels:  tutorial-exercises, tutorial-sourcecode
kalman-estimator
kalman-estimator - a Kalman estimator in C++
Stars: ✭ 22 (-70.27%)
Mutual labels:  bare-metal
LibSerialPort.jl
Julia wrapper for the libserialport c library
Stars: ✭ 54 (-27.03%)
Mutual labels:  port
Luakernel
Lua + SQLite + musl libc running on x86.
Stars: ✭ 223 (+201.35%)
Mutual labels:  osdev
Kernel
The Stupid Operating System
Stars: ✭ 217 (+193.24%)
Mutual labels:  osdev
register-rs
Unified interface for type-safe MMIO and CPU register access in Rust
Stars: ✭ 48 (-35.14%)
Mutual labels:  bare-metal
valkyrie
🔮 A UNIX-like toy kernel built from scratch (for AArch64) with preemptive multi-threading, VM, CoW fork(), buddy, slob, VFS, FAT32.
Stars: ✭ 57 (-22.97%)
Mutual labels:  osdev
Nebulet
A proof-of-concept microkernel that implements a WebAssembly "usermode" that runs in Ring 0.
Stars: ✭ 2,237 (+2922.97%)
Mutual labels:  osdev
SecuringBareMetal
Best Practices for Securing Services on Bare Metal
Stars: ✭ 16 (-78.38%)
Mutual labels:  baremetal
Snowflakeos
"It is very special"
Stars: ✭ 190 (+156.76%)
Mutual labels:  osdev

Bare Bones

Introduction

This source provides a complete port of the C Bare Bones tutorial from http://wiki.osdev.org. I copied and modified the linker script from the D port as the original didn't work for me and also did the same with the startup code from the original C port.

The full documentation and build instructions for this project can be found here.

Note I am currently in the process of updating this repository.

$ git clone https://github.com/Lucretia/bare_bones.git
$ cd bare_bones/build/gnat

Prerequisites

To test using make QEMU, you will need GRUB 2 installed for the grub2-mkrescue (GRUB 2 should be installed if you're on a modern distribution) command. This command also requires xorriso - which you will have to install separately.

Debian

$ sudo apt-get install qemu xorriso

Gentoo

I have sudo installed on my machine:

$ sudo emerge -av libisoburn

I also used my Free Ada build scripts to build useable bare metal cross compilers.

x86

GRUB

$ mkdir -p others/{build,source}
$ cd others/source
$ git clone git://git.savannah.gnu.org/grub.git
$ cd grub
$ ./autogen.sh
$ mkdir ../../build/grub && cd ../../build/grub
$ ../../source/grub/configure --prefix=`pwd`/../../../gen/pc/grub --target=i586-elf
$ make -j4
$ make install

Booting the kernel

The qemu target will also make the kernel image and boot.iso.

$ make rts
$ make qemu

Debugging the kernel

From the build/gnat directory, in one shell, type the following:

$ make qemud

then in another shell, type:

$ ./gdb-qemu.sh

Boot the kernel within QEMU and GDB will break into the kernel at the main program. e.g.:

$ ./gdb-qemu.sh
GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gen/pc/debug/disk/boot/bare_bones-i586.elf...done.
0x0000fff0 in ?? ()
Breakpoint 1 at 0x100c20: file /home/laguest/src/mine/bare_bones/src/bare_bones.adb, line 15.


Breakpoint 1, bare_bones () at /home/laguest/src/mine/bare_bones/src/bare_bones.adb:15
15	procedure Bare_Bones is
(gdb)
(gdb) bt
#0  bare_bones () at /home/laguest/src/mine/bare_bones/src/bare_bones.adb:15
(gdb) list
10	--  with System.Address_To_Access_Conversions;
11	--  with Ada.Unchecked_Conversion;
12
13	use type Multiboot.Magic_Values;
14
15	procedure Bare_Bones is
16	   Line : Screen_Height_Range := Screen_Height_Range'First;
17	begin
18	   null;
19	   Clear;
(gdb) q
A debugging session is active.

	Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) y
Detaching from program: /home/laguest/src/mine/bare_bones/build/gnat/gen/pc/debug/disk/boot/bare_bones-i586.elf, Remote target
Ending remote debugging.

Bugs

None at present.

Who did this?

Luke A. Guest

Future

I intend to get this very basic kernel building on a number of boards that I have lying around:

  • Raspberry Pi (original version)
  • Pandaboard
  • Arduino Uno
  • ChipKit Uno32
  • STM32F4-Discovery
  • MSP430 Launchpad

This will show that Ada 2012 can be built and booted directly on top of any type type of board from small limited devices and upwards.

Ada features to add

  • Port to Ada 2012.
  • Secondary stack so that indefinite types can be returned easily.
  • Move runtime building to Free Ada.

Licence

As advised in the forum sticky on osdev.org, the code here is released under the CC0 license placing this work under public domain with no copyright.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].