Skip to content

Commit ba045e6

Browse files
committed
merge
2 parents 0dcad6d + 13d5ef7 commit ba045e6

File tree

41 files changed

+540
-1178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+540
-1178
lines changed

Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: disk run
22

33
setup:
4-
rustup override set nightly-2021-05-11
4+
rustup override set nightly-2021-05-18
55
rustup update
66
cargo update
77
cargo install bootimage
@@ -11,13 +11,13 @@ setup:
1111
disk:
1212
python3 ./disk/createDisk.py
1313

14-
ferros_release: fmt
14+
ferros_release:
1515
cargo build --release
1616

1717
ferros:
1818
cargo build
1919

20-
run: fmt
20+
run:
2121
cargo run --release
2222

2323
fmt:
@@ -29,16 +29,22 @@ doc: fmt
2929
clean: fmt
3030
cargo clean
3131

32-
sound: fmt
32+
sound:
3333
cargo run -- -soundhw pcspk -drive format=raw,file=disk/disk.disk,index=2 -boot c
3434

3535
count: fmt
3636
wc -l `find src -type f` -l `find disk -type f`
3737

38-
memory: fmt
38+
memory:
3939
qemu-system-x86_64 -drive format=raw,file=target/x86_64-ferros/debug/bootimage-ferr_os.bin -drive format=raw,file=disk/disk.img,index=2 -boot c
4040

41-
memory2: fmt
41+
memory2:
4242
qemu-system-x86_64 -drive format=raw,file=target/x86_64-ferros/debug/bootimage-ferr_os.bin -drive format=raw,file=disk/disk.disk,index=2 -boot c
4343

44+
config:
45+
rustup override nightly
46+
cargo install bootimage
47+
rustup component add llvm-tools-preview
48+
rustup component ad rust-src
49+
4450
.PHONY: all run fmt doc clean count sound memory memory2 disk

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- cargo
77
- rustup
88
- qemu
9-
9+
- Python 3.8
1010
## Installation
1111
Install the dependencies.
1212

@@ -25,3 +25,8 @@ Then run these three commands in the root directory of the project:
2525
- Clean: `make clean`
2626
- Format: `make fmt`
2727
- Count the number of lines: `make count`
28+
29+
## Accessing the report
30+
- It is accessible in `/docs`
31+
- Compile the files with `make`
32+
- Find them in `/docs/artifacts`

disk/diskStructures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def part(self, i):
2626
if i < 2:
2727
return (self.lba >> (8 * (1-i))) & 255
2828
else:
29-
return ((self.index + 1) >> (8 * (3-i))) & 255
29+
return ((self.index) >> (8 * (3-i))) & 255
3030

3131

3232

@@ -88,7 +88,7 @@ def get_data(self):
8888
return perm(self.data)
8989

9090
def mode(self):
91-
if len(self) < SHORT_MODE_LIMIT * BLOCK_SIZE:
91+
if len(self) <= SHORT_MODE_LIMIT * BLOCK_SIZE:
9292
return 0
9393
else:
9494
return 1

docs/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
LATEX = xelatex
2+
BIBTEX = bibtex
13
PANDOC = pandoc
24
PANDOC-TEMPLATE = template.latex
3-
PANDOC-FLAGS = --template $(PANDOC-TEMPLATE) --listings --pdf-engine=xelatex -V geometry:a4paper -V geometry:margin=2cm
4-
PANDOC-BEAMER-FLAGS = --template $(PANDOC-TEMPLATE) --listings --slide-level 2 --pdf-engine=xelatex
5+
PANDOC-FLAGS = --template $(PANDOC-TEMPLATE) --listings --pdf-engine=$(LATEX) -V geometry:a4paper -V geometry:margin=2cm
6+
PANDOC-BEAMER-FLAGS = --listings --slide-level 2 --pdf-engine=$(LATEX)
57

6-
XELATEX = xelatex
7-
BIBTEX = bibtex
88

99
REPORT_SRC = report/report.md
1010
REPORT_PDF = report.pdf

docs/images/VFS.png

64 KB
Loading

docs/images/error.png

56.3 KB
Loading

docs/report/report.md

Lines changed: 94 additions & 29 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)