Update CI

This commit is contained in:
longpanda 2021-01-29 17:54:04 +08:00
parent ee81f89911
commit 519fac719e
8 changed files with 69 additions and 22 deletions

View File

@ -33,7 +33,7 @@ rm -f $DST_PATH
rm -f $VTEFI_PATH2
rm -f $DST_PATH2
rm -f $VTEFI_PATH3
rm -f $DST_PATH3
[ -d ../../VDiskChain ] && rm -f $DST_PATH3
source ./edksetup.sh
@ -48,7 +48,7 @@ if [ -e $VTEFI_PATH ] && [ -e $VTEFI_PATH2 ] && [ -e $VTEFI_PATH3 ]; then
echo -e '\n\n====================== SUCCESS ========================\n\n'
cp -a $VTEFI_PATH $DST_PATH
cp -a $VTEFI_PATH2 $DST_PATH2
cp -a $VTEFI_PATH3 $DST_PATH3
[ -d ../../VDiskChain ] && cp -a $VTEFI_PATH3 $DST_PATH3
cd ..
else
echo -e '\n\n====================== FAILED ========================\n\n'

View File

@ -10,7 +10,12 @@ cd edk2-edk2-stable201911
make -j 4 -C BaseTools/
cd ..
echo '======== build EDK2 for i386-efi ==============='
sh ./build.sh ia32 || exit 1
echo '======== build EDK2 for arm64-efi ==============='
sh ./build.sh aa64 || exit 1
echo '======== build EDK2 for x86_64-efi ==============='
sh ./build.sh || exit 1

View File

@ -11,7 +11,7 @@ mkdir SRC
mkdir NBP
mkdir PXE
tar -xvf grub-2.04.tar.xz -C ./SRC/
tar -xf grub-2.04.tar.xz -C ./SRC/
/bin/cp -a ./MOD_SRC/grub-2.04 ./SRC/
@ -19,6 +19,7 @@ cd ./SRC/grub-2.04
# build for x86_64-efi
echo '======== build grub2 for x86_64-efi ==============='
make distclean
./autogen.sh
./configure --with-platform=efi --prefix=$VT_GRUB_DIR/INSTALL/
@ -27,6 +28,7 @@ sh install.sh uefi
#build for i386-efi
echo '======== build grub2 for i386-efi ==============='
make distclean
./autogen.sh
./configure --target=i386 --with-platform=efi --prefix=$VT_GRUB_DIR/INSTALL/
@ -36,6 +38,7 @@ sh install.sh i386efi
#build for arm64 EFI
echo '======== build grub2 for arm64-efi ==============='
PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin
make distclean
./autogen.sh
@ -54,6 +57,7 @@ sh install.sh arm64
# build for i386-pc
echo '======== build grub2 for i386-pc ==============='
./autogen.sh
./configure --prefix=$VT_GRUB_DIR/INSTALL/
make -j 16

View File

@ -67,6 +67,6 @@ if [ "$1" = "CI" ]; then
sed "s/VENTOY_VERSION=.*/VENTOY_VERSION=\"$Ver\"/" -i ./grub/grub.cfg
fi
sh ventoy_pack.sh || exit 1
sh ventoy_pack.sh $1 || exit 1
echo -e '\n============== SUCCESS ==================\n'

View File

@ -1,5 +1,11 @@
#!/bin/sh
if [ "$1" = "CI" ]; then
OPT=''
else
OPT='-a'
fi
dos2unix -q ./tool/ventoy_lib.sh
dos2unix -q ./tool/VentoyWorker.sh
@ -49,21 +55,21 @@ mount ${LOOP}p2 $tmpmnt
mkdir -p $tmpmnt/grub
# First copy grub.cfg file, to make it locate at front of the part2
cp -a ./grub/grub.cfg $tmpmnt/grub/
cp $OPT ./grub/grub.cfg $tmpmnt/grub/
ls -1 ./grub/ | grep -v 'grub\.cfg' | while read line; do
cp -a ./grub/$line $tmpmnt/grub/
cp $OPT ./grub/$line $tmpmnt/grub/
done
cp -a ./ventoy $tmpmnt/
cp -a ./EFI $tmpmnt/
cp -a ./tool/ENROLL_THIS_KEY_IN_MOKMANAGER.cer $tmpmnt/
cp $OPT ./ventoy $tmpmnt/
cp $OPT ./EFI $tmpmnt/
cp $OPT ./tool/ENROLL_THIS_KEY_IN_MOKMANAGER.cer $tmpmnt/
mkdir -p $tmpmnt/tool
cp -a ./tool/i386/mount.exfat-fuse $tmpmnt/tool/mount.exfat-fuse_i386
cp -a ./tool/x86_64/mount.exfat-fuse $tmpmnt/tool/mount.exfat-fuse_x86_64
cp -a ./tool/aarch64/mount.exfat-fuse $tmpmnt/tool/mount.exfat-fuse_aarch64
cp $OPT ./tool/i386/mount.exfat-fuse $tmpmnt/tool/mount.exfat-fuse_i386
cp $OPT ./tool/x86_64/mount.exfat-fuse $tmpmnt/tool/mount.exfat-fuse_x86_64
cp $OPT ./tool/aarch64/mount.exfat-fuse $tmpmnt/tool/mount.exfat-fuse_aarch64
rm -f $tmpmnt/grub/i386-pc/*.img
@ -79,12 +85,12 @@ dd if=$LOOP of=$tmpdir/boot/boot.img bs=1 count=512 status=none
dd if=$LOOP of=$tmpdir/boot/core.img bs=512 count=2047 skip=1 status=none
xz --check=crc32 $tmpdir/boot/core.img
cp -a ./tool $tmpdir/
cp $OPT ./tool $tmpdir/
rm -f $tmpdir/ENROLL_THIS_KEY_IN_MOKMANAGER.cer
cp -a Ventoy2Disk.sh $tmpdir/
cp -a README $tmpdir/
cp -a plugin $tmpdir/
cp -a CreatePersistentImg.sh $tmpdir/
cp $OPT Ventoy2Disk.sh $tmpdir/
cp $OPT README $tmpdir/
cp $OPT plugin $tmpdir/
cp $OPT CreatePersistentImg.sh $tmpdir/
dos2unix -q $tmpdir/Ventoy2Disk.sh
dos2unix -q $tmpdir/CreatePersistentImg.sh
@ -120,8 +126,8 @@ tar -czvf ventoy-${curver}-linux.tar.gz $tmpdir
rm -f ventoy-${curver}-windows.zip
cp -a Ventoy2Disk*.exe $tmpdir/
cp -a $LANG_DIR/languages.ini $tmpdir/ventoy/
cp $OPT Ventoy2Disk*.exe $tmpdir/
cp $OPT $LANG_DIR/languages.ini $tmpdir/ventoy/
rm -rf $tmpdir/tool
rm -f $tmpdir/*.sh
rm -f $tmpdir/README
@ -132,6 +138,11 @@ zip -r ventoy-${curver}-windows.zip $tmpdir/
rm -rf $tmpdir
cd ../LiveCD
if [ "$1" = "CI" ]; then
echo "=============== run docker_ci.sh ==============="
sh docker_ci.sh
fi
echo "=============== run livecd.sh ==============="
sh livecd.sh
cd $CurDir

View File

@ -2,7 +2,7 @@
rm -rf ipxe-3fe683e
tar -xvf ipxe_org_code/ipxe-3fe683e.tar.bz2 -C ./
tar -xf ipxe_org_code/ipxe-3fe683e.tar.bz2 -C ./
rm -rf ./ipxe-3fe683e/src/bin
rm -rf ./ipxe-3fe683e/src/drivers
@ -11,6 +11,7 @@ rm -rf ./ipxe-3fe683e/src/drivers
cd ipxe-3fe683e/src
echo '========= build IPXE =========='
sh build.sh
cd ../../

11
LiveCD/docker_ci.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
VENTOY_PATH=$PWD/../
for i in vmlinuz core.gz modules.gz; do
wget -q -P ISO/EFI/boot/ http://www.tinycorelinux.net/11.x/x86/release/distribution_files/$i
done
for i in glib2.tcz libffi.tcz liblvm2.tcz ncursesw.tcz parted.tcz readline.tcz udev-lib.tcz; do
wget -q -P VTOY/ventoy/tcz/ http://distro.ibiblio.org/tinycorelinux/11.x/x86/tcz/$i
done

View File

@ -17,10 +17,25 @@ fi
rm -rf ISO_TMP
cp -a ISO ISO_TMP
cp -a VTOY VTOY_TMP && cd VTOY_TMP
cp -a VTOY VTOY_TMP
ls -la
if ! [ -d ISO_TMP ]; then
echo "Copy ISO_TMP failed"
exit 1
fi
if ! [ -d VTOY_TMP ]; then
echo "Copy VTOY_TMP failed"
exit 1
fi
mkdir -p ISO_TMP/EFI/ventoy
cd VTOY_TMP
gcc -O2 -m32 ./ventoy/disksize.c -o ./ventoy/disksize
rm -f ./ventoy/disksize.c
find . | cpio -o -H newc | gzip -9 > ../ISO_TMP/EFI/ventoy/ventoy.gz
find . | cpio -o -H newc | gzip -c -9 > ../ISO_TMP/EFI/ventoy/ventoy.gz
cd .. && rm -rf VTOY_TMP