Skip to content

Commit

Permalink
fix: build kernel directly instead of via hermit-playground
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Aug 9, 2024
1 parent 5ad7aff commit e2aa7f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ WORKDIR /root
ADD --link https://github.com/hermit-os/binutils.git binutils
ADD --link https://github.com/hermit-os/gcc.git gcc
ADD --link https://github.com/hermit-os/hermit-playground.git hermit
ADD --link https://github.com/hermit-os/kernel.git#hermit-c kernel
ADD --link https://github.com/hermit-os/newlib.git newlib
ADD --link https://github.com/hermit-os/pthread-embedded.git pte
ADD --link ./toolchain.sh ./toolchain.sh
Expand Down
33 changes: 10 additions & 23 deletions toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ make install-gcc
cd -
fi

if [ ! -d "tmp/hermit" ]; then
mkdir -p tmp/hermit
cd tmp/hermit
cmake ../../hermit/ \
-DTOOLCHAIN_BIN_DIR=$PREFIX/bin \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DBOOTSTRAP=true
make hermit
make hermit_rs-install
cp -r hermit/include $PREFIX/x86_64-hermit

cd kernel
cargo xtask build \
--artifact-dir . \
--arch x86_64 \
--release \
--no-default-features \
--features pci,smp,acpi,newlib,tcp,dhcpv4
export LDFLAGS_FOR_TARGET=-L$PWD
cd -
fi

if [ ! -d "tmp/newlib" ]; then
mkdir -p tmp/newlib
Expand Down Expand Up @@ -128,16 +128,3 @@ make -O $NJOBS
make install
cd -
fi

if [ ! -d "tmp/final" ]; then
mkdir -p tmp/final
cd tmp/final
cmake ../../hermit \
-DTOOLCHAIN_BIN_DIR=$PREFIX/bin \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DMTUNE=native \
-DCMAKE_BUILD_TYPE=Release
make
make install
cd -
fi

0 comments on commit e2aa7f1

Please sign in to comment.