diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | CHANGELOG.md | 21 | ||||
| -rw-r--r-- | Makefile | 30 |
3 files changed, 46 insertions, 8 deletions
@@ -10,5 +10,8 @@ test/*.o test/test_dt test/test_initrd +tmp/ +/fbos.tar.gz + # You can generate it with Bear: `$ bear -- make`. compile_commands.json diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..aa18331 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +# State of the project by the end of SUSE Hackweek 2024 + +As part of [SUSE Hack Week +24](https://hackweek.opensuse.org/24/projects/fizzbuzz-os) I started this +project with the scope in mind to at least have something running. This is what +I have achieved by the end of this week: + +- The kernel knows how to parse the Device Tree blob to obtain the memory + location of the `initrd` blob. +- The kernel can parse the `initrd` (as referenced by the Device Tree blob) to + reference all the user-space binaries. +- The kernel can parse the ELF binary for each user-space binary in order to get + their binary entry. +- The kernel can react to the OpenSBI timer and count seconds on QEMU. +- The kernel can schedule each binary entry depending on the requirement of the + whole system. + +Hence, by the end of the week I already got a kernel that could start on QEMU +and show the whole `fizz`, `buzz`, `fizzbuzz` strings as given by user-space +processes. Even with rough edges still to be polished, my initial goals have +been met. @@ -56,13 +56,15 @@ endif ## # Paths -SRC = $(filter-out kernel/fbos.ld.S, $(wildcard kernel/*.S kernel/*.c lib/*.c)) -OBJ = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(SRC))) -LINKER = kernel/fbos.ld -KRNL = fbos -USR = usr/bin/init usr/bin/fizz usr/bin/buzz usr/bin/fizzbuzz -INIT = usr/initramfs.cpio -TESTS = test/test_dt test/test_initrd +SRC = $(filter-out kernel/fbos.ld.S, $(wildcard kernel/*.S kernel/*.c lib/*.c)) +OBJ = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(SRC))) +LINKER = kernel/fbos.ld +KRNL = fbos +USR = usr/bin/init usr/bin/fizz usr/bin/buzz usr/bin/fizzbuzz +INIT = usr/initramfs.cpio +TESTS = test/test_dt test/test_initrd +TMP = tmp/ +ARCHIVE = fbos.tar.gz LDFLAGS += -T $(LINKER) @@ -128,6 +130,18 @@ test/%: test/%.o $(Q) $(HOSTCC) -Iinclude/ $< test/lib/*.o -o $@ ## +# Produce an archive for releases. + +.PHONY: archive +archive: all + $(Q) rm -rf $(TMP) && mkdir -p $(TMP) + $(Q) cp -r usr/ $(TMP) && rm -r $(TMP)/usr/src + $(Q) cp $(KRNL) $(TMP) + $(Q) tar czf $(ARCHIVE) $(TMP) + $(Q) rm -rf $(TMP) + $(E) " TAR $(ARCHIVE)" + +## # Hacking .PHONY: qemu @@ -144,7 +158,7 @@ gdb: .PHONY: clean clean: - $(Q) rm -f $(OBJ) $(KRNL) $(LINKER) $(USR) usr/src/*.o $(INIT) test/*.o test/lib/*.o $(TESTS) + $(Q) rm -rf $(OBJ) $(KRNL) $(LINKER) $(USR) usr/src/*.o $(INIT) test/*.o test/lib/*.o $(TESTS) $(TMP) $(ARCHIVE) .PHONY: lint lint: |
