🔧 优化了虚拟机启动脚本

This commit is contained in:
fslongjin
2022-01-25 13:33:36 +08:00
parent d0cd77799c
commit 14374d5faf
3 changed files with 22 additions and 25 deletions

View File

@ -4,8 +4,6 @@
//
#pragma once
#ifndef GLIB_H
#define GLIB_H
//引入对bool类型的支持
#include <stdbool.h>
@ -102,4 +100,3 @@ static inline int strlen(char *s)
return __res;
}
#endif

View File

@ -13,18 +13,19 @@ if [ ! "$1" == "--nobuild" ]; then
fi
# ==============检查文件是否齐全================
if [ ! -x "bin/bootloader/boot.bin" ]; then
echo "bin/bootloader/boot.bin 不存在!"
exit
fi
if [ ! -x "bin/bootloader/loader.bin" ]; then
echo "bin/bootloader/loader.bin 不存在!"
exit
fi
if [ ! -x "bin/boot.img" ]; then
echo "bin/boot.img 不存在!"
bins[0]=bin/bootloader/boot.bin
bins[1]=bin/bootloader/loader.bin
bins[2]=bin/boot.img
bins[3]=bin/kernel/kernel.bin
for file in ${bins[*]};do
if [ ! -x $file ]; then
echo "$file 不存在!"
exit
fi
done
# ===============文件检查完毕===================

View File

@ -13,18 +13,17 @@ if [ ! "$1" == "--nobuild" ]; then
fi
# ==============检查文件是否齐全================
if [ ! -x "bin/bootloader/boot.bin" ]; then
echo "bin/bootloader/boot.bin 不存在!"
exit
fi
if [ ! -x "bin/bootloader/loader.bin" ]; then
echo "bin/bootloader/loader.bin 不存在!"
exit
fi
if [ ! -x "bin/boot.img" ]; then
echo "bin/boot.img 不存在!"
bins[0]=bin/bootloader/boot.bin
bins[1]=bin/bootloader/loader.bin
bins[2]=bin/boot.img
bins[3]=bin/kernel/kernel.bin
for file in ${bins[*]};do
if [ ! -x $file ]; then
echo "$file 不存在!"
exit
fi
done
# ===============文件检查完毕===================