diff mbox

[U-Boot,v4,3/8] env: Enable getenv_f() for SPL_BUILD

Message ID 1348657852-11457-1-git-send-email-sr@denx.de
State Superseded
Delegated to: Scott Wood
Headers show

Commit Message

Stefan Roese Sept. 26, 2012, 11:10 a.m. UTC
With this patch, getenv_f() can be included easily into the SPL
binary. With this, SPL boards can now use getenv_f() to read
environment variables (e.g. to detect if the OS or U-Boot shall
be executed).

In the approach this is done for env stored in NOR flash, as this
will be used by an upcoming MPC5200 board port.

Signed-off-by: Stefan Roese <sr@denx.de>
---
Changes in v3:
- Rebased on current master plus SPL framework v7

Changes in v4:
- getenv_f not extracted into separate file. Only Makefile
  additions for SPL_BUILD needed.

 common/Makefile | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/common/Makefile b/common/Makefile
index 22e8a6f..0a0ffc3 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -194,6 +194,9 @@  COBJS-$(CONFIG_CMD_DFU) += cmd_dfu.o
 endif
 
 ifdef CONFIG_SPL_BUILD
+COBJS-y += cmd_nvedit.o
+COBJS-y += env_common.o
+COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
 COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
 endif
 COBJS-y += console.o