All of lore.kernel.org
 help / color / mirror / Atom feed
* OpenBMC Starting Point
@ 2020-01-15 17:38 Samuel Herts
  2020-01-20  6:57 ` Michael Richardson
  0 siblings, 1 reply; 13+ messages in thread
From: Samuel Herts @ 2020-01-15 17:38 UTC (permalink / raw)
  To: geissonator; +Cc: openbmc

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

Hello,
I am currently working on getting a working OpenBMC test environment up and
running. I am using VirtualBox and the github Development Environment
tutorial. I had a couple questions regarding how to make our own modules.
Would it be possible to upload files to the bmc on the virtual server?
And would I be able to make a script which can read text off of that file
inside the bmc chip?

I have a physical server which I am not using yet, would I be able to
install openbmc and the scripts and insert the file onto the actual bmc
chip, and eventually read from that file?

-- 
Sincerely,
Samuel Herts

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

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

* Re: OpenBMC Starting Point
  2020-01-15 17:38 OpenBMC Starting Point Samuel Herts
@ 2020-01-20  6:57 ` Michael Richardson
  2020-01-20 17:03   ` Samuel Herts
  2020-02-24 15:40   ` Samuel Herts
  0 siblings, 2 replies; 13+ messages in thread
From: Michael Richardson @ 2020-01-20  6:57 UTC (permalink / raw)
  To: Samuel Herts; +Cc: geissonator, openbmc

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


Samuel Herts <sdherts@gmail.com> wrote:
    > I am currently working on getting a working OpenBMC test environment
    > up and running. I am using VirtualBox and the github Development
    > Environment tutorial. I had a couple questions regarding how to make
    > our own modules. Would it be possible to upload files to the bmc on
    > the virtual server?

You can do that.
The disk is rather small by default.
If you are using VirtualBox, you may be able to use the vboxfs file system to
mount the host. That might require adding modules to the kernel.

    > And would I be able to make a script which can read text off of that
    > file inside the bmc chip?

    > I have a physical server which I am not using yet, would I be able to
    > install openbmc and the scripts and insert the file onto the actual
    > bmc chip, and eventually read from that file?

Maybe. What server do you have?

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: OpenBMC Starting Point
  2020-01-20  6:57 ` Michael Richardson
@ 2020-01-20 17:03   ` Samuel Herts
  2020-01-21 15:21     ` Andrew Geissler
  2020-01-21 16:52     ` Andrew Geissler
  2020-02-24 15:40   ` Samuel Herts
  1 sibling, 2 replies; 13+ messages in thread
From: Samuel Herts @ 2020-01-20 17:03 UTC (permalink / raw)
  To: Michael Richardson; +Cc: geissonator, openbmc

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

Thank you!
I have a supermicro X9 with ast2400 BMC chip. How would we go about
installing it? openBMC onto it? We currently have a fresh install of Ubuntu
LTS on it, and nothing else.

In terms of the development virtual machine. I keep running into an issue
when trying to wget the sdk.
Specifically, this line: wget
https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh
 After running that inside the romulus emulator, it runs out of space and
won't complete the download. Does this mean I need to either increase the
storage for the romulus, or am I simply installing it in the wrong place,
and instead need to wget that into the regular VM?
Apologies for all the questions, I am doing as much research as I can, and
this mailing list seems to be the largest wealth of knowledge I have
available.

--Sam

On Mon, Jan 20, 2020 at 1:57 AM Michael Richardson <mcr@sandelman.ca> wrote:

>
> Samuel Herts <sdherts@gmail.com> wrote:
>     > I am currently working on getting a working OpenBMC test environment
>     > up and running. I am using VirtualBox and the github Development
>     > Environment tutorial. I had a couple questions regarding how to make
>     > our own modules. Would it be possible to upload files to the bmc on
>     > the virtual server?
>
> You can do that.
> The disk is rather small by default.
> If you are using VirtualBox, you may be able to use the vboxfs file system
> to
> mount the host. That might require adding modules to the kernel.
>
>     > And would I be able to make a script which can read text off of that
>     > file inside the bmc chip?
>
>     > I have a physical server which I am not using yet, would I be able to
>     > install openbmc and the scripts and insert the file onto the actual
>     > bmc chip, and eventually read from that file?
>
> Maybe. What server do you have?
>
> --
> ]               Never tell me the odds!                 | ipv6 mesh
> networks [
> ]   Michael Richardson, Sandelman Software Works        |    IoT
> architect   [
> ]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on
> rails    [
>
>

-- 
Sincerely,
Samuel Herts

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

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

* Re: OpenBMC Starting Point
  2020-01-20 17:03   ` Samuel Herts
@ 2020-01-21 15:21     ` Andrew Geissler
  2020-01-21 16:52     ` Andrew Geissler
  1 sibling, 0 replies; 13+ messages in thread
From: Andrew Geissler @ 2020-01-21 15:21 UTC (permalink / raw)
  To: Samuel Herts; +Cc: Michael Richardson, openbmc

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



> On Jan 20, 2020, at 11:03 AM, Samuel Herts <sdherts@gmail.com> wrote:
> 
> Thank you!
> I have a supermicro X9 with ast2400 BMC chip. How would we go about installing it? openBMC onto it? We currently have a fresh install of Ubuntu LTS on it, and nothing else.

The only AST2400 config I’m familiar with is our Palmetto.
You could start with that machine and tweak it for yours.
https://github.com/openbmc/openbmc/blob/master/meta-ibm/meta-palmetto/conf/machine/palmetto.conf <https://github.com/openbmc/openbmc/blob/master/meta-ibm/meta-palmetto/conf/machine/palmetto.conf>
> 
> In terms of the development virtual machine. I keep running into an issue when trying to wget the sdk. 
> Specifically, this line: wget https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh <https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh> After running that inside the romulus emulator, it runs out of space and won't complete the download. Does this mean I need to either increase the storage for the romulus, or am I simply installing it in the wrong place, and instead need to wget that into the regular VM?

The SDK is not meant to be downloaded to the actual OpenBMC
system. I’t meant to be downloaded to your development system.
You can then use it to build OpenBMC software that you then copy
over to your OpenBMC and run.

> Apologies for all the questions, I am doing as much research as I can, and this mailing list seems to be the largest wealth of knowledge I have available.
> 
> --Sam
> 
> On Mon, Jan 20, 2020 at 1:57 AM Michael Richardson <mcr@sandelman.ca <mailto:mcr@sandelman.ca>> wrote:
> 
> Samuel Herts <sdherts@gmail.com <mailto:sdherts@gmail.com>> wrote:
>     > I am currently working on getting a working OpenBMC test environment
>     > up and running. I am using VirtualBox and the github Development
>     > Environment tutorial. I had a couple questions regarding how to make
>     > our own modules. Would it be possible to upload files to the bmc on
>     > the virtual server?
> 
> You can do that.
> The disk is rather small by default.
> If you are using VirtualBox, you may be able to use the vboxfs file system to
> mount the host. That might require adding modules to the kernel.
> 
>     > And would I be able to make a script which can read text off of that
>     > file inside the bmc chip?
> 
>     > I have a physical server which I am not using yet, would I be able to
>     > install openbmc and the scripts and insert the file onto the actual
>     > bmc chip, and eventually read from that file?
> 
> Maybe. What server do you have?
> 
> --
> ]               Never tell me the odds!                 | ipv6 mesh networks [
> ]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
> ]     mcr@sandelman.ca <mailto:mcr@sandelman.ca>  http://www.sandelman.ca/ <http://www.sandelman.ca/>        |   ruby on rails    [
> 
> 
> 
> -- 
> Sincerely, 
> Samuel Herts


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

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

* Re: OpenBMC Starting Point
  2020-01-20 17:03   ` Samuel Herts
  2020-01-21 15:21     ` Andrew Geissler
@ 2020-01-21 16:52     ` Andrew Geissler
  2020-01-31 17:15       ` Samuel Herts
  1 sibling, 1 reply; 13+ messages in thread
From: Andrew Geissler @ 2020-01-21 16:52 UTC (permalink / raw)
  To: Samuel Herts; +Cc: Michael Richardson, openbmc

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



> On Jan 20, 2020, at 11:03 AM, Samuel Herts <sdherts@gmail.com> wrote:
> 
> Thank you!
> I have a supermicro X9 with ast2400 BMC chip. How would we go about installing it? openBMC onto it? We currently have a fresh install of Ubuntu LTS on it, and nothing else.

The only AST2400 config I’m familiar with is our Palmetto.
You could start with that machine and tweak it for yours.
https://github.com/openbmc/openbmc/blob/master/meta-ibm/meta-palmetto/conf/machine/palmetto.conf <https://github.com/openbmc/openbmc/blob/master/meta-ibm/meta-palmetto/conf/machine/palmetto.conf>


> In terms of the development virtual machine. I keep running into an issue when trying to wget the sdk. 
> Specifically, this line: wget https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh <https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh> After running that inside the romulus emulator, it runs out of space and won't complete the download. Does this mean I need to either increase the storage for the romulus, or am I simply installing it in the wrong place, and instead need to wget that into the regular VM?

The SDK is not meant to be downloaded to the actual OpenBMC
system. I’t meant to be downloaded to your development system.
You can then use it to build OpenBMC software that you then copy
over to your OpenBMC and run.

> Apologies for all the questions, I am doing as much research as I can, and this mailing list seems to be the largest wealth of knowledge I have available.
> 
> --Sam
> 
> On Mon, Jan 20, 2020 at 1:57 AM Michael Richardson <mcr@sandelman.ca <mailto:mcr@sandelman.ca>> wrote:
> 
> Samuel Herts <sdherts@gmail.com <mailto:sdherts@gmail.com>> wrote:
>     > I am currently working on getting a working OpenBMC test environment
>     > up and running. I am using VirtualBox and the github Development
>     > Environment tutorial. I had a couple questions regarding how to make
>     > our own modules. Would it be possible to upload files to the bmc on
>     > the virtual server?
> 
> You can do that.
> The disk is rather small by default.
> If you are using VirtualBox, you may be able to use the vboxfs file system to
> mount the host. That might require adding modules to the kernel.
> 
>     > And would I be able to make a script which can read text off of that
>     > file inside the bmc chip?
> 
>     > I have a physical server which I am not using yet, would I be able to
>     > install openbmc and the scripts and insert the file onto the actual
>     > bmc chip, and eventually read from that file?
> 
> Maybe. What server do you have?
> 
> --
> ]               Never tell me the odds!                 | ipv6 mesh networks [
> ]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
> ]     mcr@sandelman.ca <mailto:mcr@sandelman.ca>  http://www.sandelman.ca/ <http://www.sandelman.ca/>        |   ruby on rails    [
> 
> 
> 
> -- 
> Sincerely, 
> Samuel Herts


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

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

* Re: OpenBMC Starting Point
  2020-01-21 16:52     ` Andrew Geissler
@ 2020-01-31 17:15       ` Samuel Herts
  2020-01-31 21:29         ` Andrew Geissler
  2020-02-06 14:16         ` Michael Richardson
  0 siblings, 2 replies; 13+ messages in thread
From: Samuel Herts @ 2020-01-31 17:15 UTC (permalink / raw)
  To: Andrew Geissler; +Cc: Michael Richardson, openbmc

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

We got the Hello World to work perfectly, thank you for the assistance! How
would we now go about doing the exact same thing, but hardware implemented?
By that, I mean actually running the phosphor state manager modified module
on the physical BMC chip? How do we install the OpenBMC sdk? Also, is there
a method to read from the computer's BIOS chip from this modified state
manager?



On Tue, Jan 21, 2020 at 11:52 AM Andrew Geissler <geissonator@gmail.com>
wrote:

>
>
> On Jan 20, 2020, at 11:03 AM, Samuel Herts <sdherts@gmail.com> wrote:
>
> Thank you!
> I have a supermicro X9 with ast2400 BMC chip. How would we go about
> installing it? openBMC onto it? We currently have a fresh install of Ubuntu
> LTS on it, and nothing else.
>
>
> The only AST2400 config I’m familiar with is our Palmetto.
> You could start with that machine and tweak it for yours.
>
> https://github.com/openbmc/openbmc/blob/master/meta-ibm/meta-palmetto/conf/machine/palmetto.conf
>
>
> In terms of the development virtual machine. I keep running into an issue
> when trying to wget the sdk.
> Specifically, this line: wget
> https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh
>  After running that inside the romulus emulator, it runs out of space and
> won't complete the download. Does this mean I need to either increase the
> storage for the romulus, or am I simply installing it in the wrong place,
> and instead need to wget that into the regular VM?
>
>
> The SDK is not meant to be downloaded to the actual OpenBMC
> system. I’t meant to be downloaded to your development system.
> You can then use it to build OpenBMC software that you then copy
> over to your OpenBMC and run.
>
> Apologies for all the questions, I am doing as much research as I can, and
> this mailing list seems to be the largest wealth of knowledge I have
> available.
>
> --Sam
>
> On Mon, Jan 20, 2020 at 1:57 AM Michael Richardson <mcr@sandelman.ca>
> wrote:
>
>>
>> Samuel Herts <sdherts@gmail.com> wrote:
>>     > I am currently working on getting a working OpenBMC test environment
>>     > up and running. I am using VirtualBox and the github Development
>>     > Environment tutorial. I had a couple questions regarding how to make
>>     > our own modules. Would it be possible to upload files to the bmc on
>>     > the virtual server?
>>
>> You can do that.
>> The disk is rather small by default.
>> If you are using VirtualBox, you may be able to use the vboxfs file
>> system to
>> mount the host. That might require adding modules to the kernel.
>>
>>     > And would I be able to make a script which can read text off of that
>>     > file inside the bmc chip?
>>
>>     > I have a physical server which I am not using yet, would I be able
>> to
>>     > install openbmc and the scripts and insert the file onto the actual
>>     > bmc chip, and eventually read from that file?
>>
>> Maybe. What server do you have?
>>
>> --
>> ]               Never tell me the odds!                 | ipv6 mesh
>> networks [
>> ]   Michael Richardson, Sandelman Software Works        |    IoT
>> architect   [
>> ]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on
>> rails    [
>>
>>
>
> --
> Sincerely,
> Samuel Herts
>
>
>

-- 
Sincerely,
Samuel Herts

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

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

* Re: OpenBMC Starting Point
  2020-01-31 17:15       ` Samuel Herts
@ 2020-01-31 21:29         ` Andrew Geissler
  2020-02-06 14:16         ` Michael Richardson
  1 sibling, 0 replies; 13+ messages in thread
From: Andrew Geissler @ 2020-01-31 21:29 UTC (permalink / raw)
  To: Samuel Herts; +Cc: Michael Richardson, openbmc

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



> On Jan 31, 2020, at 11:15 AM, Samuel Herts <sdherts@gmail.com> wrote:
> 
> We got the Hello World to work perfectly, thank you for the assistance! How would we now go about doing the exact same thing, but hardware implemented? By that, I mean actually running the phosphor state manager modified module on the physical BMC chip? How do we install the OpenBMC sdk?

You would want to use an SDK that you’ve built for your BMC hardware.
bitbake -c populate_sdk obmc-phosphor-image

You’d then use that SDK the same way you used it for Hello World
and then you would scp the compiled binary to your BMC hardware.

If your bmc hardware is similar to the Romulus hardware then you
could just scp the binary you generated for Hello World over
to your hardware.

> Also, is there a method to read from the computer's BIOS chip from this modified state manager?

The BIOS is pretty dependent on the system. Something like this should
list all firmware images on your system, you could then introspect them
to figure out your BIOS and the appropriate D-Bus calls to read them
from an application:

busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias "/xyz/openbmc_project/software" 0 1 xyz.openbmc_project.Software.Version


Andrew

> 
> 
> On Tue, Jan 21, 2020 at 11:52 AM Andrew Geissler <geissonator@gmail.com <mailto:geissonator@gmail.com>> wrote:
> 
> 
>> On Jan 20, 2020, at 11:03 AM, Samuel Herts <sdherts@gmail.com <mailto:sdherts@gmail.com>> wrote:
>> 
>> Thank you!
>> I have a supermicro X9 with ast2400 BMC chip. How would we go about installing it? openBMC onto it? We currently have a fresh install of Ubuntu LTS on it, and nothing else.
> 
> The only AST2400 config I’m familiar with is our Palmetto.
> You could start with that machine and tweak it for yours.
> https://github.com/openbmc/openbmc/blob/master/meta-ibm/meta-palmetto/conf/machine/palmetto.conf <https://github.com/openbmc/openbmc/blob/master/meta-ibm/meta-palmetto/conf/machine/palmetto.conf>
> 
> 
>> In terms of the development virtual machine. I keep running into an issue when trying to wget the sdk. 
>> Specifically, this line: wget https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh <https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=romulus/lastSuccessfulBuild/artifact/deploy/sdk/oecore-x86_64-arm1176jzs-toolchain-nodistro.0.sh> After running that inside the romulus emulator, it runs out of space and won't complete the download. Does this mean I need to either increase the storage for the romulus, or am I simply installing it in the wrong place, and instead need to wget that into the regular VM?
> 
> The SDK is not meant to be downloaded to the actual OpenBMC
> system. I’t meant to be downloaded to your development system.
> You can then use it to build OpenBMC software that you then copy
> over to your OpenBMC and run.
> 
>> Apologies for all the questions, I am doing as much research as I can, and this mailing list seems to be the largest wealth of knowledge I have available.
>> 
>> --Sam
>> 
>> On Mon, Jan 20, 2020 at 1:57 AM Michael Richardson <mcr@sandelman.ca <mailto:mcr@sandelman.ca>> wrote:
>> 
>> Samuel Herts <sdherts@gmail.com <mailto:sdherts@gmail.com>> wrote:
>>     > I am currently working on getting a working OpenBMC test environment
>>     > up and running. I am using VirtualBox and the github Development
>>     > Environment tutorial. I had a couple questions regarding how to make
>>     > our own modules. Would it be possible to upload files to the bmc on
>>     > the virtual server?
>> 
>> You can do that.
>> The disk is rather small by default.
>> If you are using VirtualBox, you may be able to use the vboxfs file system to
>> mount the host. That might require adding modules to the kernel.
>> 
>>     > And would I be able to make a script which can read text off of that
>>     > file inside the bmc chip?
>> 
>>     > I have a physical server which I am not using yet, would I be able to
>>     > install openbmc and the scripts and insert the file onto the actual
>>     > bmc chip, and eventually read from that file?
>> 
>> Maybe. What server do you have?
>> 
>> --
>> ]               Never tell me the odds!                 | ipv6 mesh networks [
>> ]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
>> ]     mcr@sandelman.ca <mailto:mcr@sandelman.ca>  http://www.sandelman.ca/ <http://www.sandelman.ca/>        |   ruby on rails    [
>> 
>> 
>> 
>> -- 
>> Sincerely, 
>> Samuel Herts
> 
> 
> 
> -- 
> Sincerely, 
> Samuel Herts


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

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

* Re: OpenBMC Starting Point
  2020-01-31 17:15       ` Samuel Herts
  2020-01-31 21:29         ` Andrew Geissler
@ 2020-02-06 14:16         ` Michael Richardson
  1 sibling, 0 replies; 13+ messages in thread
From: Michael Richardson @ 2020-02-06 14:16 UTC (permalink / raw)
  To: Samuel Herts, openbmc

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


Samuel Herts <sdherts@gmail.com> wrote:
    > We got the Hello World to work perfectly, thank you for the assistance!
    > How would we now go about doing the exact same thing, but hardware
    > implemented?  By that, I mean actually running the phosphor state
    > manager modified module on the physical BMC chip? How do we install the
    > OpenBMC sdk? Also, is there a method to read from the computer's BIOS
    > chip from this modified state manager?

I'm aware of only one hardware platform that explicitely supports openbmc,
and it was rather expensive.  Apparently it can run on quite a few other
boards, and I'd like to try to get a list of things I might be able to get =
on ebay... I don't need something new to experiment with... old and well
documented seems better to me.

I don't think you'd ever install the *SDK* on the target system.
You compile it with the build system on an ubuntu server or equivalent
container, and then install the resulting image as the BMC image.=20
That might require a JTAG load for some systems, and then OTA afterwards.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: OpenBMC Starting Point
  2020-01-20  6:57 ` Michael Richardson
  2020-01-20 17:03   ` Samuel Herts
@ 2020-02-24 15:40   ` Samuel Herts
  2020-02-24 20:22     ` Andrew Geissler
  2020-02-24 20:23     ` Andrew Geissler
  1 sibling, 2 replies; 13+ messages in thread
From: Samuel Herts @ 2020-02-24 15:40 UTC (permalink / raw)
  To: Michael Richardson; +Cc: geissonator, openbmc

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

So if I wanted a c++ script to run on the bmc whenever I desired, how
exactly would I go about implementing it as a module to run? Kind of like
the Phosphor state manager module that the Hello World guide starts on,
specifically, what steps would I need to take or what resources should I
look into for creating my own module that will run when a specific command
is sent, like the systemctl start phosphor.

On Mon, Jan 20, 2020 at 1:57 AM Michael Richardson <mcr@sandelman.ca> wrote:

>
> Samuel Herts <sdherts@gmail.com> wrote:
>     > I am currently working on getting a working OpenBMC test environment
>     > up and running. I am using VirtualBox and the github Development
>     > Environment tutorial. I had a couple questions regarding how to make
>     > our own modules. Would it be possible to upload files to the bmc on
>     > the virtual server?
>
> You can do that.
> The disk is rather small by default.
> If you are using VirtualBox, you may be able to use the vboxfs file system
> to
> mount the host. That might require adding modules to the kernel.
>
>     > And would I be able to make a script which can read text off of that
>     > file inside the bmc chip?
>
>     > I have a physical server which I am not using yet, would I be able to
>     > install openbmc and the scripts and insert the file onto the actual
>     > bmc chip, and eventually read from that file?
>
> Maybe. What server do you have?
>
> --
> ]               Never tell me the odds!                 | ipv6 mesh
> networks [
> ]   Michael Richardson, Sandelman Software Works        |    IoT
> architect   [
> ]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on
> rails    [
>
>

-- 
Sincerely,
Samuel Herts

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

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

* Re: OpenBMC Starting Point
  2020-02-24 15:40   ` Samuel Herts
@ 2020-02-24 20:22     ` Andrew Geissler
  2020-02-24 20:23     ` Andrew Geissler
  1 sibling, 0 replies; 13+ messages in thread
From: Andrew Geissler @ 2020-02-24 20:22 UTC (permalink / raw)
  To: Samuel Herts; +Cc: Michael Richardson, openbmc

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



> On Feb 24, 2020, at 9:40 AM, Samuel Herts <sdherts@gmail.com> wrote:
> 
> So if I wanted a c++ script to run on the bmc whenever I desired, how exactly would I go about implementing it as a module to run? Kind of like the Phosphor state manager module that the Hello World guide starts on, specifically, what steps would I need to take or what resources should I look into for creating my own module that will run when a specific command is sent, like the systemctl start phosphor. 

This would probably make a good tutorial under
https://github.com/openbmc/docs/tree/master/development <https://github.com/openbmc/docs/tree/master/development>
but here’s the really fast answer from my perspective.

First you create a git repository somewhere (i.e. github).

Next you pick a logical location in for your recipe to
be located. For example if it was going to be a package used
by all of OpenBMC, it would go out somewhere in
https://github.com/openbmc/openbmc/tree/master/meta-phosphor/recipes-phosphor <https://github.com/openbmc/openbmc/tree/master/meta-phosphor/recipes-phosphor>

A good example is bmcweb:
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb>
You’d make a recipe like this, point SRC_URI and SRCREV to your
code and the commit id to pick up.

You’d create your own service file, like bmcweb.service
(note the service file is packaged in your repo).
(i.e. https://github.com/openbmc/bmcweb/blob/master/bmcweb.service.in <https://github.com/openbmc/bmcweb/blob/master/bmcweb.service.in>)
For the [Install] section you would just put the following
to ensure your service was started on BMC boot up.
WantedBy=multi-user.target
You’d adjust the ExecStart to call your application

Note that bmcweb uses CMake but we’re moving a lot of
projects to meson which is what I’d recommend if you’re
creating a new project.
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-state-manager/+/27878 <https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-state-manager/+/27878>
is an example of adding service files to meson.

Then you would go into a packagegroup, like
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb>
and do something similar to what they did with
bmcweb and add it as an RDEPENDS

Then you would bitbake your image and voila, your code would
be pulled down, built, and packaged into the image. When you
start it in QEMU you would see your application run.

If you were writing something you thought would be useful
for the community then you would send out an email and
write up a design doc to get feedback on the right
location for the code and recipe to go.
https://github.com/openbmc/docs/blob/master/designs/design-template.md <https://github.com/openbmc/docs/blob/master/designs/design-template.md> 

Andrew


> 
> On Mon, Jan 20, 2020 at 1:57 AM Michael Richardson <mcr@sandelman.ca <mailto:mcr@sandelman.ca>> wrote:
> 
> Samuel Herts <sdherts@gmail.com <mailto:sdherts@gmail.com>> wrote:
>     > I am currently working on getting a working OpenBMC test environment
>     > up and running. I am using VirtualBox and the github Development
>     > Environment tutorial. I had a couple questions regarding how to make
>     > our own modules. Would it be possible to upload files to the bmc on
>     > the virtual server?
> 
> You can do that.
> The disk is rather small by default.
> If you are using VirtualBox, you may be able to use the vboxfs file system to
> mount the host. That might require adding modules to the kernel.
> 
>     > And would I be able to make a script which can read text off of that
>     > file inside the bmc chip?
> 
>     > I have a physical server which I am not using yet, would I be able to
>     > install openbmc and the scripts and insert the file onto the actual
>     > bmc chip, and eventually read from that file?
> 
> Maybe. What server do you have?
> 
> --
> ]               Never tell me the odds!                 | ipv6 mesh networks [
> ]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
> ]     mcr@sandelman.ca <mailto:mcr@sandelman.ca>  http://www.sandelman.ca/ <http://www.sandelman.ca/>        |   ruby on rails    [
> 
> 
> 
> -- 
> Sincerely, 
> Samuel Herts


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

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

* Re: OpenBMC Starting Point
  2020-02-24 15:40   ` Samuel Herts
  2020-02-24 20:22     ` Andrew Geissler
@ 2020-02-24 20:23     ` Andrew Geissler
  2020-02-25 15:31       ` krtaylor
  1 sibling, 1 reply; 13+ messages in thread
From: Andrew Geissler @ 2020-02-24 20:23 UTC (permalink / raw)
  To: Samuel Herts; +Cc: Michael Richardson, openbmc



> On Feb 24, 2020, at 9:40 AM, Samuel Herts <sdherts@gmail.com> wrote:
> 
> So if I wanted a c++ script to run on the bmc whenever I desired, how exactly would I go about implementing it as a module to run? Kind of like the Phosphor state manager module that the Hello World guide starts on, specifically, what steps would I need to take or what resources should I look into for creating my own module that will run when a specific command is sent, like the systemctl start phosphor. 


This would probably make a good tutorial under
https://github.com/openbmc/docs/tree/master/development
but here’s the really fast answer from my perspective.

First you create a git repository somewhere (i.e. github).

Next you pick a logical location in for your recipe to
be located. For example if it was going to be a package used
by all of OpenBMC, it would go out somewhere in
https://github.com/openbmc/openbmc/tree/master/meta-phosphor/recipes-phosphor

A good example is bmcweb:
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb
You’d make a recipe like this, point SRC_URI and SRCREV to your
code and the commit id to pick up.

You’d create your own service file, like bmcweb.service
(note the service file is packaged in your repo).
(i.e. https://github.com/openbmc/bmcweb/blob/master/bmcweb.service.in)
For the [Install] section you would just put the following
to ensure your service was started on BMC boot up.
WantedBy=multi-user.target
You’d adjust the ExecStart to call your application

Note that bmcweb uses CMake but we’re moving a lot of
projects to meson which is what I’d recommend if you’re
creating a new project.
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-state-manager/+/27878
is an example of adding service files to meson.

Then you would go into a packagegroup, like
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
and do something similar to what they did with
bmcweb and add it as an RDEPENDS

Then you would bitbake your image and voila, your code would
be pulled down, built, and packaged into the image. When you
start it in QEMU you would see your application run.

If you were writing something you thought would be useful
for the community then you would send out an email and
write up a design doc to get feedback on the right
location for the code and recipe to go.
https://github.com/openbmc/docs/blob/master/designs/design-template.md 

Andrew

> 
> On Mon, Jan 20, 2020 at 1:57 AM Michael Richardson <mcr@sandelman.ca> wrote:
> 
> Samuel Herts <sdherts@gmail.com> wrote:
>     > I am currently working on getting a working OpenBMC test environment
>     > up and running. I am using VirtualBox and the github Development
>     > Environment tutorial. I had a couple questions regarding how to make
>     > our own modules. Would it be possible to upload files to the bmc on
>     > the virtual server?
> 
> You can do that.
> The disk is rather small by default.
> If you are using VirtualBox, you may be able to use the vboxfs file system to
> mount the host. That might require adding modules to the kernel.
> 
>     > And would I be able to make a script which can read text off of that
>     > file inside the bmc chip?
> 
>     > I have a physical server which I am not using yet, would I be able to
>     > install openbmc and the scripts and insert the file onto the actual
>     > bmc chip, and eventually read from that file?
> 
> Maybe. What server do you have?
> 
> --
> ]               Never tell me the odds!                 | ipv6 mesh networks [
> ]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
> ]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [
> 
> 
> 
> -- 
> Sincerely, 
> Samuel Herts

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

* Re: OpenBMC Starting Point
  2020-02-24 20:23     ` Andrew Geissler
@ 2020-02-25 15:31       ` krtaylor
  0 siblings, 0 replies; 13+ messages in thread
From: krtaylor @ 2020-02-25 15:31 UTC (permalink / raw)
  To: Andrew Geissler; +Cc: openbmc

On 2/24/20 2:23 PM, Andrew Geissler wrote:
> 
> 
>> On Feb 24, 2020, at 9:40 AM, Samuel Herts <sdherts@gmail.com> wrote:
>>
>> So if I wanted a c++ script to run on the bmc whenever I desired, how exactly would I go about implementing it as a module to run? Kind of like the Phosphor state manager module that the Hello World guide starts on, specifically, what steps would I need to take or what resources should I look into for creating my own module that will run when a specific command is sent, like the systemctl start phosphor.
> 
> 
> This would probably make a good tutorial under
> https://github.com/openbmc/docs/tree/master/development
> but here’s the really fast answer from my perspective.

This is a *really good* quick-start tutorial. Care to push it as such?

Thanks Andrew!

Kurt Taylor (krtaylor)

<snip>

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

* Re: OpenBMC Starting Point
       [not found] <7601.1580558972@dooku>
@ 2020-02-01 22:44 ` Michael Richardson
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Richardson @ 2020-02-01 22:44 UTC (permalink / raw)
  To: Samuel Herts, openbmc

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


Samuel Herts <sdherts@gmail.com> wrote:
    > We got the Hello World to work perfectly, thank you for the assistance!
    > How would we now go about doing the exact same thing, but hardware
    > implemented?  By that, I mean actually running the phosphor state
    > manager modified module on the physical BMC chip? How do we install the
    > OpenBMC sdk? Also, is there a method to read from the computer's BIOS
    > chip from this modified state manager?

I'm aware of only one hardware platform that explicitely supports openbmc,
and it was rather expensive.  Apparently it can run on quite a few other
boards, and I'd like to try to get a list of things I might be able to get on
ebay... I don't need something new to experiment with... old and well
documented seems better to me.

I don't think you'd ever install the *SDK* on the target system.
You compile it with the build system on an ubuntu server or equivalent
container, and then install the resulting image as the BMC image. 
That might require a JTAG load for some systems, and then OTA afterwards.

-- 
]               Never tell me the odds!                 | ipv6 mesh networks [ 
]   Michael Richardson, Sandelman Software Works        | network architect  [ 
]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [ 


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

end of thread, other threads:[~2020-02-25 15:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 17:38 OpenBMC Starting Point Samuel Herts
2020-01-20  6:57 ` Michael Richardson
2020-01-20 17:03   ` Samuel Herts
2020-01-21 15:21     ` Andrew Geissler
2020-01-21 16:52     ` Andrew Geissler
2020-01-31 17:15       ` Samuel Herts
2020-01-31 21:29         ` Andrew Geissler
2020-02-06 14:16         ` Michael Richardson
2020-02-24 15:40   ` Samuel Herts
2020-02-24 20:22     ` Andrew Geissler
2020-02-24 20:23     ` Andrew Geissler
2020-02-25 15:31       ` krtaylor
     [not found] <7601.1580558972@dooku>
2020-02-01 22:44 ` Michael Richardson

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.