Skip to contentSkip to conversation

u-boot-fw-utils: Add support for libubootenv

PATCH Superseded Stefano Babic 3 participants 5 messages Jan 2, 2020

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 u-boot-fw-utils: Add support for libubootenv

libubootenv is a replacement for u-boot-fw-utils. It is hardware-independent and provides fw_printenv and fw_setenv tools that are full compatible with the ones provided by U-Boot. A library is provided to access the environment from an own application. License is LGPL-2.1 and this allow to link the library to proprietary code. The user of the tools should install the configuration file "fw_env.config", as he is already used to with u-boot-fw-utils. The configuration file is compatible with u-boot-fw-utils.

---

Changes since V1:
- drop PACKAGE_ARCH (M. Jansa)

 meta/recipes-bsp/u-boot/libubootenv.inc    | 25 ++++++++++++++++++++++
 meta/recipes-bsp/u-boot/libubootenv_0.2.bb |  2 ++
 2 files changed, 27 insertions(+)
 create mode 100644 meta/recipes-bsp/u-boot/libubootenv.inc
 create mode 100644 meta/recipes-bsp/u-boot/libubootenv_0.2.bb
meta/recipes-bsp/u-boot/libubootenv.inc new file +25 -0
new file mode 100644
index 0000000000..de7bee9197
@@ -0,0 +1,25 @@
+SUMMARY = "U-Boot libraries and tools to access environment"
+DEPENDS += "mtd-utils"
+
+DESCRIPTION = "This package contains tools and libraries to read \
+and modify U-Boot environment. \
+It provides a hardware-independent replacement for fw_printenv/setenv utilities \
+provided by U-Boot"
+
+HOMEPAGE = "https://github.com/sbabic/libubootenv"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c"
+SECTION = "libs"
+
+SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release"
+
+PROVIDES += "u-boot-fw-utils"
+RPROVIDES_${PN} += "u-boot-fw-utils"
+
+BBCLASSEXTEND = "native"
meta/recipes-bsp/u-boot/libubootenv_0.2.bb new file +2 -0
new file mode 100644
index 0000000000..96a60cbc4b
@@ -0,0 +1,2 @@
+require libubootenv.inc
+SRCREV = "bf6ff631c0e38cede67268ceb8bf1383b5f8848e"
Signature · 1 line
2.17.1
#1 lore raw

meta/recipes-bsp/u-boot/libubootenv_0.2.bb line 2

Quoted 4 lines · Stefano Babic

+++ b/meta/recipes-bsp/u-boot/libubootenv_0.2.bb

meta/recipes-bsp/u-boot/libubootenv_0.2.bb new file +2 -0
@@ -0,0 +1,2 @@
+require libubootenv.inc
+SRCREV = "bf6ff631c0e38cede67268ceb8bf1383b5f8848e"

I *really* dislike bb/inc splits where there's nothing gained apart from more work when editing recipes. Can you just merge these?

Ross

#2 lore raw

Hi Ross,

Quoted 8 lines · Ross Burton

meta/recipes-bsp/u-boot/libubootenv_0.2.bb line 2

Quoted 4 lines · Stefano Babic

+++ b/meta/recipes-bsp/u-boot/libubootenv_0.2.bb

meta/recipes-bsp/u-boot/libubootenv_0.2.bb new file +2 -0
@@ -0,0 +1,2 @@
+require libubootenv.inc
+SRCREV = "bf6ff631c0e38cede67268ceb8bf1383b5f8848e"

I *really* dislike bb/inc splits where there's nothing gained apart from more work when editing recipes.  Can you just merge these?

Of course, I'll do in V3.

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#3 lore raw
In reply to Stefano Babic
Quoted 9 lines · Stefano Babic

libubootenv is a replacement for u-boot-fw-utils. It is hardware-independent and provides fw_printenv and fw_setenv tools that are full compatible with the ones provided by U-Boot. A library is provided to access the environment from an own application. License is LGPL-2.1 and this allow to link the library to proprietary code. The user of the tools should install the configuration file "fw_env.config", as he is already used to with u-boot-fw-utils. The configuration file is compatible with u-boot-fw-utils.
...

Why do we need two implementations of the same in OE-core? meta-oe sounds more appropriate to me.

cu
Adrian

#4 lore raw

Hi Adrian,

Quoted 11 lines · Adrian Bunk
Quoted 9 lines · Stefano Babic

libubootenv is a replacement for u-boot-fw-utils. It is hardware-independent and provides fw_printenv and fw_setenv tools that are full compatible with the ones provided by U-Boot. A library is provided to access the environment from an own application. License is LGPL-2.1 and this allow to link the library to proprietary code. The user of the tools should install the configuration file "fw_env.config", as he is already used to with u-boot-fw-utils. The configuration file is compatible with u-boot-fw-utils.
...

Quoted 2 lines

Why do we need two implementations of the same in OE-core? meta-oe sounds more appropriate to me.

Well, it looks to me more consistent that tools for U-Boot's environment are grouped together. It seems to me more easy and transparent. I agree with you if u-boot-fw-utils was in meta-oe/recipes-bsp.

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================