mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-24 02:59:49 +02:00
Add -F option
This commit is contained in:
1 parent
f4facd4933
commit
a696c2b50f
3 files changed
+12
-5
No files matched your search
+1
-1
@@ -119,7 +119,7 @@ extern pthread_mutex_t spin_mutex, found_pongo_mutex, ecid_dfu_wait_mutex;
|
|||||||
|
|
||||||
extern int enable_rootful, do_pongo_sleep, demote;
|
extern int enable_rootful, do_pongo_sleep, demote;
|
||||||
extern int pongo_thr_running, dfuhelper_thr_running;
|
extern int pongo_thr_running, dfuhelper_thr_running;
|
||||||
extern bool ohio, start_from_pongo;
|
extern bool ohio, start_from_pongo, pongo_full;
|
||||||
extern char xargs_cmd[0x270];
|
extern char xargs_cmd[0x270];
|
||||||
extern char checkrain_flags_cmd[0x20];
|
extern char checkrain_flags_cmd[0x20];
|
||||||
extern char palerain_flags_cmd[0x20];
|
extern char palerain_flags_cmd[0x20];
|
||||||
|
|||||||
+7
-2
@@ -19,6 +19,7 @@ static struct option longopts[] = {
|
|||||||
{"dfuhelper", no_argument, NULL, 'D'},
|
{"dfuhelper", no_argument, NULL, 'D'},
|
||||||
{"help", no_argument, NULL, 'h'},
|
{"help", no_argument, NULL, 'h'},
|
||||||
{"pongo-shell", no_argument, NULL, 'p'},
|
{"pongo-shell", no_argument, NULL, 'p'},
|
||||||
|
{"pongo-full", no_argument, NULL, 'F'},
|
||||||
{"start-from-pongo", no_argument, NULL, 'P'},
|
{"start-from-pongo", no_argument, NULL, 'P'},
|
||||||
{"debug-logging", no_argument, NULL, 'v'},
|
{"debug-logging", no_argument, NULL, 'v'},
|
||||||
{"verbose-boot", no_argument, NULL, 'V'},
|
{"verbose-boot", no_argument, NULL, 'V'},
|
||||||
@@ -60,6 +61,7 @@ static int usage(int e, char* prog_name)
|
|||||||
"\t-h, --help\t\t\t\tShow this help\n"
|
"\t-h, --help\t\t\t\tShow this help\n"
|
||||||
"\t-p, --pongo-shell\t\t\tBoots to PongoOS shell\n"
|
"\t-p, --pongo-shell\t\t\tBoots to PongoOS shell\n"
|
||||||
"\t-P, --start-from-pongo\t\t\tStart with a PongoOS USB Device attached\n"
|
"\t-P, --start-from-pongo\t\t\tStart with a PongoOS USB Device attached\n"
|
||||||
|
"\t-F, --pongo-full\t\t\tBoots to a PongoOS shell with default images already uploaded\n"
|
||||||
"\t-v, --debug-logging\t\t\tEnable debug logging\n"
|
"\t-v, --debug-logging\t\t\tEnable debug logging\n"
|
||||||
"\t\tThis option can be repeated for extra verbosity.\n"
|
"\t\tThis option can be repeated for extra verbosity.\n"
|
||||||
"\t-V, --verbose-boot\t\t\tVerbose boot\n"
|
"\t-V, --verbose-boot\t\t\tVerbose boot\n"
|
||||||
@@ -87,9 +89,9 @@ int optparse(int argc, char* argv[]) {
|
|||||||
int index;
|
int index;
|
||||||
while ((opt = getopt_long(argc, argv,
|
while ((opt = getopt_long(argc, argv,
|
||||||
#ifdef DEV_BUILD
|
#ifdef DEV_BUILD
|
||||||
"cCDhpvVldsOLtfe:o:r:K:k:",
|
"cCDhpvVldsOLtfFe:o:r:K:k:",
|
||||||
#else
|
#else
|
||||||
"cCDhpvVldsOLfe:o:r:K:k:",
|
"cCDhpvVldsOLfFe:o:r:K:k:",
|
||||||
#endif
|
#endif
|
||||||
longopts, NULL)) != -1)
|
longopts, NULL)) != -1)
|
||||||
{
|
{
|
||||||
@@ -136,6 +138,9 @@ int optparse(int argc, char* argv[]) {
|
|||||||
snprintf(dtpatch_cmd, 0x20, "dtpatch %s", optarg);
|
snprintf(dtpatch_cmd, 0x20, "dtpatch %s", optarg);
|
||||||
enable_rootful = 1;
|
enable_rootful = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'F':
|
||||||
|
pongo_full = 1;
|
||||||
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
enable_rootful = 0;
|
enable_rootful = 0;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+4
-2
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
|
||||||
|
bool pongo_full = 0;
|
||||||
|
|
||||||
void* pongo_helper(void* ptr) {
|
void* pongo_helper(void* ptr) {
|
||||||
pongo_thr_running = 1;
|
pongo_thr_running = 1;
|
||||||
@@ -51,9 +52,10 @@ void *pongo_usb_callback(void *arg) {
|
|||||||
upload_pongo_file(handle, **overlay_to_upload, binpack_dmg_len);
|
upload_pongo_file(handle, **overlay_to_upload, binpack_dmg_len);
|
||||||
issue_pongo_command(handle, "overlay");
|
issue_pongo_command(handle, "overlay");
|
||||||
issue_pongo_command(handle, xargs_cmd);
|
issue_pongo_command(handle, xargs_cmd);
|
||||||
issue_pongo_command(handle, "kpf");
|
if (pongo_full) goto done;
|
||||||
issue_pongo_command(handle, "bootux");
|
issue_pongo_command(handle, "bootx");
|
||||||
LOG(LOG_INFO, "Booting Kernel...");
|
LOG(LOG_INFO, "Booting Kernel...");
|
||||||
|
done:
|
||||||
set_spin(0);
|
set_spin(0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user