All of lore.kernel.org
 help / color / mirror / Atom feed
* Set hostname on image?
@ 2012-12-21 15:04 Jonas Jonsson L
  2012-12-21 15:44 ` Tomas Frydrych
  2012-12-24  2:23 ` ChenQi
  0 siblings, 2 replies; 3+ messages in thread
From: Jonas Jonsson L @ 2012-12-21 15:04 UTC (permalink / raw)
  To: Yocto Mailinglist (yocto@yoctoproject.org)

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

Hi!

This is probably a very stupid question, but I don't understand how to set the hostname of the system that I'm building (I'm building a 'core-image-minimal'), unless I

A) write a /etc/hostname file to the image, or
B) write a script that updates the hostname during startup

The installed (/etc/hostname) file is created & installed in the base-files recipe, but I don't understand how to set/use the hostname-variable in that recipe so that it becomes what I want it to be (unless I start editing that recipe ....).

Is there a way to modify the hostname from my 'local.conf' file?

Best regards, Merry Christmas & Happy New Year!

Jonas



[-- Attachment #2: Type: text/html, Size: 1376 bytes --]

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

* Re: Set hostname on image?
  2012-12-21 15:04 Set hostname on image? Jonas Jonsson L
@ 2012-12-21 15:44 ` Tomas Frydrych
  2012-12-24  2:23 ` ChenQi
  1 sibling, 0 replies; 3+ messages in thread
From: Tomas Frydrych @ 2012-12-21 15:44 UTC (permalink / raw)
  To: yocto

On 21/12/12 15:04, Jonas Jonsson L wrote:
> The installed (/etc/hostname) file is created & installed in the
> base-files recipe, but I don't understand how to set/use the
> hostname-variable in that recipe so that it becomes what I want it to be
> (unless I start editing that recipe ....).
>  
> Is there a way to modify the hostname from my 'local.conf' file?

You will not be able to override it in local.conf because the 'hostname'
variable in the recipe is not weakly assigned. But you should be able to
override it in a base-files.bbappend.

Tomas


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

* Re: Set hostname on image?
  2012-12-21 15:04 Set hostname on image? Jonas Jonsson L
  2012-12-21 15:44 ` Tomas Frydrych
@ 2012-12-24  2:23 ` ChenQi
  1 sibling, 0 replies; 3+ messages in thread
From: ChenQi @ 2012-12-24  2:23 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

On 12/21/2012 11:04 PM, Jonas Jonsson L wrote:
> Hi!
> This is probably a very stupid question, but I don't understand how to 
> set the hostname of the system that I'm building (I'm building a 
> 'core-image-minimal'), unless I
> A) write a /etc/hostname file to the image, or
> B) write a script that updates the hostname during startup
> The installed (/etc/hostname) file is created & installed in the 
> base-files recipe, but I don't understand how to set/use the 
> hostname-variable in that recipe so that it becomes what I want it to 
> be (unless I start editing that recipe ....).
> Is there a way to modify the hostname from my 'local.conf' file?
The hostname.sh script in recipes-core/initscripts will be later 
modified to regard the kernel command line parameters. You can then 
specify your hostname in kernel command line when booting.

Best Regards,
Chen Qi
> Best regards, Merry Christmas & Happy New Year!
> Jonas
>
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


[-- Attachment #2: Type: text/html, Size: 2923 bytes --]

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

end of thread, other threads:[~2012-12-24  2:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-21 15:04 Set hostname on image? Jonas Jonsson L
2012-12-21 15:44 ` Tomas Frydrych
2012-12-24  2:23 ` ChenQi

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.