bitbake: Use IPK packaging for rootfs assembly

bitbake offers a choice of DEB, RPM or IPK packaging. To a degree the
choice is functionally arbitrary for image generation but control over
the package format becomes important if we want to:

1. Include runtime package management functionality in the firmware image
2. Mess about with the packages on the build system

With respect to 1 the IPK format and opkg (an ipk package manager) are
designed for embedded systems[1] - by contrast to RPMs have heavier
dependencies and a greater impact on the size and complexity of the
firmware image.

Regarding 2, the embedded nature and the need for opkg to work without
much fuss leads to a lower configuration barrier by comparison to RPMs.
With ipk it becomes possible to reuse the packages built during image
preparation for core analysis without needing to generate an SDK:

```
$ export LD_LIBRARY_PATH=./tmp/work/x86_64-linux/opkg-native/*/recipe-sysroot-native/usr/lib
$ MY_DEBUG_ROOT=tmp/rootfs-debug
$ ./tmp/sysroots-components/x86_64/opkg-native/usr/bin/opkg \
	-f ./tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-phosphor-image/*/opkg.conf \
	-o $MY_DEBUG_ROOT \
	update
$ fakeroot ./tmp/sysroots-components/x86_64/opkg-native/usr/bin/opkg \
	-f ./tmp/work/p10bmc-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/opkg.conf \
	-o $MY_DEBUG_ROOT \
	install dbus-sensors dbus-sensors-dbg
$ gdb-multiarch
(gdb) set solib-absolute-prefix .../tmp/rootfs-debug
(gdb) add-auto-load-safe-path .../tmp/rootfs-debug
(gdb) file tmp/rootfs-debug/usr/bin/nvmesensor
(gdb) core-file obmcdump_17_9597/core.nvmesensor.0.aae91b519d0e4e0e8bbe746e3f6cd25f.2779.9594000000
Core was generated by `/usr/bin/nvmesensor'.
Program terminated with signal SIGABRT, Aborted.
pthread_kill.c:45
45      pthread_kill.c: No such file or directory.
(gdb) bt
pthread_kill.c:45
../sysdeps/posix/raise.c:26
/home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/rootfs-debug/usr/lib/libstdc++.so.6
/home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/rootfs-debug/usr/lib/libstdc++.so.6
/home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/rootfs-debug/usr/lib/libstdc++.so.6
/home/andrew/src/openbmc/openbmc/build/p10bmc/tmp/rootfs-debug/usr/lib/libstdc++.so.6
"xyz.openbmc_project.NVMeSensor", this=0x488f04) at
/usr/include/sdbusplus/bus.hpp:234
../../../../../../workspace/sources/dbus-sensors/src/NVMeSensorMain.cpp:159
(gdb)
```

This approach documented in the Poky Reference Manual:

https://www.yoctoproject.org/docs/1.0/poky-ref-manual/poky-ref-manual.html#platdev-gdb-remotedebug-launch-gdb-inferiorbins

Switch all machines to IPK to align the debugging experience with
upstream's documentation and to facilitate efficient use of packaged
software at runtime.

[1] https://openwrt.org/docs/guide-user/additional-software/opkg

Change-Id: I8ef526add2d7a6790de1b3eb3fb85cd39b864f23
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
34 files changed
tree: fe18e692448f09bc12e2c4592aec0b8f7b78727c
  1. .github/
  2. meta-alibaba/
  3. meta-amd/
  4. meta-ampere/
  5. meta-arm/
  6. meta-aspeed/
  7. meta-asrock/
  8. meta-bytedance/
  9. meta-evb/
  10. meta-facebook/
  11. meta-fii/
  12. meta-google/
  13. meta-hpe/
  14. meta-hxt/
  15. meta-ibm/
  16. meta-ingrasys/
  17. meta-inspur/
  18. meta-intel-openbmc/
  19. meta-inventec/
  20. meta-lenovo/
  21. meta-microsoft/
  22. meta-nuvoton/
  23. meta-openembedded/
  24. meta-openpower/
  25. meta-phosphor/
  26. meta-portwell/
  27. meta-qualcomm/
  28. meta-quanta/
  29. meta-raspberrypi/
  30. meta-security/
  31. meta-supermicro/
  32. meta-wistron/
  33. meta-x86/
  34. meta-xilinx/
  35. meta-yadro/
  36. poky/
  37. .gitignore
  38. .gitreview
  39. .templateconf
  40. MAINTAINERS
  41. openbmc-env
  42. OWNERS
  43. README.md
  44. setup
README.md

OpenBMC

Build Status

OpenBMC is a Linux distribution for management controllers used in devices such as servers, top of rack switches or RAID appliances. It uses Yocto, OpenEmbedded, systemd, and D-Bus to allow easy customization for your platform.

Setting up your OpenBMC project

1) Prerequisite

  • Ubuntu 14.04
sudo apt-get install -y git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat
  • Fedora 28
sudo dnf install -y git patch diffstat texinfo chrpath SDL-devel bitbake \
    rpcgen perl-Thread-Queue perl-bignum perl-Crypt-OpenSSL-Bignum
sudo dnf groupinstall "C Development Tools and Libraries"

2) Download the source

git clone git@github.com:openbmc/openbmc.git
cd openbmc

3) Target your hardware

Any build requires an environment set up according to your hardware target. There is a special script in the root of this repository that can be used to configure the environment as needed. The script is called setup and takes the name of your hardware target as an argument.

The script needs to be sourced while in the top directory of the OpenBMC repository clone, and, if run without arguments, will display the list of supported hardware targets, see the following example:

$ . setup <machine> [build_dir]
Target machine must be specified. Use one of:

centriq2400-rep         f0b                     fp5280g2
gsj                     hr630                   hr855xg2
lanyang                 mihawk                  msn
neptune                 nicole                  olympus
olympus-nuvoton         on5263m5                p10bmc
palmetto                qemuarm                 quanta-q71l
romulus                 s2600wf                 stardragon4800-rep2
swift                   tiogapass               vesnin
witherspoon             witherspoon-tacoma      yosemitev2
zaius

Once you know the target (e.g. romulus), source the setup script as follows:

. setup romulus

For evb-ast2500, please use the below command to specify the machine config, because the machine in meta-aspeed layer is in a BSP layer and does not build the openbmc image.

TEMPLATECONF=meta-evb/meta-evb-aspeed/meta-evb-ast2500/conf . openbmc-env

4) Build

bitbake obmc-phosphor-image

Additional details can be found in the docs repository.

OpenBMC Development

The OpenBMC community maintains a set of tutorials new users can go through to get up to speed on OpenBMC development out here

Build Validation and Testing

Commits submitted by members of the OpenBMC GitHub community are compiled and tested via our Jenkins server. Commits are run through two levels of testing. At the repository level the makefile make check directive is run. At the system level, the commit is built into a firmware image and run with an arm-softmmu QEMU model against a barrage of CI tests.

Commits submitted by non-members do not automatically proceed through CI testing. After visual inspection of the commit, a CI run can be manually performed by the reviewer.

Automated testing against the QEMU model along with supported systems are performed. The OpenBMC project uses the Robot Framework for all automation. Our complete test repository can be found here.

Submitting Patches

Support of additional hardware and software packages is always welcome. Please follow the contributing guidelines when making a submission. It is expected that contributions contain test cases.

Bug Reporting

Issues are managed on GitHub. It is recommended you search through the issues before opening a new one.

Questions

First, please do a search on the internet. There's a good chance your question has already been asked.

For general questions, please use the openbmc tag on Stack Overflow. Please review the discussion on Stack Overflow licensing before posting any code.

For technical discussions, please see contact info below for Discord and mailing list information. Please don't file an issue to ask a question. You'll get faster results by using the mailing list or Discord.

Features of OpenBMC

Feature List

  • Host management: Power, Cooling, LEDs, Inventory, Events, Watchdog
  • Full IPMI 2.0 Compliance with DCMI
  • Code Update Support for multiple BMC/BIOS images
  • Web-based user interface
  • REST interfaces
  • D-Bus based interfaces
  • SSH based SOL
  • Remote KVM
  • Hardware Simulation
  • Automated Testing
  • User management
  • Virtual media

Features In Progress

  • OpenCompute Redfish Compliance
  • Verified Boot

Features Requested but need help

  • OpenBMC performance monitoring

Finding out more

Dive deeper into OpenBMC by opening the docs repository.

Technical Steering Committee

The Technical Steering Committee (TSC) guides the project. Members are:

  • Brad Bishop (chair), IBM
  • Nancy Yuen, Google
  • Sai Dasari, Facebook
  • James Mihm, Intel
  • Sagar Dharia, Microsoft
  • Samer El-Haj-Mahmoud, Arm

Contact