From 6cd38065a59663668469e98b7e45db5526bf07fe Mon Sep 17 00:00:00 2001 From: Steven Kang Date: Wed, 16 Aug 2023 22:13:26 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20179=20=E7=89=88=E6=9C=AC=201.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 33 ++++----------- .../179 \347\211\210\346\234\254 1.0.0.md" | 38 ++++++++++++++++++ docs/others/images/snapshot.png | Bin 14071 -> 12782 bytes src/builtin/uname.c | 18 +++++++++ src/include/onix/onix.h | 4 ++ src/include/onix/syscall.h | 3 ++ src/include/onix/uname.h | 15 +++++++ src/kernel/gate.c | 4 ++ src/kernel/uname.c | 21 ++++++++++ src/lib/syscall.c | 5 +++ src/makefile | 5 +++ src/utils/cdrom.mk | 1 + 12 files changed, 122 insertions(+), 25 deletions(-) create mode 100644 "docs/13 \347\263\273\347\273\237\344\274\230\345\214\226/179 \347\211\210\346\234\254 1.0.0.md" mode change 100644 => 100755 docs/others/images/snapshot.png create mode 100644 src/builtin/uname.c create mode 100644 src/include/onix/uname.h create mode 100644 src/kernel/uname.c diff --git a/README.md b/README.md index 9989b956..14d48b80 100644 --- a/README.md +++ b/README.md @@ -8,37 +8,20 @@ - [参考文献](./docs/others/参考文献.md) -## 开发中的功能 +## 使用方法 -### 硬件驱动: +iso 文件的使用参考 [版本 1.0.0](./docs/13%20系统优化/179%20版本%201.0.0.md); -- [x] CPU 功能检测 -- [x] FPU 支持 -- [ ] ACPI:控制关机和重启 [@lihanrui2913](https://github.com/lihanrui2913) -- [x] ISA 总线 - - [x] 💾 软盘驱动 - - [x] 📣 Sound Blaster16 驱动 -- [x] 💿 ATAPI 光盘驱动 -- [x] PCI 总线枚举 -- [x] IDE 硬盘 DMA -- [x] 网卡驱动 E1000 -- [x] 网卡驱动 RTL8139 +对于 `qemu` 模拟器,需要提前配置 `tap0` 设备,用于网络: -### 文件系统 + qemu-system-i386 -m 32M -audiodev pa,id=snd -machine pcspk-audiodev=snd -device sb16,audiodev=snd -rtc base=localtime -chardev stdio,mux=on,id=com1 -serial chardev:com1 -netdev tap,id=eth0,ifname=tap0,script=no,downscript=no -device e1000,netdev=eth0 -drive file=onix_1.0.0.iso,media=cdrom,if=ide -boot d -- [x] 虚拟文件系统 -- [x] ISO 9660 文件系统 +## 开发中的功能 -### 网络协议栈 +### 硬件驱动 -- [x] Ether -- [x] ARP -- [x] IP -- [x] ICMP -- [x] UDP -- [ ] TCP -- [ ] DNS -- [ ] HTTP +- [ ] ACPI:控制关机和重启 [@lihanrui2913](https://github.com/lihanrui2913) +- [x] 网卡驱动 RTL8139 ## Pull Request 约定 diff --git "a/docs/13 \347\263\273\347\273\237\344\274\230\345\214\226/179 \347\211\210\346\234\254 1.0.0.md" "b/docs/13 \347\263\273\347\273\237\344\274\230\345\214\226/179 \347\211\210\346\234\254 1.0.0.md" new file mode 100644 index 00000000..ede31d7c --- /dev/null +++ "b/docs/13 \347\263\273\347\273\237\344\274\230\345\214\226/179 \347\211\210\346\234\254 1.0.0.md" @@ -0,0 +1,38 @@ +# 版本 1.0.0 + +哈哈!版本 1.0.0 发布!!!,发布 `onix_1.0.0.iso` 文件; + +![](../others/images/snapshot.png) + +## uname 系统调用 + +用于获取简单的系统信息; + +## 配置方式 + +## qemu + +需要提前配置 `tap0` 设备,用于网络; + +```sh +qemu-system-i386 -m 32M -audiodev pa,id=snd -machine pcspk-audiodev=snd -device sb16,audiodev=snd -rtc base=localtime -chardev stdio,mux=on,id=com1 -serial chardev:com1 -netdev tap,id=eth0,ifname=tap0,script=no,downscript=no -device e1000,netdev=eth0 -drive file=onix_1.0.0.iso,media=cdrom,if=ide -boot d +``` + +## vmware + +修改虚拟机 `.vmx` 文件,添加如下内容,另外可能需要添加一个串口设备: + +```sh +# 声霸卡 +sound.present = "TRUE" +sound.virtualDev = "sb16" +sound.opl3.enabled = "TRUE" +sound.autodetect = "TRUE" +sound.baseAddr = "0x220" +sound.dma16 = "5" +sound.dma8 = "1" +sound.irq = "5" + +# e1000 网卡 +ethernet0.virtualDev = "e1000" +``` diff --git a/docs/others/images/snapshot.png b/docs/others/images/snapshot.png old mode 100644 new mode 100755 index bfa237a6bd160a319a6f39ea9d350d61ca4e8993..64bec0d7549c1739443be90b0bff202e2dd556a0 GIT binary patch literal 12782 zcmcI~cT|&EyYH)f%6wxR$2KYgLM({%W#~W#jvo*G z2tm*eq~V3D5VW}kf;P4MuoZmsXSMAn@bT|khL(5;+O~)Pe-o6L{0jtasdu|}!|R5z z5dww7$U8XU9MSTAm|I{q1ZnB|-Eu&=qrD^@(JpRSZK=tMYAH!KCv7PUHDg8NTj$ZP zZifDzXfuD4Ybbwr6x>NlS4UFI4*>{Z&|VIbei#od9^t1gC7_D{&-||yq$CAPyxg^= z&hihGykUG<@;uHHEeV%bltU>hDoJX<<&{*?C`VQ0(~`=H%E}5#$_k3ga!PQ7k}^V7 zRdW5G6gbY)$r*9=!o~H&z+c)@u3lcZ5DE&uzP|FlD)Kl_7X>9a91aL5C@af>6>@k2 z*2}?94vUxmPT>L?kMeZ8<>iLMO7bZ>IO4p$w50&6!aHDYZIH#{*X0Bxrr_srOF>Cq zk$OAyl|e^a5#_en!5a* zilnltyt3p;3pcD2&KEDk=V*Nc`htTOT3ZTeO+`-ejGU7CHDzUlA{?QrCaZV`p{OWa zY77j)$-&FvKU<7*a&sp9Crgcu5lAfF%K?i*BQI!60jA{L+?)_jD7dPsnv%1eqmrVd zoVuc_vm6|*>L`a+b~>XDcZ92`D>(}I0{buEP~Lp;@%Ibu)(M9KG&UrJIHPz*)!D&W zO->bsa+Xt3QdN_4P;zjPb3CJ=f^yI}a|Z6@{GFPqryFn`2ao?smCuzEpr{O2Rd-Z_ zqvcR=XD2yDM^(6-qq8$yPEA9@>5QWq8l{9*k&<*mA)IlZ7zbb{ZWsp_w8AZ{iaG;5?0SPC(`=d}{{O!7U8k@IZBhb^kC!-(G+6aFY}m9l`;{w{>kP6ko|`C#m(X z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*-{2FG*yMjvP{F!@M3=y*XV-ua?t$V}4e@ z%b1@mqh70~d;##xKAl}3KJSPxsucn+4me;T-%}IZg7d1)yBHftO%Eh$N1ap7Bkd<^ zJy(EBDA7i45;E8VZ$6*EW=|aDZUP{@DQ*DkTv-;{)PiH>w6?V*KG^Zj#$S=X?zRf( z!1dAGhJtVlhnljwx|rrN93t>_UC+%O#;1o}lRL`dNy7G8-Au+gA4r-{@6bNRd~i^q z9x>@PfJLs4I#T^x2~~w9o%A$@Po!(%RCV4C-&??CVPQwLhBZT?c0|}dTM&0Y_AIif zmDqxdGax37)g=w9Jq6C_spdtAz$8HP+! z8dL}SB=b(diB6RoqsWQsZ#%+i9TNFOE~#u2116Q47&f}BKEmuz))`58>WxU0(&sG8 zw#BOt?vm2gA8MF2nKu=Vn-#LElLjEv+MTlQ1#E7LOACP2Gas7QG8~^4IXxT6l0Rf! zaLc+)eef`F>FPtkkh@Ta z66s>}g1>%=V4iV}gopKn;5p)6OcKd-S!>j1jQ^6S6acN%`} z)aDF(WxnJjD|&u;{$LfiV6wXBG1lpYzl~qSbEwFXG@{Pxo-?oE?3fYD=e9en z(+ip89a&b5HpHY?uFoiXS1Jw!KGy*DwA>@i)o!%J8=>BUJsK;#3GHsnLb$4zX%78B z!nb863^GJm5v$L&tGYReN`x2f2JFQaYC~)ZS3B4X^Vi6z;ph*`w8DsDqy6+<9*k55B~tyLwiX-7kaQkkTO^ogJ;Guh(s4~C-Lmc* zZstfz_?_7M$}ZPqKp>wK`fCk;5it2Ud9y}tiH9*=Ne diff --git a/src/builtin/uname.c b/src/builtin/uname.c new file mode 100644 index 00000000..fd5eeae8 --- /dev/null +++ b/src/builtin/uname.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include +#include + +int main(int argc, char const *argv[], char const *envp[]) +{ + utsname_t name; + int ret = uname(&name); + if (ret < 0) + { + printf(strerror(ret)); + return ret; + } + printf("%s_%s\n", name.sysname, name.version); + return 0; +} diff --git a/src/include/onix/onix.h b/src/include/onix/onix.h index 4898f555..b75dcf4f 100644 --- a/src/include/onix/onix.h +++ b/src/include/onix/onix.h @@ -4,4 +4,8 @@ // 内核魔数,用于校验错误 #define ONIX_MAGIC 0x20220205 +#ifndef ONIX_VERSION +#define ONIX_VERSION "1.0.0" +#endif + #endif \ No newline at end of file diff --git a/src/include/onix/syscall.h b/src/include/onix/syscall.h index f9897481..1f245852 100644 --- a/src/include/onix/syscall.h +++ b/src/include/onix/syscall.h @@ -46,6 +46,7 @@ typedef enum syscall_t SYS_NR_SIGNAL = 48, SYS_NR_IOCTL = 54, SYS_NR_SETPGID = 57, + SYS_NR_UNAME = 59, SYS_NR_UMASK = 60, SYS_NR_CHROOT = 61, SYS_NR_DUP2 = 63, @@ -223,4 +224,6 @@ int sendmsg(int fd, msghdr_t *msg, u32 flags); int resolv(const char *name, ip_addr_t addr); +int uname(void *buf); + #endif diff --git a/src/include/onix/uname.h b/src/include/onix/uname.h new file mode 100644 index 00000000..2c077e6c --- /dev/null +++ b/src/include/onix/uname.h @@ -0,0 +1,15 @@ +#ifndef ONIX_UNAME_H +#define ONIX_UNAME_H + +#include + +typedef struct utsname_t +{ + char sysname[9]; // 本版本操作系统的名称 + char nodename[9]; // 与实现相关的网络中节点名称 + char release[9]; // 本实现的当前发行级别 + char version[9]; // 本次发行的版本级别 + char machine[9]; // 系统运行的硬件类型名称 +} utsname_t; + +#endif \ No newline at end of file diff --git a/src/kernel/gate.c b/src/kernel/gate.c index 4bacb90b..173c6c57 100644 --- a/src/kernel/gate.c +++ b/src/kernel/gate.c @@ -102,6 +102,8 @@ extern int sys_sendmsg(); extern int sys_resolv(); +extern int sys_uname(); + void syscall_init() { for (size_t i = 0; i < SYSCALL_SIZE; i++) @@ -195,4 +197,6 @@ void syscall_init() syscall_table[SYS_NR_SHUTDOWN] = sys_shutdown; syscall_table[SYS_NR_RESOLV] = sys_resolv; + + syscall_table[SYS_NR_UNAME] = sys_uname; } diff --git a/src/kernel/uname.c b/src/kernel/uname.c new file mode 100644 index 00000000..c5c39db6 --- /dev/null +++ b/src/kernel/uname.c @@ -0,0 +1,21 @@ +#include +#include +#include +#include +#include +#include + +#define LOGK(fmt, args...) DEBUGK(fmt, ##args) + +int sys_uname(utsname_t *buf) +{ + if (!memory_access(buf, sizeof(utsname_t), true, running_task()->uid)) + return -EINVAL; + + strncpy(buf->sysname, "onix", 9); + strncpy(buf->nodename, "onix", 9); + strncpy(buf->release, "release", 9); + strncpy(buf->version, ONIX_VERSION, 9); + strncpy(buf->machine, "machine", 9); + return EOK; +} \ No newline at end of file diff --git a/src/lib/syscall.c b/src/lib/syscall.c index 832db777..facfff1d 100644 --- a/src/lib/syscall.c +++ b/src/lib/syscall.c @@ -410,3 +410,8 @@ int resolv(const char *name, ip_addr_t addr) { return _syscall2(SYS_NR_RESOLV, (u32)name, (u32)addr); } + +int uname(void *buf) +{ + return _syscall1(SYS_NR_UNAME, (u32)buf); +} diff --git a/src/makefile b/src/makefile index d68b5e3a..e92c347f 100644 --- a/src/makefile +++ b/src/makefile @@ -1,6 +1,7 @@ BUILD:=../build SRC:=. +ONIX_VERSION:=1.0.0 MULTIBOOT2:=0x18000 ENTRYPOINT:=$(shell python -c "print(f'0x{$(MULTIBOOT2) + 0x8000:x}')") @@ -15,6 +16,8 @@ CFLAGS+= -fno-stack-protector # 不需要栈保护 CFLAGS+= -Werror CFLAGS+= -DONIX # 定义 ONIX CFLAGS+= -DONIX_DEBUG # 定义 ONIX_DEBUG +CFLAGS+= -DONIX_VERSION='"$(ONIX_VERSION)"' # 定义 ONIX_VERSION + CFLAGS:=$(strip ${CFLAGS}) DEBUG:= -g @@ -73,6 +76,7 @@ BUILTIN_APPS := \ $(BUILD)/builtin/ifconfig.out \ $(BUILD)/builtin/ping.out \ $(BUILD)/builtin/httpd.out \ + $(BUILD)/builtin/uname.out \ $(BUILD)/builtin/tcp_server.out \ $(BUILD)/builtin/tcp_client.out \ $(BUILD)/builtin/tcp_nagle.out \ @@ -93,6 +97,7 @@ $(BUILD)/kernel.bin: \ $(BUILD)/kernel/start.o \ $(BUILD)/kernel/onix.o \ $(BUILD)/kernel/main.o \ + $(BUILD)/kernel/uname.o \ $(BUILD)/kernel/io.o \ $(BUILD)/kernel/mio.o \ $(BUILD)/kernel/device.o \ diff --git a/src/utils/cdrom.mk b/src/utils/cdrom.mk index b345bcec..15d92a70 100644 --- a/src/utils/cdrom.mk +++ b/src/utils/cdrom.mk @@ -28,6 +28,7 @@ $(BUILD)/kernel.iso : \ cp $(SRC)/utils/grub.cfg $(BUILD)/iso/boot/grub # 生成 iso 文件 grub-mkrescue -o $@ $(BUILD)/iso + cp $@ $(BUILD)/onix_$(ONIX_VERSION).iso .PHONY: bochsb bochsb: $(BUILD)/kernel.iso