From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtprelay01.ispgateway.de ([80.67.31.24]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XEcs9-0001ix-34 for ptxdist@pengutronix.de; Tue, 05 Aug 2014 13:25:44 +0200 Message-ID: <53E0C214.6080902@tqsc.de> Date: Tue, 05 Aug 2014 13:37:56 +0200 From: Markus Niebel MIME-Version: 1.0 References: <1407140962-2116-1-git-send-email-bth@kamstrup.dk> In-Reply-To: <1407140962-2116-1-git-send-email-bth@kamstrup.dk> Subject: Re: [ptxdist] [RFC] u-boot-tools: emmc support in fw_printenv/fw_setenv Reply-To: ptxdist@pengutronix.de, list-09@tqsc.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: bth@kamstrup.dk, Martin Fisker 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 image= s, 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). Sho= uld work at least for U-Boot 2013.01 and 2013.04 You need to provide a targ= et specific /etc/fw_env.config 8<-------------------------------------------------------------------- # -*-makefile-*- # # Copyright (C) 2012 by Andreas Bie=C3=9Fmann # # 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) +=3D u-boot-tools # # Paths and names # U_BOOT_TOOLS_VERSION :=3D $(U_BOOT_VERSION) U_BOOT_TOOLS_MD5 :=3D $(U_BOOT_MD5) U_BOOT_TOOLS :=3D u-boot-$(U_BOOT_TOOLS_VERSION) U_BOOT_TOOLS_SUFFIX :=3D tar.bz2 U_BOOT_TOOLS_URL :=3D http://ftp.denx.de/pub/u-boot/$(U_BOOT_TOOLS).$(U_BOO= T_TOOLS_SUFFIX) U_BOOT_TOOLS_SOURCE :=3D $(SRCDIR)/$(U_BOOT_TOOLS).$(U_BOOT_TOOLS_SUFFIX) U_BOOT_TOOLS_DIR :=3D $(BUILDDIR)/$(U_BOOT_TOOLS) U_BOOT_TOOLS_LICENSE :=3D 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 :=3D $(U_BOOT_PATH) # U_BOOT_TOOLS_MAKE_OPT :=3D $(U_BOOT_MAKE_OPT) tools U_BOOT_TOOLS_CONF_TOOL :=3D NO U_BOOT_TOOLS_MAKE_OPT :=3D \ HOSTCC=3D"$(BOOTLOADER_CROSS_COMPILE)gcc" \ HOSTSTRIP=3D"$(BOOTLOADER_CROSS_COMPILE)strip" \ CROSS_COMPILE=3D$(BOOTLOADER_CROSS_COMPILE) \ tools # HOSTCC=3D"$(CROSS_CC)" \ # HOSTSTRIP=3D"$(CROSS_STRIP)" \ # tools ifdef PTXCONF_U_BOOT_TOOLS_TOOL_ENV U_BOOT_TOOLS_MAKE_OPT +=3D 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=C3=9Fmann ") @$(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=3Dmake 8<-------------------------------------------------------------------- Regards Markus -- = ptxdist mailing list ptxdist@pengutronix.de