Skip to content

Commit

Permalink
Fix Caching
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtyson123 committed Dec 16, 2023
1 parent 0bf90a7 commit 87b587f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/max-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/cache@v3
with:
path: toolchain/cross_compiler
key: ${{ runner.os }}-toolchain
key: ${{ runner.os }}-cross_compiler

- name: Build toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

TARGET=i686-elf

GCC_EXEC ?= $$HOME/opt/cross/bin/$(TARGET)-gcc
GCC_EXEC ?= toolchain/cross_compiler/cross/bin/$(TARGET)-gcc
GCC_PARAMS = -ffreestanding -fno-exceptions -fno-rtti -nostdlib -Wall -Wextra

AS_EXEC ?= $$HOME/opt/cross/bin/$(TARGET)-as
AS_EXEC ?= toolchain/cross_compiler/cross/bin/$(TARGET)-as

LD_EXEC ?= $$HOME/opt/cross/bin/$(TARGET)-ld
LD_EXEC ?= toolchain/cross_compiler/cross/bin/$(TARGET)-ld

QEMU_PARAMS = -device pcnet,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::1234-:1234 \
Expand Down Expand Up @@ -167,7 +167,7 @@ debug_qemu: build
.PHONY: clean
clean:
rm -rf obj
rm -f maxOS.bin maxOS.sym maxOS.img
rm -f maxOS.bin maxOS.sym

cross_compiler:
cd toolchain && ./make_cross_compiler.sh
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Kernel Cleanup
- [x] VESA Video Mode
- [x] Kernel Boot Rewrite
- [x] Rewrite Event Handlers
- [ ] Cross Compiler
- [x] Cross-Compiler
- [ ] Better Scripts
- [ ] Network Touch Up - Fix Issues with IP, Get it working on QEMU
- [ ] DCHP protocol
Expand Down
2 changes: 1 addition & 1 deletion kernel/src/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ extern "C" void kernelMain(const multiboot_info& multibootHeader, uint32_t multi
ConsoleStream headerStream(&consoleHeader);

// Write the header
int buildCount = 494;
int buildCount = 495;
headerStream << " Max OS v0.01 [build " << buildCount << "] " ;

// Make a main console area at the top of the screen
Expand Down
Empty file modified toolchain/increment_version.sh
100644 → 100755
Empty file.
9 changes: 6 additions & 3 deletions toolchain/make_cross_compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ fi
mkdir ./cross_compiler
cd ./cross_compiler

# Export the paths
export PREFIX="$HOME/opt/cross"
# Prefix should be a bin directory in the current directory
export PREFIX="$PWD/cross"
export TARGET=i686-elf
export PATH="$PREFIX/bin:$PATH"

# Store versions in a variable
BINUTILS_VERSION=2.39
GCC_VERSION=12.2.0

# Print what we are doing
echo "Installing binutils-$BINUTILS_VERSION and gcc-$GCC_VERSION for $TARGET to $PREFIX"

# == Build Binutils ==

# Download Binutils if not already downloaded
Expand Down Expand Up @@ -57,4 +60,4 @@ make install-gcc
make install-target-libgcc

# Test
$HOME/opt/cross/bin/$TARGET-gcc --version
$PREFIX/bin/$TARGET-gcc --version

0 comments on commit 87b587f

Please sign in to comment.