implement bmlutils
Change-Id: I8ec38a3b5e20e39b02c393d13e89142038ae3e82
This commit is contained in:
parent
12154200a7
commit
e5c7e0eaca
@ -23,17 +23,37 @@
|
||||
int
|
||||
__system(const char *command);
|
||||
|
||||
int write_raw_image(const char* partition, const char* filename) {
|
||||
int restore_raw_partition(const char *partition, const char *filename)
|
||||
{
|
||||
char tmp[PATH_MAX];
|
||||
if (0 != strcmp("boot", partition)) {
|
||||
return -1;
|
||||
}
|
||||
sprintf(tmp, "/sbin/redbend_ua restore %s %s", filename, BOARD_BOOT_DEVICE);
|
||||
sprintf("dd if=%s of=/dev/block/bml7 bs=4096", filename);
|
||||
return __system(tmp);
|
||||
}
|
||||
|
||||
int read_raw_image(const char* partition, const char* filename) {
|
||||
int backup_raw_partition(const char *partition, const char *filename)
|
||||
{
|
||||
char tmp[PATH_MAX];
|
||||
sprintf(tmp, "dd if=/dev/block/bml7 of=%s", filename);
|
||||
sprintf("dd of=%s if=/dev/block/bml7 bs=4096", filename);
|
||||
return __system(tmp);
|
||||
}
|
||||
|
||||
int erase_raw_partition(const char *partition)
|
||||
{
|
||||
// TODO: implement raw wipe
|
||||
return 0;
|
||||
}
|
||||
|
||||
int erase_partition(const char *partition, const char *filesystem)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int mount_partition(const char *partition, const char *mount_point, const char *filesystem, int read_only)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int get_partition_device(const char *partition, char *device)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user