mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
allow proceed with no ramdisk or binpack
This commit is contained in:
1 parent
96cadc4105
commit
6e324f1b54
3 files changed
+24
-23
No files matched your search
@@ -17,9 +17,14 @@
|
||||
|
||||
#define LOG(loglevel, ...) p1_log(loglevel, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||
#define CLEAR() printf("\33[2K\r");
|
||||
#define palerain_option_case(x) (512 + x)
|
||||
#define palerain_option_version 129
|
||||
#define CMD_LEN_MAX 512
|
||||
#define OVERRIDE_MAGIC 0xd803b376
|
||||
|
||||
#define palerain_option_case_version palerain_option_case(0)
|
||||
#define palerain_option_case_force_revert palerain_option_case(1)
|
||||
|
||||
#ifdef USE_LIBUSB
|
||||
#include <libusb-1.0/libusb.h>
|
||||
|
||||
|
||||
+4
-18
@@ -29,9 +29,9 @@ static struct option longopts[] = {
|
||||
{"rootless", no_argument, NULL, 'l'},
|
||||
{"jbinit-log-to-file", no_argument, NULL, 'L'},
|
||||
{"demote", no_argument, NULL, 'd'},
|
||||
{"force-revert", no_argument, NULL, checkrain_option_force_revert},
|
||||
{"force-revert", no_argument, NULL, palerain_option_case_force_revert},
|
||||
{"safe-mode", no_argument, NULL, 's'},
|
||||
{"version", no_argument, NULL, palerain_option_version},
|
||||
{"version", no_argument, NULL, palerain_option_case_version},
|
||||
{"override-pongo", required_argument, NULL, 'k'},
|
||||
{"override-overlay", required_argument, NULL, 'o'},
|
||||
{"override-ramdisk", required_argument, NULL, 'r'},
|
||||
@@ -233,10 +233,10 @@ int optparse(int argc, char* argv[]) {
|
||||
palerain_flags |= palerain_option_test2;
|
||||
break;
|
||||
#endif
|
||||
case checkrain_option_force_revert:
|
||||
case palerain_option_case_force_revert:
|
||||
checkrain_flags |= checkrain_option_force_revert;
|
||||
break;
|
||||
case palerain_option_version:
|
||||
case palerain_option_case_version:
|
||||
host_flags |= host_option_palerain_version;
|
||||
break;
|
||||
default:
|
||||
@@ -293,20 +293,6 @@ int optparse(int argc, char* argv[]) {
|
||||
}
|
||||
if (!(checkrain_option_enabled(host_flags, host_option_pongo_exit) || checkrain_option_enabled(host_flags, host_option_pongo_exit)))
|
||||
{
|
||||
#ifdef NO_BINPACK
|
||||
if (binpack_dmg_len == 0)
|
||||
{
|
||||
LOG(LOG_FATAL, "binpack omitted in build but no override specified");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
#ifdef NO_RAMDISK
|
||||
if (ramdisk_dmg_len == 0)
|
||||
{
|
||||
LOG(LOG_FATAL, "ramdisk omitted in build but no override specified");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
#ifdef NO_KPF
|
||||
if (checkra1n_kpf_pongo_len == 0)
|
||||
{
|
||||
|
||||
+15
-5
@@ -32,7 +32,6 @@ void *pongo_usb_callback(void *arg) {
|
||||
if (get_found_pongo())
|
||||
return NULL;
|
||||
set_found_pongo(1);
|
||||
strncat(xargs_cmd, " rootdev=md0", 0x270 - strlen(xargs_cmd) - 1);
|
||||
if (checkrain_option_enabled(palerain_flags, palerain_option_setup_rootful)) {
|
||||
strncat(xargs_cmd, " wdt=-1", 0x270 - strlen(xargs_cmd) - 1);
|
||||
}
|
||||
@@ -50,10 +49,21 @@ void *pongo_usb_callback(void *arg) {
|
||||
{
|
||||
issue_pongo_command(handle, "rootfs");
|
||||
}
|
||||
upload_pongo_file(handle, **ramdisk_to_upload, ramdisk_dmg_len);
|
||||
issue_pongo_command(handle, "ramdisk");
|
||||
upload_pongo_file(handle, **overlay_to_upload, binpack_dmg_len);
|
||||
issue_pongo_command(handle, "overlay");
|
||||
#ifdef NO_RAMDISK
|
||||
if (ramdisk_dmg_len != 0)
|
||||
#endif
|
||||
{
|
||||
strncat(xargs_cmd, " rootdev=md0", 0x270 - strlen(xargs_cmd) - 1);
|
||||
upload_pongo_file(handle, **ramdisk_to_upload, ramdisk_dmg_len);
|
||||
issue_pongo_command(handle, "ramdisk");
|
||||
}
|
||||
#ifdef NO_BINPACK
|
||||
if (binpack_dmg_len != 0)
|
||||
#endif
|
||||
{
|
||||
upload_pongo_file(handle, **overlay_to_upload, binpack_dmg_len);
|
||||
issue_pongo_command(handle, "overlay");
|
||||
}
|
||||
issue_pongo_command(handle, xargs_cmd);
|
||||
if (checkrain_option_enabled(host_flags, host_option_pongo_full)) goto done;
|
||||
issue_pongo_command(handle, "bootx");
|
||||
|
||||
Reference in new issue
Block a user