From d492f25c54b4134fd6632156efee07670ab4004f Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Tue, 1 Nov 2016 17:04:26 +0100 Subject: nwztools: add preliminary dualboot and dualboot install script At the moment, the script install_duaboot does the following: - rename SpiderApp to SpiderApp.of (unless it already exists) - install payload as SpiderApp - fixes permissions Since SpiderApp is the main app, it will execute instead of the OF. The current dualboot code (dualboot.c) is still a preliminary but the current version displays an "all tools" menu to choose for. When exitting the menu using BACK, it will run the OF. With the modifications made by the install script, it should not be possible to break the device. In the worst case scenario, the dualboot code crashes and it restarted by the sysmgrd, or hangs. A safe way to recover is to plug the USB cable and reset the device: the system manager will then start the USB app and one can reflash the device if necessary. Change-Id: Id9edab0347538ad2a8651a28aea7fd083feaa626 --- utils/nwztools/plattools/nwz_lib.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'utils/nwztools/plattools/nwz_lib.h') diff --git a/utils/nwztools/plattools/nwz_lib.h b/utils/nwztools/plattools/nwz_lib.h index 90d122003a..df0105a13d 100644 --- a/utils/nwztools/plattools/nwz_lib.h +++ b/utils/nwztools/plattools/nwz_lib.h @@ -30,6 +30,7 @@ #include #include #include +#include #include "nwz_keys.h" #include "nwz_fb.h" @@ -47,7 +48,9 @@ const char *nwz_get_model_name(unsigned long model_id); /* run a program and exit with nonzero status in case of error * argument list must be NULL terminated */ -void nwz_run(const char *file, const char *args[], bool wait); +int nwz_run(const char *file, const char *args[], bool wait); +/* run a program and return program output */ +char *nwz_run_pipe(const char *file, const char *args[], int *status); /* invoke /usr/bin/lcdmsg to display a message using the small font, optionally * clearing the screen before */ -- cgit v1.2.3