Intelligent Multi Kernel System Wiki
Yet another Kernel - clone the git repo for newest version
Status: Alpha
Brought to you by:
clundxiii
As you can see, the Makefile uses Bash-Scripts for each Step:
IMKS:
###############################
#IMKS (c) by Simon Michalke #
#Makeskript: IMKS #
###############################
@bash ./kop_pic.sh runlevel_1.asm
@bash ./bootmng_sichern.sh
@bash ./com_cp.sh ./bootmng.asm CKernel/init1.asm
@bash ./System_sichern.sh IMKS
kop_pic.sh copies the PIC_init (this initilieses the Interrupts) in front of runlevel_1.asm. runlevel_1.asm will be compiled in next step. bootmng_sichern.sh saves the bootmanager to a backup directory. If you dont need this, you could remove the line. In the next step com_cp.sh compiles the bootmanager, assembler basic system and the C System and put them together in a floppy image named System.img: (I am sorry, but the output is still in German, i'll fix it soon)
#!/bin/bash#Shell zum Compilieren des Kernels & Bootmngr (C) Simon Michalke, 2011
#$1: Bootmng $2:Assembler System (init 1) $3:C-Kernel (init 2)
echo "compiliere bootmng......."
nasm -f bin ./$1 -o ./bootmng.bin
echo "->fertig!"
echo "Compiliere Kernel........"
nasm -f bin ./$2 -o ./asskernel.bin
echo "->fertig!"
echo "cutten..................."
cat bootmng.bin asskernel.bin > System.bin
echo "fertig!"
echo "mit Nullen ausfuellen (bis Track 1)..."
anz=`cat System.bin | wc -c`
echo "$anz bytes"
diskz=12288
anz=`expr $diskz - $anz`
echo "Nullen: $anz"
dd if=/dev/zero bs=$anz count=1 >temp.temp
cat System.bin temp.temp >temp2.temp
mv temp2.temp System.bin
#C-Kernel (extern Makefile):
cd ./CKernel/
make Compile
cd ./../
#Copy CKernel to System.bin:
cat System.bin ./CKernel.bin >temp2.temp
mv temp2.temp System.bin
echo "mit Nullen ausfuellen (bis zum Ende) ..."
anz=`cat System.bin | wc -c`
echo "$anz bytes"
diskz=`expr 512 \* 2880`
anz=`expr $diskz - $anz`
echo "Nullen: $anz"
dd if=/dev/zero bs=$anz count=1 >temp.temp
cat System.bin temp.temp >temp2.temp
mv temp2.temp System.img
After that the System is automatically backuped by System_sichern.sh.