BMC Compiling and running

Andrew Geissler geissonator at gmail.com
Thu Mar 5 08:51:14 AEDT 2020



> On Mar 4, 2020, at 12:46 PM, Samuel Herts <sdherts at gmail.com> wrote:
> 
> Yes, this seems to have fixed that issue. Thank you.
> 
> When starting up the phosphor-bmc-state-manager on its own, everything appears to work fine, but when I restart using systemctl the journal entries do not appear to show any of my functions working. Previously the hello world would show up in the journal entry, but after adding more code, specifically the code seen below, nothing appears after systemctl starts it.

If you cat the system service file,
cat /lib/systemd/system/xyz.openbmc_project.State.BMC.service

you’ll see that it hard codes the path to the state manager binary,
ExecStart=/usr/bin/phosphor-bmc-state-manager

So on Romulus QEMU you should be able to directly edit the
file and point to your binary.  You’ll need to tell systemd to reload
once you edit the file:
systemctl daemon-reload

Or just stop the service and copy your version of the binary over
/usr/bin/phosphor-bmc-state-manager

On some systems, the filesystem may be read-only, you can mount
an overlay and then do the copy:
mkdir -p /tmp/persist/usr
mkdir -p /tmp/persist/work/usr
mount -t overlay -o lowerdir=/usr,upperdir=/tmp/persist/usr,workdir=/tmp/persist/work/usr overlay /usr

> <image.png>
> And here is the journal entry. All of the compiling has been working flawlessly since.
> <image.png>
> 
> On Mon, Mar 2, 2020 at 9:51 PM Andrew Geissler <geissonator at gmail.com> wrote:
> 
> 
> > On Mar 2, 2020, at 12:06 PM, Michael Richardson <mcr at sandelman.ca> wrote:
> > 
> > Samuel Herts <sdherts at gmail.com> wrote:
> >> Apologies for all the constant questions. I am trying to add code to the
> >> Hello World tutorial, specifically a system call to run a shell script on
> >> the QEMU BMC. The problem I run into is in the image below. My bmc state
> >> manager main looks like the following as well.
> > 
> > It looks like your hello world program was not properly linked.
> > Usually, that results in no executable being created.
> > Maybe, you linked against a different version of a share library than is in
> > the target image.
> 
> Yes, most likely your SDK that you are using to build the bmc application
> does not match the level of code your are running in QEMU.
> 
> If you’re using images from jenkins, try and match the git commit
> id’s up in these 2 jobs (for your image and SDK)
> 
> https://openpower.xyz/job/openbmc-build-sdk/distro=ubuntu,target=romulus/ 
> https://openpower.xyz/job/openbmc-build/distro=ubuntu,label=builder,target=romulus/ 
> 
> > 
> > --
> > ]               Never tell me the odds!                 | ipv6 mesh networks [
> > ]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
> > ]     mcr at sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [
> > 
> > 
> > 
> 
> 
> 
> -- 
> Sincerely, 
> Samuel Herts



More information about the openbmc mailing list