All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] coreutils: get the uptime program to work
@ 2014-09-10 20:44 Thomas Petazzoni
  2014-09-11  9:12 ` Vicente Olivert Riera
  2014-09-13 21:54 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2014-09-10 20:44 UTC (permalink / raw)
  To: buildroot

coreutils configure script needs to know whether /proc/uptime is
available, but this is not possible in a cross-compilation
context. This leads to an uptime program that fails to work on the
target, as it has been compiled without /proc/uptime reading support.

This commit fixes that by telling coreutils at configure time that
/proc/uptime will be available on the target (which seems to be a
reasonable assumption on Linux systems).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/coreutils/coreutils.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index 07a1347..e6af7e2 100644
--- a/package/coreutils/coreutils.mk
+++ b/package/coreutils/coreutils.mk
@@ -57,6 +57,7 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \
 		gl_cv_func_working_mkstemp=yes \
 		gl_cv_func_working_utimes=yes \
 		gl_getline_needs_run_time_check=no \
+		gl_cv_have_proc_uptime=yes \
 		utils_cv_localtime_cache=no \
 		PERL=missing
 
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] coreutils: get the uptime program to work
  2014-09-10 20:44 [Buildroot] [PATCH] coreutils: get the uptime program to work Thomas Petazzoni
@ 2014-09-11  9:12 ` Vicente Olivert Riera
  2014-09-13 21:54 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Vicente Olivert Riera @ 2014-09-11  9:12 UTC (permalink / raw)
  To: buildroot

Dear ThomasP,

On 09/10/2014 09:44 PM, Thomas Petazzoni wrote:
> coreutils configure script needs to know whether /proc/uptime is
> available, but this is not possible in a cross-compilation
> context. This leads to an uptime program that fails to work on the
> target, as it has been compiled without /proc/uptime reading support.
>
> This commit fixes that by telling coreutils at configure time that
> /proc/uptime will be available on the target (which seems to be a
> reasonable assumption on Linux systems).
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>   package/coreutils/coreutils.mk | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
> index 07a1347..e6af7e2 100644
> --- a/package/coreutils/coreutils.mk
> +++ b/package/coreutils/coreutils.mk
> @@ -57,6 +57,7 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \
>   		gl_cv_func_working_mkstemp=yes \
>   		gl_cv_func_working_utimes=yes \
>   		gl_getline_needs_run_time_check=no \
> +		gl_cv_have_proc_uptime=yes \
>   		utils_cv_localtime_cache=no \
>   		PERL=missing
>
>

Welcome to Buildroot
(none) login: root
# uptime
  00:00am  up   0:00,  1 user,  load average: 0.46, 0.00, 0.10

It works :)

Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

-- 
Vincent

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] coreutils: get the uptime program to work
  2014-09-10 20:44 [Buildroot] [PATCH] coreutils: get the uptime program to work Thomas Petazzoni
  2014-09-11  9:12 ` Vicente Olivert Riera
@ 2014-09-13 21:54 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2014-09-13 21:54 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > coreutils configure script needs to know whether /proc/uptime is
 > available, but this is not possible in a cross-compilation
 > context. This leads to an uptime program that fails to work on the
 > target, as it has been compiled without /proc/uptime reading support.

 > This commit fixes that by telling coreutils at configure time that
 > /proc/uptime will be available on the target (which seems to be a
 > reasonable assumption on Linux systems).

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-13 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-10 20:44 [Buildroot] [PATCH] coreutils: get the uptime program to work Thomas Petazzoni
2014-09-11  9:12 ` Vicente Olivert Riera
2014-09-13 21:54 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.