From: Minep
Date: Sat, 12 Nov 2022 20:07:19 +0000 (+0000)
Subject: update readme
X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/commitdiff_plain/1e54f1850eda97e3b41c302b72c07a1f9cc4d637?ds=sidebyside
update readme
add materials related to ISO9660 file system
---
diff --git a/README.md b/README.md
index cdeecbe..da02130 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,8 @@
ç®ä½ä¸æ | English
-# LunaixOS Project
+# LunaixOS Project
+
LunaixOS - ä¸ä¸ªç®åçï¼è¯¦ç»çï¼POSIXå
¼å®¹çï¼ä½æ¿ï¼ï¼ï¼å¸¦ææµéä¸ªäººé£æ ¼çæä½ç³»ç»ãå¼åè¿ç¨ä»¥è§é¢æç¨å½¢å¼å¨Bilibiliåç°ï¼[ãä»é¶å¼å§èªå¶æä½ç³»ç»ç³»åã](https://space.bilibili.com/12995787/channel/collectiondetail?sid=196337)ã
## å½åè¿åº¦ä»¥åæ¯æçåè½
@@ -28,7 +29,11 @@ LunaixOS - ä¸ä¸ªç®åçï¼è¯¦ç»çï¼POSIXå
¼å®¹çï¼ä½æ¿ï¼ï¼ï¼å¸¦æ
+ PCI 3.0
+ PCIe 1.1 (WIP)
+ Serial ATA AHCI
-+ æä»¶ç³»ç» (WIP)
++ æä»¶ç³»ç»
+ + èææä»¶ç³»ç»
+ + ISO9660
+ + åç
+ + Rock Ridgeæå± (WIP)
+ è¿ç¨GDB串å£è°è¯ (COM1@9600Bd)
å·²ç»æµè¯è¿çç¯å¢ï¼
@@ -40,11 +45,11 @@ LunaixOS - ä¸ä¸ªç®åçï¼è¯¦ç»çï¼POSIXå
¼å®¹çï¼ä½æ¿ï¼ï¼ï¼å¸¦æ
## ç®å½ç»æ
-| | |
-|-----|------|
-| [lunaix-os](lunaix-os/) | LunaixOSæºä»£ç |
-| [slides](slides/) | è§é¢ä¸æç¨çå¹»ç¯çåè¡¥å
ææ |
-| [reference-material](reference-material/)| æ åï¼ææ¯ææ¡£ååèæç® |
+| | |
+| ----------------------------------------- | ---------------------------- |
+| [lunaix-os](lunaix-os/) | LunaixOSæºä»£ç |
+| [slides](slides/) | è§é¢ä¸æç¨çå¹»ç¯çåè¡¥å
ææ |
+| [reference-material](reference-material/) | æ åï¼ææ¯ææ¡£ååèæç® |
## ç¼è¯ä¸æå»º
@@ -61,16 +66,16 @@ LunaixOS - ä¸ä¸ªç®åçï¼è¯¦ç»çï¼POSIXå
¼å®¹çï¼ä½æ¿ï¼ï¼ï¼å¸¦æ
åè¥æ¡ä»¶æ»¡è¶³ï¼é£ä¹å¯ä»¥ç´æ¥æ§è¡`make all`è¿è¡æå»ºï¼å®æåå¯å¨çæç`build`ç®å½ä¸æ¾å°å¯å¼å¯¼çisoã
æ¬é¡¹ç®æ¯æçmakeå½ä»¤ï¼
-| å½ä»¤ | ç¨é |
-|---|---|
-| `make all` | æå»ºéåï¼`-O2`ï¼ä½ç¦ç¨CSEç¸å
³çä¼å项 **â»** ï¼ |
-| `make instable` | æå»ºéåï¼`-O2`ï¼å¼å¯CSEç¸å
³ä¼åï¼ |
-| `make all-debug` | æå»ºéåè°è¯ç¨çéåï¼`-Og`ï¼ |
-| `make run` | 使ç¨QEMUè¿è¡buildç®å½ä¸çéå|
-| `make debug-qemu` | æå»ºå¹¶ä½¿ç¨QEMUè¿è¡è°è¯ |
-| `make debug-bochs` | æå»ºå¹¶ä½¿ç¨Bochsè¿è¡è°è¯ |
-| `make debug-qemu-vscode` | ç¨äºvscodeæ´å |
-| `make clean` | å é¤buildç®å½ |
+| å½ä»¤ | ç¨é |
+| ------------------------ | ----------------------------------------------- |
+| `make all` | æå»ºéåï¼`-O2`ï¼ä½ç¦ç¨CSEç¸å
³çä¼å项 **â»** ï¼ |
+| `make instable` | æå»ºéåï¼`-O2`ï¼å¼å¯CSEç¸å
³ä¼åï¼ |
+| `make all-debug` | æå»ºéåè°è¯ç¨çéåï¼`-Og`ï¼ |
+| `make run` | 使ç¨QEMUè¿è¡buildç®å½ä¸çéå |
+| `make debug-qemu` | æå»ºå¹¶ä½¿ç¨QEMUè¿è¡è°è¯ |
+| `make debug-bochs` | æå»ºå¹¶ä½¿ç¨Bochsè¿è¡è°è¯ |
+| `make debug-qemu-vscode` | ç¨äºvscodeæ´å |
+| `make clean` | å é¤buildç®å½ |
**â»ï¼ç±äºå¨`-O2`模å¼ä¸ï¼GCCä¼è¿è¡CSEä¼åï¼è¿å¯¼è´LunaixOSä¼åºç°ä¸äºé叏奿ªã离谱çbugï¼ä»èå½±åå°åºæ¬è¿è¡ãå
·ä½åå æå¾
è°æ¥ã**
@@ -85,6 +90,7 @@ qemu-img create -f vdi machine/disk0.vdi 128M
å¦æä½ æ³è¦ä½¿ç¨å«çç£çéåï¼éè¦ä¿®æ¹`configs/make-debug-tool`
æ¾å°è¿ä¸è¡ï¼
+
```
-drive id=disk,file="machine/disk0.vdi",if=none \
```
@@ -97,11 +103,11 @@ qemu-img create -f vdi machine/disk0.vdi 128M
ä¸é¢ååºä¸äºå¯è½ä¼åºç°çé®é¢ã
-#### é®é¢#1ï¼ QEMUä¸8042æ§å¶å¨æç¤ºæ¾ä¸å°ã
+#### é®é¢#1ï¼ QEMUä¸8042æ§å¶å¨æç¤ºæ¾ä¸å°
è¿æ¯QEMUé
ç½®ACPIæ¶çä¸ä¸ªbugï¼å¨7.0.0çä¸ä¿®å¤äºã
-#### é®é¢#2ï¼å¤è¿ç¨è¿è¡æ¶ï¼å¶å°ä¼åºç°General Protectioné误ã
+#### é®é¢#2ï¼å¤è¿ç¨è¿è¡æ¶ï¼å¶å°ä¼åºç°General Protectioné误
è¿å¾å¤§æ¦çæ¯åºç°äºç«ææ¡ä»¶ãè½ç¶æ¯ç¸å½ä¸å¯è½çãä½å¦æåºç°äºï¼è¿æ¯è¯·æissueã
@@ -120,6 +126,7 @@ qemu-img create -f vdi machine/disk0.vdi 128M
å½ç¶ï¼æ¨ä¹å¯ä»¥åè以ä¸å表æ¥äºè§£ç°é¶æ®µçLunaixOSé½ä½¿ç¨äºåªäºèµæï¼æ¬å表ä¼éçå¼åè¿åº¦æ´æ°ï¼ï¼
#### æåï¼æ åï¼ææ¯ææ¡£
+
+ [Intel 64 and IA-32 Architecture Software Developer's Manual (Full Volume Bundle)](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html)
+ [ACPI Specification (version 6.4)](https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf)
+ IBM PC/AT Technical Reference
@@ -131,31 +138,37 @@ qemu-img create -f vdi machine/disk0.vdi 128M
+ PCI Express Base Specification, Revision 1.1
+ PCI Firmware Specification, Revision 3.0
+ Serial ATA - Advanced Host Controller Interface (AHCI), Revision 1.3.1
-+ Serial ATA: HIgh Speed Serialized AT Attachment, Revision 3.2
++ Serial ATA: High Speed Serialized AT Attachment, Revision 3.2
+ SCSI Command Reference Manual
+ ATA/ATAPI Command Set - 3 (ACS-3)
++ [ECMA-119 (ISO9660)](https://www.ecma-international.org/publications-and-standards/standards/ecma-119/)
++ Rock Ridge Interchange Protocol (RRIP: IEEE P1282)
++ System Use Sharing Protocol (SUSP: IEEE P1281)
**å
责声æï¼PCIç¸å
³çæ åæç»è§£éæå½PCI-SIGææãæ¤å¤æä¾ç坿¬ä»
ä¾ä¸ªäººå¦ä¹ 使ç¨ãä»»ä½åç¨ç®çé¡»åPCI-SIGè´ä¹°ã**
#### ç论书ç±
+
+ *Computer System - A Programmer's Perspective Third Edition (CS:APP)* (Bryant, R & O'Hallaron, D)
+ *Modern Operating System* (Tanenbaum, A)
+ ãæ±ç¼è¯è¨ãï¼çç½ï¼ - ç¨äºå
¥é¨Intelè¯æ³çx86æ±ç¼ï¼å¯¹äºAT&Tè¯æ³ï¼æ¨èé
读CS:APPï¼
+ ~~ãå¾®æºåç䏿¥å£ææ¯ã - ç¨äºå¤§è´äºè§£x86æ¶æçå¾®æºä½ç³»ï¼æ´å ç»è´çäºè§£å¯ä»¥é
读Intel Manualï¼~~ ï¼å·²è¿æ¶ï¼æ¨èé
读CS:APPï¼
#### ç½ç«
+
+ [OSDev](https://wiki.osdev.org/Main_Page) - æä¸æå
«çåèï¼å¾å¤è¿æ¥äººçç»éªãä½è
主è¦ç¨äºä¸å¤èµææ¥è¯¢ä»¥åæ¶éï¼ææ¯æç®ï¼æåï¼æ åçç²ç¥æ»ç»ï¼ä»¥åå¼åç¯å¢/å·¥å
·é¾çæå»ºã
+ [FreeVGA](http://www.osdever.net/FreeVGA/home.htm) - 98å¹´çèµæºï¼å
³äºVGAç¼ç¨ææ¯çå®èç½ç«ã
+ GNU CC å GNU LD ç宿¹ææ¡£ã
+ [PCI Lookup](https://www.pcilookup.com/) - PCI设å¤ç¼å·æ¥è¯¢
#### å
¶ä»
-+ Linux Manual - ç¨äºæ¥è¯¢*nix APIçä¸äºå
·ä½è¡ä¸ºã
++ Linux Manual - ç¨äºæ¥è¯¢*nix APIçä¸äºå
·ä½è¡ä¸ºã
## éå½1ï¼æ¯æçç³»ç»è°ç¨
**Unix/Linux/POSIX**
+
1. `sleep(3)`
1. `wait(2)`
1. `waitpid(2)`
@@ -200,7 +213,7 @@ qemu-img create -f vdi machine/disk0.vdi 128M
2. `setxattr(2)`â»
2. `fgetxattr(2)`â»
2. `fsetxattr(2)`â»
-2. `ioctl(2)`â»
+2. `ioctl(2)`
2. `getpgid(2)`
2. `setpgid(2)`
@@ -209,6 +222,7 @@ qemu-img create -f vdi machine/disk0.vdi 128M
1. `yield`
2. `geterrno`
3. `realpathat`
+4. `syslog`
( **â»**ï¼è¯¥ç³»ç»è°ç¨ææªç»è¿æµè¯ )
@@ -216,9 +230,10 @@ qemu-img create -f vdi machine/disk0.vdi 128M
注æï¼gccéè¦ä»æºç æå»ºï¼å¹¶é
置为交åç¼è¯å¨ï¼å³ç®æ å¹³å°ä¸º`i686-elf`ãä½ å¯ä»¥ä½¿ç¨æ¬é¡¹ç®æä¾ç[èªå¨åèæ¬](slides/c0-workspace/gcc-build.sh)ï¼è¿å°ä¼æ¶µçgccåbinutilsæºç çä¸è½½ï¼é
ç½®åç¼è¯ï¼æ²¡ä»ä¹æ¶é´å»æç£¨èæ¬ï¼ç®ååªç¥éå¨ç¬è
çUbuntuç³»ç»ä¸å¯ä»¥è¿è¡ï¼ã
-**æ¨è**æå¨ç¼è¯ã以ä¸ç¼è¯æ¥éª¤æ¬è¿èªï¼https://wiki.osdev.org/GCC_Cross-Compiler
+**æ¨è**æå¨ç¼è¯ã以ä¸ç¼è¯æ¥éª¤æ¬è¿èªï¼
**é¦å
å®è£
æå»ºä¾èµé¡¹ï¼**
+
```bash
sudo apt update &&\
apt install -y \
@@ -232,10 +247,12 @@ sudo apt update &&\
```
**å¼å§ç¼è¯ï¼**
+
1. è·å[gcc](https://ftp.gnu.org/gnu/gcc/)å[binutils](https://ftp.gnu.org/gnu/binutils)æºç
2. è§£åï¼å¹¶å¨å级ç®å½ä¸ºgccåbinutilæ°å»ºä¸é¨çbuildæä»¶å¤¹
ç°å¨åè®¾ä½ çç®å½ç»æå¦ä¸ï¼
+
```
+ folder
+ gcc-src
@@ -247,25 +264,31 @@ sudo apt update &&\
3. ç¡®å®gccåbinutilå®è£
çä½ç½®ï¼å¹¶è®¾ç½®ç¯å¢åéï¼`export PREFIX=<å®è£
è·¯å¾>` ç¶å设置PATHï¼ `export PATH="$PREFIX/bin:$PATH"`
4. è®¾ç½®ç®æ å¹³å°ï¼`export TARGET=i686-elf`
5. è¿å
¥`binutils-build`è¿è¡é
ç½®
+
```bash
../binutils-src/configure --target="$TARGET" --prefix="$PREFIX" \
- --with-sysroot --disable-nls --disable-werror
+ --with-sysroot --disable-nls --disable-werror
```
+
ç¶å `make && make install`
6. ç¡®ä¿ä¸è¿°ç`binutils`å·²ç»æ£å¸¸å®è£
ï¼æ§è¡ï¼`which i686-elf-as`ï¼åºè¯¥ä¼ç»åºä¸ä¸ªä½äºä½ å®è£
ç®å½ä¸çè·¯å¾ã
6. è¿å
¥`gcc-build`è¿è¡é
ç½®
+
```bash
../gcc-src/configure --target="$TARGET" --prefix="$PREFIX" \
- --disable-nls --enable-languages=c,c++ --without-headers
+ --disable-nls --enable-languages=c,c++ --without-headers
```
+
ç¶åç¼è¯å®è£
ï¼å峿§è½ï¼å¤§çº¦10~20åéï¼ï¼
+
```bash
make all-gcc &&\
make all-target-libgcc &&\
make install-gcc &&\
make install-target-libgcc
```
+
8. éªè¯å®è£
ï¼æ§è¡`i686-elf-gcc -dumpmachine`ï¼è¾åºåºè¯¥ä¸ºï¼`i686-elf`
**å°æ°ç¼è¯å¥½çGCCæ°¸ä¹
æ·»å å°`PATH`ç¯å¢åé**
@@ -283,6 +306,7 @@ make all-gcc &&\
ç±äºç®åLunaixOS没æä¸ä¸ªå®å强大çå
æ ¸è¿½è¸ªåè½ãåè¥Lunaixçè¿è¡åºç°ä»»ä½é®é¢ï¼è¿è¯·æç
§ä»¥ä¸çæè¿°ï¼å¨Issueé颿ä¾è¯¦ç»çä¿¡æ¯ã
æå¥½æä¾ï¼
+
+ å¯ç¨äºå¤ç°é®é¢çæè¿°åæå¼ï¼å¦Lunaixè¿è¡å¹³å°ç软硬件é
ç½®ï¼
+ é误çç¶æè¿°
+ ï¼å¦å¯è½ï¼è¿è¡æªå¾
@@ -305,4 +329,4 @@ LunaixOSå
æ ¸éæäºæåºæ¬çGDBè¿ç¨è°è¯æå¡å¨ãå¯éè¿ä¸²å£COM
### GDBè°è¯æ³¨æäºé¡¹
-å¨è°è¯ä¸ï¼è¯·é¿å
使ç¨`info stack`ï¼`bt`æè
任使¶å **æ å±å¼ï¼Stack Unwindingï¼** æè
**æ åæº¯ï¼Stack Backtracingï¼** çæä»¤ãå¦åï¼LunaixOS徿å¯è½ä¼åºç° **ä¸å¯é¢æçè¡ä¸º** ã
\ No newline at end of file
+å¨è°è¯ä¸ï¼è¯·é¿å
使ç¨`info stack`ï¼`bt`æè
任使¶å **æ å±å¼ï¼Stack Unwindingï¼** æè
**æ åæº¯ï¼Stack Backtracingï¼** çæä»¤ãå¦åï¼LunaixOS徿å¯è½ä¼åºç° **ä¸å¯é¢æçè¡ä¸º** ã
diff --git a/docs/README_en.md b/docs/README_en.md
index 2a115ca..be03432 100644
--- a/docs/README_en.md
+++ b/docs/README_en.md
@@ -6,16 +6,16 @@
ç®ä½ä¸æ | English
-# The LunaixOS Project
+# The LunaixOS Project
+
LunaixOS - A simple (yet naive), POSIX-complaint (hopefully!), operating system from scratch. This is started for educational & learning purpose, for my online video tutorial on OS development **in Chinese**ï¼[*Do It Yourself an Operating System*](https://space.bilibili.com/12995787/channel/collectiondetail?sid=196337).
## Features
-This operating system is a macro-kernel, has its root in Intel's x86 platform and its ecosystem. It runs in protected mode and uses 4GiB addressing with two-level paging mechanism. It does not have x86_64 variant and does not support multi-core machine.
+This operating system is a macro-kernel, has its root in Intel's x86 platform and its ecosystem. It runs in protected mode and uses 4GiB addressing with two-level paging mechanism. It does not have x86_64 variant and does not support multi-core machine.
The virtual address space is divided into two parts, that is, 3GiB for user space (0x400000 ~ 0xBFFFFFFF) and 1GiB for kernel space (0xC0000000 ~ 0xFFFFFFFF). Such paradigm is a common practicing found in major operating systems, for example x86_32 version of Linux and Windows. For a more detailed arrangement of memory in LunaixOS, please refer to [LunaixOS Virtual Memory Mappings](img/lunaix-os-mem.png).
-
The following list presents all features it does have in current stage.
+ Multiboot for bootstrapping
@@ -31,9 +31,13 @@ The following list presents all features it does have in current stage.
+ PCI 3.0
+ PCIe 1.1 (WIP)
+ Serial ATA AHCI
-+ Virtual File System
++ File System
+ + Virtual File System
+ + ISO9660
+ + Original
+ + Rock Ridge Extension (WIP)
+ GDB Remote debugger (via UART)
-
+
The OS has been tested in the following environments, including both virtual and bare-metal.
+ QEMU (>=7.0.0)
@@ -101,7 +105,7 @@ To maximize the value of this section, we will provide some FAQ below that hopef
This is a issue related to misconfiguration of ACPI table in QEMU, and has been addressed in version 7.0.0.
-#### Q2: General Protection exception get triggered.
+#### Q2: General Protection exception get triggered
It is possible a race condition result from multiprogramming. This is not possible in current stage, and we however encourage you to report in case of it.
@@ -132,30 +136,35 @@ The following list also enumerated such materials the author has used:
+ PCI Express Base Specification, Revision 1.1
+ PCI Firmware Specification, Revision 3.0
+ Serial ATA - Advanced Host Controller Interface (AHCI), Revision 1.3.1
-+ Serial ATA: HIgh Speed Serialized AT Attachment, Revision 3.2
++ Serial ATA: High Speed Serialized AT Attachment, Revision 3.2
+ SCSI Command Reference Manual
+ ATA/ATAPI Command Set - 3 (ACS-3)
++ [ECMA-119 (ISO9660)](https://www.ecma-international.org/publications-and-standards/standards/ecma-119/)
++ Rock Ridge Interchange Protocol (RRIP: IEEE P1282)
++ System Use Sharing Protocol (SUSP: IEEE P1281)
**DISCLAIMER: All rights of PCI-related specification is reserved by PCI-SIG. It is provided ONLY for learning purpose. Any commercial use should purchase a copy from PCI-SIG**
#### Textbook
+
+ *Computer System - A Programmer's Perspective Third Edition* (Bryant, R & O'Hallaron, D), a.k.a. CS:APP
+ *Modern Operating System* (Tanenbaum, A)
+#### Website
-#### Website
+ [OSDev](https://wiki.osdev.org/Main_Page) - For material gathering.
+ [FreeVGA](http://www.osdever.net/FreeVGA/home.htm) - For VGA references.
+ GNU CC & LD online documentation.
+ [PCI Lookup](https://www.pcilookup.com/) - For device look up
#### Others
-+ Linux Manual - For learning the system call behavior on real machine.
++ Linux Manual - For learning the system call behavior on real machine.
## Appendix 1: Supported System Call
**Unix/Linux/POSIX**
+
1. `sleep(3)`
1. `wait(2)`
1. `waitpid(2)`
diff --git a/reference-material/ECMA-119_4th_edition_june_2019.pdf b/reference-material/ECMA-119_4th_edition_june_2019.pdf
new file mode 100644
index 0000000..935c2d9
Binary files /dev/null and b/reference-material/ECMA-119_4th_edition_june_2019.pdf differ
diff --git a/reference-material/Rockridge.pdf b/reference-material/Rockridge.pdf
new file mode 100644
index 0000000..21501ee
Binary files /dev/null and b/reference-material/Rockridge.pdf differ
diff --git a/reference-material/SUSP-112.pdf b/reference-material/SUSP-112.pdf
new file mode 100644
index 0000000..5a43434
Binary files /dev/null and b/reference-material/SUSP-112.pdf differ