All of lore.kernel.org
 help / color / mirror / Atom feed
* Questions on openBMC compilation
       [not found] <1409586871.2278971.1522976422431.ref@mail.yahoo.com>
@ 2018-04-06  1:00 ` Mam Nag
  2018-04-09  3:28   ` Lei YU
  0 siblings, 1 reply; 2+ messages in thread
From: Mam Nag @ 2018-04-06  1:00 UTC (permalink / raw)
  To: openbmc

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


Hello,

 

I am working on supporting new platform which has AST2500.Some of the questions I have are:

 

1.      If I want to make changes to any openBMCcomponent for development, is folder “openbmc/build/tmp/work/” right locationto make changes?

2.      When I try to build openBMC for AST2500, nooption to configure the linux kernel. If I want to add new driver to the kernelto support new sensor chip. Once add the code into kernel 

a.       canI know which configuration file to change in the linux kernel to enable newdriver. In standard kernel this can be done through .config. However in openBMCwe didn’t find .config file.

b.      Oncestep “a” is done how do I recompile openBMC build? . Do I need to run “bitbakeobmc-phosphor-image” again?. Will this take my changes done?. FYI: I made smallone line change in kernel source code, reran “bitbake obmc-phosphor-image” andgot message “NOTE: Tasks Summary: Attempted 3940 tasks of which 3940 didn'tneed to be rerun and all succeeded” – looks like changes are not recognized. 

3.      I want add new sensor to “recipes-phosphor/sensors/”.(I have gone through “docs/sensor-architecture.md” and couldn’t find detailsfor the below questions)

a.       Isthere any specific rules to name “.conf” file?

b.      Ifthere are multiple sensors inside i2c bus, how are “.conf” files for each ofthe sensors defined?

c.       Howdoes openBMC/phosphor know which i2c device register it has to talk to for aspecific sensor

4.      How do I add this sensor to “Dbus” interface?.Does step 2 cover this?

5.      How do I add sensor to “hwmon”

6.      Noticed there are many “bin” files generatedafter the build, can I know which file to use to flash that has “uboot+kernel+openbmc+…”.Can I flash this image on new system, without making any changes to openBMCcomponents ?

 Thanks in advance for your help.



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

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

* Re: Questions on openBMC compilation
  2018-04-06  1:00 ` Questions on openBMC compilation Mam Nag
@ 2018-04-09  3:28   ` Lei YU
  0 siblings, 0 replies; 2+ messages in thread
From: Lei YU @ 2018-04-09  3:28 UTC (permalink / raw)
  To: Mam Nag; +Cc: OpenBMC Maillist

On Fri, Apr 6, 2018 at 9:00 AM, Mam Nag <mam.nagv@yahoo.com> wrote:
> Hello,
>
>
>
> I am working on supporting new platform which has AST2500. Some of the
> questions I have are:
>
>
>
> 1.       If I want to make changes to any openBMC component for development,
> is folder “openbmc/build/tmp/work/” right location to make changes?
No.
>
> 2.       When I try to build openBMC for AST2500, no option to configure the
> linux kernel. If I want to add new driver to the kernel to support new
> sensor chip. Once add the code into kernel
>
> a.       can I know which configuration file to change in the linux kernel
> to enable new driver. In standard kernel this can be done through .config.
> However in openBMC we didn’t find .config file.

It depends on the machine for the specific configs.
The common config for AST2500 is at:
meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-kernel/linux/linux-obmc/defconfig
The machine specific config is put at "meta-machine" layer, e.g.
meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-kernel/linux/linux-obmc/romulus.cfg

>
> b.      Once step “a” is done how do I recompile openBMC build? . Do I need
> to run “bitbake obmc-phosphor-image” again?. Will this take my changes
> done?. FYI: I made small one line change in kernel source code, reran
> “bitbake obmc-phosphor-image” and got message “NOTE: Tasks Summary:
> Attempted 3940 tasks of which 3940 didn't need to be rerun and all
> succeeded” – looks like changes are not recognized.

There are several ways to modify a repo, e.g. you can modify the recipe
to point to your own code, or add patches to the recipe.
But I would suggest to use the "devtool" way to modify code.
E.g. to modify the kernel, you actually need to modify the "linux-obmc"
recipe, so you can do:
```
# It will create build/workspace/sources/linux-obmc/ and add linux-obmc's
# bbappend in build/workspace/appends/ automatically
# So when you do build, bitbake will build the code in your workspace
devtool modify linux-obmc

# Do modifications in build/workspace/sources/linux-obmc/

bitbake obmc-phosphor-image # Now build your code
```

>
> 3.       I want add new sensor to “recipes-phosphor/sensors/”. (I have gone
> through “docs/sensor-architecture.md” and couldn’t find details for the
> below questions)
>
> a.       Is there any specific rules to name “.conf” file?
>
Yes, the doc actually mentions this:

    The children of the obmc/hwmon directory should follow the children of the
    devicetree/base directory path on the system as defined by the kernel.

In short, the conf file's name and path shall match the device tree.

> b.      If there are multiple sensors inside i2c bus, how are “.conf” files
> for each of the sensors defined?

The same as above, each conf file matches the devices tree's specific device.

>
> c.       How does openBMC/phosphor know which i2c device register it has to
> talk to for a specific sensor

The same as above.

>
> 4.       How do I add this sensor to “Dbus” interface?. Does step 2 cover
> this?

phosphor-hwmon parse the .conf, read the hwmon sensor in sysfs, and create
Dbus objects.
So both step 2 and step 3 are necessary.

>
> 5.       How do I add sensor to “hwmon”

The save as above.

>
> 6.       Noticed there are many “bin” files generated after the build, can I
> know which file to use to flash that has “uboot+kernel+openbmc+…”. Can I
> flash this image on new system, without making any changes to openBMC
> components ?

Please refer to
https://github.com/openbmc/docs/blob/master/code-update/code-update.md

>
>  Thanks in advance for your help.
>
>

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

end of thread, other threads:[~2018-04-09  3:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1409586871.2278971.1522976422431.ref@mail.yahoo.com>
2018-04-06  1:00 ` Questions on openBMC compilation Mam Nag
2018-04-09  3:28   ` Lei YU

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.