forked from Tow-Boot/Tow-Boot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hardware/allwinner: Fix build with environment outside mmc
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
modules/hardware/allwinner/0001-sunxi-Use-mmc_get_env_dev-only-if-relevant.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 30da7f7745f15ead3a5bbc7e99a421bdb9009855 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Dionne-Riel <[email protected]> | ||
Date: Tue, 22 Feb 2022 10:51:33 -0500 | ||
Subject: [PATCH] sunxi: Use mmc_get_env_dev only if relevant | ||
|
||
When build is made with environment elsewhere than on MMC, the reference | ||
to `CONFIG_SYS_MMC_ENV_DEV` will not exist, and thus this fails. | ||
--- | ||
board/sunxi/board.c | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/board/sunxi/board.c b/board/sunxi/board.c | ||
index 1a46100e408..689034355e8 100644 | ||
--- a/board/sunxi/board.c | ||
+++ b/board/sunxi/board.c | ||
@@ -637,6 +637,7 @@ int board_mmc_init(struct bd_info *bis) | ||
return 0; | ||
} | ||
|
||
+#ifdef CONFIG_SYS_MMC_ENV_DEV | ||
#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1 | ||
int mmc_get_env_dev(void) | ||
{ | ||
@@ -651,6 +652,7 @@ int mmc_get_env_dev(void) | ||
} | ||
#endif | ||
#endif | ||
+#endif | ||
|
||
#ifdef CONFIG_SPL_BUILD | ||
|
||
-- | ||
2.34.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters