1 /* 2 * Copyright 2016 Google Inc. All Rights Reserved. 3 * Author: gkalsi@google.com (Gurjant Kalsi) 4 * 5 * Use of this source code is governed by a MIT-style 6 * license that can be found in the LICENSE file or at 7 * https://opensource.org/licenses/MIT 8 */ 9 10 #pragma once 11 12 #include <sys/types.h> 13 14 typedef struct moot_sysinfo { 15 uintptr_t sys_base_addr; // Pointer to the base of the main system image. 16 17 size_t btldr_offset; 18 size_t bootloader_len; 19 20 size_t system_offset; 21 size_t system_len; 22 23 char *system_flash_name; 24 } moot_sysinfo_t; 25 26 // Must be implemented by the platform; 27 extern const moot_sysinfo_t moot_system_info; 28 29 // Returns NO_ERROR if it was successfully able to mount a secondary flash 30 // device. If NO_ERROR is returned, mount_path and device_name should also be 31 // populated to reflect the path at which the FS was mounted and the name of 32 // the BIO device that hosts the FS. 33 status_t moot_mount_default_fs(char **mount_path, char **device_name); 34