Commit Graph

79 Commits

Author SHA1 Message Date
Vincent Ollivier 1959b31f62
Improve documentation (#294)
* Add calc doc

* Link doc from readme

* Rename stdnil to stdnull

* Add items to the TODO list in the README

* Update instructions in the README

* Improve feature list in README

* Add link to doc in README

* Disable unused show command

* Add colors to chess perf command
2021-12-29 22:56:08 +01:00
Vincent Ollivier 237d78339f
Improve help (#291)
* Improve help command

* Impove disk --help

* Add find --help

* Add list --help

* Add net --help

* Improve pci --help

* Add beep --help

* Add http --help

* Fix http args parsing

* Add memory --help

* Add keyboard --help
2021-12-23 18:30:59 +01:00
Vincent Ollivier 313f90ee73
Extend lisp language (#278)
* Add map builtin

* Rename ensure_length macro

* Update documentation

* Update map function

* Rename map to mapcar

* Add modulo to calculator

* Add division, modulo, and exponential to lisp

* Add type to built in functions

* Add string comparisons

* Update atom function

* Add basic load function

* Update load to parse multiple expressions

* Escape quote in string display

* Move print definition

* Rename read-file to read

* Simplify mapcar implementation

* Update tests

* Add comment and test

* Add standard library

* Add lib to install

* Refactor eval

* Refactor eq

* Refactor eval with ensure macros

* Add more tests

* Redefine primitives

* Move primitives to /ini/lisp/core.lsp

* Update install file

* Refactor eval

* Create /ini/lisp
2021-12-12 11:43:57 +01:00
Vincent Ollivier d053f17124
Add shell redirections (#262)
* Reorder syscalls

* Add DUP syscall

* Add api::fs::reopen

* Add shell redirections

* Use regex to parse arrow

* Add tests

* Refactor install

* Add eprint macro

* Change exit code of empty command in shell

* Update changelog
2021-11-05 09:06:40 +01:00
Vincent Ollivier 591a54e348
Add website (#261)
* Add www dir for the website

* Update html

* Add website

* Refactor CSS

* Fix image path

* Update assets

* Update doc and readme description

* Reorder badges

* Update doc index title
2021-11-01 08:58:22 +01:00
Vincent Ollivier 71d83cd688
Add dynamical disk information (#252)
* Add sys::ata::Drive struct

* Add fs size to superblock

* Add missing usage option to disk command

* Update changelog

* Store ata::Drive in AtaBlockDevice

* Store allocated block count in superblock

* Rename Superblock to SuperBlock

* Add superblock to memfs

* Use Block instead of LinkedBlock for BlockBitmap

* Rename BlockBitmap to BitmapBlock

* Fix removed const

* Remove some hardcoded constants

* Fix BitmapBlock::free_all

* Allocate the whole remaining disk space

* Use memory size to alloc memfs

* Dynamically use half of the memory for the heap

* Add SuperBlock::check_ata

* Move init to mod.rs

* Update python fuse

* Add BITMAP_SIZE constant

* Fix available space computation

* Limit the heap to 8 GB max

* Fix memfs size
2021-10-04 21:37:47 +02:00
Vincent Ollivier e5a7b63bc2
Add chess game (#230)
* Add chess game

* Add missing file

* Add moves parsing

* Add autocompletion

* Add perft command to chess

* Update Cargo.lock

* Add undo and time commands

* Improve output of commands

* Add endgame support

* Split main into multiple methods of a Chess struct

* Update littlewing

* Use chess prelude

* Add show board command

* Add help

* Update docs

* Fix url syntax in doc

* Add commands to doc index

* Update doc/index.md

* Fix typos
2021-08-12 23:15:28 +02:00
Vincent Ollivier 41cc200375 Add network screenshot 2021-08-01 13:14:49 +02:00
Vincent Ollivier 89458a732c Add index page to the doc 2021-08-01 13:03:29 +02:00
Vincent Ollivier de48c87e0c
Add a regular expression engine (#222)
* Add a regular expression engine

* Fix off by one error

* Add + quantifier

* Add more tests

* Use assert_eq instead of assert in tests

* Rewrite tests with an array

* Fix bug in is_match_star

* Use the same do while equivalent in is_match_plus

* Add ? quantifier

* Refactor engine code

* Add backslash char

* Group ifs in match

* Add special escaped chars

* Add doc

* Add find command

* Add Match#find

* Show multiple matches in the same line

* Dry Regex

* Change matches color

* Add greedy version of matching by default

* Add MetaChar enum to fix matching escaped chars

* Change function signatures

* Remove macro_export

* Add TODO

* Find matching lines recursively

* Handle special patterns
2021-08-01 11:35:24 +02:00
Vincent Ollivier bbcfc66e18
Add time to dir entry (#215)
* Add creation time to dir entry

* Update and publish fuse script

* Change boot offset in doc

* Change creation time into last modified time

* Add sort parameter to list command

* Add error for missing sort key

* Add shortcut params for sort
2021-07-26 22:35:32 +02:00
Vincent Ollivier 8af428beab
Add Lisp interpreter (#207)
* Add lisp interpreter

* Refactor lisp code

* Add copyright notice

* Add multiplication

* Shorten type names

* Remove print import

* Add tests

* Add tests for def and fn

* Add print builtin

* Add file eval

* Add fib.ls

* Use define and lambda instead of def and fn

* Rewrite the primitive operators

* Update fibonacci example

* Add syntactic sugar for quote

* Rename console::abort to console::end_of_text

* Add console::end_of_transmission

* Remove auto parenthesis

* Fix parsing quotes

* Refactor quote primitive

* Add empty list comparison to eq primitive

* Add defun primitive

* Rename example

* Fix install path

* Add doc

* Add eq? and atom? aliases
2021-07-21 09:40:40 +02:00
Vincent Ollivier f35ca06346
Add syscalls (#196)
* Add syscall handler

* Add syscall macro

* Add sleep syscall

* Remove unimplemented syscall numbers

* Add syscalls to MOROS API

* Refactor idt

* Add return value to syscalls

* Add uptime syscall

* Use match instead of table in dispatcher

* Remove syscall4

* Use naked function for syscall

* Enable interrupts while sleeping

* Use sysv64 calling convention

* Add realtime syscall

* Add basic documentation

* Update changelog
2021-07-03 15:47:20 +02:00
Vincent Ollivier 3586122a80 Fix typo 2021-02-07 13:00:17 +01:00
Vincent Ollivier 9d09d1b2ed
Add a web server (#114)
* Add HTTP server

* Update server code

* Support PUT method to update files

* Support DELETE method to delete files

* Add kernel::console::abort() to detect ^C

* Update network monitoring

* Drain console input after a program stopped

* Refactor loop exits

* Remove mut keyword

* Use MTU for TCP sockets buffer size

* Fix empty lines

* Support directory creation

* Use mtu for chunk size
2020-11-15 09:44:10 +01:00
Vincent Ollivier 07b58189aa
Add pcnet driver (#82)
* Update crates

* Move kernel::rtl8139 to kernel::net::rtl8139

* Refactor rtl8139 driver

* Add draft PCNET driver

* Add compilation option nic

* Add module file

* Move State to net

* Add draft implementation of smoltcp::phy::Device

* Rewrite RTL8139 to be shared between threads

* Copy buffer for RxToken

* Use only Device inside TxToken

* Fix error in packet transmission

* Update driver code

* Refactor driver

* Fix transmit packet length

* Fix number of descriptor entries setup

* Loop through owned receiver buffers

* Add ip set subcommand

* Fix MTU

* Refactor drivers

* Update readme
2020-10-31 23:20:41 +01:00
Vincent Ollivier c9d56e6889
Improve installation and documentation (#73)
* Add kernel::fs::mount

* Check if fs is mounted before opening dir

* Save password hash during user creation

* Create home directory during user creation

* Improve path checking in mkfs

* Improve mkfs output

* Add install command

* Check presence of username and password during user creation

* Update documentation

* Check if user already exists before creation

* Split hashed_password

* Add save_hashed_password

* Rename login command to user

* Display MOROS version in a consistent way

* Use ctrl+d instead of ctrl+c to exit shell

* Rename mkfs to disk format

* Add disk list command

* Change prompt color if last command errored

* Improve installer

* Use $ and > prompts in doc

Use $ and > prompts in doc to indicate commands outside and inside
of MOROS respectively.
2020-07-05 13:31:49 +02:00
Vincent Ollivier 0988d05936 Add editor doc 2020-02-16 20:06:29 +01:00
Vincent Ollivier 00a028150a Update shell doc 2020-02-16 20:06:04 +01:00
Vincent Ollivier 3b638486a3 Use hard drive instead of disk in doc 2020-02-15 10:52:49 +01:00
Vincent Ollivier 0a4b26a8bb
Improve filesystem (#24)
* Add doc about fs

* Add console on diskless boot

* Enumerate all disks

* Avoid hardcoded allocation of root dir

* Refactor ATA code

* Add BlockDevice

* Add mkfs command

* Update readme

* Add warning in the readme about disk modifications

* Use all bits inside BlockBitmap data

* Add makefile

* Overwrite only bootloader and kernel in disk image

* Update readme

* Add doc about mkfs

* Update mkfs command
2020-02-13 09:42:22 +01:00
Vincent Ollivier 8ee2ca489f
Add tcp command (#17)
* Add tcp command

* Add support for read /net/tcp/<host>:<port> commands

* Add doc
2020-02-06 20:26:08 +01:00
Vincent Ollivier 4fd7d68a63
Add network stack (#12)
* Display MAC address

* Add kernel::pci::find_device

* Mask lower bits of 16-bit Memory Space BAR

* Use array instead of vector for MAC address

* Split interrupts module

* Use IRQ constants instead of InterruptIndex enum

* Replace kernel::sleep by kernel::time

* Add kernel::idt::set_irq_handler

* Add interrupt handler for RTL8139

* Enable bus mastering for RTL8139

* Setup NIC

* Add features for vga/serial and qwerty/dvorak

* Add smoltcp crate

* Use EthernetAddress from smoltcp

* Add RTL8139 struct to implement smoltcp Device

* Save detected device

* Add kernel::mem::translate_addr

* Use physical address of rx_buffer

* Add command to read raw network data

* Parse packet header and length

* Fix missing ascii on last line

* Take CRC into account for packet length

* Fix compilation error

* Move buffer pointers after packet received

* Use buffer slice instead of clone in RxToken

* Add packet transmission and dhcp client

* Configure network interface with DHCP client

* Add debug mode to network interface

* Clean dhcp command output

* Add ip command

* Clean up commands output

* Count number of packets transmitted and received

* Add route command

* Add kernel::random::rand16

* Handle carriage return char

* Add HTTP client

* Improve http command output

* Add DNS resolver command

* Parse DNS responses to A IN queries

* Resolve http host

* Check if interface is ready before operations

* Add timeout to polling loops

* Fix sleep during polling

* Add verbose arg to http command

* Add State struct to Device struct

* Add subcommand config and dump to net command

* Add MTU to RX_BUFFER_LEN when using WRAP

* Fix first transmission index

* Refactor TxToken implementation

* Add user agent to http requests

* Add more comments to code

* Add llvm-tools-preview component to readme

* Add method to translate IRQ into system interrupt

* Clear IRQ mask in set_irq_handler

* Refactor driver code

* Sleep less rather than more

* Add rand32

* Disable RTL8139 interrupts

* Use arrays instead of vectors for buffers

* Add minimum sleep duration

* Add phy_addr to dry init

* Use CAPR and CBR to compute rx buffer offset

* Add debug for alloc issue with continuous physical memory

* Fix timeout in loops

* Add unused buffer to push the rx buffer into contiguous memory

* Add doc about network

* Update readme

* Add read /net/<proto>/<host>/<path> subcommand
2020-02-02 18:55:20 +01:00
Vincent Ollivier 2d294ebe72
Add basic filesystem (#5)
* Add basic filesystem

* Fix duplicate call to shell in main loop

* Add file type and size to dir entry

* Add sleep after write to avoid failures

* Add list command

* Add dir creation

* Add comment to write dir command

* Move File struct

* Update readme

* Sort files by name in list command

* Create some default dirs

* Avoid opening dirs with File::open

* Create default dirs on the filesystem

* Update read command to mirror list for dirs

* Add delete command
2020-01-17 19:52:48 +01:00
Vincent Ollivier fa4eacec46 Add append command to shell doc 2020-01-06 22:26:31 +01:00
Vincent Ollivier b6388cf588 Update shell documentation 2019-12-31 18:32:23 +01:00
Vincent Ollivier 452d2f5745 Add content to shell doc 2019-12-31 08:40:17 +01:00
Vincent Ollivier 916e6411a7 Fix path in examples 2019-12-30 22:53:03 +01:00
Vincent Ollivier 27e6314db4 Add doc about shell 2019-12-30 22:47:50 +01:00