|
| 1 | +#include <stdio.h> |
| 2 | +#include "simulator.h" |
| 3 | +#include <android/log.h> |
| 4 | +#include <unistd.h> |
| 5 | + |
| 6 | +void droidboot_internal_fb_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p) |
| 7 | +{ |
| 8 | + // TODO |
| 9 | +} |
| 10 | + |
| 11 | +int droidboot_internal_get_display_height() |
| 12 | +{ |
| 13 | + return 1920; // TODO |
| 14 | +} |
| 15 | + |
| 16 | +int droidboot_internal_get_display_width() |
| 17 | +{ |
| 18 | + return 1080; // TODO |
| 19 | +} |
| 20 | + |
| 21 | +void droidboot_internal_key_read(lv_indev_drv_t * drv, lv_indev_data_t*data) |
| 22 | +{ |
| 23 | + // TODO |
| 24 | +} |
| 25 | + |
| 26 | +droidboot_error droidboot_internal_platform_init() |
| 27 | +{ |
| 28 | + return DROIDBOOT_EOK; |
| 29 | +} |
| 30 | + |
| 31 | +ssize_t dridboot_internal_sd_read_block(void *buf, uint32_t block, uint count) |
| 32 | +{ |
| 33 | + return 0; // TODO |
| 34 | +} |
| 35 | + |
| 36 | +ssize_t dridboot_internal_sd_write_block(const void *buf, uint32_t block, uint count) |
| 37 | +{ |
| 38 | + return 0; // TODO |
| 39 | +} |
| 40 | + |
| 41 | +uint32_t droidboot_internal_sd_blklen() |
| 42 | +{ |
| 43 | + return 0; // TODO |
| 44 | +} |
| 45 | + |
| 46 | +uint64_t droidboot_internal_sd_blkcnt() |
| 47 | +{ |
| 48 | + return 0; // TODO |
| 49 | +} |
| 50 | + |
| 51 | +bool droidboot_internal_sd_exists() |
| 52 | +{ |
| 53 | + return false; // TODO |
| 54 | +} |
| 55 | + |
| 56 | +bool droidboot_internal_have_fallback() |
| 57 | +{ |
| 58 | + return true; |
| 59 | +} |
| 60 | + |
| 61 | +int droidboot_internal_get_disp_buffer_height() |
| 62 | +{ |
| 63 | + return 0; |
| 64 | +} |
| 65 | + |
| 66 | +bool droidboot_internal_use_double_buffering() |
| 67 | +{ |
| 68 | + return true; |
| 69 | +} |
| 70 | + |
| 71 | +void droidboot_internal_lvgl_threads_init() |
| 72 | +{ |
| 73 | + // TODO |
| 74 | +} |
| 75 | + |
| 76 | + |
| 77 | +void droidboot_internal_platform_on_screen_log(const char *buf) |
| 78 | +{ |
| 79 | + __android_log_print(ANDROID_LOG_ERROR, "droidboot", "%s", buf); // TODO |
| 80 | +} |
| 81 | + |
| 82 | +void droidboot_internal_platform_system_log(const char *buf) |
| 83 | +{ |
| 84 | + __android_log_print(ANDROID_LOG_VERBOSE, "droidboot", "%s", buf); |
| 85 | +} |
| 86 | + |
| 87 | +void droidboot_internal_delay(unsigned int time) |
| 88 | +{ |
| 89 | + sleep(time); |
| 90 | +} |
| 91 | + |
| 92 | +void droidboot_internal_boot_linux_from_ram(void *kernel_raw, off_t kernel_raw_size, void *ramdisk_raw, off_t ramdisk_size, void *dtb_raw, off_t dtb_raw_size, void *dtbo_raw, off_t dtbo_raw_size, char *options) |
| 93 | +{ |
| 94 | + // nothing happens |
| 95 | +} |
| 96 | + |
| 97 | +void droidboot_internal_pre_ramdisk_load(void *kernel_raw, off_t kernel_raw_size) |
| 98 | +{ |
| 99 | + // nothing happens |
| 100 | +} |
| 101 | + |
| 102 | +void *droidboot_internal_get_kernel_load_addr() |
| 103 | +{ |
| 104 | + return NULL; |
| 105 | +} |
| 106 | + |
| 107 | +void *droidboot_internal_get_ramdisk_load_addr() |
| 108 | +{ |
| 109 | + return NULL; |
| 110 | +} |
| 111 | + |
| 112 | +void *droidboot_internal_get_dtb_load_addr() |
| 113 | +{ |
| 114 | + return NULL; |
| 115 | +} |
| 116 | + |
| 117 | +void *droidboot_internal_get_dtbo_load_addr() |
| 118 | +{ |
| 119 | + return NULL; |
| 120 | +} |
| 121 | +bool droidboot_internal_append_ramdisk_to_kernel() |
| 122 | +{ |
| 123 | + return true; |
| 124 | +} |
| 125 | + |
| 126 | +void droidboot_internal_platform_tasks() |
| 127 | +{ |
| 128 | +} |
0 commit comments