[meta-intel] [Patch v2 00/11] machinesetuptool commits

Kamble, Nitin A nitin.a.kamble at intel.com
Fri Oct 10 11:46:52 PDT 2014



On 10/10/14, 9:40 AM, "Darren Hart" <dvhart at linux.intel.com> wrote:

>Hi Nitin,
>
>This description helps to identify _what_ the tool is intended to do, but
>it still does not address the _how_, which is important context to have
>when reviewing the patches. There was also no mention of the sources to
>the tool itself, also important for context.

Location of the machine setup tool sources:
http://git.yoctoproject.org/cgit/cgit.cgi/machinesetuptool/


How a target machine is configured?
A. An initscript for the tool is ran on every boot, which checks weather a
valid target machine is already set. If the machine is already set, then
it means that the images is already configured for the target machine, and
nothing much need to be done for setting up, except running any machine
specific Boot time scripts. If the image is not previously setup, which is
the case for the 1st time boot of the image, then the machine detection
script is run, which is not implemented at this point. If the target
machine is not successfully detected, then the target machine selection
script is run, which provides a boot prompt along with list of supported
target machine. The boot prompt comes before the boot splash screen, so it
don¹t get hidden. End user can interactively enter the name of target
machine at the boot prompt. If no input is received on the the boot
prompt, then after timeout of 1 minute, the target machine which is marked
as default machine in the configuration is chosen. Once the target machine
is chosen, then the <targetmachine>.vars file is used to find all the
configuration for the machine. Few machine configuration are listed in the
commits. And look at setup.in file in the sources to see how the machine
configuration is handled.



>
>One gap below is Gummiboot serial support, which I had intended to switch
>meta-intel EFI support over too this release (looking like that may not
>happen... Will look into how invasive that would be).

It can be specified as addition configuration.

>
>Another concern is the statement below about not allowing for a default
>configuration. Like other recent changes to meta-intel, this should be an
>opt-in thing, and as such, the BSPs need to be able to provide defaults.
>The intel-corei7-64 BSP works well as it is for a number of Intel
>platforms, and people using those may prefer not to use the
>machinesetuptool.

As mentioned earlier, it was needed for the reconfiguration of images. The
target machine which is configured as a default target machine can be used
for this purpose. Which makes the tool transparent to them. So I am not
seeing any significant issue here. I think ability to reconfigure an image
is a great benefit for development and testing.

Thanks for the comments Darren,
Nitin




>
>--
>Darren
>
>On 10/8/14, 5:32, "nitin.a.kamble at intel.com" <nitin.a.kamble at intel.com>
>wrote:
>
>>From: Nitin A Kamble <nitin.a.kamble at intel.com>
>>
>>As this is totally new feature I am including some explanation as a
>>simple
>>design document for ease of understanding the implementation.
>>
>>Machine Setup Tool
>>
>>Q. Why is this feature implemented?
>>A. Many of the BSPs from meta-intel are very similar differing only in
>>the
>>   configuration of things such as serial port, X configuration, network,
>>   audio, kernel parameters etc. Now with the common kernel it is
>>possible
>>   to support more platforms or boards with a single BSP. The only thing
>>   missing was the text configuration customization for a particular
>>hardware
>>   platform. The machine setup tool fills this gap.
>>
>>Q. What the machine setup tool can do?
>>A. It provides following capabilities:
>>   * Provide previously defined machine configurations.
>>   * Ability to select a target machine at runtime at the time of boot.
>>   * Ability to reconfigure a previously configured machine for another
>>supported platform.
>>   * Ability to select a default machine when no user input is received
>>at the boot time.
>>   * These configurations can be specified for machines
>>     * ALSA audio configuration file
>>     * ALSA Mixer state file
>>     * Network configuration file
>>     * xorg configuration file
>>     * Machine formfactor file
>>     * Kernel boot parameters
>>     * A list of blacklisted kernel modules
>>     * A list of kernel modules to autoload
>>     * Serial port configuration for syslinux boot loader
>>     * Serial port configuration for grub boot loader
>>     * Serial port configuration for setting up serial console
>>     * Any scripts to run at setup time
>>     * Any scripts to run on every boot
>>
>>Q. What the machine setup tool can not do?
>>A. Anything, which can not be easily manipulated on the target image is
>>   outside of the scope of the machine setup tool. So things like
>>providing
>>   a custom kernel, or providing any special binaries is outside the
>>scope
>>   of the machine setup tool.
>>
>>Q. Is the machine setup tool arch specific?
>>A. Even though, the tool is mainly designed for the BSPs from the
>>meta-intel
>>   layer, there is no architecture specific logic in the tool. It can be
>>   used on other architecture hardware similarly.
>>
>>Q. What are the possible future extensions to the tool?
>>A. * The tool can be extended to detect the target hardware
>>automatically.
>>   * It can also be extended to support more machine configuration
>>     customizations.
>>   * It can be extended to take the target machine from the kernel boot
>>parameter.
>>   * It can be extended to handle different versions of configuration
>>files, to
>>   deal with differences in configurations in the future.
>>
>>Q. What is the history of the machine setup tool?
>>A. The tool has taken few ideas from the zaurusd project. And to avoid
>>any
>>   legacy it has started the code from scratch.
>>
>>Q. What kind of design decision are made while developing the tool?
>>A. The following points are considered in the design of the code.
>>  * The processing logic and the configuration can be neatly separated in
>>the
>>    different Yocto Project layers. This way all the BSP specific
>>    configuration can go in the individual BSP layers, and the common
>>logic
>>    can be placed in the common layer.
>>  * If a target machine is not previously configured, then at the boot
>>time
>>    a list of supported machines is displayed along with a prompt for the
>>    selection of target machine.
>>  * A default target machine can be specified, which becomes the selected
>>    machine when no user input is received at the boot time prompt. This
>>    helps in situations where serial ports may not be accessible at the
>>1st
>>    boot.
>>  * To get the ability of reconfiguration of image, complete machine
>>    configuration need to be specified for each supported machine It can
>>not
>>    rely on any kind of default configuration.
>>
>>Q. What is missing in this pull request?
>>A. The documentation changes for README is missing at this point. These
>>will
>>   follow, once the structure and format of README for such kind of
>>features is
>>   finalized with the microcode commits.
>>
>>Q. What kind of testing these commits has received?
>>A. These commits are tested on the individual BSPs mentioned in the
>>commits.
>>   The feature is working as expected on all the mentioned BSPs. It does
>>not
>>   lack any missing functionality for the meta-intel BSPs.
>>
>>Changes from v1 pull request:
>>* Removed -noemgd suffixes from the machine names.
>>* Added ability to specify and use a default target machine on timeout on
>>the user prompt.
>>* Complete validation of commits on read hardware.
>>* Some typo and code cleanup.
>>
>>Thanks,
>>Nitin
>>
>>The following changes since commit
>>8e5fe6c0f5cf710e1a46c5f203e52f069874768a:
>>  meta-sugarbay: Add wifi machine feature to sugarbay.conf (2014-10-01
>>22:55:56 -0500)
>>
>>are available in the git repository at:
>>
>>  git://git.yoctoproject.org/meta-intel-contrib nitin/machinesetuptool
>>  
>>http://git.yoctoproject.org/cgit.cgi/meta-intel-contrib/log/?h=nitin/mach
>>i
>>nesetuptool
>>
>>Nitin A Kamble (11):
>>  machinesetuptool: a new recipe for setup of a machine
>>  machinesetuptool: add nuc machine config to the intel-corei7-64 BSP
>>  machinesetuptool: add jasperforest machine config to the
>>    intel-corei7-64 BSP
>>  machinesetuptool: add sugarbay machine config to the intel-corei7-64
>>    BSP
>>  machinesetuptool: add emenlow machine config to the intel-core2-32 BSP
>>  machinesetuptool: add crownbay machine config to the intel-core2-32
>>    BSP
>>  machinesetuptool: add fri2 machine config to the intel-core2-32 BSP
>>  intel-corei7-64 BSP: Pull in the machinesetuptool packages
>>  intel-core2-32 BSP: Pull in the machinesetuptool packages
>>  intel-core2-32.conf: remove config handled by machine-setup-tool
>>  intel-corei7-64.conf: remove config handled by machine-setup-tool
>>
>> .../intel-core2-32/crownbay-alsa.conf              |   1 +
>> .../intel-core2-32/crownbay-alsa.state             | 684
>>+++++++++++++++++++++
>> .../intel-core2-32/crownbay-formfactor.machconfig  |   3 +
>> .../intel-core2-32/crownbay-network.interfaces     |   9 +
>> .../machinesetuptool/intel-core2-32/crownbay.vars  |  14 +
>> .../intel-core2-32/emenlow-alsa.conf               |   1 +
>> .../intel-core2-32/emenlow-alsa.state              | 143 +++++
>> .../intel-core2-32/emenlow-formfactor.machconfig   |   3 +
>> .../intel-core2-32/emenlow-network.interfaces      |   9 +
>> .../intel-core2-32/emenlow-xorg.conf               |  22 +
>> .../machinesetuptool/intel-core2-32/emenlow.vars   |  14 +
>> .../machinesetuptool/intel-core2-32/fri2-alsa.conf |   1 +
>> .../intel-core2-32/fri2-alsa.state                 | 411 +++++++++++++
>> .../intel-core2-32/fri2-formfactor.machconfig      |   3 +
>> .../intel-core2-32/fri2-network.interfaces         |   9 +
>> .../machinesetuptool/intel-core2-32/fri2.vars      |  17 +
>> .../intel-corei7-64/jasperforest-alsa.conf         |   1 +
>> .../jasperforest-formfactor.machconfig             |   3 +
>> .../jasperforest-network.interfaces                |   9 +
>> .../intel-corei7-64/jasperforest.vars              |  14 +
>> .../machinesetuptool/intel-corei7-64/nuc-alsa.conf |  24 +
>> .../intel-corei7-64/nuc-alsa.state                 | 309 ++++++++++
>> .../nuc-bootscript-hdmi_port_audio.sh              |  19 +
>> .../intel-corei7-64/nuc-formfactor.machconfig      |   3 +
>> .../intel-corei7-64/nuc-network.interfaces         |  20 +
>> .../machinesetuptool/intel-corei7-64/nuc.vars      |  14 +
>> .../intel-corei7-64/sugarbay-alsa.conf             |   1 +
>> .../intel-corei7-64/sugarbay-alsa.state            | 349 +++++++++++
>> .../intel-corei7-64/sugarbay-formfactor.machconfig |   3 +
>> .../intel-corei7-64/sugarbay-network.interfaces    |  16 +
>> .../machinesetuptool/intel-corei7-64/sugarbay.vars |  14 +
>> .../machinesetuptool/machinesetuptool_git.bb       |  48 ++
>> .../machinesetuptool/machinesetuptool_git.bbappend |  72 +++
>> conf/machine/intel-core2-32.conf                   |   5 +-
>> conf/machine/intel-corei7-64.conf                  |   5 +-
>> 35 files changed, 2265 insertions(+), 8 deletions(-)
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/crown
>>b
>>ay-alsa.conf
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/crown
>>b
>>ay-alsa.state
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/crown
>>b
>>ay-formfactor.machconfig
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/crown
>>b
>>ay-network.interfaces
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/crown
>>b
>>ay.vars
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/emenl
>>o
>>w-alsa.conf
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/emenl
>>o
>>w-alsa.state
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/emenl
>>o
>>w-formfactor.machconfig
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/emenl
>>o
>>w-network.interfaces
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/emenl
>>o
>>w-xorg.conf
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/emenl
>>o
>>w.vars
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/fri2-
>>a
>>lsa.conf
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/fri2-
>>a
>>lsa.state
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/fri2-
>>f
>>ormfactor.machconfig
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/fri2-
>>n
>>etwork.interfaces
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-core2-32/fri2.
>>v
>>ars
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/jasp
>>e
>>rforest-alsa.conf
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/jasp
>>e
>>rforest-formfactor.machconfig
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/jasp
>>e
>>rforest-network.interfaces
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/jasp
>>e
>>rforest.vars
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-
>>a
>>lsa.conf
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-
>>a
>>lsa.state
>> create mode 100755
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-
>>b
>>ootscript-hdmi_port_audio.sh
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-
>>f
>>ormfactor.machconfig
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-
>>n
>>etwork.interfaces
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc.
>>v
>>ars
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/suga
>>r
>>bay-alsa.conf
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/suga
>>r
>>bay-alsa.state
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/suga
>>r
>>bay-formfactor.machconfig
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/suga
>>r
>>bay-network.interfaces
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/suga
>>r
>>bay.vars
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool_git.bb
>> create mode 100644
>>common/recipes-bsp/machinesetuptool/machinesetuptool_git.bbappend
>>
>>-- 
>>1.8.1.4
>>
>>
>
>
>-- 
>Darren Hart
>Intel Open Source Technology Center
>
>
>



More information about the meta-intel mailing list