mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Markus Niebel <list-09_ptxdist@tqsc.de>
To: ptxdist@pengutronix.de
Cc: bth@kamstrup.dk, Martin Fisker <mfi@kamstrup.dk>
Subject: Re: [ptxdist] [RFC] u-boot-tools: emmc support in fw_printenv/fw_setenv
Date: Tue, 05 Aug 2014 14:29:12 +0200	[thread overview]
Message-ID: <53E0CE18.9060103@tqsc.de> (raw)
In-Reply-To: <1407140962-2116-1-git-send-email-bth@kamstrup.dk>

Hello Bruno,

Am 04.08.2014 10:29, wrote Bruno Thomsen:
> Provide read/write access to U-Boot environment stored in eMMC flash from Linux.
> 
> Access to U-Boot environment can be very useful; dual kernel/rootfs images, production default values, change kernel bootargs, etc.
> 
> Tested with U-Boot 2009.08 and 2013.04 on TQMa28.
> 

Wouldn't it be better to rework the support for u-boot tools in general? (I know, this will be tricky, since
U-Boot environment tools compilation is really an adventure). Also I think, we should use the same version of
U-Boot tools as we use for the U-Boot itself.

What do you think?

For reference here is an internal used version of the u-boot-tools Makefile (known to work with U-Boot versions from our BSP for TQMa53 / TQMa6x). Should work at least for U-Boot 2013.01 and 2013.04 You need to provide a target specific /etc/fw_env.config

8<--------------------------------------------------------------------
# -*-makefile-*-
#
# Copyright (C) 2012 by Andreas Bießmann <andreas@biessmann.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_U_BOOT_TOOLS) += u-boot-tools

#
# Paths and names
#
U_BOOT_TOOLS_VERSION	:= $(U_BOOT_VERSION)
U_BOOT_TOOLS_MD5	:= $(U_BOOT_MD5)
U_BOOT_TOOLS		:= u-boot-$(U_BOOT_TOOLS_VERSION)
U_BOOT_TOOLS_SUFFIX	:= tar.bz2
U_BOOT_TOOLS_URL	:= http://ftp.denx.de/pub/u-boot/$(U_BOOT_TOOLS).$(U_BOOT_TOOLS_SUFFIX)
U_BOOT_TOOLS_SOURCE	:= $(SRCDIR)/$(U_BOOT_TOOLS).$(U_BOOT_TOOLS_SUFFIX)
U_BOOT_TOOLS_DIR	:= $(BUILDDIR)/$(U_BOOT_TOOLS)
U_BOOT_TOOLS_LICENSE	:= GPLv2

$(STATEDIR)/u-boot-tools.extract: $(STATEDIR)/u-boot.extract
	@$(call targetinfo)
	@$(call touch)

$(STATEDIR)/u-boot-tools.prepare: $(STATEDIR)/u-boot.prepare
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

U_BOOT_TOOLS_PATH	:= $(U_BOOT_PATH)
# U_BOOT_TOOLS_MAKE_OPT	:= $(U_BOOT_MAKE_OPT) tools

U_BOOT_TOOLS_CONF_TOOL	:= NO
U_BOOT_TOOLS_MAKE_OPT	:= \
	HOSTCC="$(BOOTLOADER_CROSS_COMPILE)gcc" \
	HOSTSTRIP="$(BOOTLOADER_CROSS_COMPILE)strip" \
	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
	tools

#	HOSTCC="$(CROSS_CC)" \
#	HOSTSTRIP="$(CROSS_STRIP)" \
#	tools

ifdef PTXCONF_U_BOOT_TOOLS_TOOL_ENV
U_BOOT_TOOLS_MAKE_OPT	+= env
endif

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/u-boot-tools.install:
	@$(call targetinfo)
	install -D $(U_BOOT_TOOLS_DIR)/tools/env/fw_printenv \
		$(U_BOOT_TOOLS_PKGDIR)/usr/sbin/fw_printenv
	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/u-boot-tools.targetinstall:
	@$(call targetinfo)

	@$(call install_init,  u-boot-tools)
	@$(call install_fixup, u-boot-tools,PRIORITY,optional)
	@$(call install_fixup, u-boot-tools,SECTION,base)
	@$(call install_fixup, u-boot-tools,AUTHOR,\
		"Andreas Bießmann <andreas@biessmann.de>")
	@$(call install_fixup, u-boot-tools,DESCRIPTION,missing)

ifdef PTXCONF_U_BOOT_TOOLS_TOOL_ENV
	@$(call install_copy, u-boot-tools, 0, 0, 0755, -, /usr/sbin/fw_printenv)
	@$(call install_link, u-boot-tools, fw_printenv, /usr/sbin/fw_setenv)
	@$(call install_alternative, u-boot-tools, 0, 0, 0644, /etc/fw_env.config)
endif

	@$(call install_finish, u-boot-tools)

	@$(call touch)

$(STATEDIR)/u-boot-tools.clean:
	@$(call targetinfo)
	-rm $(STATEDIR)/u-boot-tools.*
#	@$(call clean_pkg, U_BOOT_TOOLS)

# vim: syntax=make
8<--------------------------------------------------------------------

Regards

Markus

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2014-08-05 12:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04  8:29 Bruno Thomsen
2014-08-05 11:37 ` Markus Niebel
2014-08-05 12:29 ` Markus Niebel [this message]
2014-08-08 10:16   ` Michael Olbrich
2014-08-20  9:02     ` Bruno Thomsen
2014-08-25 10:09       ` Markus Niebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E0CE18.9060103@tqsc.de \
    --to=list-09_ptxdist@tqsc.de \
    --cc=bth@kamstrup.dk \
    --cc=mfi@kamstrup.dk \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox