From e2aa7f100a1e4b50aa0155a416a1daeda82bc01b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Fri, 9 Aug 2024 16:35:01 +0000 Subject: [PATCH] fix: build kernel directly instead of via hermit-playground MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- Dockerfile | 1 + toolchain.sh | 33 ++++++++++----------------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index d303c84..14c0abd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/toolchain.sh b/toolchain.sh index f5fb384..41ed1d2 100755 --- a/toolchain.sh +++ b/toolchain.sh @@ -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 @@ -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