Browse Source

U-Boot: use U-Boot functions to access the environment

Allow to use U-Boot library to access the environment instead of
duplicating the code inside swupdate.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Stefano Babic 10 years ago
parent
commit
5114ff8193

+ 31 - 0
recipes-bsp/u-boot/files/0001-Allow-fw-env-tools-to-be-available-as-library.patch

@@ -0,0 +1,31 @@
+From e6850fcf6273b2068c5ae659bbacd8c7f664fd26 Mon Sep 17 00:00:00 2001
+From: Stefano Babic <sbabic@denx.de>
+Date: Mon, 22 Jun 2015 14:58:24 +0200
+Subject: [PATCH] Allow fw env tools to be available as library
+
+Signed-off-by: Stefano Babic <sbabic@denx.de>
+---
+ tools/env/Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tools/env/Makefile b/tools/env/Makefile
+index 40164f7..38ad118 100644
+--- a/tools/env/Makefile
++++ b/tools/env/Makefile
+@@ -23,10 +23,12 @@ endif
+ always := fw_printenv
+ hostprogs-y := fw_printenv
+ 
+-fw_printenv-objs := fw_env.o fw_env_main.o \
++lib-y += fw_env.o \
+ 	crc32.o ctype.o linux_string.o \
+ 	env_attr.o env_flags.o aes.o
+ 
++fw_printenv-objs := fw_env_main.o $(lib-y)
++
+ quiet_cmd_crosstools_strip = STRIP   $^
+       cmd_crosstools_strip = $(STRIP) $^; touch $@
+ 
+-- 
+1.9.1
+

+ 8 - 0
recipes-bsp/u-boot/u-boot-fw-utils%.bbappend

@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://0001-Allow-fw-env-tools-to-be-available-as-library.patch"
+
+do_install_append() {
+    install -d ${D}${libdir}
+    install -m 644  ${S}/tools/env/lib.a ${D}${libdir}/libubootenv.a
+}