Skip to content

Commit

Permalink
common: introduce droidboot_have_fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
luka177 committed Dec 3, 2023
1 parent 2e38e91 commit 0a8fa3e
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/droidboot_platform_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ bool droidboot_sd_exists()
return droidboot_internal_sd_exists();
}

bool droidboot_have_fallback()
{
return droidboot_internal_have_fallback();
}

int droidboot_get_disp_buffer_height()
{
Expand Down
1 change: 1 addition & 0 deletions common/droidboot_platform_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ssize_t dridboot_sd_write_block(const void *buf, uint32_t block, uint count);
uint32_t droidboot_sd_blklen(void);
uint64_t droidboot_sd_blkcnt(void);
bool droidboot_sd_exists(void);
bool droidboot_have_fallback(void);

int droidboot_get_disp_buffer_height(void);
bool droidboot_use_double_buffering(void);
Expand Down
6 changes: 6 additions & 0 deletions lk/common/src/lk_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ void droidboot_internal_platform_tasks()
thread_sleep(200);
}

// All current lk platforms do provide fallback
bool droidboot_internal_have_fallback()
{
return true;
}

// No lk targets do implement dtbo yet
void *droidboot_internal_get_dtbo_load_addr()
{
Expand Down
1 change: 1 addition & 0 deletions lk/common/src/lk_common.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
void droidboot_internal_lvgl_threads_init();
void *droidboot_internal_get_dtbo_load_addr();
bool droidboot_internal_have_fallback();
5 changes: 5 additions & 0 deletions u-boot/u-boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ bool droidboot_internal_sd_exists()
return false;
}

bool droidboot_internal_have_fallback()
{
return false;
}

// Logging functions
void droidboot_internal_platform_on_screen_log(const char *buf)
{
Expand Down
1 change: 1 addition & 0 deletions u-boot/u-boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ssize_t dridboot_internal_sd_write_block(const void *buf, uint32_t block, uint c
uint32_t droidboot_internal_sd_blklen(void);
uint64_t droidboot_internal_sd_blkcnt(void);
bool droidboot_internal_sd_exists(void);
bool droidboot_internal_have_fallback(void);

// Logging functions
void droidboot_internal_platform_on_screen_log(const char *buf);
Expand Down
5 changes: 5 additions & 0 deletions uefi/common/droidboot_uefi_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ bool droidboot_internal_sd_exists()
return true;
}

bool droidboot_internal_have_fallback()
{
return false;
}

// Logging functions
void droidboot_internal_platform_on_screen_log(const char *buf)
{
Expand Down
1 change: 1 addition & 0 deletions uefi/common/droidboot_uefi_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ssize_t dridboot_internal_sd_write_block(const void *buf, uint32_t block, uint c
uint32_t droidboot_internal_sd_blklen(void);
uint64_t droidboot_internal_sd_blkcnt(void);
bool droidboot_internal_sd_exists(void);
bool droidboot_internal_have_fallback(void);

// Logging functions
void droidboot_internal_platform_on_screen_log(const char *buf);
Expand Down

0 comments on commit 0a8fa3e

Please sign in to comment.