Commit Graph

596 Commits

Author SHA1 Message Date
Vincent Ollivier a49670138f Update spin crate 2020-11-05 21:51:35 +01:00
Vincent Ollivier 0d2c5343a9
Improve text editor (#109)
* Rename offset_y to dy

* Add truncated line indicator

* Render tab as spaces

* Fix insertion

* Update help

* Add horizontal screen offset

* Support delete key in editor

* Support delete key in shell
2020-11-05 21:36:16 +01:00
Vincent Ollivier 2a584af6a8 Update crates 2020-11-01 00:11:13 +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 f97191b272
Remove cargo xbuild (#83)
* Add nanowait based on calibrated rdtsc

* Add spin_loop_hint

* Update dependencies

* Update cargo config

* Add rlibc dependency to fix compilation bug

* Remove cargo xbuild

* Update crates

* Update readme
2020-07-31 10:31:59 +02:00
Vincent Ollivier 51a1b777b6
Add nanowait busy loop with nanoseconds precision (#78)
* Add nanowait based on calibrated rdtsc

* Add spin_loop_hint
2020-07-29 23:05:57 +02:00
Vincent Ollivier 32a6d3fb9f Bump version to 0.4.0 2020-07-29 22:09:57 +02:00
Vincent Ollivier 41d0fd7d63 Update changelog 2020-07-29 22:04:14 +02:00
Vincent Ollivier b35f79a300 Use pc-keyboard from crates.io 2020-07-29 21:59:45 +02:00
Vincent Ollivier fd0ffd0ed9 Rename screenshot 2020-07-27 07:23:23 +02:00
Vincent Ollivier b0266744c2
Improve editor (#77)
* Show write status in editor

* Add 'help edit' command

* Show pathname in status bar

* Update status bar colors

* Avoid clearing before printing by overwriting whole lines
2020-07-14 11:34:38 +02:00
Vincent Ollivier 1f86f6ba7f
Add ANSI Style type (#76)
* Replace console::color() by console::Style

* Remove write_string from writers

* Keep ansi parser alive between writes
2020-07-12 18:55:29 +02:00
Vincent Ollivier e61db9e935 Skip handling unknown keys 2020-07-12 09:58:11 +02:00
Vincent Ollivier c91d7a95cf Fix detection of magic superblock 2020-07-12 09:56:49 +02:00
Vincent Ollivier 672b89fd49 Fix ATA busy loop hang 2020-07-12 09:56:13 +02:00
Vincent Ollivier da83646738 Improve ATA reset 2020-07-12 09:55:05 +02:00
Vincent Ollivier c4daf3a88c Run rustfmt 2020-07-11 20:33:55 +02:00
Vincent Ollivier e07663a19c Update dependencies 2020-07-11 00:42:57 +02:00
Vincent Ollivier 313b10a344
Optimize shell printing (#75)
* Optimze shell printing

* Fix autocomplete with serial output

* Use cfg macro to dry code
2020-07-11 00:41:05 +02:00
Vincent Ollivier 526bffea24 Refactor RTC code 2020-07-10 10:42:18 +02:00
Vincent Ollivier 5828c7f4d3
Improve console (#74)
* Move keyboard key decoding to keyboard interrupt handler

* Read keys from serial

* Disable cursor in shell for serial

* Trim cpu brand string

* Use array for writer position

* Add Serial struct

* Add console::clear_row()

* Update autocomplete commands

* Parse ANSI color code

* Add colors to banner

* Remove newline before diskless mode

* Use lighter colors in banner

* Fix ansi color code parsing

* Use ansi colors in logger

* Rewrite colors command

* Add color to halt command

* Rewrite help command

* Use yellow color for titles

* User kernel::console::color() in shell

* Update screenshot

* Fix execute state in vte parser

* Fix typo

* Add colors to serial logger

* Fix banner colors

* Add some randomnly darker colors to banner

* Autocomplete devices path

* Create /ini/version.txt during install
2020-07-10 08:18:34 +02:00
Vincent Ollivier 5118a3db2c Fix http port parsing 2020-07-06 19:15:31 +02: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 ac390fb863 Update gitignore 2020-07-03 23:49:58 +02:00
Vincent Ollivier 92e46ed4c3 Bump version number 2020-07-03 23:46:25 +02:00
Vincent Ollivier 5081e98054 Update changelog 2020-07-03 22:38:27 +02:00
Vincent Ollivier c8b1a51ef4
Handle RTC interrupts (#71)
* Fix setting and clearing of IRQ masks

* Add kernel::clock::time_between_ticks

* Add methods to enable RTC interrupts

* Keep track of last RTC update time

* Add fractional seconds to timestamps

* Fix spacing

* Use more accurate PIT frequency

* Change PIT frequency divider

* Replace mutexes by atomics
2020-07-03 22:25:03 +02:00
Vincent Ollivier e61552f5c2
Upgrade dependencies (#70) 2020-06-30 00:16:41 +02:00
Vincent Ollivier 43f4b40198
Colorize user interface (#69)
* Add color to help command

* Add color to shell prompt
2020-06-29 22:47:25 +02:00
Vincent Ollivier 090466bd8e
Update dependencies (#42)
* Reorder dependencies

* Update x86 dependencies
2020-04-13 13:14:04 +02:00
Vincent Ollivier 8b33c3979f
Update ATA driver (#41)
* Read from alternate status register in wait

* Add busy loop

* Update bochs config
2020-04-13 11:36:04 +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 17be8ef85b Update readme 2020-02-15 10:49:30 +01:00
Vincent Ollivier 2360da0a66 Add screenshot to readme 2020-02-14 21:01:30 +01:00
Vincent Ollivier 3de538517d Fix geotime after midnight 2020-02-14 20:59:13 +01:00
Vincent Ollivier 965f1f3c98 Update changelog 2020-02-13 20:29:06 +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 d5ff99c26c
Add process struct (#19)
* Add process struct

* Set process during login

* Use HOME env var to find shell history file

* Add kernel::fs::realpath

* Use realpath in FS CRUD operations

* Add change dir command to shell

* List current dir by default

* Replace empty dir arg by current dir in list command

* Use realpath in shell autocomplete

* Refactor path joining code

* Add goto command
2020-02-10 21:29:07 +01:00
Vincent Ollivier c736091480
Better shell history (#18)
* Save and load shell history from file

* Update shell history on key press

* Add comments
2020-02-07 18:36:27 +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 d2fe9e6524
Add PhysBuf for DMA (#16)
* Rename call to clock_monotonic

* Add PhysBuf for buffers using contiguous physical memory

* Fix imports

* Improve timeout code

* Remove unused variable warning

* Hide unrecognized packets from network errors

* Improve http command args parsing

* Remove mandatory first halt in sleep

* Fix http header detection

* Parse invalid UTF-8 string
2020-02-05 19:32:40 +01:00
Vincent Ollivier ea13ad50c5 Disable blinking text after color change 2020-02-03 21:21:47 +01:00
Vincent Ollivier 1cca81ff68 Add config for using Bochs 2020-02-03 21:18:06 +01:00
Vincent Ollivier cf6e8a99b1 Print colors on 4 rows 2020-02-03 09:53:46 +01:00
Vincent Ollivier 1b6f519e67
Add geotime command (#14)
* Add libm crate

* Add geotime command

* Rename kernel::clock::clock_monotonic to kernel::clock::uptime

* Rename kernel::clock::clock_realtime to kernel::clock::realtime

* Use utc for rtc

* Fix clock in log
2020-02-03 09:45:53 +01:00
Vincent Ollivier 38fa72a8e4
Use VGA color palette (#15)
* Add kernel::vga::set_color

* Add log macro using vga colors

* Add Dark Gruvbox color palette

* Add kernel::vga::color

* Add colors command to show all colors
2020-02-03 09:33:30 +01:00
Vincent Ollivier 03df4f147f Add changelog 2020-02-02 19:36:54 +01:00
Vincent Ollivier f4ba1949bc Update readme 2020-02-02 19:25:25 +01:00