* [ptxdist] [PATCH] u-boot: Add option to install u-boot environment tools on target
@ 2012-05-28 12:42 Bart vdr. Meulen
2012-05-29 8:31 ` Alexander Dahl
0 siblings, 1 reply; 3+ messages in thread
From: Bart vdr. Meulen @ 2012-05-28 12:42 UTC (permalink / raw)
To: ptxdist; +Cc: Ivo Sieben
From: Remy Bohmer <linux@bohmer.net>
Add config option that can be used to install u-boot tools on target
Current tools that can be selected:
- fw_setenv
- fw_printenv
- gen_eth_addr
Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ivo Sieben <meltedpianoman@gmail.com>
---
platforms/u-boot.in | 6 ++++++
rules/u-boot.make | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index e5401d6..f3a7a63 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -79,5 +79,11 @@ config U_BOOT_INSTALL_U_BOOT_IMG
endif
+config U_BOOT_INSTALL_TOOLS
+ prompt "install u-boot userspace tools"
+ bool
+ help
+ Installs the u-boot user space tools (fw_printenv, fw_setenv &
+ gen_eth_addr) tools in the target image.
endif
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 36760ee..7ab9959 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -50,11 +50,30 @@ $(STATEDIR)/u-boot.prepare:
@$(call touch)
# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/u-boot.compile:
+ @$(call targetinfo)
+ @$(call world/compile,U_BOOT)
+ifdef PTXCONF_U_BOOT_INSTALL_TOOLS
+ @cd $(U_BOOT_DIR) && make env CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(PTXCONF_GNU_TARGET)-gcc
+ @cd $(U_BOOT_DIR) && make eth CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(PTXCONF_GNU_TARGET)-gcc
+endif
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------
$(STATEDIR)/u-boot.install:
@$(call targetinfo)
+ifdef PTXCONF_U_BOOT_INSTALL_TOOLS
+ @mkdir -p $(U_BOOT_PKGDIR)/usr/bin/ $(U_BOOT_PKGDIR)/etc/
+ @install -D -m 755 $(U_BOOT_DIR)/tools/env/fw_printenv $(U_BOOT_PKGDIR)/usr/bin/
+ @ln -sf fw_printenv $(U_BOOT_PKGDIR)/usr/bin/fw_setenv
+ @install -D -m 755 $(U_BOOT_DIR)/tools/eth/gen_eth_addr $(U_BOOT_PKGDIR)/usr/bin/
+endif
@$(call touch)
# ----------------------------------------------------------------------------
@@ -76,6 +95,21 @@ endif
ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_IMG
@install -D -m644 $(U_BOOT_DIR)/u-boot.img $(IMAGEDIR)/u-boot.img
endif
+
+ifdef PTXCONF_U_BOOT_INSTALL_TOOLS
+ @$(call install_init, u-boot)
+ @$(call install_fixup, u-boot,PRIORITY,optional)
+ @$(call install_fixup, u-boot,SECTION,base)
+ @$(call install_fixup, u-boot,AUTHOR,"Remy Bohmer <linux@bohmer.net>")
+ @$(call install_fixup, u-boot,DESCRIPTION,missing)
+
+ @$(call install_copy, u-boot, 0, 0, 0755, -, /usr/bin/fw_printenv)
+ @$(call install_link, u-boot, fw_printenv, /usr/bin/fw_setenv)
+ @$(call install_copy, u-boot, 0, 0, 0755, -, /usr/bin/gen_eth_addr)
+
+ @$(call install_finish, u-boot)
+endif
+
@$(call touch)
# ----------------------------------------------------------------------------
--
1.7.9.5
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] [PATCH] u-boot: Add option to install u-boot environment tools on target
2012-05-28 12:42 [ptxdist] [PATCH] u-boot: Add option to install u-boot environment tools on target Bart vdr. Meulen
@ 2012-05-29 8:31 ` Alexander Dahl
2012-05-29 15:34 ` Bart van der Meulen
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Dahl @ 2012-05-29 8:31 UTC (permalink / raw)
To: ptxdist
Hello,
Am 2012-05-28 14:42, schrieb Bart vdr. Meulen:
> From: Remy Bohmer <linux@bohmer.net>
>
> Add config option that can be used to install u-boot tools on target
> Current tools that can be selected:
> - fw_setenv
> - fw_printenv
> - gen_eth_addr
Does this conflict with the recently introduced u-boot-tools package?
Greets
Alex
--
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 ***
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] [PATCH] u-boot: Add option to install u-boot environment tools on target
2012-05-29 8:31 ` Alexander Dahl
@ 2012-05-29 15:34 ` Bart van der Meulen
0 siblings, 0 replies; 3+ messages in thread
From: Bart van der Meulen @ 2012-05-29 15:34 UTC (permalink / raw)
To: ptxdist
Hi,
2012/5/29 Alexander Dahl <post@lespocky.de>:
> Hello,
>
> Am 2012-05-28 14:42, schrieb Bart vdr. Meulen:
>> From: Remy Bohmer <linux@bohmer.net>
>>
>> Add config option that can be used to install u-boot tools on target
>> Current tools that can be selected:
>> - fw_setenv
>> - fw_printenv
>> - gen_eth_addr
>
> Does this conflict with the recently introduced u-boot-tools package?
>
Looks like it will, I must admit I missed that the package was added,
I will look into it,
> Greets
> Alex
>
> --
> »With the first link, the chain is forged. The first speech censured,
> the first thought forbidden, the first freedom denied, chains us all
> irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
> *** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 ***
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
Bart
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-29 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-28 12:42 [ptxdist] [PATCH] u-boot: Add option to install u-boot environment tools on target Bart vdr. Meulen
2012-05-29 8:31 ` Alexander Dahl
2012-05-29 15:34 ` Bart van der Meulen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox