mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-21 05:06:31 +00:00
🔧 优化了虚拟机启动脚本
This commit is contained in:
@ -4,8 +4,6 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef GLIB_H
|
|
||||||
#define GLIB_H
|
|
||||||
|
|
||||||
//引入对bool类型的支持
|
//引入对bool类型的支持
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -102,4 +100,3 @@ static inline int strlen(char *s)
|
|||||||
return __res;
|
return __res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
@ -13,18 +13,19 @@ if [ ! "$1" == "--nobuild" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ==============检查文件是否齐全================
|
# ==============检查文件是否齐全================
|
||||||
if [ ! -x "bin/bootloader/boot.bin" ]; then
|
|
||||||
echo "bin/bootloader/boot.bin 不存在!"
|
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
|
exit
|
||||||
fi
|
fi
|
||||||
if [ ! -x "bin/bootloader/loader.bin" ]; then
|
done
|
||||||
echo "bin/bootloader/loader.bin 不存在!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
if [ ! -x "bin/boot.img" ]; then
|
|
||||||
echo "bin/boot.img 不存在!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
# ===============文件检查完毕===================
|
# ===============文件检查完毕===================
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,18 +13,17 @@ if [ ! "$1" == "--nobuild" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ==============检查文件是否齐全================
|
# ==============检查文件是否齐全================
|
||||||
if [ ! -x "bin/bootloader/boot.bin" ]; then
|
bins[0]=bin/bootloader/boot.bin
|
||||||
echo "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
|
exit
|
||||||
fi
|
fi
|
||||||
if [ ! -x "bin/bootloader/loader.bin" ]; then
|
done
|
||||||
echo "bin/bootloader/loader.bin 不存在!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
if [ ! -x "bin/boot.img" ]; then
|
|
||||||
echo "bin/boot.img 不存在!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
# ===============文件检查完毕===================
|
# ===============文件检查完毕===================
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user