Giter Site home page Giter Site logo

srg-ics-uplb / ics-os Goto Github PK

View Code? Open in Web Editor NEW
13.0 6.0 86.0 26.13 MB

An instructional operating system

C 95.62% Shell 0.02% Makefile 0.24% Assembly 2.12% Batchfile 0.03% Dockerfile 0.01% TeX 1.96%
operating-systems kernel os teaching-kernel instructional-operating-systems osdev i386 x86 boot operating-system

ics-os's Introduction

Alt Text

About

Modern real-world operating systems are too complex to be taught to undergraduates and other instructional operating systems are not complete and usable and do not work on real hardware. By providing students with a not so complex working operating system to play with, they will be able to appreciate and understand deeper the concepts underlying an operating system.

Thus, this project aims to develop a simple yet operational instructional operating system for teaching undergraduate operating systems courses. ICS-OS is a fork of DEX-OS by Joseph Dayo.

Downloads

Latest floppy image: ics-os-floppy.img

Test the floppy image in qemu.

$qemu-system-i386 -fda ics-os-floppy.img

Build Environment

Ubuntu 16.04 64-bit is the last tested working build environment. Virtualbox can be used to run this version of Ubuntu. However, docker is the recommended build environment since new versions of Ubuntu do not work anymore.

Using Docker to build

ICS-OS is a 32-bit operating system and requires a 32-bit build environment. You need to install docker and docker-compose to build the ICS-OS kernel and user applications.

Run the following command to enter the build environment:

$docker-compose run ics-os-build

or if you are using the docker-compose plugin:

$docker compose run ics-os-build

You will be dropped to a shell where you can perform the build. The ics-os folder is mapped inside the container. Thus, you can perform the edits outside the container(in another terminal) and the changes will be reflected inside the build environment.

#cd /home/ics-os
#make clean
#make
#exit

Make the floppy image then boot.

$sudo make floppy
$make boot-floppy

Alternatively, you can boot the floppy image directly using qemu.

$qemu-system-i386 -fda ics-os-floppy.img

See Lab 01 for a more complete discussion of how to set up the build environment.

Development and Support

This project is used at the Institute of Computer Science, University of the Philippines Los Banos for CMSC 125. It is maintained by the Systems Research Group.

Get started by reading the Kernel Developer's Guide.

Don't forget to check the Wiki.

You can ask questions by submitting an issue.

Citation

If you find his resource useful in your research or teaching, please cite our paper.


J. A. C. Hermocilla. Ics-os: A kernel programming approach to teaching operating system concepts. Philippine Information Technology Journal, 2(2):25--30, 2009.


You can also use the following bibtex entry.

@article{hermocilla-ics-os-pitj2009,
  author = {Hermocilla, J. A. C.},
  title = {ICS-OS: A Kernel Programming Approach to Teaching Operating System Concepts},
  journal = {Philippine Information Technology Journal},
  volume = {2},
  number = {2},
  year = {2009},
  issn = {2012-0761},
  pages = {25--30},
  publisher = {Philippine Society of Information Technology Educators and Computing Society of the Philippines },
  address = {Philippines},
  pdf = {https://jachermocilla.org/publications/hermocilla-pitj2009-ics-os.pdf}
}

ics-os's People

Contributors

jachermocilla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ics-os's Issues

How to do file i/o in kernel mode?

Here's a demo:

void kernel_file_io_demo(){
   char msg[10]="Hello!";
   char buf[10];
   file_PCB *fp;

   fp=openfilex("sample.txt",FILE_WRITE);
   fwrite(msg,sizeof(msg),1,fp);
   fclose(fp);

   fp=openfilex("sample.txt",FILE_READ);
   fread(buf,sizeof(msg),1,fp);
   printf("%s\n",buf);
   fclose(fp);

}

ICS OS fails to compile in the GNU C Compiler versions 5.0 and above

ICS OS fails to compile in the GNU C Compiler versions 5.0 and above.

The linker seems to be unable to find references to inline functions.

The following is the output in the terminal when running make:

make -C kernel/
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/home/skeithc/Codes/C/ics-os2/ics-os/kernel'
gcc -m32 -w -nostdlib -fno-builtin -ffreestanding -c -o scheduler.o process/scheduler.c
gcc -m32 -w -nostdlib -fno-builtin -ffreestanding -c -o fat.o filesystem/fat12.c
gcc -m32 -w -nostdlib -fno-builtin -ffreestanding -c -o iso9660.o filesystem/iso9660.c
gcc -m32 -w -nostdlib -fno-builtin -ffreestanding -c -o devfs.o filesystem/devfs.c
gcc -m32 -w -nostdlib -fno-builtin -ffreestanding -c -o iomgr.o iomgr/iosched.c
gcc -m32 -w -nostdlib -fno-builtin -ffreestanding -c -o devmgr_error.o devmgr/devmgr_error.c
gcc -m32 -w -nostdlib -fno-builtin -ffreestanding -c -o kernel32.o kernel32.c 
nasm -f elf32 -o startup.o startup/startup.asm
nasm -f elf32 -o asmlib.o startup/asmlib.asm 
startup/asmlib.asm:300: warning: label alone on a line without a colon might be in error
nasm -f elf32 -o irqwrap.o irqwrap.asm
strip --strip-debug *.o
ld -melf_i386  -T lscript.txt -Map mapfile.txt

kernel32.o: In function `ports_write':
(.text+0x16e): undefined reference to `outportw'
kernel32.o: In function `ports_read':
(.text+0x1f0): undefined reference to `inportw'
kernel32.o: In function `read_regs':
(.text+0x2e6): undefined reference to `inportb'
kernel32.o: In function `read_regs':
(.text+0x311): undefined reference to `outportb'
kernel32.o: In function `read_regs':
(.text+0x321): undefined reference to `inportb'
kernel32.o: In function `read_regs':
(.text+0x356): undefined reference to `outportb'
kernel32.o: In function `read_regs':
(.text+0x366): undefined reference to `inportb'
kernel32.o: In function `read_regs':
(.text+0x39b): undefined reference to `outportb'
...
Makefile:47: recipe for target 'Kernel32.bin' failed
make[1]: *** [Kernel32.bin] Error 1
make[1]: Leaving directory '/home/skeithc/Codes/C/ics-os2/ics-os/kernel'
Makefile:7: recipe for target 'vmdex' failed
make: *** [vmdex] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.