Skip to content

Commit eab6de7

Browse files
committed
* Implemented a subsystem for adding new filesystem
* Implemented a subsystem for managing video drivers * Added documentation for modules * Added new scripts to create fat32 and ext2 images * Added more comments for sorfs * Added more entries to proc directory * Updated Makefile * Updated bochsrc
1 parent ed77890 commit eab6de7

File tree

32 files changed

+813
-382
lines changed

32 files changed

+813
-382
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ src/kernel/kernel.o
1111
sorfs
1212
sorhd
1313
files/uname
14+
files/game

Makefile

Lines changed: 4 additions & 4 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 -hdb fat32.img
37+
QEMUFLAGS=-cdrom $(ISOFILE) -m 4096M -boot d -hda sorhd -hdb hello.img
3838
QEMUDFLAGS= -s -S -serial file:k.log -daemonize -m 512M
3939

4040
PROJECT=SectorOS-RW4
@@ -82,12 +82,12 @@ OBJECTS= $(SRCDIR)/boot/multiboot.o \
8282
$(SRCDIR)/common/libs/fast_memcpy.o \
8383
$(SRCDIR)/common/libs/charbuffer.o \
8484
$(SRCDIR)/fs/vfs.o \
85-
$(SRCDIR)/fs/ext2.o \
8685
$(SRCDIR)/fs/devfs.o \
8786
$(SRCDIR)/fs/mount.o \
8887
$(SRCDIR)/fs/sorfs.o \
8988
$(SRCDIR)/fs/kernelfs.o \
9089
$(SRCDIR)/fs/tmpfs.o \
90+
$(SRCDIR)/fs/ext2.o \
9191
$(SRCDIR)/fs/stat.o \
9292
$(SRCDIR)/gui/draw.o \
9393
$(SRCDIR)/gui/blend.o \
@@ -155,7 +155,7 @@ $(EXECUTABLE): $(OBJECTS)
155155

156156
compile_objs: $(OBJECTS)
157157

158-
$(ISOFILE): $(IMAGEFILE) $(EXECUTABLE) $(MODULES)
158+
$(ISOFILE): $(MODULES) $(IMAGEFILE) $(EXECUTABLE)
159159
@echo '[GRUB] $@'
160160
@mkdir -p $(PROJECT)/boot/grub
161161
@cp $(EXECUTABLE) $(PROJECT)/boot/
@@ -224,7 +224,7 @@ forcerund: clean iso rund
224224
PHONY: clean kernel
225225
clean:
226226
@echo 'Cleaning the source directory...'
227-
@rm -f $(OBJECTS) $(EXECUTABLE) $(ISOFILE) sorfs $(IMAGEFILE)
227+
@rm -f $(OBJECTS) $(EXECUTABLE) $(ISOFILE) sorfs $(IMAGEFILE) $(MODULES)
228228

229229
clean_objs:
230230
@rm -f $(OBJECTS) $(SRCDIR)

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Kernel Version
1414

1515

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

1919
## Screenshots
2020
<img src="./assets/Screenshot_01.jpg"></img>

docs/bochsrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
megs: 32
1+
megs: 512
22
ata0-slave: type=cdrom, path=SEOS.iso, status=inserted
33
com1: enabled=1, mode=file, dev=serial.log
44
speaker: enabled=1, mode=sound
55
boot: cdrom
66
mouse: enabled=0
77
clock: sync=realtime
88
cpu: ips=500000000
9-
display_library: x, options="gui_debug"
9+
#display_library: x, options="gui_debug"

docs/changelog.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,14 @@
255255
* Updated screenshots
256256
* Added memory protection for some kernel functions
257257
* Added new shell commands
258-
* Updated run_vbox.sh to enable the passthrough of pc speaker
258+
* Updated run_vbox.sh to enable the passthrough of pc speaker
259+
260+
29-06-2023: 04:50 PM IST v7.23.06.5NR
261+
* Implemented a subsystem for adding new filesystem
262+
* Implemented a subsystem for managing video drivers
263+
* Added documentation for modules
264+
* Added new scripts to create fat32 and ext2 images
265+
* Added more comments for sorfs
266+
* Added more entries to proc directory
267+
* Updated Makefile
268+
* Updated bochsrc

src/common/libs/debug.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ void load_kernel_symbols(multiboot_info_t* info)
157157

158158
uint32_t j = 0;
159159

160+
char* buf = zalloc((func_num*256)+512);
161+
160162
for(uint32_t i = 0; i < func_num; i++)
161163
{
162164
if(symtab[i].st_info & STT_FUNC)
@@ -165,15 +167,14 @@ void load_kernel_symbols(multiboot_info_t* info)
165167
kernel_symbols[j].size = symtab[i].st_size;
166168
kernel_symbols[j].name = strdup(&(strtab[symtab[i].st_name]));
167169
kernel_symbols[j].type = ELF32_ST_TYPE(symtab[i].st_info);
170+
sprintf(buf+strlen(buf), "%08x %s\n", kernel_symbols[j].addr, kernel_symbols[j].name);
168171
j++;
169172
}
170-
// else if(symtab[i].st_info & STT_OBJECT)
171-
// {
172-
// kernelfs_add_variable("/proc/ksyms", strdup(&strtab[symtab[i].st_name]), symtab[i].st_value, symtab[i].st_size);
173-
// }
174173
}
175174

176175
n_kernel_symbols = j;
176+
kernelfs_addcharf("/proc", "kallsyms", buf);
177+
free(buf);
177178
}
178179

179180
symbol_t* get_kernel_symbol_by_name(char* name)

0 commit comments

Comments
 (0)