An experimental operating system for x86 and ARM

Overview

CI Coverity Scan Build Status

Odyssey - an experimental operating system for x86 and ARM

Odyssey running in Qemu

Current Development Status

Architecture: x86 (i386)

  • Multiboot2
  • Protected mode
  • EGA 80x25 console
  • Scalable console fonts
  • Serial output
  • RGB framebuffer
  • Build-time customization of features
  • Segmentation
  • Interrupt handling
  • Timers
  • PS/2 keyboard support
  • Memory manager
  • GRUB boot modules
  • Paging
  • User-mode
  • System calls
  • File system
  • Multitasking
  • Process scheduler
  • Standard C-library
  • Shell and basic UNIX commands

Architecture: ARM (armv7-a)

  • EGA 80x25 console
  • Serial output
  • RGB framebuffer
  • Build-time customization of features
  • Segmentation
  • Interrupt handling
  • Timers
  • PS/2 keyboard support
  • Memory manager
  • Paging
  • User-mode
  • System calls
  • File system
  • Multitasking
  • Process scheduler
  • Standard C-library
  • Shell and basic UNIX commands

Build and runtime dependencies

Clone repo and install build dependencies:

$ git clone https://github.com/aweeraman/odyssey.git
$ sudo apt-get install git gcc g++ make m4 bison flex bzip2 xz-utils curl zlib1g-dev gnat python

Build GCC cross compilers for i386, armv7-a and boot loaders:

$ cd odyssey
$ make deps

Install additional dependencies required for building and running odyssey in qemu:

$ sudo apt-get install grub-common mtools qemu-system-gui qemu-system-x86 qemu-system-arm ovmf exuberant-ctags u-boot-tools netpbm

Optionally, if you wish to use clang, you can install it and configure it in the build config as follows:

$ sudo apt-get install clang

Set the following variables in config/build.cfg to use clang:

CC        := clang

nasm is built as part of the cross compiler dependencies and can be used in place GNU as for building the assembly programs by setting the following in in config/build.cfg. The GNU assembler will be used by default.

AS        := deps/coreboot/util/crossgcc/xgcc/bin/nasm

Running in qemu

To build and run in qemu:

$ make boot

or, to build the ARM version:

$ make ARCH=arm boot

To build and run in qemu with Coreboot:

$ make boot-coreboot

To build and run in qemu with OVMS/EFI:

$ make boot-efi

Running in qemu on ARM/U-Boot

Install a tftp-server to serve the OS image:

$ sudo apt-get install tftpd-hpa lrzsz
$ sudo systemctl start tftpd-hpa

Build the OS image and copy over to the tftp server location:

$ make ARCH=arm image
$ sudo cp odyssey.img /srv/tftp
$ make ARCH=arm boot-uboot

At the U-Boot prompt, enter the following:

setenv ipaddr 10.x.x.x
setenv serverip 192.x.x.x
tftp 80000000 odyssey.img
iminfo 80000000
bootm 80000000

Configuration

List capabilities to be included in the kernel in config/kernel.cfg. Currently available options are:

# Prefix with a leading hash (#) to disable a feature

CONFIG_VERSION_MAJOR=0
CONFIG_VERSION_MINOR=1

# Drivers / hardware support
CONFIG_SERIAL
CONFIG_KEYBOARD

# Framebuffer console
CONFIG_FRAMEBUFFER_RGB
CONFIG_FRAMEBUFFER_WIDTH=1024
CONFIG_FRAMEBUFFER_HEIGHT=768
CONFIG_FRAMEBUFFER_BPP=32

# FirstFit memory manager
CONFIG_MM_FF

# Run tests during boot
CONFIG_TEST

Running on hardware

Intel

Odyssey has been tested on a Minnowboard Turbot B, a quad-core Atom-based x86 single board computer.

Minnowboard Turbot B

To configure GRUB, set a custom boot configuration such as follows:

menuentry "odyssey" {
        set root='hd0,gpt2'
        multiboot2 /home/anuradha/odyssey/odyssey
        module2 /home/anuradha/odyssey/modules/canary.bin canary
}

At the time of writing, only PS/2 keyboards are supported, and since the Minnowboard doesn't support PS/2, disable "CONFIG_KEYBOARD" when building odyssey on the Minnowboard and use the USB to serial interface for input via a second host.

ARM

ARM support is also being tested on the BeagleBone Black Rev C single board computer, though at the time of writing it is somewhat lagging behind the Intel counterpart.

BeagleBone Black Rev C

On BeagleBone black, use loady at the U-Boot prompt to load the image over serial/ymodem via a secondary host using a USB to Serial FTDI cable:

$ make ARCH=arm
$ screen /dev/ttyUSB0 115200
[power-on the board]
[press space to interrupt auto-boot]
=> loady

   
    :exec !! sx --ymodem odyssey.img
=> go 0x82000000

   

Splash

The 'splash' command displays an image on the framebuffer. To specify an image to converted to a C-header from a provided JPG, run the following command:

$ tools/ppm-to-array/jpeg-to-c.sh tools/ppm-to-array/img/kanagawa.jpg include/ppm/splash.h

Build and launch Odyssey and run the 'splash' command at the shell.

Splash

Call Graph

Optionally, to create a graphical view of the C function call graph when using gcc, run:

$ make call_graph
$ make ARCH=arm call_graph

You will need graphviz for this to work:

$ sudo apt-get install graphviz

This will create an SVG file called "call_graph.svg" on the top level directory.

Call graph

Debugging

~/.gdbinit:

set print pretty on
set architecture i386
target remote :1234

Enable following in config/build.cfg:

DEBUG     := yes

Run 'make boot' and in a different shell start gdb and set a breakpoint to step through the code:

$ gdb odyssey
--snip--
x0000fff0 in ?? ()
Reading symbols from odyssey...
(gdb) break kernel_main
Breakpoint 1 at 0x100517: file arch/x86/boot/main.c, line 39.
(gdb) c
Continuing.

Use of Free and Open Source Software

Odyssey makes use of following free and open source software:

License

Odyssey is distributed under the GPLv3 license.

Reference

You might also like...
A place to collaborate on code for the Embedded.fm book club. Currently reading "STM32 ARM Programming for Embedded Systems".

Welcome to the Book Club Code site! This is a place for the Embedded.fm book club to collaborate and learn together. Repo Structure Guide Top-level fo

A lightweight ARM reverse engineering tool.

eydis A lightweight (basic and slow) ARM reverse engineering tool. I. Requierements macOS/Linux, Basics compiling tools, The SQLite3 + readline framew

Prometheus exporter for ARM® Hardware components using HWCPipe.

ARM® HWCPipe Exporter ARM® HWCPipe Exporter is a Prometheus exporter written in Java and C++ that retrieves metrics from Android devices running on AR

ARM DevSummit workshop with Portenta H7

ARM DevSummit 2021 - Edge Impulse Portenta workshop Edge Impulse enables developers to create the next generation of intelligent device solutions with

Dummy-Robot my super mini robot arm robot items
Dummy-Robot my super mini robot arm robot items

Dummy-Robot 我的超迷你机械臂机器人项目。 资料待整理 已添加3D模型设计源文件。 已添加夹爪硬件设计文件和LED灯环PCB 已添加无线空间定位控制器PCB文件 已添加无线示教器Peak软硬件工程(作为submodule) 已添加REF的硬件设计文件 已添加DummyStudio上位机 已

Kernel with ARM/KVM for SM-A600G (Samsung Galaxy A6) with Exynos7870 SoC
Kernel with ARM/KVM for SM-A600G (Samsung Galaxy A6) with Exynos7870 SoC

Kernel source for SM-A600G (Samsung Galaxy A6 with exynos7870) with KVM support. Warning: Super long text ahead, be careful not to mess up your brain

An articulating arm in OpenGL for coms336

Theodore Davis tcdavis Sean Griffen griffens opengl-articulating-arm Articulating Arm in OpenGL for ComS 336 Project Description The scene will defaul

A small RTOS for ARM Cortex-M3/M4 based Microcontrollers.
A small RTOS for ARM Cortex-M3/M4 based Microcontrollers.

A tiny RTOS for ARM Cortex-M3/M4 based Microcontrollers. Explore the docs » View Demo · Report Bug · Request Feature Table of Contents About The Proje

Control of 4 DOF robotic arm using Bluetooth HC-05 Sensor
Control of 4 DOF robotic arm using Bluetooth HC-05 Sensor

SERV-E - "At your Service" Problem Statement With the current boom of technology where the whole world is running towards digitisation and automation

Releases(v0.1.1-alpha)
  • v0.1.1-alpha(Oct 4, 2020)

    This is an initial alpha release containing some capabilities around:

    • [X] Multiboot2
    • [X] Protected mode
    • [X] EGA 80x25 console
    • [X] Scalable console fonts
    • [X] Serial output
    • [X] RGB framebuffer
    • [X] Build-time customization of features
    • [X] Segmentation
    • [X] Interrupt handling
    • [X] Timers
    • [X] PS/2 keyboard support
    • [X] Memory manager
    • [X] GRUB boot modules
    • [X] Paging

    Note that USB keyboards are not supported yet, so try this out in an emulated VM with support for PS/2 keyboard support, or use a serial connection if you're using a single board computer to interact with the shell.

    Source code(tar.gz)
    Source code(zip)
    odyssey.iso(13.96 MB)
Owner
Anuradha Weeraman
Technologist | @Debian Developer
Anuradha Weeraman
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, X86)

Unicorn Engine Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU. Unicorn offers some unparalleled fea

Unicorn Engine 6k Jan 3, 2023
SerenityOS - Graphical Unix-like operating system for x86 computers. 🐞

SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.

SerenityOS 23.5k Jan 4, 2023
A port of the Linux x86 IOLI crackme challenges to x86-64

This is a port of the original Linux x86 IOLI crackme binaries to x86-64. The original set of IOLI crackmes can be found here: https://github.com/Maij

Julian Daeumer 4 Mar 19, 2022
PHP Encoder, protect PHP scripts in PHP 8 and PHP 7, High Performance, Compitable with X86_64, MIPS, ARM platform and Ubuntu/Centos/OpenWRT system.

What's FRICC2? FRICC2 is a PHP Script encryption tool. When you are developing a commercial software using PHP, the script can be distributed as encry

Hoowa Sun 43 Dec 12, 2022
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

RaidTheWeb 42 Oct 28, 2022
Operating system project - implementing scheduling algorithms and some system calls for XV6 OS

About XV6 xv6 is a modern reimplementation of Sixth Edition Unix in ANSI C for multiprocessor x86 and RISC-V systems.

Amirhossein Rajabpour 22 Dec 22, 2022
[WIP] Experimental C++14 multithreaded compile-time entity-component-system library.

ecst Experimental & work-in-progress C++14 multithreaded compile-time Entity-Component-System header-only library. Overview Successful development of

Vittorio Romeo 450 Dec 17, 2022
This package contains the common algorithms in robotic arm, and I have developed it based on universal robot. It will be continuously updateing.

Robotic_Arm_Algorithms It contains the common algorithms in robotic arm, and will be recording the development as soon as I have completed the any one

Mingshan-Beal 98 Dec 21, 2022
SynapseOS is a free and open source 64x operating system written in FASM and C

SynapseOS SynapseOS is a free and open source 64x operating system written in FASM and C Documentation Documentation Build To build SynapseOS you need

Synapse OS 102 Dec 5, 2022
A static C library to build applications for the Foenix retro computers, and, eventually, a single-tasking operating system and file browser that sits atop the Foenix MCP Kernel

@mainpage Foenix A2560 Foenix Retro OS: fr/OS A2560-FoenixRetroOS This project provides 2 things: A static C library/framework that anyone can use to

null 4 Jun 24, 2022