#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int __system(const char *command); int write_raw_image(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); return __system(tmp); }