Skip to content
Snippets Groups Projects
Commit dfc9fe93 authored by Oleksii Kutuzov's avatar Oleksii Kutuzov
Browse files

[SYSDATA] Add Switchslot system for bootembedded

MediaTek uses 'bootembedded' rather than 'booti' or 'bootz'
parent 2677885e
No related branches found
No related tags found
No related merge requests found
Pipeline #156379 passed with stage
in 57 seconds
......@@ -6,6 +6,25 @@
#include <common.h>
#include <command.h>
#include <linux/libfdt.h>
#ifdef CONFIG_SECO_SYSTEM_DATA
#include <sysdata.h>
#endif
#ifdef CONFIG_SECO_SYSTEM_DATA
static int sysdata_set_boot( void ) {
int ret;
ret = sysdata_swtchslot_update_current_slot( );
if ( ret < 0 )
return ret;
ret = sysdata_switchslot_boot_counter_update( );
if ( ret < 0 )
return ret;
return 0;
}
#endif
extern uint8_t _start;
extern uint8_t _end;
......@@ -28,6 +47,12 @@ static int do_bootembedded(struct cmd_tbl *cmdtp, int flag, int argc,
sprintf(cmd, "source %p", script_start);
printf("run '%s'\n", cmd);
#ifdef CONFIG_SECO_SYSTEM_DATA
int ret = sysdata_set_boot( );
if ( ret )
debug( "*SysData: error boot setting" );
#endif
return run_command_list(cmd, -1, 0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment