1.安装依赖
OpenBMC是基于Yocto搭建的,基于不同的OS预先需要安装的依赖包和工具,清参考:
1 System Requirements — The Yocto Project ® 5.1.999 documentation
2.下载代码
OpenBMC的源码位于:
openbmc/openbmc: OpenBMC Distribution
clone代码:
$ git clone git@github.com:openbmc/openbmc.git
3.查看支持的硬件平台
OpenBMC目前已经支持多多种硬件平台,所以编译前需要先选择一个指定的硬件平台
#首先进入clone后的源码目录
$ cd openbmc
#查看当前支持的硬件,需要注意.和setup之间有一个空格
$ . setup
Target machine must be specified. Use one of:
ahe50dc huygens s7106
bletchley kudo s8036
catalina lannister sbp1
daytonax minerva spc621d8hm3
dl360-g11 mori starscream
dl360poc mtjade system1
dl385-g11 mtjefferson tatlin-archive-x86
e3c246d4i mtmitchell-dcscm tiogapass
e3c256d4i ncplite transformers
ethanolx nf5280m7 vegman-n110
evb-ast2500 nicole vegman-rx20
evb-ast2600 olympus-nuvoton vegman-sx20
evb-npcm750 p10bmc ventura
evb-npcm845 palmetto witherspoon
f0b pstbmc witherspoon-tacoma
fp5280g3 qcom-dc-scm-v1 x11spi
fvp quanta-q71l x570d4u
g220a rl300-g11 yosemite4
gbs romed8hm3 yosemite4n
genesis3 romulus yosemitev2
greatlakes s2600wf zaius
4.选择一个硬件平台
$ . setup evb-ast2600
5.编译
$ bitbake obmc-phosphor-image
初次编译时,需要下载所需的源码,因此会很长时间。
如果因为网络原因没有下载成功,再次执行bitbake obmc-phosphor-image编译即可
编译完成后,所生成的image位于目录:openbmc/build/evb-ast2600/tmp/deploy/images/evb-ast2600
$ ls
aspeed-ast2600-evb--6.6.71+git0+4e798939e6-r0-evb-ast2600-20250128025926.dtb
aspeed-ast2600-evb.dtb
aspeed-ast2600-evb-evb-ast2600.dtb
evb-ast2600-20250128025926.all.tar
evb-ast2600-20250128025926.tar
fitImage
fitImage--6.6.71+git0+4e798939e6-r0-evb-ast2600-20250128025926.bin
fitImage-evb-ast2600.bin
fitImage-its--6.6.71+git0+4e798939e6-r0-evb-ast2600-20250128025926.its
fitImage-its-evb-ast2600
fitImage-its-obmc-phosphor-initramfs-evb-ast2600--6.6.71+git0+4e798939e6-r0-evb-ast2600-20250128025926.its
fitImage-its-obmc-phosphor-initramfs-evb-ast2600-evb-ast2600
fitImage-linux.bin--6.6.71+git0+4e798939e6-r0-evb-ast2600-20250128025926.bin
fitImage-linux.bin-evb-ast2600
fitImage-obmc-phosphor-initramfs-evb-ast2600--6.6.71+git0+4e798939e6-r0-evb-ast2600-20250128025926.bin
fitImage-obmc-phosphor-initramfs-evb-ast2600-evb-ast2600
flash-evb-ast2600
image-bmc
image-kernel
image-rofs
image-rwfs
image-u-boot
obmc-phosphor-image-evb-ast2600-20250128025926.manifest
obmc-phosphor-image-evb-ast2600-20250128025926.qemuboot.conf
obmc-phosphor-image-evb-ast2600-20250128025926.spdx.json
obmc-phosphor-image-evb-ast2600-20250128025926.squashfs-xz
obmc-phosphor-image-evb-ast2600-20250128025926.static.mtd
obmc-phosphor-image-evb-ast2600-20250128025926.static.mtd.all.tar
obmc-phosphor-image-evb-ast2600-20250128025926.static.mtd.tar
obmc-phosphor-image-evb-ast2600-20250128025926.testdata.json
obmc-phosphor-image-evb-ast2600.jffs2
obmc-phosphor-image-evb-ast2600.manifest
obmc-phosphor-image-evb-ast2600.qemuboot.conf
obmc-phosphor-image-evb-ast2600.spdx.json
obmc-phosphor-image-evb-ast2600.squashfs-xz
obmc-phosphor-image-evb-ast2600.static.mtd
obmc-phosphor-image-evb-ast2600.static.mtd.all.tar
obmc-phosphor-image-evb-ast2600.static.mtd.tar
obmc-phosphor-image-evb-ast2600.testdata.json
obmc-phosphor-initramfs-evb-ast2600-20250128025926.cpio.xz
obmc-phosphor-initramfs-evb-ast2600-20250128025926.manifest
obmc-phosphor-initramfs-evb-ast2600-20250128025926.qemuboot.conf
obmc-phosphor-initramfs-evb-ast2600-20250128025926.testdata.json
obmc-phosphor-initramfs-evb-ast2600.cpio.xz
obmc-phosphor-initramfs-evb-ast2600.manifest
obmc-phosphor-initramfs-evb-ast2600.qemuboot.conf
obmc-phosphor-initramfs-evb-ast2600.testdata.json
u-boot.bin
u-boot-evb-ast2600.bin
u-boot-evb-ast2600-v2019.04+git-r0.bin
u-boot-spl.bin
u-boot-spl.bin-evb-ast2600
u-boot-spl.bin-evb-ast2600-v2019.04+git-r0
vmlinux
vmlinux--6.6.71+git0+4e798939e6-r0-evb-ast2600-20250128025926.bin
vmlinux-evb-ast2600.bin