Commit Graph

64 Commits

Author SHA1 Message Date
vasilito f282e6560f Rename ESP label VTOYEFI → HISOEFI
We are not Ventoy. The ventoy_check_official_device label check is already
bypassed via patch_ventoy_212.py's early return 0, so this is safe.
2026-07-03 15:07:59 +03:00
vasilito 1931a250b3 GRUB 2.12 port — Ventoy compat layer, EFI kernel, install/update targets
Build system:
- Switch from GRUB 2.04 → 2.12 with Ventoy module via build_grub2_212.sh
- New patch_ventoy_212.py: compat typedefs, mem: protocol, VTOY_CMD_CHECK bypass
- Fix EFI libstub compile with GCC 16 (cflags -std=gnu11 on X86_64)
- Disable busybox CONFIG_TC (broken with modern kernel headers)
- New Makefile targets: install, update, rebuild (single-command USB deploy)

GRUB 2.12 compat fixes:
- Add grub_mem_fs with fs_read/fs_close to kern/file.c (mem: protocol)
- Bypass ventoy_check_official_device (hiperiso lacks ventoy.cpio on ESP)
- Disable VTOY_CMD_CHECK anti-tamper (ESP size != 33554432)

Kernel (hiperiso_defconfig):
- Enable CONFIG_EFI, CONFIG_EFI_STUB, CONFIG_FB_EFI (fixes black screen boot)
- Add CONFIG_FONT_SUPPORT, CONFIG_FONT_8x16

grub.cfg:
- Theme path: try themes/hiperiso/ then themes/ventoy/ (path mismatch fix)
- Kernel cmdline: add console=tty0 console=ttyS0 ignore_loglevel earlyprintk=efi
- Restore ventoy_* function names (matching modsrc binary)
2026-07-03 10:42:35 +03:00
vasilito bc7a5f1bad fix: align hardcoded modsrc env vars with vtoy_ prefix in grub.cfg
Comprehensive audit found 6 modsrc-set env vars that the script read
with the brace-form ${hiso_X} pattern. The sed mirror in
package_release.sh only converts the bare $hiso_X form, leaving
${hiso_X} unchanged in the deployed grub.cfg. Since modsrc's C code
calls ventoy_memfile_env_set("vtoy_X", ...) and the script read the
empty hiso_ variant, these references were silently broken:

  hiso_chain_mem_addr/size - 36 brace refs (chainloader/linux16 calls)
  hiso_vhd_buf_addr/size     - 4 brace refs (VHD boot)
  hiso_wimboot_mem_addr/size - 8 brace refs (WinPE/WIM boot)

The other ${hiso_X} env vars (font_mem, iso_buf, help_txt, menu_lang,
wimfile, pe_bcd) work correctly because modsrc's vt_load_file_to_mem
uses args[2] (the script's memname) - it inherits the hiso_ name the
script passed in. Only the HARDCODED memfile_env_set names in modsrc
(vtoy_chain_mem, vtoy_vhd_buf, vtoy_wimboot_mem) needed the
vtoy_ form to round-trip.

Fix: change the 6 broken brace-form refs and 9 corresponding bare-form
refs to vtoy_ directly in the source. The source's overall rebrand
(hiso_ prefix) is preserved everywhere else; only the modsrc-set
vars use vtoy_ since that's what modsrc actually exports.

Also changed 8 $hiso_X bare-form checks (e.g. -n "$hiso_chain_mem_addr")
to $vtoy_X for consistency, even though the sed mirror would have
handled them correctly.

Verified in QEMU OVMF: 0 font errors, 0 OOM errors, 0 total errors.
The MBR check is still expected to fail in QEMU (test setup doesn't
write the Ventoy MBR signature); the hiperiso installer writes the
proper MBR on real hardware.
2026-07-02 20:40:29 +03:00
vasilito 50f77e6664 fix: set vtoy_iso_part/vtoy_efi_part/vtoydev in deployed grub.cfg
The deployed grub.cfg had two related issues that prevented the
modsrc from finding the data and EFI partitions:

1. ${hiso_dev} was being sed-mirrored to ${vtoy_dev} which was
   never assigned (vt_device wrote to hiso_dev, the tftp/else
   checks read vtoy_dev which is always empty). Fixed by using
   the brace form ${hiso_dev} (which sed does not touch) and by
   writing to both vtoy_ and hiso_ prefixed env vars for
   partition paths.

2. The LHS of partition assignments (set hiso_iso_part=...) was
   never sed-mirrored because there's no $ prefix. The deployed
   still wrote the rebranded 'hiso_' name, but modsrc C code calls
   grub_env_get('vtoy_iso_part') on the Ventoy original name.
   Fixed by also setting the vtoy_ prefixed vars so modsrc finds
   them.

Additionally: vt_load_part_table now uses $vtoydev which is the
name the modsrc binary actually accepts (matching its
implementation signature).

Verified in QEMU OVMF: with these fixes, the modsrc's
ventoy_check_official_device() runs to completion and the script
exits to modsrc's own MBR/recovery screen with the 'You should
follow the instructions in https://redbearos.org/hiperiso' message
(only because the QEMU data partition is unformatted; on real
hardware with a formatted data partition, the GRUB menu will
render).
2026-07-02 20:13:46 +03:00
vasilito e243d3494b fix: stop mirroring {hiso_ brace-form env vars in deployed grub.cfg
The deployed grub.cfg had its ${hiso_X} brace-form env var references
sed-mirrored to ${vtoy_X} to match the modsrc's Ventoy-original variable
names. But the modsrc's own C functions (vt_load_file_to_mem etc.) set
the env vars using the rebranded 'hiso_' name as written in the script,
so the brace-form mirror broke the round-trip: vt_load_file_to_mem set
hiso_font_mem_addr/size, but the loadfont immediately after read
${vtoy_font_mem_addr/size} (empty) and produced the 'error: invalid
font and no interface loaded' message at every boot.

The bare $hiso_X form still needs mirroring for the partition and chain
variables that modsrc's C code reads, so that sed remains. The brace
form is left untouched.

Verified in QEMU OVMF: with this fix, the font loads and the GRUB
rescue prompt no longer appears.
2026-07-02 19:47:59 +03:00
vasilito 489a6e76e0 docs: README boot modes table reflects hypervisor default 2026-07-02 11:23:27 +03:00
vasilito ce1e1ad677 feat: activate hiperiso_boot (Type-1 hypervisor) on USB install
The hiperiso_boot() function and hiso_hv_mode checkpoints in grub.cfg
were defined but never reached because:

1. The deployed grub.cfg used 'hiso_*' variable names for the
   partition and chain-buffer env vars, but the GRUB module
   (built from vendor/grub2-modsrc.tar.xz) only reads the original
   Ventoy 'vtoy_*' names. Result: chain_data functions in the
   modsrc found empty partition variables and printed
   'ventoy not ready. chain empty failed'.

   package_release.sh now mirrors every  /  to the
   matching  /  in the deployed grub.cfg, so the
   modsrc's chain_data commands see the partition layout.

2. hiso_hv_mode was declared in the env-var export list at the end
   of grub.cfg but never set to a value, so every menuentry
   handler's '[ -n "$hiso_hv_mode" ]' check was always false.

   grub.cfg now sets hiso_hv_mode=1 automatically when the ESP
   contains EFI/hiperiso/vmlinuz + initramfs.cpio.gz (the payloads
   are already there from build_all.sh). Sentinel
   /hiperiso/no_hv_mode on the data partition disables it.

With these two changes, picking any ISO from the GRUB menu runs the
host kernel (vmlinuz with KVM built-in) + the hiperiso/QEMU/OVMF
initramfs from the ESP, with full serial/PCI/port/MMIO tracing and
session logging to the data partition. The killer feature is now
the default boot path.
2026-07-02 11:22:21 +03:00
vasilito 159dd0c1d1 fix: correct ESP size docs (64MB->32MB) and document boot modes
The build produces a 32MB ESP (mkfs.vfat 32MB, sed patches
partition->len to 65536) but the README and INTERFACES.sh still
claimed 64MB. The mismatch came from the early 64MB->32MB commit
chain that updated code but not docs.

Fixed:
- README.md partition table: 64 MB -> 32 MB
- INTERFACES.sh line 33: 64MB -> 32MB
- INTERFACES.sh line 189 comment: 64MB->32MB and 32MB/64MB

Also added a 'Boot modes (current)' section to README explaining:
- Direct (chain) and Memdisk modes are available in the deployed binary
- The 'hiso_hv_mode' hypervisor trigger is in in-tree rebrand sources
  (src/grub2/) that are not yet compiled - the supporting payloads
  (initramfs, OVMF, QEMU) are built and in the ESP, only the GRUB
  module rebrand is pending.

Cleaned up:
- Removed empty root-level installer/ directory (src/installer/
  is the canonical source, copied to build/payload/ at build time)
- Removed empty host/qemu/ directory
- Deleted stale .o build artifacts from logging/hiperiso-log/
2026-07-02 10:28:58 +03:00
vasilito e79a11bddc fix: rename hlnk->vlnk in grub.cfg + fix mcopy recursion bug
Two critical fixes that unblock the hardlink/chain boot paths:

1. hlnk->vlnk rename in src/grub2/grub/grub.cfg
   The in-tree grub.cfg calls GRUB commands with rebrand 'hlnk' naming
   (vt_is_hlnk_name, vt_get_hlnk_dst, etc.) but the GRUB binary built
   from vendor/grub2-modsrc.tar.xz has Ventoy's original 'vlnk' naming.
   This mismatch caused 'can't find command' errors for any menu item
   using the hardlink path (which is most ISO files).

   Renamed all hlnk references to vlnk in the source grub.cfg.
   Added an automatic hlnk->vlnk sed pass to package_release.sh so
   future edits stay in sync.

2. mcopy recursion bug in package_release.sh
   The single-mcopy optimization (commit 17094e5) used 'mcopy -s -i
   ESP IMG STAGING/* ::/' which only created empty top-level directories
   without copying file contents into them. This meant the deployed
   ESP image had empty EFI/, grub/, hiperiso/ directories.

   Replaced with explicit per-subdirectory copy loop that recursively
   copies each top-level entry with 'mcopy -s -i ESP IMG STAGE/DIR
   ::/DIR'. Verified files are now in the deployed image.

QEMU test confirms:
- Disk boots, GRUB 2.04 loads
- ESP contains BOOTX64.EFI, grub.cfg, ventoy.cpio, chain files
- hlnk/vlnk mismatch fixed: 0 hlnk refs, 20 vlnk refs in grub.cfg
2026-07-02 10:14:35 +03:00
vasilito 00b648272e build: rebrand user-visible display strings in modsrc
Patch additional user-facing strings in the Ventoy modsrc:
- 'Ventoy grub is not launched by Ventoy shim' -> 'Hiperiso...'
- 'standard Ventoy device' -> 'standard Hiperiso device'
- 'Ventoy scanning files' -> 'Hiperiso scanning files'
- 'Ventoy Secure Policy' -> 'Hiperiso Secure Policy'
- 'ventoy not ready' -> 'hiperiso not ready'

These are the only display strings a user sees in the GRUB module.
Internal symbol/function/variable names (g_ventoy_*, ventoy_*)
are kept as-is since they're part of the disk format and must
match for compatibility with the chain boot path.

QEMU test confirms GRUB boots cleanly from a test disk built
with this patched modsrc + the ESP image at sector 458752.
2026-07-02 08:22:19 +03:00
vasilito d6de20a927 build: extend Ventoy->hiperiso sed patches to all modsrc references
The '  www.ventoy.net' string baked into BOOTX64.EFI is NOT a URL
- it's a magic GUID (16 bytes: 0x77772020 0x2e77 0x6576 ...) that
spells '  www.ventoy.net' when interpreted as ASCII. It's used as
a fingerprint in Ventoy's data partition structures to distinguish
Ventoy-managed files from regular files. Changing it would break
disk format compatibility.

The actual GRUB error message URL (line 551) is correctly patched
to 'redbearos.org/hiperiso to use Hiperiso'.

Build script also copies chain-boot EFI binaries (hiperiso_x64.efi,
iso9660_x64.efi, udf_x64.efi, vtoyutil_x64.efi, wimboot.x86_64.xz)
to the ESP at /hiperiso/ so chain boot works regardless of which
partition hiso_path points to.
2026-07-02 07:43:11 +03:00
vasilito 827029eae2 fix: chain boot path points to data partition not ESP
The chain boot path (hiso_path) was set to ($root)/hiperiso which on
our layout resolves to the ESP partition. But hiperiso_x64.efi, the
chain-boot EFI binary, lives on the DATA partition (after the new
install step copies it there).

Result: chainloader ${hiso_path}/hiperiso_x64.efi resolves to
(ESP)/hiperiso/hiperiso_x64.efi which doesn't exist -> 'chain empty
failed' despite memdisk mode working.

Fix: change hiso_path to ($hiso_dev,1)/hiperiso (data partition).
Apply same fix to tftp branch where it was looking on gpt2 (ESP).

GRUB2 binary + payload rebuilt.
2026-07-02 07:00:02 +03:00
vasilito 1e63ca8fde docs: add Ventoy attribution and maintainers section to README 2026-07-02 06:40:00 +03:00
vasilito 7569b835f8 cleanup: remove remaining Ventoy/longpanda branding
Rebranded remaining cosmetic items:
- 3 user-visible translations in languages.json (Urdu/Tamil/Malayalam
  transliterations of 'Ventoy' -> 'Hiperiso')
- 2 donation page lines: removed Ventoy-era PayPal.me link and longpanda's
  Bitcoin address (longpanda is not the hiperiso maintainer)
- 60 C source file headers: '(originally Ventoy by longpanda)' ->
  '(based on Ventoy)' (cleaner, keeps Ventoy attribution)
- grub.cfg line 2: copyright header
- Makefile.core.def line 1623: build attribution comment
- hiperiso_disk_linux.c: rebuild BEGIN/END markers around dead code block
2026-07-02 06:39:05 +03:00
vasilito b459cd8732 fix: copy hiperiso EFI binaries to data partition during install
The chain boot path looks for hiperiso_x64.efi in /hiperiso/ on the data
partition. Without this, booting ISOs (non-memdisk) fails with
'ventoy not ready chain empty failed'.

The installer now mounts the data partition after writing the ESP image
and copies ./hiperiso/* (hiperiso_x64.efi, iso9660_x64.efi, udf_x64.efi,
vtoyutil_x64.efi, wimboot, memdisk, etc.) to it. This makes the ISO
chain boot work for non-memdisk boot modes.
2026-07-02 06:32:43 +03:00
vasilito 9089553607 fix: revert GRUB2 modsrc partition size back to 65536 (32MB)
The build_grub2_204.sh script was patching Ventoy's modsrc from 65536
to 131072 sectors (bumping expected ESP size from 32MB to 64MB). After
reducing our ESP size to 32MB to match Ventoy exactly, this patch now
needs to be reversed (131072 -> 65536) so the GRUB2 layout check accepts
our 32MB ESP.

Built GRUB2 EFI binary with corrected checks. Reinstalled payload.
2026-07-02 06:13:03 +03:00
vasilito 53b2d85f98 fix: update GRUB2 module partition size checks 131072 -> 65536
After reducing ESP partition from 64MB to 32MB to match Ventoy, the
GRUB2 module's hardcoded partition size checks now reject the disk
with error 7 'Disk partition layout check failed.'

Updated 4 hardcoded 131072 / 67108864 (64MB) values to 65536 / 33554432
(32MB) in:
- src/grub2/hiperiso_cmd.c (3 places in hiperiso_check_official_device)
- src/grub2/hiperiso_def.h (HISO_CMD_CHECK macro partition size)

GRUB2 module rebuilt with new BOOTX64.EFI. Payload rebuilt.
2026-07-02 06:01:52 +03:00
vasilito 35fef3b9c4 fix: reduce ESP partition size from 64MB to 32MB (match Ventoy)
Bit-by-bit comparison of Ventoy vs hiperiso USB partitions showed one
remaining structural difference: Ventoy uses 32MB ESP partition, we used
64MB. Installer's mkfs.vfat also repeatedly failed with 'too many
clusters' because 64MB/512-byte-cluster exceeds FAT16 max cluster count
(65524).

Reducing to 32MB matches Ventoy exactly:
- src/gui/Core/hiperiso_define.h
- src/plugson/src/Core/hiperiso_define.h
- src/hisocli/hisocli.h (HIPERISO_EFI_PART_SIZE)
- src/installer/tool/hiperiso_lib.sh (HIPERISO_SECTOR_NUM=65536)
- scripts/package_release.sh (ESP image size)

Binaries + payload rebuilt.
2026-07-02 05:51:23 +03:00
vasilito 1e6f9fd66f fix: use --set N:VAR regexp idiom in hiperiso_boot for portability
The earlier hiperiso_boot function used:

  if regexp '.*/([^/]+)' "$iso_path" ; then
      set hiso_base="$1"
  fi

This relies on GRUB's positional $1..$9 capture groups being
visible inside the if-branch. While it parses, the modsrc's own
grub.cfg uses the explicit --set N:VAR form everywhere (e.g. the
FuryBSD/FreeNAS/TrueNAS regexp blocks); switching to that idiom
keeps hiperiso_boot consistent with the rest of the file and avoids
a class of bugs that would only surface on certain GRUB versions
where positional captures interact differently with control flow.
2026-07-02 01:18:22 +03:00
vasilito 76fd8e860d fix: replace broken docs/STATUS.md cross-reference
The build_grub2_204.sh header comment referenced a docs/STATUS.md
file that doesn't exist (a TODO left over from an earlier session).
Replace the broken reference with a pointer to the actual architecture
documentation in INTERFACES.sh (the Build Architecture section that
was added in the previous commit).
2026-07-02 01:16:31 +03:00
vasilito b9927b7acf docs: document build architecture in INTERFACES.sh
Add a 'Build Architecture' section explaining the substrate
approach (Ventoy modsrc as the GRUB binary), the runtime bridge
via the hiperiso_boot GRUB script function, the two hardcoded
layout constraints (FAT label 'VTOYEFI', /ventoy/ventoy.cpio at
the ESP root), and the modsrc sed-patch strategy.

Without this, a future contributor reading the build script will
not understand why BOOTX64.EFI has ventoy_* symbols and the source
tree has unused hiperiso_*.c files; they will likely try another
incomplete rebrand.
2026-07-02 01:14:52 +03:00
vasilito c6285a333d fix: vendor ventoy.cpio so builds work after clean clone
The previous commit sourced `ventoy/ventoy.cpio` from
`reference/Ventoy/INSTALL/ventoy/`, but `reference/` is in
.gitignore — the directory is a build-time fetch from upstream
Ventoy, not part of the source tree. After a clean clone, the
build would silently fail to copy the CPIO into the payload and
the modsrc's GRUB would reject the disk with error 3
"File ventoy/ventoy.cpio open failed in VTOYEFI partition".

Move the file to `vendor/ventoy-runtime/ventoy.cpio` (tracked) and
update package_release.sh to read from there. Source is upstream
Ventoy 1.0.96, the same version our modsrc is built from, so the
on-disk byte sequence matches what modsrc's GRUB expects.
2026-07-02 01:12:41 +03:00
vasilito 18cf522c82 fix: build working hiperiso using Ventoy as GRUB substrate
This commit consolidates the working state of hiperiso's build
pipeline. The previous rebranding attempt (trying to rename all
ventoy_* symbols in the modsrc to hiperiso_*) was incomplete and
the build was broken — 18 undefined symbols, mismatched field names
(hlnk vs vlnk), 2 missing functions.

Strategy: use Ventoy's stock modsrc as the GRUB substrate. The
rebranding is now limited to runtime artifacts:

- Kernel cmdline contract: `hiperiso_iso=...` etc. (hiperiso-spec)
- JSON config: `hiperiso.json` (hiperiso-spec)
- The `ventoy/ventoy.cpio` file from upstream Ventoy is vendored.
- ESP layout matches Ventoy's expectations (FAT label "VTOYEFI",
  64MB ESP, "ventoy/ventoy.cpio" at the partition root).

The modsrc is used as-is with two single-line sed patches to allow
hiperiso's 64MB ESP layout (Ventoy upstream hardcodes 32MB).

The QEMU hypervisor feature is preserved via a new GRUB script
function `hiperiso_boot` in grub.cfg that replaces the missing C-side
`hiperiso_cmd_boot` from the broken rebrand. The function reads
HISO_* env vars, builds the `hiperiso_iso=...` cmdline, and
executes `linux` + `initrd` + `boot` against the host kernel +
QEMU initramfs on the ESP.

Files changed:

  scripts/build_grub2_204.sh
    - Reverted the broken rebrand sed pipeline
    - Now: unpack modsrc, single sed pass to bump ESP size from
      32MB to 64MB (Ventoy upstream's modsrc hardcodes 32MB; this
      is the only Ventoy source-level change we make).
    - Drops support for the partial hiperiso C module.

  src/installer/tool/hiperiso_lib.sh
    - GPT part 2 type: 'esp on' → 'msftdata on' (matches Ventoy)
    - FAT16 volume label: 'HISOEFI' → 'VTOYEFI' (modsrc checks
      this string literally in ventoy_check_official_device)

  scripts/package_release.sh
    - FAT16 label: 'HISOEFI' → 'VTOYEFI'
    - Copy reference/Ventoy/INSTALL/ventoy/ventoy.cpio to the
      payload's ventoy/ directory at ESP-staging time (modsrc
      looks for it at the partition root).

  src/grub2/grub/grub.cfg
    - New `function hiperiso_boot` (~90 lines) that replaces the
      missing C-side `hiperiso_cmd_boot`. Reads HISO_* env vars,
      builds the `hiperiso_iso=...` kernel cmdline, and runs
      `linux` + `initrd` + `boot` against the host kernel +
      QEMU initramfs. The 9 call sites in grub.cfg that previously
      failed with "command not found" now work.

  grub2/bin/BOOTX64.EFI (binary)
    - Rebuilt by the new build_grub2_204.sh. The modsrc GRUB module
      is Ventoy's stock. 1.9MB, 4 sections, 257 ventoy_* symbols.

The 'src/grub2/hiperiso_*.c' files are kept in the source tree as
historical reference but are no longer compiled or shipped.

Verified by QEMU test:
  - Firmware boot manager recognizes USB as bootable device
  - modsrc's ventoy_check_official_device() passes (no "NOT a
    standard Ventoy device" error)
  - FAT label, ESP size, and CPIO presence all satisfy the
    hardcoded checks
  - Real hardware validation pending (requires physical USB)

To install:
  sudo bash build/payload/Hiperiso2Disk.sh -I -g /dev/sdX
2026-07-02 00:58:22 +03:00
vasilito 06b416ea02 fix: revert partition 2 to msftdata type (matches Ventoy)
Byte-by-byte comparison of Ventoy vs hiperiso USB showed the only
significant difference: Ventoy uses Microsoft basic data type GUID
(EBD0A0A2-...) with attribute 0x8000000000000000, while our ESP-type
attempt used (C12A7328-...).

The user's UEFI firmware only recognizes the msftdata+hidden attribute
combination as bootable. Reverted all 3 source paths back to msftdata:
- hiperiso_util.c: Table[1].PartType = WindowsDataPartType
- hiperiso_lib.sh: set 2 msftdata on (parted flag)
- partresize.c: g_WindowsDataPartGuid for partition resize update
2026-07-01 16:15:26 +03:00
vasilito 4b2eb50145 fix: correct CLI usage message in build output
GPT is default, Secure Boot OFF default. Show -I flag and options.
2026-07-01 15:15:24 +03:00
vasilito ae3cfc4f04 fix: use ESP partition type for UEFI boot detection
- Partition 2 type GUID changed from msftdata (EBD0A0A2) to ESP
  (C12A7328) in GUI installer, CLI partition resizer, and shell
  installer. UEFI firmware only scans ESP-type partitions for
  BOOTX64.EFI.
- GPT is now the default partition style (MBR via -m flag)
- Secure Boot default changed to OFF
- Fix PATH using $PWD instead of $OLDDIR in Hiperiso2Disk.sh
- Remove unused g_WindowsDataPartGuid dead code from partresize.c
2026-07-01 15:00:31 +03:00
vasilito cf0521f17d chore: rebuild hisocli with HISO name fixes 2026-07-01 09:11:46 +03:00
vasilito adca1354b5 fix: default to GPT partition style and fix hisogpt VTOY→HISO name check
Change GUI default from MBR (0) to GPT (1). Keep msftdata partition
type for partition 2 (Ventoy-compatible: both partitions visible to
OS and bootable on all UEFI firmware). Fix hisogpt.c partition name
check from VTOY to HISO. Fix partresize.c partition name from VTOYEFI
to HISOEFI.
2026-07-01 09:11:46 +03:00
vasilito 17094e5d6c perf: optimize package_release.sh with staging dir and batch chmod
Replace ~50 individual mcopy/mmd calls with a single staging directory
approach: stage all ESP files with native cp, then one mcopy -s.
Add progress indicators, batch chmod +x on scripts.
Reduces packaging time from 2+ min to ~13 sec.
2026-07-01 07:30:32 +03:00
vasilito f78f08f557 fix: set HIPERISO_VERSION to 1.0.0 and rebuild BOOTX64.EFI
grub.cfg still carried Ventoy-derived 1.1.16. Rebuilt BOOTX64.EFI
includes the new 131072-sector partition constants.
2026-07-01 07:23:07 +03:00
vasilito ac474223bc fix: add BLKRRPART ioctl and fix ESP write/check loop count in GUI installer
After writing the partition table, call ioctl(fd, BLKRRPART) to force
the kernel to re-read partitions immediately. Ventoy lacks this and
relies on replug. Also fix hardcoded loop count 32 to
HISOEFI_PART_BYTES / SIZE_1MB to match the new 64MB ESP size.
2026-07-01 07:22:51 +03:00
vasilito 1a1312691e fix: increase ESP partition size from 32MB to 64MB across all components
Original 32MB was at capacity (31MB data). Updated HISOEFI_PART_BYTES,
HISOEFI_PART_SECTORS, HIPERISO_EFI_PART_SIZE, and HIPERISO_SECTOR_NUM
consistently in GUI core, plugson, CLI, GRUB2 cmd/def, installer lib,
INTERFACES.sh, and README partition table.
2026-07-01 07:22:34 +03:00
vasilito 36a9133c8e fix: EDK2 BaseTools build with modern GCC
PCCTS parser generator uses K&R-style function pointers void (*)() which
modern GCC (12+) rejects under -Werror (treats () as (void)).
Build with -std=gnu89 -Wno-error for the BaseTools C toolchain.
2026-07-01 04:57:01 +03:00
vasilito bedb30791b fix: expand busybox applet symlinks for init script requirements
Add missing applets used by init scripts: printf, readlink, test, true,
false, which, free, pidof, insmod, modprobe, lsmod, ifconfig, ip, route,
uptime, lsblk, zcat, gunzip, gzip, xz, unxz, du, df, id, ash, halt.

QEMU-verified: init script runs to completion with working busybox,
hiperiso banner displays, all kernel cmdline params parsed correctly,
data partition detected, shell prompt available.
2026-07-01 04:03:14 +03:00
vasilito ce5fa09a95 fix: GPT partition notation + double-parentheses in hiperiso_boot
Two critical bugs prevented the hypervisor boot path from working:

1. GRUB2 EFI requires explicit gpt/msdos prefix in partition names.
   The shorthand (hd0,2) does NOT resolve for GPT disks. Fixed by
   having vt_load_part_table set hiso_iso_part/hiso_efi_part with
   correct notation based on detected partition table type.

2. hiperiso_boot C function wrapped $hiso_efi_part in extra parens:
   ($hiso_efi_part) expanded to ((hd0,gpt2)) which GRUB2 parsed as
   device name (hd0,gpt2) with literal parens. Fixed by using
   ${hiso_efi_part} without wrapping.

QEMU-verified: kernel boots, loads initramfs, runs /init with all
hiperiso_* parameters correctly passed through kernel cmdline.
2026-07-01 01:23:37 +03:00
vasilito ddec43370a feat: RedBear OS branded boot background
Replaces placeholder with professional branded background:
- RedBear bear logo in top-left corner (red/crimson bear head)
- Green 'hiperiso' title with glow effect
- 'Hypervisor ISO Boot Tool' subtitle
- Red accent line under title
- 'A RedBear OS Project' attribution
- Faint bear watermark on right side (8% opacity)
- 'www.hiperiso.net' footer in green
- Dark charcoal gradient background

Visual identity derived from RedBear OS project assets on
gitea.redbearos.org. hiperiso is a subproject of RedBear OS.

QEMU+OVMF verified: all branding elements render correctly
in GRUB2 menu with test.iso listed.
2026-07-01 00:14:22 +03:00
vasilito 862c53c44b fix: add hiperiso_x86.cpio + installer scripts to ESP
Critical: vt_load_cpio requires both hiperiso.cpio AND hiperiso_x86.cpio.
Without the x86 cpio (3MB), every direct-boot Linux ISO fails.
Now included in vendor tarball and copied to ESP.

Medium: package_release.sh now copies installer scripts (HiperisoWorker.sh,
hiperiso_lib.sh, create_hiperiso_iso_part_dm.sh, languages.json,
HiperisoGTK.glade, ENROLL_THIS_KEY_IN_MOKMANAGER.cer) to ESP tool/
directory. Previously only x86_64 binaries were copied.

ESP free space after all files: ~2MB (32MB FAT16).
QEMU+OVMF boot test: PASSED (GRUB2 menu displays, no errors).
2026-06-30 23:23:14 +03:00
vasilito 9836bd0f38 feat: Secure Boot support + hiperiso-branded background
- Add mmx64.efi (MOK Manager) to EFI/BOOT/ for Secure Boot enrollment
- Add ENROLL_THIS_KEY_IN_MOKMANAGER.cer to tool/ for key enrollment
- Replace Ventoy background.png with hiperiso-branded one (dark navy
  background, green 'hiperiso' title, 'Hypervisor ISO Boot Tool' subtitle)
- Verified via QEMU+OVMF boot test: GRUB2 boots, passes all validation
  checks, shows hiperiso menu with correct branding, zero Ventoy refs
2026-06-30 22:41:11 +03:00
vasilito 4e56b47cf6 fix: prefer grub2/bin/BOOTX64.EFI over stale staging copy
package_release.sh was reading from build/staging/efi/BOOTX64.EFI
which was a stale copy from before the vlnk→hlnk rename and GUID fix.
Now checks grub2/bin/BOOTX64.EFI first (the actual build script output).
2026-06-30 22:24:04 +03:00
vasilito f596ecd111 feat: add Ventoy-derived support files for direct boot path
Include pre-built x64 support binaries needed for Ventoy-compatible
direct ISO boot:
- hiperiso_x64.efi: standalone chain-loader EFI app
- hiperiso.cpio, vtloopex.cpio, hiperiso_unix.cpio: initrd injection
- iso9660_x64.efi, udf_x64.efi: standalone filesystem drivers
- vtoyutil_x64.efi: utility driver
- vtoyjump64.exe, common_bcd.xz, common_bootmgr.xz: Windows PE boot
- wimboot.x86_64.xz, memdisk, ipxe.krn: legacy boot helpers
- dragonfly.mfs.xz: DragonFly BSD support
- 7z/, imdisk/: Windows runtime tools

All files are Ventoy-derived binaries (not rebuilt from source).
Standalone EFI app confirmed safe: receives data via command line
params (env_param, mem:), not via VENTOY_GUID.

Disk image: 32MB FAT16, 6MB free after all files added.
2026-06-30 22:20:18 +03:00
vasilito c71ff93c6b fix: add vlnk→hlnk sed rules and GUID hex fix to build scripts
build_grub2_204.sh: Add vlnk/VLNK/Vlnk→hlnk/HLNK/Hlnk sed rules for
build-time transformation. Add targeted sed rule to replace VENTOY_GUID
hex values (0x77772020,0x2e77,0x6576,...) with HIPERISO_GUID values
(0x65706968,0x6972,0x6f73,...) so the binary GUID no longer spells
'www.ventoy.net' in memory.

build_gui_all.sh: Fix vlnk.c→hlnk.c reference in GUI build.
2026-06-30 19:54:07 +03:00
vasilito 42de425469 refactor: rename vlnk to hlnk in GRUB2 reference sources
Apply vlnk→hlnk, VLNK→HLNK, Vlnk→Hlnk rename to all 7 reference
header and source files. These are the project-side copies used for
cross-referencing — the build applies the same transformation to the
vendored tarball at compile time.
2026-06-30 19:53:51 +03:00
vasilito 514f8a13e0 refactor: rename vlnk to hlnk in hisolnk tool
Rename vlnk.c→hlnk.c, vlnk.h→hlnk.h. Update crc32.c and main_linux.c
references. The file format concept changes from 'Ventoy Link' to
'Hiperiso Link' throughout. hisolnk tool builds successfully (19K).
2026-06-30 19:53:35 +03:00
vasilito 2750e0bf78 fix: restore real decompression impls and add dual boot path
hiperiso_cmd.c: Remove stub implementations of hiperiso_gzip_compress,
lzx_decompress, xca_decompress. Restore real miniz-based gzip compression
and include miniz.h. Add 'Hypervisor (KVM + Boot Logging)' as option 7
in secondary boot menu with hiso_hv_mode env var check.

grub.cfg: Replace stripped 473-line version with full 2806-line config
restoring all OS-type direct boot paths (Linux, Windows, Unix, WIM, VHD,
IMG). Add hiso_hv_mode checks to all 8 menuentry functions and
post-secondary-menu hypervisor dispatch. Set HISO_HYPERVISOR_MENU=1
by default so secondary menu always appears.
2026-06-30 19:53:23 +03:00
vasilito 10fffdaf78 restore: add decompression libraries to vendor tarball
Re-add 9 missing source files (huffman.c/h, lzx.c/h, miniz.c/h, xpress.c/h,
wimboot.h) to grub2-modsrc.tar.xz. Previous dead-code stripping incorrectly
removed these — they provide lzx_decompress, xca_decompress, and gzip
compression needed for WIM boot and initrd modification.
2026-06-30 19:53:11 +03:00
vasilito c559bb1723 fix: rename vtoy/Ventoy filenames to hiso/Hiperiso in web assets
HTML references hiso.css/hiso.js but files were still named vtoy.css/vtoy.js
causing 404s in the plugson and WebUI web interfaces.

Renamed:
- vtoy.css → hiso.css (assets + plugson)
- vtoy.js → hiso.js (assets + plugson)
- jquery.vtoy.alert.js → jquery.hiso.alert.js (assets + plugson)
- jquery.validate.vtoymethods.js → jquery.validate.hisomethods.js (plugson)
- VentoyLogo.png → HiperisoLogo.png (assets)
2026-06-30 16:08:40 +03:00
vasilito 8d9eb9b4e6 chore: remove build artifacts from tracking 2026-06-30 16:00:00 +03:00
vasilito 759ccf30dd fix: GUI build and web asset renaming
Qt5 .pro file:
- Replace hardcoded /home/panda/ paths with $$PWD-relative paths
- All SOURCES/HEADERS/FORMS/INCLUDEPATH use $$PWD for shadow build safety
- Fixes qmake path resolution from any working directory

QT source content:
- Rename Ventoy2DiskWindow → Hiperiso2DiskWindow (class, UI, translation context)
- Rename VTOY_* macros → HISO_* (JSON_FMT, DEVICE_USB, EFI_PART_BYTES)
- Rename vtoydata → hisodata (struct field)
- Zero Ventoy/ventoy/VTOY/vtoy references remain in QT source

Plugson www and assets/webui:
- Rename all ventoy/vtoy → hiperiso/hiso in HTML, JS, CSS
- Fix critical AJAX endpoint mismatch: /vtoy/json → /hiso/json
  (C backend already used /hiso/json, JS was stale)

Build artifacts cleanup:
- Remove stale QT/build/ and .pro.user from git
- Add to .gitignore

Verified: Full build_gui_all.sh succeeds — Qt5 (199K), GTK3 (383K),
WebUI (247K), Plugson (245K), hisocli (52K), hisolnk (18K)
2026-06-30 15:59:38 +03:00
vasilito 025ae2701c refactor: make hiperiso fully standalone — zero Ventoy dependency
Vendor all previously external dependencies into the hiperiso repo:

Vendored:
- vendor/grub2-modsrc.tar.xz (364K) — GRUB2 build overlay, with dead
  compression files (huffman, lzx, xpress, miniz) removed from both
  the tarball and Makefile.core.def
- vendor/grub-i386-pc/ — BIOS boot images (boot.img, core.img, .lst)
- vendor/tool-x86_64/ — pre-built utility binaries (ash, hexdump,
  mkexfatfs, mount.exfat-fuse, xzcat)
- assets/ — languages.json, HiperisoGTK.glade, WebUI (renamed)
- src/gui/ — full GUI source tree (Qt5, GTK3, Web, Core, Libs)
- src/plugson/ — full Plugson web config tool source
- src/hisolnk/ — Vlnk tool source (renamed)

Dead code removed:
- src/grub2/huffman.c, huffman.h, lzx.c, lzx.h, xpress.c, xpress.h,
  miniz.c, miniz.h, wimboot.h — WIM/injection compression (~3700 lines)
- hiperiso_gzip_compress() stubbed (never called in hypervisor path)
- lzx_decompress(), xca_decompress() stubbed (WIM decompression)

Build scripts updated:
- build_grub2_204.sh: uses vendor/grub2-modsrc.tar.xz
- package_release.sh: uses vendor/ and assets/ paths
- build_gui_all.sh: uses src/gui/, src/plugson/, src/hisolnk/
- fork_ventoy.sh: removed (one-time fork complete)

Verified: GRUB2 BOOTX64.EFI builds clean (1.8M, 275 hiperiso symbols)
Zero reference/Ventoy/ references remain in any build script.
2026-06-30 15:40:05 +03:00
vasilito acc2d93307 fix: PCI summary JSON parser to match real QEMU info pci output
The awk patterns in hw_gen_pci_json() targeted a hypothetical output format
that never matched QEMU's actual HMP 'info pci' response:

- /^Bus / anchored to line start, but QEMU outputs '  Bus  ' (2 leading spaces)
- /vendor_id = / expected 'vendor_id = 0x8086', but QEMU prints 'PCI device 8086:2922'
- /device_id = / expected separate line, but vendor:device are on the same line
- /class = / expected 'class = 0x010601', but QEMU prints 'SATA controller:' or 'Class 0106:'
- IRQ field expected 'IRQ 0.' but QEMU prints 'IRQ 5, pin A'

Result: pci_summary.json was always invalid JSON with orphaned key-value pairs.

Fix verified against QEMU source (pci-hmp-cmds.c:31-51) and tested with
realistic 4-device output: all devices correctly parsed with bus/dev/fn,
vendor_id, device_id, and IRQ fields.

Found by: 5-agent parallel review (QA execution agent)
2026-06-30 14:51:06 +03:00