ubuntu18.04上部署openbmc编译环境

1、安装Ubuntu环境,硬盘配置至少100GB大小

2、更换ubutun软件源。编辑/etc/apt/sources.list文件,添加以下内容

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

然后执行

sudo apt-get update
sudo apt-get upgrade

3、安装开发中必要的支持软件

sudo apt-get install -y gawk wget git diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm sed cvs subversion help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc npm meson tree


sudo apt-get install -y git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat

sudo apt-get install -y liblz4-tool zstd

sudo apt-get install -y ipmitool

4、配置git

git config --global user.name  XXXX  (github官网注册的用户名)
git config --global user.email  XXXX@xxxx.com (gitub官网注册绑定的邮箱)

查看配置

git config --list 

生成SSH秘钥

ssh-keygen -t rsa -C "XXXX@xxxx.com" 

gedit ~/.ssh/id_rsa.pub

登录git官网,网址:https://github.com/。
右上角 登陆后点击settings->SSH and GPS keys->New SSH key,添加id_rsa.pub中的内容

5、下载openBmc源码

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

6、编译openbmc

. setup evb-ast2600

sudo vim conf/local.conf,添加三行

BB_NUMBER_THREADS ='8' #(修改编译线程的数量,改为多线程)
PARALLEL_MAKE ='-j 8' #(修改cpu核的数量,不宜超过电脑cpu核数量)
BB_NO_NETWORK = "1"  #网络环境不好的时候,配置成离线编译

编译并显示时间

time bitbake obmc-phosphor-image

只下载代码不编译:

bitbake obmc-phosphor-image -c fetch

清除编译

bitbake -c clean -v u-boot
bitbake -c cleanall     xx-image            #清除所有编译中间
bitbake -c cleansstate   xx-image            #清除编译      

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值