Skip to content

Commit

Permalink
fix uboot compilation issues on Orange Pi 5/5 Plus
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn authored and igorpecovnik committed Jul 3, 2024
1 parent 63ad4d9 commit abe132c
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 7 deletions.
53 changes: 53 additions & 0 deletions patch/u-boot/legacy/u-boot-orangepi5-rk3588/fix-build-errors.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Muhammed Efe Cetin <[email protected]>
Date: Tue, 2 Jul 2024 18:14:23 +0300
Subject: Fix build errors

---
common/edid.c | 2 +-
drivers/mmc/rockchip_dw_mmc.c | 2 +-
include/command.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/edid.c b/common/edid.c
index 111111111111..222222222222 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -3579,7 +3579,7 @@ int add_cea_modes(struct hdmi_edid_data *data, struct edid *edid)
{
const u8 *cea = drm_find_cea_extension(edid);
const u8 *db, *hdmi = NULL, *video = NULL;
- u8 dbl, hdmi_len, video_len = 0;
+ u8 dbl, hdmi_len = 0, video_len = 0;
int modes = 0;

if (cea && cea_revision(cea) >= 3) {
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index 111111111111..222222222222 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -42,7 +42,7 @@ int board_mmc_dm_reinit(struct udevice *dev)
{
struct rockchip_dwmmc_priv *priv = dev_get_priv(dev);

- if (!priv || !&priv->clk)
+ if (!priv)
return 0;

if (!memcmp(dev->name, "dwmmc", strlen("dwmmc")))
diff --git a/include/command.h b/include/command.h
index 111111111111..222222222222 100644
--- a/include/command.h
+++ b/include/command.h
@@ -139,7 +139,7 @@ enum command_ret_t {
* number of ticks the command took to complete.
* @return 0 if the command succeeded, 1 if it failed
*/
-int cmd_process(int flag, int argc, char * const argv[],
+enum command_ret_t cmd_process(int flag, int argc, char * const argv[],
int *repeatable, unsigned long *ticks);

void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
--
Armbian

10 changes: 3 additions & 7 deletions patch/u-boot/legacy/u-boot-orangepi5-rk3588/set-fixed-mac.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ Signed-off-by: Igor <[email protected]>
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/fdt_support.c b/common/fdt_support.c
index e72aaf04e0..fa3d3e7af2 100644
index 111111111111..222222222222 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -703,12 +703,12 @@ void fdt_fixup_ethernet(void *fdt)
tmp = (*end) ? end + 1 : end;
}
@@ -705,8 +705,8 @@ void fdt_fixup_ethernet(void *fdt)

do_fixup_by_path(fdt, path, "mac-address",
&mac_addr, 6, 0);
Expand All @@ -25,8 +23,6 @@ index e72aaf04e0..fa3d3e7af2 100644
}
}
}

/* Resize the fdt to its actual size + a bit of padding */
--
Created with Armbian build tools https://github.com/armbian/build
Armbian

0 comments on commit abe132c

Please sign in to comment.