Files
hiperiso/src/gui/Web/hiperiso_http.h
T
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

83 lines
2.1 KiB
C

/******************************************************************************
* hiperiso_http.h
*
* Copyright (c) 2021, vasilito <adminpupkin@gmail.com> (originally Ventoy by longpanda)
*
* 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/>.
*
*/
#ifndef __HIPERISO_HTTP_H__
#define __HIPERISO_HTTP_H__
#include <civetweb.h>
typedef enum PROGRESS_POINT
{
PT_START = 1,
PT_PRAPARE_FOR_CLEAN,
PT_DEL_ALL_PART,
PT_LOAD_CORE_IMG,
PT_LOAD_DISK_IMG,
PT_UNXZ_DISK_IMG_FINISH = PT_LOAD_DISK_IMG + 32,
PT_FORMAT_PART1, //10
PT_FORMAT_PART2,
PT_WRITE_HIPERISO_START,
PT_WRITE_HIPERISO_FINISH = PT_WRITE_HIPERISO_START + 8,
PT_WRITE_STG1_IMG,//45
PT_SYNC_DATA1,
PT_CHECK_PART2,
PT_CHECK_PART2_FINISH = PT_CHECK_PART2 + 8,
PT_WRITE_PART_TABLE,//52
PT_SYNC_DATA2,
PT_FINISH
}PROGRESS_POINT;
typedef int (*hiperiso_json_callback)(struct mg_connection *conn, HISO_JSON *json);
typedef struct JSON_CB
{
const char *method;
hiperiso_json_callback callback;
}JSON_CB;
typedef struct hiperiso_thread_data
{
int diskfd;
uint32_t align4kb;
uint32_t partstyle;
uint32_t secure_boot;
uint64_t reserveBytes;
hiperiso_disk *disk;
}hiperiso_thread_data;
extern int g_hiso_exfat_disk_fd;
extern uint64_t g_hiso_exfat_part_size;
int hiperiso_http_init(void);
void hiperiso_http_exit(void);
int hiperiso_http_start(const char *ip, const char *port);
int hiperiso_http_stop(void);
int mkexfat_main(const char *devpath, int fd, uint64_t part_sector_count);
#endif /* __HIPERISO_HTTP_H__ */