From 1b8b0252699d417f1677527a69450660d304b756 Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Thu, 21 Dec 2023 18:19:30 -0600 Subject: fixed some typos --- .bochsrc | 2 +- .gitignore | 4 ++-- Makefile | 2 +- README.md | 4 +++- configure.sh | 34 ++++++++++++++++++++++++++++++++++ out/isodir/boot/grub/grub.cfg | 2 +- 6 files changed, 42 insertions(+), 6 deletions(-) create mode 100755 configure.sh diff --git a/.bochsrc b/.bochsrc index df42d47..f0ebff1 100644 --- a/.bochsrc +++ b/.bochsrc @@ -11,7 +11,7 @@ boot: cdrom # no floppyb ata0: enabled=true, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14 ata0-master: type=none -ata0-slave: type=cdrom, path="out/myos.iso", status=inserted, model="Generic 1234", biosdetect=auto +ata0-slave: type=cdrom, path="out/gftos.iso", status=inserted, model="Generic 1234", biosdetect=auto ata1: enabled=true, ioaddr1=0x170, ioaddr2=0x370, irq=15 ata1-master: type=none ata1-slave: type=none diff --git a/.gitignore b/.gitignore index 2b673ac..5d57669 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ build/ -out/myos.iso -out/isodir/boot/myos.bin +out/*.iso +out/isodir/boot/*.bin diff --git a/Makefile b/Makefile index 8453c31..c2d043c 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ run: all # Generate logfiles using bochs test: all mkdir -p $(BOCHS) - bochs -q -rc $(TEST) + bochs -f .bochsrc -q -rc $(TEST) .PHONY: clean # Clean the build environment diff --git a/README.md b/README.md index ddfbc57..d9d7ca5 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ export TARGET=i686-elf export PATH="$PREFIX/bin:$PATH" cd $HOME/.local/src +curl https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz | tar -xJ mkdir build-binutils cd build-binutils -curl https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz | tar -xJ ../binutils-2.41/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror make make install @@ -31,3 +31,5 @@ make install-target-libgcc export PATH="$HOME/.local/opt/cross/bin:$PATH" ``` + +You can also run `./configure.sh`, which contains the above commands. diff --git a/configure.sh b/configure.sh new file mode 100755 index 0000000..a669fa7 --- /dev/null +++ b/configure.sh @@ -0,0 +1,34 @@ +mkdir -p $HOME/.local/opt +mkdir -p $HOME/.local/opt/cross +mkdir -p $HOME/.local/src +export PREFIX="$HOME/.local/opt/cross" +export TARGET=i686-elf +export PATH="$PREFIX/bin:$PATH" + +cd $HOME/.local/src +curl https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz | tar -xJ + +mkdir build-binutils +cd build-binutils +../binutils-2.41/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror + +make -j8 +make install + +cd $HOME/.local/src +command -v -- $TARGET-as || echo $TARGET-as is not in the PATH +curl https://ftp.gnu.org/gnu/gcc/gcc-13.2.0/gcc-13.2.0.tar.xz | tar -xJ +cd gcc-13.2.0 +./contrib/download_prerequisites +cd .. + +mkdir build-gcc +cd build-gcc +../gcc-13.2.0/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers + +make -j8 all-gcc +make -j8 all-target-libgcc +make install-gcc +make install-target-libgcc + +export PATH="$HOME/.local/opt/cross/bin:$PATH" diff --git a/out/isodir/boot/grub/grub.cfg b/out/isodir/boot/grub/grub.cfg index ad2ba5e..3bc68b8 100644 --- a/out/isodir/boot/grub/grub.cfg +++ b/out/isodir/boot/grub/grub.cfg @@ -2,6 +2,6 @@ set timeout=0 set default=0 # Set the default menu entry menuentry "gftos" { - multiboot /boot/myos.bin + multiboot /boot/gftos.bin boot } -- cgit v1.2.3