Skip to content

Commit 75bbb86

Browse files
committed
Verify limine also before kernel build
1 parent 197ee98 commit 75bbb86

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

ghost.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,25 @@ SYSROOT_SYSTEM_INCLUDE=$SYSROOT_SYSTEM/include
199199
SYSROOT_SYSTEM_LIB=$SYSROOT_SYSTEM/lib
200200

201201
export PATH=$PATH:$TOOLCHAIN_BASE/bin
202+
203+
204+
#
205+
# Checks if limine is present and otherwise builds it
206+
#
207+
target_verify_limine() {
208+
pushd $TOOLCHAIN_BASE/target
209+
if [ ! -d "limine-$LIMINE_VERSION" ]; then
210+
headline "Prepare bootloader"
211+
212+
curl -LO $LIMINE_SOURCE
213+
tar -xzf limine-$LIMINE_VERSION.tar.gz
214+
215+
pushd limine-$LIMINE_VERSION
216+
./configure --enable-bios --enable-bios-cd --enable-uefi-cd --enable-uefi-x86-64
217+
make -j"$(nproc)"
218+
make install
219+
popd
220+
fi
221+
popd
222+
}
223+

kernel/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ target_all() {
145145

146146

147147
# execute targets
148+
target_verify_limine
149+
148150
for var in $TARGET; do
149151
if [[ "$var" == "all" ]]; then
150152
target_all

target/build.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,25 +98,6 @@ target_pack() {
9898
}
9999

100100

101-
#
102-
# Checks if limine is present and otherwise builds it
103-
#
104-
target_verify_limine() {
105-
if [ ! -d "limine-$LIMINE_VERSION" ]; then
106-
echo "Download limine"
107-
curl -LO https://ghostkernel.org/repository/limine/limine-$LIMINE_VERSION.tar.gz
108-
tar -xzf limine-$LIMINE_VERSION.tar.gz
109-
110-
echo "Building limine"
111-
pushd limine-$LIMINE_VERSION
112-
./configure --enable-bios --enable-bios-cd --enable-uefi-cd --enable-uefi-x86-64
113-
make -j"$(nproc)"
114-
make install
115-
popd
116-
fi
117-
}
118-
119-
120101
# execute targets
121102
target_verify_limine
122103

0 commit comments

Comments
 (0)