mirror of
https://github.com/ventoy/Ventoy.git
synced 2024-12-25 06:35:59 -05:00
support for latest snapshot FreeBSD 13.0
This commit is contained in:
parent
041ccb7435
commit
6434e453b2
Binary file not shown.
@ -4,7 +4,9 @@ VENTOY_PATH=$PWD/../
|
|||||||
|
|
||||||
rm -f ventoy_unix.cpio
|
rm -f ventoy_unix.cpio
|
||||||
|
|
||||||
|
mv ./ventoy_unix/DragonFly ./
|
||||||
find ./ventoy_unix | cpio -o -H newc>ventoy_unix.cpio
|
find ./ventoy_unix | cpio -o -H newc>ventoy_unix.cpio
|
||||||
|
mv ./DragonFly ./ventoy_unix/
|
||||||
|
|
||||||
echo '======== SUCCESS ============='
|
echo '======== SUCCESS ============='
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -157,20 +157,31 @@ static void ventoy_init(char **argv_orig)
|
|||||||
vdebug("[VTOY] step 7: switch root ...\n");
|
vdebug("[VTOY] step 7: switch root ...\n");
|
||||||
error = chdir("/new_root");
|
error = chdir("/new_root");
|
||||||
if (error)
|
if (error)
|
||||||
goto chroot_failed;
|
{
|
||||||
|
printf("[VTOY] chdir /new_root failed %d\n", error);
|
||||||
|
goto chroot_failed;
|
||||||
|
}
|
||||||
|
|
||||||
error = chroot_kernel("/new_root");
|
error = chroot_kernel("/new_root");
|
||||||
if (error)
|
if (error)
|
||||||
goto chroot_failed;
|
{
|
||||||
|
printf("[VTOY] chroot_kernel /new_root failed %d\n", error);
|
||||||
|
goto chroot_failed;
|
||||||
|
}
|
||||||
|
|
||||||
error = chroot("/new_root");
|
error = chroot("/new_root");
|
||||||
if (error)
|
if (error)
|
||||||
goto chroot_failed;
|
{
|
||||||
|
printf("[VTOY] chroot /new_root failed %d\n", error);
|
||||||
|
goto chroot_failed;
|
||||||
|
}
|
||||||
|
|
||||||
|
vdebug("[VTOY] step 8: now run /sbin/init ...\n");
|
||||||
execv("/sbin/init", __DECONST(char **, argv_orig));
|
execv("/sbin/init", __DECONST(char **, argv_orig));
|
||||||
|
|
||||||
/* We failed to exec /sbin/init in the chroot, sleep forever */
|
/* We failed to exec /sbin/init in the chroot, sleep forever */
|
||||||
chroot_failed:
|
chroot_failed:
|
||||||
|
printf("[VTOY] ################### DEAD ################\n");
|
||||||
while(1) {
|
while(1) {
|
||||||
sleep(3);
|
sleep(3);
|
||||||
};
|
};
|
||||||
|
@ -173,9 +173,13 @@ int prepare_dmtable(void)
|
|||||||
fread(&desc, 1, sizeof(desc), fIn);
|
fread(&desc, 1, sizeof(desc), fIn);
|
||||||
|
|
||||||
vdebug("[VTOY] disksize:%lu part1size:%lu chunkcount:%u\n", desc.disk_size, desc.part1_size, desc.img_chunk_count);
|
vdebug("[VTOY] disksize:%lu part1size:%lu chunkcount:%u\n", desc.disk_size, desc.part1_size, desc.img_chunk_count);
|
||||||
|
|
||||||
find_disk_by_size(desc.part1_size, NULL, &count, disk);
|
for (i = 0; count <= 0 && i < 10; i++)
|
||||||
vdebug("[VTOY] find disk by part1 size: %d %s\n", count, disk);
|
{
|
||||||
|
sleep(2);
|
||||||
|
find_disk_by_size(desc.part1_size, NULL, &count, disk);
|
||||||
|
vdebug("[VTOY] find disk by part1 size, i=%d, count=%d, %s\n", i, count, disk);
|
||||||
|
}
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user