From e26cc5e5e2ce6fe5c0fbb7a4ed83e8d81fa2745f Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 21 Jul 2020 21:45:36 +0200 Subject: Yaas. May or may not work. This is actually very dumb. I thought about a fix for the 0x200 inode 16bit overflow since a few days but then I just decided to use a static inode (5) for the kernel. It's way simpler to implement so I'm staying with this for a while (although specific inodes don't work with genext2fs and co AFAIK). --- run | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'run') diff --git a/run b/run index 8a53630..3a0d588 100755 --- a/run +++ b/run @@ -17,33 +17,6 @@ qemu_with_flags() { fi } -make_genext2fs() { - if [ "$(genext2fs -V | awk '{print $2}')" = "1.4.2" ]; then - echo "genext2fs is already the newest version" - else - if [ "$no_ask" != "-y" ]; then - printf "Melvix requires the newest genext2fs version, would you like to install it? [y/n] " - read -r answer - fi - if [ "$answer" != "${answer#[Yy]}" ] || [ "$no_ask" = "-y" ]; then - echo "Building genext2fs..." - git clone --quiet https://github.com/bestouff/genext2fs.git >/dev/null - cd genext2fs >/dev/null - git checkout --quiet 000e369 >/dev/null - mv README.md README >/dev/null - touch ChangeLog >/dev/null - bash autogen.sh >/dev/null - ./configure >/dev/null - sudo make install >/dev/null - cd .. >/dev/null - rm -rf genext2fs >/dev/null - echo "Success!" - else - echo "This probably won't compile..." - fi - fi -} - make_cross() { if [ ! -d "./cross/" ]; then # Create directory @@ -89,7 +62,7 @@ make_cross() { } make_build() { - rm -rf disk/bin/ disk/ + rm -rf disk/bin/ disk/ build/disk.img mkdir -p build/ disk/bin/ disk/ echo "Building..." @@ -106,9 +79,10 @@ make_build() { cp build/melvix.bin disk/ # Create disk image - make_genext2fs - /usr/local/bin/genext2fs -B 1024 -d disk/ -U -N 1024 -b 65536 build/disk.img + dd if=/dev/zero of=build/disk.img bs=1k count=16k + sudo mke2fs build/disk.img dd if=disk/boot.bin of=build/disk.img conv=notrunc + ./ext2util/ext2util -x build/disk.img -wf disk/melvix.bin -i 5 printf "Build finshed successfully!\n\n" } @@ -118,9 +92,7 @@ make_test() { } make_debug() { - qemu_with_flags -display none -hdb build/disk.img -s -S & - gdb "$(pwd)"/build/melvix.bin -ex 'target remote localhost:1234' - killall qemu-system-i386 + qemu_with_flags -hdb build/disk.img -s -S } make_disasm() { -- cgit v1.2.3