Garden OS código atualizado

1. Garden OS código atualizado

???
gokernel

(usa Linux Mint)

Enviado em 02/08/2017 - 17:01h

Olá pessoal !

Depois de muito estudar sobre OS, finalmente disponibilizei no SOURCEFORGE o código atual do Garden OS.

Aqui:
https://sourceforge.net/projects/garden-linux/files/
ARQUIVO: gardenOS_src_0.9.0.tar.gz

Sobre o código atual:
01: O shell inicialmente só tem 2 comandos ( clear, quit ) ... pressione a tecla TAB que será exibido a lista de comandos.
02: Não implementei ainda a rolagem de tela ... se chegar no final da tela ... somente um ( clear ) para continuar. rasrars.

Para compilar leia o arquivo README.txt ou:
PARA WINDOWS:
compile_windows_gcc.bat
PARA LINUX:
./compile_linux_gcc.sh

Será compilado o código na pasta ( src ) para a pasta ( obj ) e será gerado o kernel ( gardenOS_kernel ) na pasta principal.

TESTANDO:
qemu -kernel gardenOS_kernel

OBS: não tive tempo de programar todas a teclas então só funcionam as teclas:

de: 'a' --> 'z'
de: 'A' --> 'Z'
de: '0' --> '9'


NOTA: a funcao principal do usuário ( void kmain (void) ) está definida no arquivo( src/kmain.c )

Críticas / sugestões são bem-vindas !!!



  


2. Re: Garden OS código atualizado

Alberto Federman Neto.
albfneto

(usa openSUSE)

Enviado em 02/08/2017 - 18:21h

Puxa, tá indo bem e tá trabalhando rápido vc.
quando quiser, e se quiser, publique uma Dica ou Artigo dele, aqui.
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
Albfneto,
Ribeirão Preto, S.P., Brasil.
Usuário Linux, Linux Counter: #479903.
Distros Favoritas: Sabayon, Gentoo, openSUSE, Mageia e OpenMandriva.


3. Re: Garden OS código atualizado

Alberto Federman Neto.
albfneto

(usa openSUSE)

Enviado em 02/08/2017 - 18:26h

Não sou profissional de TI, mas se entendi, é para dar um boot " em branco", não? é tipo um SO pequeno, não?

um usuário aqui, procura por um "apagador" de HDD, que funcione auto, em um boot de live CD. Seu SO não serviria como base para fazer esse CD "formatador"?
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
Albfneto,
Ribeirão Preto, S.P., Brasil.
Usuário Linux, Linux Counter: #479903.
Distros Favoritas: Sabayon, Gentoo, openSUSE, Mageia e OpenMandriva.


4. Re: Garden OS código atualizado

???
gokernel

(usa Linux Mint)

Enviado em 03/08/2017 - 07:15h


Olá "albfneto" !

1 - "albfneto" escreveu:

Puxa, tá indo bem e tá trabalhando rápido vc.
quando quiser, e se quiser, publique uma Dica ou Artigo dele, aqui.


Sobre dica/artigo fica para quando ele tiver um pouco mais funcional .

2 - "albfneto" escreveu:

Não sou profissional de TI, mas se entendi, é para dar um boot " em branco", não? é tipo um SO pequeno, não?

um usuário aqui, procura por um "apagador" de HDD, que funcione auto, em um boot de live CD.
Seu SO não serviria como base para fazer esse CD "formatador"?


Sim é tipo um SO pequeno e bem pequeno mesmo ... mas essa versão utiliza o GRUB como boot, no futuro acho que farei um BootLoader próprio.


Seu SO não serviria como base para fazer esse CD "formatador"?

Nessa fase inicial ainda não está implementado a parte de ( Sistemas de Arquivos ), ou seja no estágio atual não se pode ler/escrever.

Pretendo iniciar um Sistema de Arquivo padrão ( ISO ) para ler CD-ROM... pois faz muito tempo que pretendo fazer um OS tipo o PlayStation onde coloca-se jogos em um CD-ROM( dando o boot por esse ) e "ver a mágica" acontecer.

Resumo: esse OS pretendo que seja um "kernel completo" em apenas um arquivo.



5. Re: Garden OS código atualizado

???
gokernel

(usa Linux Mint)

Enviado em 13/08/2017 - 10:14h

Olá !

Código atualizado com interrupção !

https://sourceforge.net/projects/garden-linux/files/
Arquivo: gardenOS_src_0.10.0.zip

Código bem legível, veja a função principal ( void kmain (void) ):

//-------------------------------------------------------------------
//
// GARDEN OS VERSION: 0.10.0
//
// Main User function:
// void kmain (void);
//
// FILE:
// kmain.c
//
// TANKS TO:
// ----------------------------------------------
//
// 01: God creator of the heavens and the earth in the name of Jesus Christ.
//
// 02: OsDev Site: www.osdev.org
//
// 03: Micah Dowty - Creator of MetalKit:
// https://github.com/scanlime/metalkit/
// http://svn.navi.cx/misc/trunk/metalkit/
//
// ----------------------------------------------
//
// MINI SHELL COMMANDS:
// clear
// quit
// reboot
//
// BY: Francisco - gokernel@hotmail.com
//
//-------------------------------------------------------------------
//
#include "garden.h"
#include "intr.h" // interrupt API

#define STRING_SIZE 255
#define SHELL_PROMPT "\nshell > "

char string [STRING_SIZE];
int quit;
int key;
int is_reboot = 0;

void reboot (void) {
while (inb(0x64) & 0x02); // reboot the computer
outb (0x64, 0xfe);

// Should it not work we halt
// the computer now so the we
// do no harm
//
asm ("cli;hlt");
}

void keyboard_handle (int i) {

key = shell (string);

if (key == KEY_TAB) {
video_puts ("\nCommands: clear, quit, reboot");
video_puts (SHELL_PROMPT);
video_puts (string);
}

if (key == KEY_ENTER) {
if (!strcmp(string, "clear")) {
video_clear ();
} else if (!strcmp(string, "quit")) {
quit = 1;
// disable keyboard interrupt
//
intr_SetMask (IRQ_KEYBOARD, FALSE);
} else if (!strcmp(string, "reboot")) {
quit = 1;
is_reboot = 1;
// disable keyboard interrupt
//
intr_SetMask (IRQ_KEYBOARD, FALSE);
} else {
video_puts ("\nCommand not found (");
video_puts (string);
video_puts (")\n");
}
memset (string, 0, STRING_SIZE);

video_puts (SHELL_PROMPT);

}//: if (key == KEY_ENTER)

}//: void keyboard_handle (int i)

void kmain (void) {

kernel_init ();

//-------------------------------------------

// interrupt init
//
intr_Init ();

// enable keyboard interrupt
//
intr_SetMask (IRQ_KEYBOARD, TRUE);

// set keyboard handler
//
intr_SetHandler (IRQ_VECTOR(IRQ_KEYBOARD), keyboard_handle);

//-------------------------------------------

video_puts ("\nGLORY TO GOD:\nThe creator of the heavens and the earth in the name of Jesus Christ. !\n");

video_puts ("\nTo display the commands list press: KEY TAB\n");

video_puts (SHELL_PROMPT);

quit = 0;

//-------------------------------------------
// MAIN LOOP:
//
// See the function:
//
// void keyboard_handle (int i)
//
//-------------------------------------------
//
while (!quit) {

kernel_wait ();

}

kernel_finalize ();

if (is_reboot)
reboot();
}


Para compilar leia o arquivo: README.txt



6. Re: Garden OS código atualizado

???
gokernel

(usa Linux Mint)

Enviado em 15/08/2017 - 11:11h


Olá !

Código atualizado e completo ( Teclado implementação completa, Video rolagem completa, printk ) para a BASE.

Atualizei os arquivos ( garden_linux_0.10.0.iso, gardenOS_src_0.10.0_BASE.src )

Agora sim, a "base" está implementada por completo !

changelog.txt

Version 0.10.0 - Build Release ( "0001 - 15/08/2017" )
F: Video VGA implementation ( with screen scroll ).
F: LibC mini implementation ( printk, strlen, itoa ... ) .
F: Keyboard implementation.
F: Interrupt implementation.
F: Shell mini implementation.





  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts