1
5
mirror of https://github.com/vinc/moros.git synced 2024-06-28 11:47:12 +00:00
Commit Graph

223 Commits

Author SHA1 Message Date
Vincent Ollivier
79682d2302
Add tilde expansion to shell (#367)
* Add tilde expansion to shell

* Add tilde expansion to auto complete

* Move tilde expansion into split_args

* Add doc
2022-07-10 22:00:13 +02:00
Vincent Ollivier
2f25c4a1ef
Improve http command (#365)
* Fix host arg

* Add support for binary output

* Send binary data to stdout directly

* Remove header struct

* Refactor states

* Refactor arg match

* Add missing -v option

* Trim protocol from url

* Fix separator when listing root
2022-07-08 09:02:27 +02:00
Vincent Ollivier
2426d2ff94
Upgrade linked list allocator (#363)
* Bump linked_list_allocator from 0.9.1 to 0.10.0

Bumps [linked_list_allocator](https://github.com/phil-opp/linked-list-allocator) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/phil-opp/linked-list-allocator/releases)
- [Changelog](https://github.com/rust-osdev/linked-list-allocator/blob/main/Changelog.md)
- [Commits](https://github.com/phil-opp/linked-list-allocator/compare/v0.9.1...v0.10.0)

---
updated-dependencies:
- dependency-name: linked_list_allocator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Convert HEAP_START addr to ptr

* Bump to 0.10.1

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-08 08:43:13 +02:00
Vincent Ollivier
3789a10df6
Improve lisp (#362)
* Parse empty strings

* Add append to core

* Add reverse to core

* Add read-line to core

* Remove prompt from read-line

* Change print return value

* Fix read-line

* Add trigonometric functions

* Update documentation

* Setup autocompletion semi-automatically
2022-07-02 15:24:30 +02:00
Vincent Ollivier
b202192810
Remove superfluous use of lazy_static (#364) 2022-06-30 07:15:58 +02:00
Vincent Ollivier
e4ce2ab59c
Use exit code to set status var (#360)
* Use exit code

* Add macro_use to sys module

* Replace ExitCode with Result<usize, usize>

* Add status var

* Fix status code

* Replace status with ?

* Fix regex for var substitution

* Remove warnings

* Add temporary fix for failing tests

* Add q shortcut to calc

* Use usize for exit code

* Use process exit codes

* Reintroduce ExitCode enum

* Use ExitCode::UsageError where needed

* Display usage error in find command

* Add doc
2022-06-29 19:23:01 +02:00
Vincent Ollivier
82882ec355
Add shell aliases (#357)
* Add shell aliases

* Fix env output error

* Fix sort

* Read aliases from config file

* Simplify arguments parsing

* Fix test

* Clone params to spawn syscall

* Run clippy

* Revert "Clone params to spawn syscall"

This reverts commit 4c91bea196.

* Disable binary stripping

* Remove exit alias

* Update doc
2022-06-26 10:00:54 +02:00
Vincent Ollivier
851bf65a8c
Fix args ptr alignment (#359)
* Update toolchain

* Rewrite args_ptr to fix alignment issue
2022-06-23 20:49:29 +02:00
Vincent Ollivier
629e254a51
Improve regex for redirections (#356) 2022-06-17 20:22:28 +02:00
Vincent Ollivier
b16f5fc9fd
Store current direction in DIR shell variable (#355) 2022-06-17 20:08:55 +02:00
Vincent Ollivier
cbf115b781
Add userspace entry_point macro (#354)
* Add entry_point macro

* Simplify userspace programs with entry_point macro

* Fix tests
2022-06-16 21:40:00 +02:00
Vincent Ollivier
783a41981d
Add shell globbing (#352)
* Add naive implementation

* Add support for multiple files in delete command

* Update find usage

* Ignore quoted params

* Add doc

* Change argument name
2022-06-16 21:29:45 +02:00
Vincent Ollivier
a177e47306
Add Coords struct to editor (#347) 2022-06-14 22:44:19 +02:00
Vincent Ollivier
dd5899a74d
Read command line args from userspace programs (#351)
* Read command line args from userspace programs

* Use Stop syscall to debug pointers from userpace

* Fix address translation system

* Update binaries

* Move print to bin

* Add hardcoded alias system

* Strip debug from binaries

* Build userspace binaries before running tests

* Save all the args in args including the command invocation name

* Move sleep command to /bin

* Rebuild binaries
2022-06-14 22:43:33 +02:00
Vincent Ollivier
6e3f3afcb0
Add binaries (#350)
* Remove linker args

* Add binaries

* Read /bin for autocomplete

* Add /bin path to commands

* Remove api bin

* Remove usr reboot
2022-06-12 15:28:54 +02:00
Vincent Ollivier
cd2e0166e6
Executable loading (#349)
* Add header to binary

* Add result to spawn

* Use spawn result to display error message

* Use info result to change directory

* Fix binary detection

* Fix lock issue
2022-06-09 22:59:33 +02:00
Vincent Ollivier
0831045c64
Add shell variables (#348)
* Add env vars to shell

* Add shell env

* Rename shell::run to shell::repl

* Add script pathname to shell env

* Add shell variables

* Add test

* Add doc

* Fix doc
2022-06-08 20:51:02 +02:00
Vincent Ollivier
b2da75189f
Improve Lisp (#344)
* Add println

* Rewrite fib

* Refactor parse

* Update lisp completer

* Store args in env

* Add 'or' and 'and' builtins

* Add factorial.lsp

* Update docs

* Add cat operation

* Add join operation

* Add system command

* Add time command (#346)

* Add time command

* Fix merge artefact

* Fix call to realtime

* Replace clock syscalls with device files (#345)

* Replace clock syscalls with device files

* Add missing newline to read

* Update time command

* Use Rc<RefCell<Env>>

* Add first TCO

* Remove Box

* Change result of env_for_lambda

* Run clippy

* Remove env clone

* Remove TCO

* Change return type of env_for_lambda
2022-06-06 16:02:34 +02:00
Vincent Ollivier
13ca997b7b
Add lazy allocation (#275)
* Add lazy allocation

* Add debug info

* Alloc stack directly

* Remove debug
2022-06-06 15:53:45 +02:00
Vincent Ollivier
28759df00c
Replace clock syscalls with device files (#345)
* Replace clock syscalls with device files

* Add missing newline to read

* Update time command
2022-06-05 13:58:05 +02:00
Vincent Ollivier
d5512baeea
Add time command (#346)
* Add time command

* Fix merge artefact

* Fix call to realtime
2022-06-05 13:24:40 +02:00
Vincent Ollivier
530658221d
Add socket command (#341)
* Add socket command

* Add test.html page

* Refactory sending code

* Update documentation

* Fix newlines

* Add interval option

* Replace newlines

* Exit on end of transmission

* Add listen mode

* Fix arguments parsing

* Remove debug output
2022-05-21 10:46:16 +02:00
Vincent Ollivier
adb5390cbc
Replace ChaCha RNG by HC-128 (#338) 2022-05-11 09:47:35 +02:00
Vincent Ollivier
df4711e323
Refactor serial (#336) 2022-05-06 20:43:48 +02:00
Vincent Ollivier
c9998f01c2
Improve dhcp command (#335) 2022-05-05 23:29:02 +02:00
Vincent Ollivier
a7cb32a5c2
Rewrite network interface (#334)
* Rewrite network interface

* Fix issue when cloning RLT8139 device

* Add Interface struct wrapping smoltcp iface

* Revert "Add Interface struct wrapping smoltcp iface"

This reverts commit ede7d5d0c9.

* Add back device stats

* Move stats code

* Rename eth_addr field to mac

* Add device config struct

* Fix usage of config and stats

* Make device init private

* Remove InnerStats and use Arc<Stats> directly

* Remove nic feature
2022-05-05 23:05:39 +02:00
Vincent Ollivier
50a48fcb75
Add CSI sequence for enabling or disabling echo to userspace (#333)
* Rename show/hide cursor to enable/disable

* Add enable/disable echo to vga

* Add CSI parser to serial

* Use csi sequence to enable/disable cursor in userspace

* Use AtomicBool instead of Mutex<bool>

* Simplify serial code
2022-04-26 13:30:53 +02:00
Vincent Ollivier
4d90d2da75
Refactor code (#330)
* Update changelog

* Update rust version

* Make changes suggested by Clippy
2022-04-19 22:42:15 +02:00
Vincent Ollivier
512b60564b
Fix device reading (#329)
* Avoid panic when reading device files

* Skip devices in find

* Fix root path in find
2022-04-15 13:00:33 +02:00
Vincent Ollivier
18bfaf93d7
Add a reboot command (#328)
* Add a reboot command

* Add STOP syscall

* Add ctrl-alt-del reboot keys

* Add comment to keyboard shortcut
2022-04-12 09:55:53 +02:00
Vincent Ollivier
41eaae9fbe
Fix issues with process alloc (#327)
* Fix off by one errors

* Simplify phys_addr

* Add offset to frame allocator

* Change code_addr

* Remove unknown commands

* Use allocated frames counter

* Remove debug code
2022-04-11 19:06:16 +02:00
Vincent Ollivier
946ea95ff0
Refactor network commands (#322)
* Change debug color

* Rewrite net command

* Update doc

* Add dhcp --verbose

* Remove ip and route commands

* Align command outputs

* Adjust colors

* Use system dns if available with host command

* Add error macro

* Display network error

* Use error macro

* Fix broken test

* Update dir listing color

* Update syscall doc

* Use error macro in more commands
2022-04-10 09:27:12 +02:00
Vincent Ollivier
478faa7f27
Autocomplete binary path (#324) 2022-04-10 08:39:51 +02:00
Vincent Ollivier
dd2b20f800
Handle backtab key for backward autocompletion (#321)
* Handle backtab key

* Handle backtab in editor
2022-04-09 09:24:05 +02:00
Vincent Ollivier
042367eb80 Update copyright year 2022-04-05 15:02:39 +02:00
Vincent Ollivier
3bef35b707
Upgrade smoltcp (#293)
* Upgrade smoltcp

* Fix issues

* Add back net monitor

* Update doc

* Fix net command help
2022-04-05 13:03:55 +02:00
Vincent Ollivier
e785942792
Update rust toolchain (#320)
* Update rust-toolchain file

* Remove stable features

* Update bootloader crate

* Remove toolchain from GitHub Actions

* Avoid running installer interactively

* Remove rustup component add commands
2022-04-05 12:03:31 +02:00
Vincent Ollivier
f044066f77
Fix various issues while reading files (#307)
* Define device file buffer in kernel

* Implement from u8 for Device

* Reading /dev/null result in error

* Reading an empty dir should not result in error

* Print all bytes from reading devices

* Print errors while reading devices

* Handle ^C and ^D when reading /dev/console

* Create pseudo device files for clocks

* Avoid hardcoding ^C and ^D

* Add missing comment
2022-01-25 21:42:21 +01:00
Vincent Ollivier
d06f641731
Add Box to process data (#306)
* Add Box to file handle array

* Add Box to process table

* Update comment
2022-01-24 20:35:00 +01:00
Vincent Ollivier
5243c08f59 Fix dir creation during install 2022-01-22 21:31:06 +01:00
Vincent Ollivier
9708796976
Add directory support to userspace (#303)
* Create dirs from userspace

* Add delete syscall

* Add name to FileStat

* Add offset to Dir

* Add dynamic size to dir

* Add FileStat (de)serializer

* Add ReadDir#block_index

* Add FileStat::root

* Implement FileIO#read for Dir

* Add api::fs::read_dir

* Use read_dir for list command

* Allow read /path/to/dir/ commands

* Save dir size to dir entry

* Fix return value of api::fs::create_device

* Read dir from userspace

* Add proc command

* Close file handle when creating dir

* Add /dev/null

* Remove path restriction

* Allow listing of singular file

* Update doc

* Re-export fs struc in API

* Use read_dir in shell autocomplete

* Use fs::delete in httpd

* Rename stat to info

* Update doc

* Rename attributes
2022-01-18 08:44:10 +01:00
Vincent Ollivier
e2ff0ac6c4
Improve file reading (#296)
* Move path canonicalization from API to kernel

* Add api::fs::read_exact

* Add read-bytes to lisp

* Add str function to lisp

* Rename fs::read to fs::read_to_bytes

* Rename fs::read_exact to fs::read

* Add bytes fonction to lisp

* Add progn special form to lisp

* Fix failing test
2022-01-05 19:47:28 +01:00
Vincent Ollivier
e96f250c55
Display RTC during boot (#298) 2022-01-04 10:06:58 +01:00
Vincent Ollivier
6d9e46408b
Add 2048 game (#295)
* Add 2048 game

* Fix issue with RNG API

* Fix issue with ANSI cursor movements

* Refactor code

* Fix seed

* Rename pow command to 2048
2022-01-01 18:06:22 +01:00
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
5cdf2d4db3
Refactor code (#288)
* Remove test command

* Add changes suggested by clippy

* Update crypto crates

* Fix offset in fuse driver

* Fix RNG on old CPUs

* Add disabled logging to fuse driver

* Remove deplicate code with a generator

* Fix scan of invalid path

* Rewrite fuse fs reading
2021-12-22 20:49:17 +01:00
Vincent Ollivier
20a4bd37d0
Improve ATA driver (#286)
* Improve identify data parsing

* Read status from alternate status register

* Update identify command

* Fix overflow in disk size printing

* Rewrite ATA PIO driver according to ATA-4 spec

* Add 'disk erase' command

* Fix issue with shell redirection in diskless mode

* Check for existence of passwords file during login

* Add IdentifyResponse enum

* Refactor lba match

* Disable debug output on command aborted

* Refactor code

* Pin specific compiler version

* Add spec in comment
2021-12-19 10:03:09 +01:00
Vincent Ollivier
acc4459f64
Add time module to API (#284)
* Add time module to API

* Remove rej files
2021-12-12 11:58:02 +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