From: longpanda Date: Fri, 1 Jan 2021 14:37:22 +0000 (+0800) Subject: support for latest snapshot FreeBSD 13.0 X-Git-Tag: v1.0.32~2 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/commitdiff_plain/6434e453b2553be864fdcb29b4d07677b4fb7aab support for latest snapshot FreeBSD 13.0 --- diff --git a/INSTALL/ventoy/ventoy_unix.cpio b/INSTALL/ventoy/ventoy_unix.cpio index f4cf2e1..ff97b5e 100644 Binary files a/INSTALL/ventoy/ventoy_unix.cpio and b/INSTALL/ventoy/ventoy_unix.cpio differ diff --git a/Unix/pack_unix.sh b/Unix/pack_unix.sh index 24048cf..1515d8c 100644 --- a/Unix/pack_unix.sh +++ b/Unix/pack_unix.sh @@ -4,7 +4,9 @@ VENTOY_PATH=$PWD/../ rm -f ventoy_unix.cpio +mv ./ventoy_unix/DragonFly ./ find ./ventoy_unix | cpio -o -H newc>ventoy_unix.cpio +mv ./DragonFly ./ventoy_unix/ echo '======== SUCCESS =============' diff --git a/Unix/ventoy_unix.cpio b/Unix/ventoy_unix.cpio index f4cf2e1..ff97b5e 100644 Binary files a/Unix/ventoy_unix.cpio and b/Unix/ventoy_unix.cpio differ diff --git a/Unix/ventoy_unix/DragonFly/sbin/init b/Unix/ventoy_unix/DragonFly/sbin/init index 248631f..a720b57 100644 Binary files a/Unix/ventoy_unix/DragonFly/sbin/init and b/Unix/ventoy_unix/DragonFly/sbin/init differ diff --git a/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/32/geom_ventoy.ko.xz b/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/32/geom_ventoy.ko.xz index facac0e..38eb428 100644 Binary files a/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/32/geom_ventoy.ko.xz and b/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/32/geom_ventoy.ko.xz differ diff --git a/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/64/geom_ventoy.ko.xz b/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/64/geom_ventoy.ko.xz index 22f55f7..5afe74d 100644 Binary files a/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/64/geom_ventoy.ko.xz and b/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/64/geom_ventoy.ko.xz differ diff --git a/Unix/ventoy_unix_src/DragonFly/oinit.c b/Unix/ventoy_unix_src/DragonFly/oinit.c index c45ddd1..ae59123 100644 --- a/Unix/ventoy_unix_src/DragonFly/oinit.c +++ b/Unix/ventoy_unix_src/DragonFly/oinit.c @@ -157,20 +157,31 @@ static void ventoy_init(char **argv_orig) vdebug("[VTOY] step 7: switch root ...\n"); error = chdir("/new_root"); if (error) - goto chroot_failed; + { + printf("[VTOY] chdir /new_root failed %d\n", error); + goto chroot_failed; + } error = chroot_kernel("/new_root"); if (error) - goto chroot_failed; + { + printf("[VTOY] chroot_kernel /new_root failed %d\n", error); + goto chroot_failed; + } error = chroot("/new_root"); 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)); /* We failed to exec /sbin/init in the chroot, sleep forever */ chroot_failed: + printf("[VTOY] ################### DEAD ################\n"); while(1) { sleep(3); }; diff --git a/Unix/ventoy_unix_src/DragonFly/walk_disk.c b/Unix/ventoy_unix_src/DragonFly/walk_disk.c index f743529..93d0d0d 100644 --- a/Unix/ventoy_unix_src/DragonFly/walk_disk.c +++ b/Unix/ventoy_unix_src/DragonFly/walk_disk.c @@ -173,9 +173,13 @@ int prepare_dmtable(void) 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); - - find_disk_by_size(desc.part1_size, NULL, &count, disk); - vdebug("[VTOY] find disk by part1 size: %d %s\n", count, disk); + + for (i = 0; count <= 0 && i < 10; i++) + { + 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) {