All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: udev: update rcS to auto-detect hostname
  2012-08-15  3:08 udev: update rcS to auto-detect hostname b19537
@ 2012-08-15  3:01 ` Khem Raj
  2012-08-15  4:06   ` McClintock Matthew-B29882
  2012-08-15  7:41   ` Koen Kooi
  2012-08-15 14:01 ` Otavio Salvador
  1 sibling, 2 replies; 8+ messages in thread
From: Khem Raj @ 2012-08-15  3:01 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Aug 14, 2012 at 8:08 PM,  <b19537@freescale.com> wrote:
> echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`

$ echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz

is that what we want ?



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

* udev: update rcS to auto-detect hostname
@ 2012-08-15  3:08 b19537
  2012-08-15  3:01 ` Khem Raj
  2012-08-15 14:01 ` Otavio Salvador
  0 siblings, 2 replies; 8+ messages in thread
From: b19537 @ 2012-08-15  3:08 UTC (permalink / raw)
  To: openembedded-core

From: Zhenhua Luo <b19537@freescale.com>

    the rootfs image can be reused by targets with same core type

Signed-off-by: Zhenhua Luo <b19537@freescale.com>
---
 meta/recipes-core/sysvinit/sysvinit/rcS |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit/rcS b/meta/recipes-core/sysvinit/sysvinit/rcS
index 080b04f..51425ff 100755
--- a/meta/recipes-core/sysvinit/sysvinit/rcS
+++ b/meta/recipes-core/sysvinit/sysvinit/rcS
@@ -22,6 +22,11 @@ export PATH runlevel prevlevel
 . /etc/default/rcS
 
 #
+#       Update the hostname according to actual board type
+#
+echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"` > /etc/hostname
+
+#
 #	Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
 #
 trap ":" INT QUIT TSTP
-- 
1.7.0.4





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

* Re: udev: update rcS to auto-detect hostname
  2012-08-15  3:01 ` Khem Raj
@ 2012-08-15  4:06   ` McClintock Matthew-B29882
  2012-08-15  4:12     ` Chris Larson
  2012-08-15  7:41   ` Koen Kooi
  1 sibling, 1 reply; 8+ messages in thread
From: McClintock Matthew-B29882 @ 2012-08-15  4:06 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Aug 14, 2012 at 10:01 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Tue, Aug 14, 2012 at 8:08 PM,  <b19537@freescale.com> wrote:
>> echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
>
> $ echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
>
> is that what we want ?

I think we need an option to turn it on or off and or make it
configurable from a BSP layer. We are looking for a way to make a rfs
for all e500v2 or e500mc, etc and say the right machine type on the
prompt.

-M

>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



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

* Re: udev: update rcS to auto-detect hostname
  2012-08-15  4:06   ` McClintock Matthew-B29882
@ 2012-08-15  4:12     ` Chris Larson
  2012-08-15  4:21       ` McClintock Matthew-B29882
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Larson @ 2012-08-15  4:12 UTC (permalink / raw)
  To: McClintock Matthew-B29882,
	Patches and discussions about the oe-core layer

On Tue, Aug 14, 2012 at 9:06 PM, McClintock Matthew-B29882
<B29882@freescale.com> wrote:
> On Tue, Aug 14, 2012 at 10:01 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> On Tue, Aug 14, 2012 at 8:08 PM,  <b19537@freescale.com> wrote:
>>> echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
>>
>> $ echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
>>
>> is that what we want ?
>
> I think we need an option to turn it on or off and or make it
> configurable from a BSP layer. We are looking for a way to make a rfs
> for all e500v2 or e500mc, etc and say the right machine type on the
> prompt.

This sounds like something that really does belong in your own
supplementary layer, rather than oe-core.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics



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

* Re: udev: update rcS to auto-detect hostname
  2012-08-15  4:12     ` Chris Larson
@ 2012-08-15  4:21       ` McClintock Matthew-B29882
  2012-08-15 13:53         ` Richard Purdie
  0 siblings, 1 reply; 8+ messages in thread
From: McClintock Matthew-B29882 @ 2012-08-15  4:21 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: McClintock Matthew-B29882

On Tue, Aug 14, 2012 at 11:12 PM, Chris Larson <clarson@kergoth.com> wrote:
> On Tue, Aug 14, 2012 at 9:06 PM, McClintock Matthew-B29882
> <B29882@freescale.com> wrote:
>> On Tue, Aug 14, 2012 at 10:01 PM, Khem Raj <raj.khem@gmail.com> wrote:
>>> On Tue, Aug 14, 2012 at 8:08 PM,  <b19537@freescale.com> wrote:
>>>> echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
>>>
>>> $ echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
>>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
>>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
>>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
>>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
>>>
>>> is that what we want ?
>>
>> I think we need an option to turn it on or off and or make it
>> configurable from a BSP layer. We are looking for a way to make a rfs
>> for all e500v2 or e500mc, etc and say the right machine type on the
>> prompt.
>
> This sounds like something that really does belong in your own
> supplementary layer, rather than oe-core.

Seemed like a valuable option for making rfs for multiple machines /
targets, but if we don't want it (or some of the bits) in oe-core
that's fine by me too.

-M

> --
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



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

* Re: udev: update rcS to auto-detect hostname
  2012-08-15  3:01 ` Khem Raj
  2012-08-15  4:06   ` McClintock Matthew-B29882
@ 2012-08-15  7:41   ` Koen Kooi
  1 sibling, 0 replies; 8+ messages in thread
From: Koen Kooi @ 2012-08-15  7:41 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 15 aug. 2012, om 05:01 heeft Khem Raj <raj.khem@gmail.com> het volgende geschreven:

> On Tue, Aug 14, 2012 at 8:08 PM,  <b19537@freescale.com> wrote:
>> echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
> 
> $ echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> 
> is that what we want ?

On ARM it will be empty:

root@beaglebone:~# echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`

root@beaglebone:~#


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

* Re: udev: update rcS to auto-detect hostname
  2012-08-15  4:21       ` McClintock Matthew-B29882
@ 2012-08-15 13:53         ` Richard Purdie
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2012-08-15 13:53 UTC (permalink / raw)
  To: McClintock Matthew-B29882,
	Patches and discussions about the oe-core layer

On Wed, 2012-08-15 at 04:21 +0000, McClintock Matthew-B29882 wrote:
> On Tue, Aug 14, 2012 at 11:12 PM, Chris Larson <clarson@kergoth.com> wrote:
> > On Tue, Aug 14, 2012 at 9:06 PM, McClintock Matthew-B29882
> > <B29882@freescale.com> wrote:
> >> On Tue, Aug 14, 2012 at 10:01 PM, Khem Raj <raj.khem@gmail.com> wrote:
> >>> On Tue, Aug 14, 2012 at 8:08 PM,  <b19537@freescale.com> wrote:
> >>>> echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
> >>>
> >>> $ echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"`
> >>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> >>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> >>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> >>> model : 23 model name : intel(r) core(tm)2 quad cpu q9300 @ 2.50ghz
> >>>
> >>> is that what we want ?
> >>
> >> I think we need an option to turn it on or off and or make it
> >> configurable from a BSP layer. We are looking for a way to make a rfs
> >> for all e500v2 or e500mc, etc and say the right machine type on the
> >> prompt.
> >
> > This sounds like something that really does belong in your own
> > supplementary layer, rather than oe-core.
> 
> Seemed like a valuable option for making rfs for multiple machines /
> targets, but if we don't want it (or some of the bits) in oe-core
> that's fine by me too.

At the very least its powerpc only since it gives crazy results on other
arches. Does it work for all powerpc machines? Its also adding 4 execs
to every boot and those calls mount up and impact boot time.

Cheers,

Richard






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

* Re: udev: update rcS to auto-detect hostname
  2012-08-15  3:08 udev: update rcS to auto-detect hostname b19537
  2012-08-15  3:01 ` Khem Raj
@ 2012-08-15 14:01 ` Otavio Salvador
  1 sibling, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-08-15 14:01 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, Aug 15, 2012 at 12:08 AM,  <b19537@freescale.com> wrote:
> +#       Update the hostname according to actual board type
> +#
> +echo `cat /proc/cpuinfo | grep model | cut -d "," -f 2 | tr "[A-Z]" "[a-z]"` > /etc/hostname
> +
> +#
>  #      Trap CTRL-C &c only in this shell so we can interrupt subprocesses.

This seems to fit well to a BSP init script; seems to be very machine
specific so it doesn't seem to be supported by other arch and
machines.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



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

end of thread, other threads:[~2012-08-15 14:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15  3:08 udev: update rcS to auto-detect hostname b19537
2012-08-15  3:01 ` Khem Raj
2012-08-15  4:06   ` McClintock Matthew-B29882
2012-08-15  4:12     ` Chris Larson
2012-08-15  4:21       ` McClintock Matthew-B29882
2012-08-15 13:53         ` Richard Purdie
2012-08-15  7:41   ` Koen Kooi
2012-08-15 14:01 ` Otavio Salvador

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.