Skip to content

Commit 3bc3aaf

Browse files
committed
Major update
* Fully implemented module support * Added support for module dependencies * Added options to grub to boot OS for showing debug messages * Kernel stops all modules when crashed * Implemented dumping the stack trace with module symbols * Added new test module * Added a driver module for pc speaker * Fixed some bugs in devfs * Fixed bug with kernel exception handler which causes the exception handler to cause exception itself * Updated wallpaper.bmp * Updated screenshots * Added memory protection for some kernel functions * Added new shell commands * Updated run_vbox.sh to enable the passthrough of pc speaker
1 parent a517d3a commit 3bc3aaf

File tree

33 files changed

+909
-164
lines changed

33 files changed

+909
-164
lines changed

.github/workflows/makefile.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,9 @@ jobs:
5151
with:
5252
name: iso
5353
path: SectorOS-RW4.iso
54+
55+
- name: Upload HDIMAGE
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: hdimage
59+
path: sorhd

Makefile

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ OBJDUMP = i686-elf-objdump
3434
OBJCOPYFLAGS = --strip-debug --strip-unneeded
3535

3636
QEMU=qemu-system-i386
37-
QEMUFLAGS=-cdrom $(ISOFILE) -m 4096M -boot d -hda sorhd
37+
QEMUFLAGS=-cdrom $(ISOFILE) -m 4096M -boot d -hda sorhd -hdb fat32.img
3838
QEMUDFLAGS= -s -S -serial file:k.log -daemonize -m 512M
3939

4040
PROJECT=SectorOS-RW4
@@ -138,6 +138,9 @@ OBJECTS= $(SRCDIR)/boot/multiboot.o \
138138
$(SRCDIR)/kernel/modules.o \
139139
$(SRCDIR)/kernel/kernel.o
140140

141+
MODULES= $(FILESDIR)/test.ko \
142+
$(FILESDIR)/pcspkr.ko
143+
141144
all: kernel iso
142145

143146
kernel: $(EXECUTABLE)
@@ -152,19 +155,22 @@ $(EXECUTABLE): $(OBJECTS)
152155

153156
compile_objs: $(OBJECTS)
154157

155-
$(ISOFILE): $(IMAGEFILE) $(EXECUTABLE)
158+
$(ISOFILE): $(IMAGEFILE) $(EXECUTABLE) $(MODULES)
156159
@echo '[GRUB] $@'
157160
@mkdir -p $(PROJECT)/boot/grub
158161
@cp $(EXECUTABLE) $(PROJECT)/boot/
159-
@cp sorhd $(PROJECT)/boot/
160162
@echo 'set timeout=3' >> $(PROJECT)/boot/grub/grub.cfg
161163
@echo 'set default=0' >> $(PROJECT)/boot/grub/grub.cfg
162164
@echo 'set root=(cd)' >> $(PROJECT)/boot/grub/grub.cfg
163165
@echo '' >> $(PROJECT)/boot/grub/grub.cfg
164-
@echo 'menuentry "$(PROJECT)" { '>> $(PROJECT)/boot/grub/grub.cfg
166+
@echo 'menuentry "Boot $(PROJECT)" { '>> $(PROJECT)/boot/grub/grub.cfg
165167
@echo 'multiboot /boot/$(EXECUTABLE) --root /dev/apio0 --loglevel 2' >> $(PROJECT)/boot/grub/grub.cfg
166-
@#echo 'module /boot/sorhd' >> $(PROJECT)/boot/grub/grub.cfg
167-
@#echo 'set gfxpayload=800x600x32' >> $(PROJECT)/boot/grub/grub.cfg
168+
@echo 'set gfxpayload=800x600x32' >> $(PROJECT)/boot/grub/grub.cfg
169+
@echo 'boot' >> $(PROJECT)/boot/grub/grub.cfg
170+
@echo '}' >> $(PROJECT)/boot/grub/grub.cfg
171+
@echo 'menuentry "Boot $(PROJECT) in debug mode" { '>> $(PROJECT)/boot/grub/grub.cfg
172+
@echo 'multiboot /boot/$(EXECUTABLE) --root /dev/apio0 --loglevel 0' >> $(PROJECT)/boot/grub/grub.cfg
173+
@echo 'set gfxpayload=800x600x32' >> $(PROJECT)/boot/grub/grub.cfg
168174
@echo 'boot' >> $(PROJECT)/boot/grub/grub.cfg
169175
@echo '}' >> $(PROJECT)/boot/grub/grub.cfg
170176
@$(GRUBDIR)grub-mkrescue -o $(ISOFILE) $(PROJECT) --product-name=$(PROJECT)
@@ -192,7 +198,7 @@ $(IMAGEFILE): sorfs_compile create_test_program
192198
./sorfs -c $@ $(wildcard $(FILESDIR)/*)
193199

194200
run: $(ISOFILE)
195-
$(QEMU) $(QEMUFLAGS) -enable-kvm -cpu host -serial stdio | tee k.log
201+
$(QEMU) $(QEMUFLAGS) -enable-kvm -cpu host -serial stdio -soundhw pcspk | tee k.log
196202

197203
runnkvm: $(ISOFILE)
198204
$(QEMU) $(QEMUFLAGS) -serial stdio | tee k.log
@@ -250,8 +256,13 @@ stopTAP1:
250256
@sudo ifconfig $(NETWORK_INTERFACE) up
251257
@sudo dhclient -v $(NETWORK_INTERFACE)
252258

253-
modules:
254-
$(CC) -c -g -pedantic -ffreestanding -static -I$(INCLUDEDIR) $(SRCDIR)/modules/test.c -o files/test.ko
259+
modules: $(MODULES)
260+
261+
$(FILESDIR)/%.ko : $(SRCDIR)/modules/%.c
262+
$(CC) -c -g -pedantic -ffreestanding -static -I$(INCLUDEDIR) -o $@ $<
263+
264+
moduleclean:
265+
rm $(MODULES)
255266

256267
runnet: $(ISOFILE) setupTAP
257268
sudo $(QEMU) $(QEMUFLAGS) -accel kvm -serial stdio -netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no -device rtl8139,netdev=mynet0,mac=52:55:00:d1:55:01 | tee k.log

docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Kernel Version
1414

1515

1616
## 🧱 Kernel
17-
The current kernel version for SectorOS-RW4 is v6.23.06.3NR.<br>
17+
The current kernel version for SectorOS-RW4 is v7.23.06.4NR.<br>
1818

1919
## Screenshots
20-
<img src="./assets/Screenshot_01.png"></img>
21-
<img src="./assets/Screenshot_02.png"></img>
22-
<img src="./assets/Screenshot_03.png"></img>
20+
<img src="./assets/Screenshot_01.jpg"></img>
21+
<img src="./assets/Screenshot_02.jpg"></img>
22+
<img src="./assets/Screenshot_03.jpg"></img>
2323

2424
## ⚙️ Build Steps
2525

docs/assets/Screenshot_01.jpg

379 KB
Loading

docs/assets/Screenshot_01.png

-493 KB
Binary file not shown.

docs/assets/Screenshot_02.jpg

733 KB
Loading

docs/assets/Screenshot_02.png

-422 KB
Binary file not shown.

docs/assets/Screenshot_03.jpg

514 KB
Loading

docs/assets/Screenshot_03.png

-428 KB
Binary file not shown.

docs/changelog.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,20 @@
239239

240240
22-06-2023: 07:56 PM IST v6.23.06.3NR
241241
* Added more information when kernel crashes
242-
* Updated the Github Actions
242+
* Updated the Github Actions
243+
244+
27-06-2023: 04:44 PM IST v7.23.06.4NR
245+
* Fully implemented module support
246+
* Added support for module dependencies
247+
* Added options to grub to boot OS for showing debug messages
248+
* Kernel stops all modules when crashed
249+
* Implemented dumping the stack trace with module symbols
250+
* Added new test module
251+
* Added a driver module for pc speaker
252+
* Fixed some bugs in devfs
253+
* Fixed bug with kernel exception handler which causes the exception handler to cause exception itself
254+
* Updated wallpaper.bmp
255+
* Updated screenshots
256+
* Added memory protection for some kernel functions
257+
* Added new shell commands
258+
* Updated run_vbox.sh to enable the passthrough of pc speaker

0 commit comments

Comments
 (0)