Ventoy/INSTALL/all_in_one.sh

82 lines
1.7 KiB
Bash
Raw Permalink Normal View History

#!/bin/sh
VTOY_PATH=$PWD/..
2021-04-01 22:08:23 -04:00
cilog() {
datestr=$(date +"%Y/%m/%d %H:%M:%S")
echo "$datestr $*"
}
2021-02-02 09:26:23 -05:00
LOG=$VTOY_PATH/DOC/build.log
[ -f $LOG ] && rm -f $LOG
2021-02-02 07:02:25 -05:00
cd $VTOY_PATH/DOC
2021-04-01 22:08:23 -04:00
cilog "prepare_env ..."
2021-02-02 07:30:25 -05:00
sh prepare_env.sh
2021-01-29 00:02:51 -05:00
export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:/opt/aarch64--uclibc--stable-2020.08-1/bin:/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/:/opt/mips64el-linux-musl-gcc730/bin/
2021-01-29 00:02:51 -05:00
2021-04-01 22:08:23 -04:00
cilog "build grub2 ..."
cd $VTOY_PATH/GRUB2
2021-04-01 22:08:23 -04:00
sh buildgrub.sh >> $LOG 2>&1 || exit 1
2021-04-01 22:08:23 -04:00
cilog "build ipxe ..."
cd $VTOY_PATH/IPXE
2021-02-02 09:26:23 -05:00
sh buildipxe.sh >> $LOG 2>&1 || exit 1
2021-04-01 22:08:23 -04:00
cilog "build edk2 ..."
cd $VTOY_PATH/EDK2
2021-02-02 09:26:23 -05:00
sh buildedk.sh >> $LOG 2>&1 || exit 1
2021-01-28 21:11:30 -05:00
#
# We almost rarely modifiy these code, so no need to build them everytime
# If you want to rebuild them, just uncomment them.
#
2021-01-28 21:11:30 -05:00
#cd $VTOY_PATH/VtoyTool
#sh build.sh || exit 1
2021-11-12 06:56:05 -05:00
#cd $VTOY_PATH/vtoycli/fat_io_lib
2021-01-28 21:11:30 -05:00
#sh buildlib.sh
2021-11-12 06:56:05 -05:00
#cd $VTOY_PATH/vtoycli
2021-01-28 21:11:30 -05:00
#sh build.sh || exit 1
#cd $VTOY_PATH/FUSEISO
#sh build_libfuse.sh
#sh build.sh
2021-01-22 02:33:06 -05:00
# cd $VTOY_PATH/ExFAT
# sh buidlibfuse.sh || exit 1
# sh buidexfat.sh || exit 1
# /bin/cp -a EXFAT/shared/mkexfatfs $VTOY_PATH/INSTALL/tool/mkexfatfs_64
# /bin/cp -a EXFAT/shared/mount.exfat-fuse $VTOY_PATH/INSTALL/tool/mount.exfat-fuse_64
2021-01-22 02:33:06 -05:00
# cd $VTOY_PATH/SQUASHFS/SRC
# sh build_lz4.sh
# sh build_lzma.sh
# sh build_lzo.sh
# sh build_zstd.sh
2021-01-22 02:33:06 -05:00
# cd $VTOY_PATH/SQUASHFS/squashfs-tools-4.4/squashfs-tools
# sh build.sh
2021-01-22 02:33:06 -05:00
# cd $VTOY_PATH/VBLADE/vblade-master
# sh build.sh
cd $VTOY_PATH/INSTALL
2021-01-29 00:02:51 -05:00
if [ "$1" = "CI" ]; then
Ver=$(date +%m%d%H%M)
2021-01-29 01:26:02 -05:00
sed "s/VENTOY_VERSION=.*/VENTOY_VERSION=\"$Ver\"/" -i ./grub/grub.cfg
2021-01-29 00:02:51 -05:00
fi
2021-04-01 22:08:23 -04:00
cilog "packing ventoy-$Ver ..."
2021-02-02 09:26:23 -05:00
sh ventoy_pack.sh $1 >> $LOG 2>&1 || exit 1
echo -e '\n============== SUCCESS ==================\n'