Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
swym
firmware
Commits
57bfade4
Commit
57bfade4
authored
5 years ago
by
swym
Browse files
Options
Downloads
Patches
Plain Diff
lifecycle: use execulte_elf option from card10.cfg
parent
54cb7169
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
epicardium/modules/lifecycle.c
+17
-11
17 additions, 11 deletions
epicardium/modules/lifecycle.c
with
17 additions
and
11 deletions
epicardium/modules/lifecycle.c
+
17
−
11
View file @
57bfade4
#include
"epicardium.h"
#include
"modules/log.h"
#include
"modules/modules.h"
#include
"modules/config.h"
#include
"api/dispatcher.h"
#include
"api/interrupt-sender.h"
#include
"l0der/l0der.h"
...
...
@@ -49,6 +50,7 @@ static volatile struct load_info async_load = {
/* Whether to write the menu script before attempting to load. */
static
volatile
bool
write_menu
=
false
;
static
bool
execute_elfs
=
false
;
/* Helpers {{{ */
...
...
@@ -88,9 +90,7 @@ static int load_stat(char *name)
*/
static
int
do_load
(
struct
load_info
*
info
)
{
#if defined(JAILBREAK_CARD10) && (JAILBREAK_CARD10 == 1)
struct
l0dable_info
l0dable
;
#endif
int
res
;
if
(
*
info
->
name
==
'\0'
)
{
...
...
@@ -129,18 +129,22 @@ static int do_load(struct load_info *info)
case
PL_PYTHON_INTERP
:
core1_load
(
PYCARDIUM_IVT
,
info
->
name
);
break
;
#if defined(JAILBREAK_CARD10) && (JAILBREAK_CARD10 == 1)
case
PL_L0DABLE
:
res
=
l0der_load_path
(
info
->
name
,
&
l0dable
);
if
(
res
!=
0
)
{
LOG_ERR
(
"lifecycle"
,
"l0der failed: %d
\n
"
,
res
);
xSemaphoreGive
(
api_mutex
);
return
-
ENOEXEC
;
if
(
execute_elfs
)
{
res
=
l0der_load_path
(
info
->
name
,
&
l0dable
);
if
(
res
!=
0
)
{
LOG_ERR
(
"lifecycle"
,
"l0der failed: %d
\n
"
,
res
);
xSemaphoreGive
(
api_mutex
);
return
-
ENOEXEC
;
}
core1_load
(
l0dable
.
isr_vector
,
""
);
}
else
{
LOG_WARN
(
"lifecycle"
,
"Execution of .elf l0dables is disabled"
);
}
core1_load
(
l0dable
.
isr_vector
,
""
);
break
;
#endif
default:
LOG_ERR
(
"lifecyle"
,
"Attempted to load invalid payload (%s)"
,
...
...
@@ -379,6 +383,8 @@ void vLifecycleTask(void *pvParameters)
hardware_init
();
execute_elfs
=
config_get_boolean
(
OptionExecuteElf
);
/* When triggered, reset core 1 to menu */
while
(
1
)
{
ulTaskNotifyTake
(
pdTRUE
,
portMAX_DELAY
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment