Skip to content

Commit 0a8fa3e

Browse files
committed
common: introduce droidboot_have_fallback
1 parent 2e38e91 commit 0a8fa3e

8 files changed

Lines changed: 24 additions & 0 deletions

File tree

common/droidboot_platform_common.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ bool droidboot_sd_exists()
6767
return droidboot_internal_sd_exists();
6868
}
6969

70+
bool droidboot_have_fallback()
71+
{
72+
return droidboot_internal_have_fallback();
73+
}
7074

7175
int droidboot_get_disp_buffer_height()
7276
{

common/droidboot_platform_common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ ssize_t dridboot_sd_write_block(const void *buf, uint32_t block, uint count);
5656
uint32_t droidboot_sd_blklen(void);
5757
uint64_t droidboot_sd_blkcnt(void);
5858
bool droidboot_sd_exists(void);
59+
bool droidboot_have_fallback(void);
5960

6061
int droidboot_get_disp_buffer_height(void);
6162
bool droidboot_use_double_buffering(void);

lk/common/src/lk_common.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ void droidboot_internal_platform_tasks()
3939
thread_sleep(200);
4040
}
4141

42+
// All current lk platforms do provide fallback
43+
bool droidboot_internal_have_fallback()
44+
{
45+
return true;
46+
}
47+
4248
// No lk targets do implement dtbo yet
4349
void *droidboot_internal_get_dtbo_load_addr()
4450
{

lk/common/src/lk_common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#pragma once
22
void droidboot_internal_lvgl_threads_init();
33
void *droidboot_internal_get_dtbo_load_addr();
4+
bool droidboot_internal_have_fallback();

u-boot/u-boot.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ bool droidboot_internal_sd_exists()
176176
return false;
177177
}
178178

179+
bool droidboot_internal_have_fallback()
180+
{
181+
return false;
182+
}
183+
179184
// Logging functions
180185
void droidboot_internal_platform_on_screen_log(const char *buf)
181186
{

u-boot/u-boot.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ ssize_t dridboot_internal_sd_write_block(const void *buf, uint32_t block, uint c
2424
uint32_t droidboot_internal_sd_blklen(void);
2525
uint64_t droidboot_internal_sd_blkcnt(void);
2626
bool droidboot_internal_sd_exists(void);
27+
bool droidboot_internal_have_fallback(void);
2728

2829
// Logging functions
2930
void droidboot_internal_platform_on_screen_log(const char *buf);

uefi/common/droidboot_uefi_common.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ bool droidboot_internal_sd_exists()
183183
return true;
184184
}
185185

186+
bool droidboot_internal_have_fallback()
187+
{
188+
return false;
189+
}
190+
186191
// Logging functions
187192
void droidboot_internal_platform_on_screen_log(const char *buf)
188193
{

uefi/common/droidboot_uefi_common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ssize_t dridboot_internal_sd_write_block(const void *buf, uint32_t block, uint c
2525
uint32_t droidboot_internal_sd_blklen(void);
2626
uint64_t droidboot_internal_sd_blkcnt(void);
2727
bool droidboot_internal_sd_exists(void);
28+
bool droidboot_internal_have_fallback(void);
2829

2930
// Logging functions
3031
void droidboot_internal_platform_on_screen_log(const char *buf);

0 commit comments

Comments
 (0)