mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 20:36:31 +00:00
🔧 优化了虚拟机启动脚本
This commit is contained in:
@ -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
|
@ -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
|
||||
|
||||
# ===============文件检查完毕===================
|
||||
|
||||
|
||||
|
@ -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
|
||||
# ===============文件检查完毕===================
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user