Compare commits

..
7 Commits
Author SHA1 Message Date
longpanda 582704ca5b try to support MODS img (#3771)
Ventoy CI / build (push) Canceled after 0s
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Canceled after 0s
2026-10-12 20:32:54 +08:00
longpanda 6dec44159e Optimize CI build script. 2026-10-12 19:17:09 +08:00
longpanda 193431d351 Optimize build script. 2026-10-12 18:57:14 +08:00
longpanda 8dde4cd56f Optimize build script. 2026-10-12 18:31:51 +08:00
longpanda 06037474e6 Fix the grub2 mode regression introduced in 1.1.18 (#3772)
Ventoy CI / build (push) Canceled after 0s
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Canceled after 0s
2026-10-12 14:39:52 +08:00
longpanda 24329a996a Change the new root path to absolute 2026-10-12 14:39:33 +08:00
longpanda 32df278c7a Add check before pointer free. 2026-10-12 14:37:51 +08:00
16 changed files with 293 additions and 49 deletions
+4 -2
View File
@@ -5,10 +5,12 @@ if ! [ -f ./dietlibc-0.34.tar.xz ]; then
exit 1 exit 1
fi fi
echo "======= install dietlibc =============="
rm -rf /opt/diet32 rm -rf /opt/diet32
rm -rf /opt/diet64 rm -rf /opt/diet64
tar -xvf dietlibc-0.34.tar.xz tar -xf dietlibc-0.34.tar.xz
cd dietlibc-0.34 cd dietlibc-0.34
prefix=/opt/diet64 make -j 4 prefix=/opt/diet64 make -j 4
@@ -17,7 +19,7 @@ prefix=/opt/diet64 make install 2>/dev/null
cd .. cd ..
rm -rf dietlibc-0.34 rm -rf dietlibc-0.34
tar -xvf dietlibc-0.34.tar.xz tar -xf dietlibc-0.34.tar.xz
cd dietlibc-0.34 cd dietlibc-0.34
sed "s/MYARCH:=.*/MYARCH=i386/" -i Makefile sed "s/MYARCH:=.*/MYARCH=i386/" -i Makefile
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
if ! [ -f ./musl-1.2.1.tar.gz ]; then
echo "No musl-1.2.1.tar.gz found ..."
exit 1
fi
echo "======= install musl =============="
tar xf musl-1.2.1.tar.gz
cd musl-1.2.1
./configure && make install
cd ..
rm -rf musl-1.2.1
echo ""
echo " ================ success ==============="
echo ""
+3 -1
View File
@@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
#[ -d /opt/diet64 ] || sh ./installdietlibc.sh [ -d /opt/diet64 ] || sh ./installdietlibc.sh
[ -d /usr/local/musl ] || sh ./installmusl.sh
[ -d /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu ] || tar xf /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz -C /opt [ -d /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu ] || tar xf /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz -C /opt
+5
View File
@@ -15,6 +15,10 @@ fi
# use musl-c to build for x86_64 # use musl-c to build for x86_64
# #
if [ ! -d $LIBFUSE_DIR ]; then
sh build_libfuse.sh
fi
export C_INCLUDE_PATH=$LIBFUSE_DIR/include export C_INCLUDE_PATH=$LIBFUSE_DIR/include
rm -f $name rm -f $name
@@ -30,3 +34,4 @@ fi
strip --strip-all $name strip --strip-all $name
rm -rf $LIBFUSE_DIR
+6
View File
@@ -8,6 +8,11 @@ name=vtoy_fuse_iso_aa64
export C_INCLUDE_PATH=$LIBFUSE_DIR/include export C_INCLUDE_PATH=$LIBFUSE_DIR/include
if [ ! -d $LIBFUSE_DIR ]; then
sh build_libfuse_aarch64.sh
fi
rm -f $name rm -f $name
aarch64-buildroot-linux-uclibc-gcc -static -O2 -D_FILE_OFFSET_BITS=64 vtoy_fuse_iso.c -o $name $LIBFUSE_DIR/lib/libfuse.a aarch64-buildroot-linux-uclibc-gcc -static -O2 -D_FILE_OFFSET_BITS=64 vtoy_fuse_iso.c -o $name $LIBFUSE_DIR/lib/libfuse.a
@@ -19,3 +24,4 @@ fi
aarch64-buildroot-linux-uclibc-strip --strip-all $name aarch64-buildroot-linux-uclibc-strip --strip-all $name
rm -rf $LIBFUSE_DIR
+2 -1
View File
@@ -33,8 +33,9 @@ fi
./makeconf.sh ./makeconf.sh
./configure --prefix="$LIBFUSE_DIR" CFLAGS='-specs /usr/local/musl/lib/musl-gcc.specs' ./configure --prefix="$LIBFUSE_DIR" CFLAGS='-specs /usr/local/musl/lib/musl-gcc.specs' --disable-example
make -j 16 make -j 16
make install make install
cd .. cd ..
rm -rf libfuse rm -rf libfuse
+1 -1
View File
@@ -37,7 +37,7 @@ sed '/#define *__s64/d' -i include/fuse_kernel.h
sed 's/__u64/uint64_t/g' -i include/fuse_kernel.h sed 's/__u64/uint64_t/g' -i include/fuse_kernel.h
sed 's/__s64/int64_t/g' -i include/fuse_kernel.h sed 's/__s64/int64_t/g' -i include/fuse_kernel.h
./configure --prefix="$LIBFUSE_DIR" --host=aarch64 CC=aarch64-buildroot-linux-uclibc-gcc ./configure --prefix="$LIBFUSE_DIR" --host=aarch64 --disable-example CC=aarch64-buildroot-linux-uclibc-gcc
make -j 16 make -j 16
+165 -26
View File
@@ -7,12 +7,12 @@
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of the * published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version. * License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
* *
@@ -42,6 +42,7 @@ typedef struct dmtable_entry
static int verbose = 0; static int verbose = 0;
#define debug(fmt, ...) if(verbose) printf(fmt, ##__VA_ARGS__) #define debug(fmt, ...) if(verbose) printf(fmt, ##__VA_ARGS__)
static int g_disk_rw = 0;
static int g_disk_fd = -1; static int g_disk_fd = -1;
static uint64_t g_iso_file_size; static uint64_t g_iso_file_size;
static char g_mnt_point[512]; static char g_mnt_point[512];
@@ -65,22 +66,33 @@ static int ventoy_iso_getattr(const char *path, struct stat *statinfo)
} }
else if (strcmp(path, g_iso_file_name) == 0) else if (strcmp(path, g_iso_file_name) == 0)
{ {
statinfo->st_mode = S_IFREG | 0444; if (g_disk_rw)
statinfo->st_nlink = 1; {
statinfo->st_size = g_iso_file_size; statinfo->st_mode = S_IFREG | 0644;
statinfo->st_nlink = 1;
statinfo->st_size = g_iso_file_size;
statinfo->st_blksize = 512;
statinfo->st_blocks = (g_iso_file_size + 511) / 512;
}
else
{
statinfo->st_mode = S_IFREG | 0444;
statinfo->st_nlink = 1;
statinfo->st_size = g_iso_file_size;
}
ret = 0; ret = 0;
} }
} }
return ret; return ret;
} }
static int ventoy_iso_readdir static int ventoy_iso_readdir
( (
const char *path, const char *path,
void *buf, void *buf,
fuse_fill_dir_t filler, fuse_fill_dir_t filler,
off_t offset, off_t offset,
struct fuse_file_info *file struct fuse_file_info *file
) )
{ {
@@ -106,9 +118,12 @@ static int ventoy_iso_open(const char *path, struct fuse_file_info *file)
return -ENOENT; return -ENOENT;
} }
if ((file->flags & 3) != O_RDONLY) if (g_disk_rw == 0)
{ {
return -EACCES; if ((file->flags & 3) != O_RDONLY)
{
return -EACCES;
}
} }
return 0; return 0;
@@ -121,7 +136,7 @@ static int ventoy_read_iso_sector(uint32_t sector, uint32_t num, char *buf)
uint32_t readSec = 0; uint32_t readSec = 0;
off_t offset = 0; off_t offset = 0;
dmtable_entry *entry = NULL; dmtable_entry *entry = NULL;
for (i = 0; i < g_disk_entry_num && num > 0; i++) for (i = 0; i < g_disk_entry_num && num > 0; i++)
{ {
entry = g_disk_entry_list + i; entry = g_disk_entry_list + i;
@@ -144,9 +159,39 @@ static int ventoy_read_iso_sector(uint32_t sector, uint32_t num, char *buf)
return 0; return 0;
} }
static int ventoy_write_iso_sector(uint32_t sector, uint32_t num, const char *buf)
{
uint32_t i = 0;
uint32_t leftSec = 0;
uint32_t readSec = 0;
off_t offset = 0;
dmtable_entry *entry = NULL;
for (i = 0; i < g_disk_entry_num && num > 0; i++)
{
entry = g_disk_entry_list + i;
if (sector >= entry->isoSector && sector < entry->isoSector + entry->sectorNum)
{
offset = (entry->diskSector + (sector - entry->isoSector)) * 512;
leftSec = entry->sectorNum - (sector - entry->isoSector);
readSec = (leftSec > num) ? num : leftSec;
pwrite(g_disk_fd, buf, readSec * 512, offset);
sector += readSec;
buf += readSec * 512;
num -= readSec;
}
}
return 0;
}
static int ventoy_iso_read static int ventoy_iso_read
( (
const char *path, char *buf, const char *path, char *buf,
size_t size, off_t offset, size_t size, off_t offset,
struct fuse_file_info *file struct fuse_file_info *file
) )
@@ -157,12 +202,12 @@ static int ventoy_iso_read
uint32_t number = 0; uint32_t number = 0;
size_t leftsize = 0; size_t leftsize = 0;
char secbuf[512]; char secbuf[512];
(void)file; (void)file;
if(strcmp(path, g_iso_file_name) != 0) if(strcmp(path, g_iso_file_name) != 0)
{ {
return -ENOENT; return -ENOENT;
} }
if (offset >= g_iso_file_size) if (offset >= g_iso_file_size)
@@ -174,7 +219,7 @@ static int ventoy_iso_read
{ {
size = g_iso_file_size - offset; size = g_iso_file_size - offset;
} }
leftsize = size; leftsize = size;
sector = offset / 512; sector = offset / 512;
@@ -200,8 +245,11 @@ static int ventoy_iso_read
} }
number = leftsize / 512; number = leftsize / 512;
ventoy_read_iso_sector(sector, number, buf); if (number > 0)
buf += number * 512; {
ventoy_read_iso_sector(sector, number, buf);
buf += number * 512;
}
mod = leftsize % 512; mod = leftsize % 512;
if (mod > 0) if (mod > 0)
@@ -213,12 +261,95 @@ static int ventoy_iso_read
return size; return size;
} }
static struct fuse_operations ventoy_op = static int ventoy_iso_write
(
const char *path, const char *buf,
size_t size, off_t offset,
struct fuse_file_info *file
)
{
uint32_t mod = 0;
uint32_t align = 0;
uint32_t sector = 0;
uint32_t number = 0;
size_t leftsize = 0;
char secbuf[512];
(void)file;
if (!g_disk_rw)
{
return -EROFS;
}
if(strcmp(path, g_iso_file_name) != 0)
{
return -ENOENT;
}
if (offset >= g_iso_file_size)
{
return -ENOSPC;
}
if (offset + size > g_iso_file_size)
{
size = g_iso_file_size - offset;
}
leftsize = size;
sector = offset / 512;
mod = offset % 512;
if (mod > 0)
{
align = 512 - mod;
ventoy_read_iso_sector(sector, 1, secbuf);
if (leftsize > align)
{
memcpy(secbuf + mod, buf, align);
ventoy_write_iso_sector(sector, 1, secbuf);
buf += align;
offset += align;
sector++;
leftsize -= align;
}
else
{
memcpy(secbuf + mod, buf, leftsize);
ventoy_write_iso_sector(sector, 1, secbuf);
return size;
}
}
number = leftsize / 512;
if (number > 0)
{
ventoy_write_iso_sector(sector, number, buf);
buf += number * 512;
}
mod = leftsize % 512;
if (mod > 0)
{
ventoy_read_iso_sector(sector + number, 1, secbuf);
memcpy(secbuf, buf, mod);
ventoy_write_iso_sector(sector + number, 1, secbuf);
}
return size;
}
static struct fuse_operations ventoy_op =
{ {
.getattr = ventoy_iso_getattr, .getattr = ventoy_iso_getattr,
.readdir = ventoy_iso_readdir, .readdir = ventoy_iso_readdir,
.open = ventoy_iso_open, .open = ventoy_iso_open,
.read = ventoy_iso_read, .read = ventoy_iso_read,
.write = ventoy_iso_write,
}; };
static int ventoy_parse_dmtable(const char *filename) static int ventoy_parse_dmtable(const char *filename)
@@ -238,8 +369,8 @@ static int ventoy_parse_dmtable(const char *filename)
/* read untill the last line */ /* read untill the last line */
while (fgets(line, sizeof(line), fp) && g_disk_entry_num < MAX_ENTRY_NUM) while (fgets(line, sizeof(line), fp) && g_disk_entry_num < MAX_ENTRY_NUM)
{ {
sscanf(line, "%u %u linear %s %llu", sscanf(line, "%u %u linear %s %llu",
&entry->isoSector, &entry->sectorNum, &entry->isoSector, &entry->sectorNum,
diskname, &entry->diskSector); diskname, &entry->diskSector);
g_iso_file_size += (uint64_t)entry->sectorNum * 512ULL; g_iso_file_size += (uint64_t)entry->sectorNum * 512ULL;
@@ -256,7 +387,7 @@ static int ventoy_parse_dmtable(const char *filename)
debug("iso file size: %llu disk name %s\n", g_iso_file_size, diskname); debug("iso file size: %llu disk name %s\n", g_iso_file_size, diskname);
g_disk_fd = open(diskname, O_RDONLY); g_disk_fd = open(diskname, g_disk_rw ? O_RDWR : O_RDONLY);
if (g_disk_fd < 0) if (g_disk_fd < 0)
{ {
debug("Failed to open %s\n", diskname); debug("Failed to open %s\n", diskname);
@@ -274,13 +405,13 @@ int main(int argc, char **argv)
/* Avoid to be killed by systemd */ /* Avoid to be killed by systemd */
if (access("/etc/initrd-release", F_OK) >= 0) if (access("/etc/initrd-release", F_OK) >= 0)
{ {
argv[0][0] = '@'; argv[0][0] = '@';
} }
g_iso_file_name[0] = '/'; g_iso_file_name[0] = '/';
while ((ch = getopt(argc, argv, "f:s:m:v::t::")) != -1) while ((ch = getopt(argc, argv, "f:s:m:v::t::w::")) != -1)
{ {
if (ch == 'f') if (ch == 'f')
{ {
@@ -302,6 +433,10 @@ int main(int argc, char **argv)
{ {
return 0; return 0;
} }
else if (ch == 'w') // write
{
g_disk_rw = 1;
}
} }
if (filename[0] == 0) if (filename[0] == 0)
@@ -322,6 +457,10 @@ int main(int argc, char **argv)
} }
debug("ventoy fuse iso: %s %s %s\n", filename, g_iso_file_name, g_mnt_point); debug("ventoy fuse iso: %s %s %s\n", filename, g_iso_file_name, g_mnt_point);
if (g_disk_rw)
{
debug("fuse rw mode\n");
}
g_disk_entry_list = malloc(MAX_ENTRY_NUM * sizeof(dmtable_entry)); g_disk_entry_list = malloc(MAX_ENTRY_NUM * sizeof(dmtable_entry));
if (NULL == g_disk_entry_list) if (NULL == g_disk_entry_list)
@@ -45,7 +45,7 @@ extern int g_ventoy_menu_refresh;
static grub_gfxmenu_view_t cached_view; static grub_gfxmenu_view_t cached_view;
static void static void
grub_gfxmenu_viewer_fini (void *data __attribute__ ((unused))) grub_gfxmenu_viewer_fini (void *data __attribute__ ((unused)))
{ {
} }
@@ -102,7 +102,9 @@ grub_gfxmenu_try (int entry, grub_menu_t menu, int nested)
mode_info.width, mode_info.width,
mode_info.height); mode_info.height);
} }
grub_free (full_theme_path);
if (full_theme_path)
grub_free (full_theme_path);
if (! cached_view) if (! cached_view)
{ {
@@ -149,6 +149,10 @@ grub_env_get (const char *name)
if (var->read_hook) if (var->read_hook)
return var->read_hook (var, var->value); return var->read_hook (var, var->value);
/* theme var hook will cause them return '' after unset */
if (var->value && var->value[0] == 0 && grub_strcmp(name, "theme") == 0)
return 0;
return var->value; return var->value;
} }
+1 -1
View File
@@ -1018,7 +1018,7 @@ ventoy_init_udev_auto_rules() {
} }
ventoy_new_root_dir() { ventoy_new_root_dir() {
for vroot in sysroot newroot new_root root live/aufs pup_new; do for vroot in /sysroot /newroot /new_root /root /live/aufs /pup_new; do
if [ -d $vroot/etc/udev/rules.d ]; then if [ -d $vroot/etc/udev/rules.d ]; then
echo "$vroot" echo "$vroot"
return return
+35
View File
@@ -0,0 +1,35 @@
#!/ventoy/busybox/sh
. /ventoy/hook/ventoy-hook-lib.sh
vtlog "####### $0 $* ########"
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
wait_for_usb_disk_ready
vtdiskname=$(get_ventoy_disk_name)
if [ "$vtdiskname" = "unknown" ]; then
vtlog "ventoy disk not found"
PATH=$VTPATH_OLD
exit 0
fi
mkdir -p $VTOY_PATH/mnt/fuse $VTOY_PATH/mnt/iso $VTOY_PATH/mnt/squashfs
vtoydm -p -f $VTOY_PATH/ventoy_image_map -d $vtdiskname > $VTOY_PATH/ventoy_dm_table
vtoy_fuse_iso -f $VTOY_PATH/ventoy_dm_table -m $VTOY_PATH/mnt/fuse -w
vfree=$(losetup -f)
losetup -P $vfree $VTOY_PATH/mnt/fuse/ventoy.iso
if echo $vtdiskname | egrep -q "nvme|mmc|nbd"; then
rm -f ${vtdiskname}p1
cp -a ${vfree}p1 ${vtdiskname}p1
else
rm -f ${vtdiskname}1
cp -a ${vfree}p1 ${vtdiskname}1
fi
PATH=$VTPATH_OLD
+5
View File
@@ -0,0 +1,5 @@
#!/ventoy/busybox/sh
. $VTOY_PATH/hook/ventoy-os-lib.sh
$SED "/FOUNDDEV=\"\"/a\ $BUSYBOX_PATH/sh $VTOY_PATH/loop/mods/ventoy-disk.sh" -i /init
+12 -12
View File
@@ -12,7 +12,7 @@ LOG=$VTOY_PATH/DOC/build.log
cd $VTOY_PATH/DOC cd $VTOY_PATH/DOC
cilog "prepare_env ..." cilog "prepare_env ..."
sh prepare_env.sh sh prepare_env.sh >> $LOG 2>&1
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/ 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/
@@ -44,29 +44,29 @@ sh buildedk.sh >> $LOG 2>&1 || exit 1
#cd $VTOY_PATH/vtoycli #cd $VTOY_PATH/vtoycli
#sh build.sh || exit 1 #sh build.sh || exit 1
#cd $VTOY_PATH/FUSEISO cd $VTOY_PATH/FUSEISO
#sh build_libfuse.sh sh build.sh >> $LOG 2>&1
#sh build.sh sh build_aarch64.sh >> $LOG 2>&1
# cd $VTOY_PATH/ExFAT # cd $VTOY_PATH/ExFAT
# sh buidlibfuse.sh || exit 1 # sh buidlibfuse.sh >> $LOG 2>&1 || exit 1
# sh buidexfat.sh || exit 1 # sh buidexfat.sh >> $LOG 2>&1 || exit 1
# /bin/cp -a EXFAT/shared/mkexfatfs $VTOY_PATH/INSTALL/tool/mkexfatfs_64 # /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 # /bin/cp -a EXFAT/shared/mount.exfat-fuse $VTOY_PATH/INSTALL/tool/mount.exfat-fuse_64
# cd $VTOY_PATH/SQUASHFS/SRC # cd $VTOY_PATH/SQUASHFS/SRC
# sh build_lz4.sh # sh build_lz4.sh >> $LOG 2>&1
# sh build_lzma.sh # sh build_lzma.sh >> $LOG 2>&1
# sh build_lzo.sh # sh build_lzo.sh >> $LOG 2>&1
# sh build_zstd.sh # sh build_zstd.sh >> $LOG 2>&1
# cd $VTOY_PATH/SQUASHFS/squashfs-tools-4.4/squashfs-tools # cd $VTOY_PATH/SQUASHFS/squashfs-tools-4.4/squashfs-tools
# sh build.sh # sh build.sh >> $LOG 2>&1
# cd $VTOY_PATH/VBLADE/vblade-master # cd $VTOY_PATH/VBLADE/vblade-master
# sh build.sh # sh build.sh >> $LOG 2>&1
cd $VTOY_PATH/INSTALL cd $VTOY_PATH/INSTALL
+4
View File
@@ -13,6 +13,10 @@ wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/g
wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/aarch64--uclibc--stable-2020.08-1.tar.bz2 wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/aarch64--uclibc--stable-2020.08-1.tar.bz2
wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz
wget -q -O $VTOY_PATH/ExFAT/exfat-1.3.0.zip https://codeload.github.com/relan/exfat/zip/v1.3.0
wget -q -O $VTOY_PATH/ExFAT/libfuse-fuse-2.9.9.zip https://codeload.github.com/libfuse/libfuse/zip/fuse-2.9.9
date +"%Y/%m/%d %H:%M:%S" date +"%Y/%m/%d %H:%M:%S"
echo downloading environment finish... echo downloading environment finish...
+22 -3
View File
@@ -2091,6 +2091,22 @@ function ventoy_img_ubos {
vt_unset_boot_opt vt_unset_boot_opt
} }
function ventoy_img_mods {
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
ventoy_debug_pause
vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=mods
vt_img_hook_root
set root=(vtimghd,1)
configfile (vtimghd,1)/grub2/grub.cfg
vt_img_unhook_root
vt_unset_boot_opt
}
function ventoy_img_recalbox { function ventoy_img_recalbox {
if [ $vtoy_img_max_part_end -GT $vt_chosen_size ]; then if [ $vtoy_img_max_part_end -GT $vt_chosen_size ]; then
echo -e "\nPlease extend the img file size before boot it. \n" echo -e "\nPlease extend the img file size before boot it. \n"
@@ -2435,12 +2451,15 @@ function img_common_menuentry {
elif [ -f (vtimghd,2)/loader/entries/ubos.conf ]; then elif [ -f (vtimghd,2)/loader/entries/ubos.conf ]; then
ventoy_img_ubos ventoy_img_ubos
elif [ -f (vtimghd,2)/etc/openwrt_version ]; then elif [ -f (vtimghd,2)/etc/openwrt_version ]; then
ventoy_img_openwrt ventoy_img_openwrt
elif [ -e (vtimghd,1)/mods -a -e (vtimghd,1)/tiny ]; then
echo aaa
ventoy_img_mods
else else
if [ -f (vtimghd,1)/efi/boot/mt86.png ]; then if [ -f (vtimghd,1)/efi/boot/mt86.png ]; then
if [ "$grub_platform" = "pc" ]; then if [ "$grub_platform" = "pc" ]; then
img_unsupport_tip img_unsupport_tip
fi fi
fi fi
#common chain #common chain