script edits

This commit is contained in:
2026-07-14 23:15:37 -05:00
parent 7f6ef0fdc2
commit c77d9e1725
7 changed files with 31 additions and 41 deletions

View File

@@ -1,29 +1,17 @@
#!/bin/bash #!/bin/bash
TARGET_DIR="programs"
mkdir -p programs/lib if [ ! -d "$TARGET_DIR" ]; then
mkdir -p programs/bin exit 1
fi
cp rocklibc/rlibc.a programs/lib find "$TARGET_DIR" -type f \( -name "Makefile" -o -name "makefile" \) | while read -r makefile_path; do
dir_path=$(dirname "$makefile_path")
(
cd "$dir_path" || exit
cd programs
cd rocksh
make clean make clean
bear -- make make
cp rocksh.elf ../bin )
cd .. done
cd vga_text_term
make clean
bear -- make
cp vga_text_term.elf ../bin
cd ..
cd test
make clean
bear -- make
cp test.elf ../bin
cd ..
cd ..

View File

@@ -1,22 +1,23 @@
#!/bin/bash #!/bin/bash
cd rocklibc cd rocklibc
rm -rf *.o
rm -rf *.a
rm -rf *.json
make clean make clean
cd .. cd ..
cd programs cd programs
rm -rf *.elf find . -type f \( -name "Makefile" -o -name "makefile" \) | while read -r makefile_path; do
rm -rf *.o dir_path=$(dirname "$makefile_path")
rm -rf *.json (
rm -rf *.a cd "$dir_path" || exit
make clean
)
done
cd .. cd ..
make clean make clean
cd initrd cd initrd
rm -rf output rm -rf output
rm -rf *.elf rm -f bin/*.elf
cd .. cd ..

View File

@@ -44,8 +44,6 @@ void parse_multiboot_modules(uint32_t mbi_vaddr) {
uint32_t mod_count = mbi->mods_count; uint32_t mod_count = mbi->mods_count;
multiboot_module_t* mod = (multiboot_module_t*)((uint32_t)mbi->mods_addr + 0xC0000000); multiboot_module_t* mod = (multiboot_module_t*)((uint32_t)mbi->mods_addr + 0xC0000000);
kprintf("found %d mods starting @ [v]0x%x\n", mod_count, (uint32_t)mod);
for (uint32_t i = 0; i < mod_count; i++) { for (uint32_t i = 0; i < mod_count; i++) {
uint32_t start = mod[i].mod_start; uint32_t start = mod[i].mod_start;
uint32_t end = mod[i].mod_end; uint32_t end = mod[i].mod_end;
@@ -156,7 +154,6 @@ void kmain(multiboot_info* mbi) {
vfs_node_t* vga_dev = devfs->create(devfs, "tvga"); vfs_node_t* vga_dev = devfs->create(devfs, "tvga");
vga_dev->write = vga_write; vga_dev->write = vga_write;
vga_dev->seek = vga_seek;
vfs_node_t* kbd_dev = devfs->create(devfs, "kbd"); vfs_node_t* kbd_dev = devfs->create(devfs, "kbd");
kbd_dev->read = kbd_read; kbd_dev->read = kbd_read;

View File

@@ -37,4 +37,5 @@ run: $(OSNAME).iso
clean: clean:
@echo "Cleaning up build artifacts..." @echo "Cleaning up build artifacts..."
rm -rf $(OSNAME).iso $(OSNAME).bin obj isodir compile_commands.json rm -rf $(OSNAME).iso $(OSNAME).bin obj isodir compile_commands.json *.img
rm -rf .cache/

View File

@@ -18,6 +18,7 @@ $(TARGET): crt0.o main.o ../lib/rlibc.a
$(LD) $(LDFLAGS) -T linker.ld crt0.o main.o ../lib/rlibc.a -o $(TARGET) $(LD) $(LDFLAGS) -T linker.ld crt0.o main.o ../lib/rlibc.a -o $(TARGET)
clean: clean:
rm -f *.o $(TARGET) rm -f *.o $(TARGET) compile_commands.json
rm -rf .cache
.PHONY: all clean test .PHONY: all clean test

View File

@@ -18,6 +18,7 @@ $(TARGET): crt0.o main.o ../lib/rlibc.a
$(LD) $(LDFLAGS) -T linker.ld crt0.o main.o ../lib/rlibc.a -o $(TARGET) $(LD) $(LDFLAGS) -T linker.ld crt0.o main.o ../lib/rlibc.a -o $(TARGET)
clean: clean:
rm -f *.o $(TARGET) rm -f *.o $(TARGET) compile_commands.json
rm -rf .cache
.PHONY: all clean test .PHONY: all clean test

View File

@@ -18,6 +18,7 @@ $(TARGET): crt0.o main.o ../lib/rlibc.a
$(LD) $(LDFLAGS) -T linker.ld crt0.o main.o ../lib/rlibc.a -o $(TARGET) $(LD) $(LDFLAGS) -T linker.ld crt0.o main.o ../lib/rlibc.a -o $(TARGET)
clean: clean:
rm -f *.o $(TARGET) rm -f *.o $(TARGET) compile_commands.json
rm -rf .cache
.PHONY: all clean test .PHONY: all clean test