mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-08-28 00:11:15 +00:00
experimental support for loongson mips64el uefi
This commit is contained in:
@@ -36,20 +36,34 @@ export SED=$BUSYBOX_PATH/sed
|
||||
export SLEEP=$BUSYBOX_PATH/sleep
|
||||
export HEAD=$BUSYBOX_PATH/head
|
||||
|
||||
if [ -e $BUSYBOX_PATH/32h ]; then
|
||||
if [ -e $BUSYBOX_PATH/64h ]; then
|
||||
#this is arm64
|
||||
$BUSYBOX_PATH/xzminidecaa64 < $BUSYBOX_PATH/busyboxaa64.xz > $BUSYBOX_PATH/busybox
|
||||
$BUSYBOX_PATH/vtchmodaa64 $BUSYBOX_PATH/busybox
|
||||
if [ -e $BUSYBOX_PATH/busyboxaa64.xz ]; then
|
||||
export VTOY_ARCH=aarch64
|
||||
elif [ -e $BUSYBOX_PATH/busyboxm64e.xz ]; then
|
||||
export VTOY_ARCH=mips64el
|
||||
else
|
||||
if [ -e $BUSYBOX_PATH/32h ]; then
|
||||
export VTOY_ARCH=x86_64
|
||||
else
|
||||
#this is x86_64
|
||||
$BUSYBOX_PATH/xzminidec64 < $BUSYBOX_PATH/busybox64.xz > $BUSYBOX_PATH/busybox
|
||||
if [ -s $BUSYBOX_PATH/busybox ]; then
|
||||
$BUSYBOX_PATH/vtchmod64 $BUSYBOX_PATH/busybox
|
||||
else
|
||||
$BUSYBOX_PATH/xzminidec64_musl < $BUSYBOX_PATH/busybox64.xz > $BUSYBOX_PATH/busybox
|
||||
$BUSYBOX_PATH/vtchmod64_musl $BUSYBOX_PATH/busybox
|
||||
fi
|
||||
export VTOY_ARCH=i386
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $VTOY_ARCH > $VTOY_PATH/ventoy_arch
|
||||
|
||||
|
||||
if [ "$VTOY_ARCH" = "aarch64" ]; then
|
||||
$BUSYBOX_PATH/xzminidecaa64 < $BUSYBOX_PATH/busyboxaa64.xz > $BUSYBOX_PATH/busybox
|
||||
$BUSYBOX_PATH/vtchmodaa64 $BUSYBOX_PATH/busybox
|
||||
elif [ "$VTOY_ARCH" = "mips64el" ]; then
|
||||
$BUSYBOX_PATH/xzminidecm64e < $BUSYBOX_PATH/busyboxm64e.xz > $BUSYBOX_PATH/busybox
|
||||
$BUSYBOX_PATH/vtchmodm64e $BUSYBOX_PATH/busybox
|
||||
elif [ "$VTOY_ARCH" = "x86_64" ]; then
|
||||
$BUSYBOX_PATH/xzminidec64 < $BUSYBOX_PATH/busybox64.xz > $BUSYBOX_PATH/busybox
|
||||
if [ -s $BUSYBOX_PATH/busybox ]; then
|
||||
$BUSYBOX_PATH/vtchmod64 $BUSYBOX_PATH/busybox
|
||||
else
|
||||
$BUSYBOX_PATH/xzminidec64_musl < $BUSYBOX_PATH/busybox64.xz > $BUSYBOX_PATH/busybox
|
||||
$BUSYBOX_PATH/vtchmod64_musl $BUSYBOX_PATH/busybox
|
||||
fi
|
||||
else
|
||||
$BUSYBOX_PATH/xzminidec32 < $BUSYBOX_PATH/busybox32.xz > $BUSYBOX_PATH/busybox
|
||||
@@ -91,35 +105,47 @@ else
|
||||
xz -d -c loop.cpio.xz | cpio -idm 2>>$VTLOG
|
||||
fi
|
||||
|
||||
if [ -e $BUSYBOX_PATH/32h ]; then
|
||||
if [ -e $BUSYBOX_PATH/64h ]; then
|
||||
echo "Use ARM64 busybox toolkit ..." >>$VTLOG
|
||||
echo aarch64 > $VTOY_PATH/ventoy_arch
|
||||
ln -s $BUSYBOX_PATH/xzminidecaa64 $BUSYBOX_PATH/xzminidec
|
||||
ln -s $VTOY_PATH/tool/dmsetupaa64 $VTOY_PATH/tool/dmsetup
|
||||
ln -s $VTOY_PATH/tool/lunzipaa64 $VTOY_PATH/tool/lunzip
|
||||
|
||||
rm -f $VTOY_PATH/tool/lz4cat $VTOY_PATH/tool/zstdcat
|
||||
ln -s $VTOY_PATH/tool/lz4cataa64 $VTOY_PATH/tool/lz4cat
|
||||
ln -s $VTOY_PATH/tool/zstdcataa64 $VTOY_PATH/tool/zstdcat
|
||||
|
||||
else
|
||||
echo "Use x86_64 busybox toolkit ..." >>$VTLOG
|
||||
echo x86_64 > $VTOY_PATH/ventoy_arch
|
||||
ln -s $BUSYBOX_PATH/xzminidec64 $BUSYBOX_PATH/xzminidec
|
||||
ln -s $VTOY_PATH/tool/dmsetup64 $VTOY_PATH/tool/dmsetup
|
||||
ln -s $VTOY_PATH/tool/lunzip64 $VTOY_PATH/tool/lunzip
|
||||
|
||||
rm -f $VTOY_PATH/tool/lz4cat $VTOY_PATH/tool/zstdcat
|
||||
ln -s $VTOY_PATH/tool/lz4cat64 $VTOY_PATH/tool/lz4cat
|
||||
ln -s $VTOY_PATH/tool/zstdcat64 $VTOY_PATH/tool/zstdcat
|
||||
fi
|
||||
else
|
||||
|
||||
if [ "$VTOY_ARCH" = "x86_64" ]; then
|
||||
echo "Use x86_64 busybox toolkit ..." >>$VTLOG
|
||||
ln -s $BUSYBOX_PATH/xzminidec64 $BUSYBOX_PATH/xzminidec
|
||||
ln -s $VTOY_PATH/tool/dmsetup64 $VTOY_PATH/tool/dmsetup
|
||||
ln -s $VTOY_PATH/tool/lunzip64 $VTOY_PATH/tool/lunzip
|
||||
|
||||
rm -f $VTOY_PATH/tool/lz4cat $VTOY_PATH/tool/zstdcat
|
||||
ln -s $VTOY_PATH/tool/lz4cat64 $VTOY_PATH/tool/lz4cat
|
||||
ln -s $VTOY_PATH/tool/zstdcat64 $VTOY_PATH/tool/zstdcat
|
||||
elif [ "$VTOY_ARCH" = "i386" ]; then
|
||||
echo "Use i386 busybox toolkit ..." >>$VTLOG
|
||||
echo i386 > $VTOY_PATH/ventoy_arch
|
||||
ln -s $BUSYBOX_PATH/xzminidec32 $BUSYBOX_PATH/xzminidec
|
||||
ln -s $VTOY_PATH/tool/dmsetup32 $VTOY_PATH/tool/dmsetup
|
||||
ln -s $VTOY_PATH/tool/lunzip32 $VTOY_PATH/tool/lunzip
|
||||
|
||||
elif [ "$VTOY_ARCH" = "mips64el" ]; then
|
||||
echo "Use MIPS64 busybox toolkit ..." >>$VTLOG
|
||||
ln -s $BUSYBOX_PATH/xzminidecm64e $BUSYBOX_PATH/xzminidec
|
||||
ln -s $VTOY_PATH/tool/dmsetupm64e $VTOY_PATH/tool/dmsetup
|
||||
|
||||
# TBD
|
||||
#ln -s $VTOY_PATH/tool/lunzipm64e $VTOY_PATH/tool/lunzip
|
||||
|
||||
rm -f $VTOY_PATH/tool/lz4cat $VTOY_PATH/tool/zstdcat
|
||||
ln -s $VTOY_PATH/tool/lz4catm64e $VTOY_PATH/tool/lz4cat
|
||||
|
||||
# TBD
|
||||
#ln -s $VTOY_PATH/tool/zstdcataa64 $VTOY_PATH/tool/zstdcat
|
||||
|
||||
elif [ "$VTOY_ARCH" = "aarch64" ]; then
|
||||
echo "Use ARM64 busybox toolkit ..." >>$VTLOG
|
||||
ln -s $BUSYBOX_PATH/xzminidecaa64 $BUSYBOX_PATH/xzminidec
|
||||
ln -s $VTOY_PATH/tool/dmsetupaa64 $VTOY_PATH/tool/dmsetup
|
||||
ln -s $VTOY_PATH/tool/lunzipaa64 $VTOY_PATH/tool/lunzip
|
||||
|
||||
rm -f $VTOY_PATH/tool/lz4cat $VTOY_PATH/tool/zstdcat
|
||||
ln -s $VTOY_PATH/tool/lz4cataa64 $VTOY_PATH/tool/lz4cat
|
||||
ln -s $VTOY_PATH/tool/zstdcataa64 $VTOY_PATH/tool/zstdcat
|
||||
else
|
||||
echo "Unknown busybox toolkit ..." >>$VTLOG
|
||||
fi
|
||||
|
||||
rm -f *.xz
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,20 +0,0 @@
|
||||
#!/ventoy/busybox/sh
|
||||
#************************************************************************************
|
||||
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
exec /ventoy/busybox/sh
|
@@ -1,74 +0,0 @@
|
||||
#!/ventoy/busybox/sh
|
||||
#************************************************************************************
|
||||
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
echo "#### install vtoytool #####" >> $VTLOG
|
||||
|
||||
for app in ar inotifyd; do
|
||||
if [ -e $BUSYBOX_PATH/$app ]; then
|
||||
$BUSYBOX_PATH/rm -f $VTOY_PATH/tool/$app
|
||||
$BUSYBOX_PATH/ln -s $BUSYBOX_PATH/$app $VTOY_PATH/tool/$app
|
||||
else
|
||||
$BUSYBOX_PATH/ln -s $VTOY_PATH/tool/$app $BUSYBOX_PATH/$app
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if $GREP -q aarch64 $VTOY_PATH/ventoy_arch; then
|
||||
for vtdir in $(ls $VTOY_PATH/tool/vtoytool/); do
|
||||
echo "try $VTOY_PATH/tool/vtoytool/$vtdir/ ..." >> $VTLOG
|
||||
if $VTOY_PATH/tool/vtoytool/$vtdir/vtoytool_aa64 --install 2>>$VTLOG; then
|
||||
echo "vtoytool_aa64 OK" >> $VTLOG
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/vtoy_fuse_iso_aa64 $VTOY_PATH/tool/vtoy_fuse_iso
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/unsquashfs_aa64 $VTOY_PATH/tool/vtoy_unsquashfs
|
||||
else
|
||||
for vtdir in $(ls $VTOY_PATH/tool/vtoytool/); do
|
||||
echo "try $VTOY_PATH/tool/vtoytool/$vtdir/ ..." >> $VTLOG
|
||||
if $VTOY_PATH/tool/vtoytool/$vtdir/vtoytool_64 --install 2>>$VTLOG; then
|
||||
echo "vtoytool_64 OK" >> $VTLOG
|
||||
break
|
||||
fi
|
||||
|
||||
if $VTOY_PATH/tool/vtoytool/$vtdir/vtoytool_32 --install 2>>$VTLOG; then
|
||||
echo "vtoytool_32 OK" >> $VTLOG
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if $VTOY_PATH/tool/vtoy_fuse_iso_64 -t 2>>$VTLOG; then
|
||||
echo "use vtoy_fuse_iso_64" >>$VTLOG
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/vtoy_fuse_iso_64 $VTOY_PATH/tool/vtoy_fuse_iso
|
||||
else
|
||||
echo "use vtoy_fuse_iso_32" >>$VTLOG
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/vtoy_fuse_iso_32 $VTOY_PATH/tool/vtoy_fuse_iso
|
||||
fi
|
||||
|
||||
if $VTOY_PATH/tool/unsquashfs_64 -t 2>>$VTLOG; then
|
||||
echo "use unsquashfs_64" >>$VTLOG
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/unsquashfs_64 $VTOY_PATH/tool/vtoy_unsquashfs
|
||||
else
|
||||
echo "use unsquashfs_32" >>$VTLOG
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/unsquashfs_32 $VTOY_PATH/tool/vtoy_unsquashfs
|
||||
fi
|
||||
|
||||
fi
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user