当前位置: 首页 > article >正文

Ubuntu下用QEMU模拟运行OpenBMC

1、前言

        在调试过程中,安装了很多依赖库,具体没有记录。关于kvm,也没理清具体有什么作用。本文仅记录,用QEMU成功的将OpenBMC跑起来的过程,做备忘,也供大家参考。

2、环境信息

VMware® Workstation 15 Prosunny@ubuntu:~$ uname -a
Linux ubuntu 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

3、虚拟化设置

进入虚拟机:

1、查看是否支持虚拟化sunny@ubuntu:~$ LC_ALL=C lscpu | grep VirtualizationVirtualization:      VT-xVirtualization type: full2、查看核心数,应该大于0sunny@ubuntu:~$ egrep -c '(vmx|svm)' /proc/cpuinfo43、安装KVM,已经安装过sunny@ubuntu:~$ sudo apt install qemu qemu-kvm virt-manager bridge-utils[sudo] password for sunny: Reading package lists... DoneBuilding dependency tree       Reading state information... Donebridge-utils is already the newest version (1.5-15ubuntu1).qemu-kvm is already the newest version (1:2.11+dfsg-1ubuntu7.42).qemu is already the newest version (1:2.11+dfsg-1ubuntu7.42).virt-manager is already the newest version (1:1.5.1-0ubuntu1.2).The following packages were automatically installed and are no longer required:gir1.2-goa-1.0 gir1.2-snapd-1Use 'sudo apt autoremove' to remove them.0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.3、重启虚拟机sunny@ubuntu:~$ reboot4、虚拟机起来后,将用户添加到适当的组中,启用并启动libvirt服务sunny@ubuntu:~$ sudo useradd -g $USER libvirtsunny@ubuntu:~$ sudo useradd -g $USER libvirt-kvmsunny@ubuntu:~$ sudo systemctl enable libvirtd.servicesunny@ubuntu:~$ sudo systemctl start libvirtd.serviceSynchronizing state of libvirtd.service with SysV service script with         /lib/systemd/systemd-sysv-install.Executing: /lib/systemd/systemd-sysv-install enable libvirtd

4、安装QENU

1、下载源码sunny@ubuntu:~$ wget https://download.qemu.org/qemu-6.2.0.tar.xz2、解压sunny@ubuntu:~$ tar xvJf qemu-6.2.0.tar.xz3、在下载目录新建文件夹buildsunny@ubuntu:~$ cd qemu-6.2.0sunny@ubuntu:~$ mkdir build sunny@ubuntu:~$ cd build  4、配置sunny@ubuntu:~$ ../configure --enable-kvm  --target-list=arm-softmmu5、编译sunny@ubuntu:~$ make6、安装sunny@ubuntu:~$ make install7、查看是否安装成功sunny@ubuntu:~$ qemu-system-arm --versionQEMU emulator version 6.2.0Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

5、启动OpenBMC

官方OpenBMC镜像下载:
https://jenkins.openbmc.org/job/latest-master/label=docker-builder,target=romulus/lastSuccessfulBuild/artifact/openbmc/build/tmp/deploy/images/romulus/obmc-phosphor-image-romulus.static.mtd

启动并登录:(用户名/密码:root/0penBmc ,0penBmc 首字母是零)

./qemu-system-arm -m 256 -M romulus-bmc -nographic \-drive file=./obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd \-net nic -net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostfwd=udp:127.0.0.1:2623-:623,hostname=qemu
sunny@ubuntu:~$ qemu-system-arm -m 256 -M romulus-bmc -nographic  -drive file=./obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd  -net nic -net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostfwd=udp:127.0.0.1:2623-:623,hostname=qemu
qemu-system-arm: warning: nic ftgmac100.1 has no peerU-Boot 2019.04 (Jan 28 2025 - 06:31:57 +0000)SOC : AST2500-A1 
RST : Power On 
2nd Boot : Enable
LPC Mode : SIO:Enable : SuperIO-2e
Eth : MAC0: RMII/NCSI, , MAC1: RMII/NCSI, 
Model: Romulus BMC
DRAM:  192 MiB (capacity:256 MiB, VGA:64 MiB, ECC:off)
MMC:   
Loading Environment from SPI Flash... SF: Detected n25q256a with page size 256 Bytes, erase size 4 KiB, total 32 MiB
*** Warning - bad CRC, using default environmentIn:    serial@1e784000
Out:   serial@1e784000
Err:   serial@1e784000
Net:   ftgmac100_probe - NCSI detectedWarning: ethernet@1e660000 (eth0) using random MAC address - be:b0:c8:9a:8c:85
eth0: ethernet@1e660000
Hit any key to stop autoboot:  0 ...romulus login: [  OK  ] Started Hostname Service.
[  OK  ] Finished Phosphor Sysfs - Add LED.
[  OK  ] Finished Phosphor Sysfs - Add LED.
[  OK  ] Finished Phosphor Sysfs - Add LED.
[  OK  ] Finished Wait for /org/openbmc/control/power0.
[  OK  ] Finished Wait for /xyz/openbmc_project/control/host0/auto_reboot.
[  OK  ] Finished Wait for /xyz/openbmc_project/control/host0/boot/one_time.
[  OK  ] Finished Wait for /xyz/openbmc_project/control/host0/boot.
[  OK  ] Finished Wait for /xyz/openbmc_pro…control/host0/power_restore_policy.
[  OK  ] Finished Wait for /xyz/openbmc_project/control/host0/restriction_mode.
[  OK  ] Finished Wait for /xyz/openbmc_project/time/sync_method.romulus login: root
Password: 
root@romulus:~# pwd
/home/root
root@romulus:~# psPID USER       VSZ STAT COMMAND1 root     10896 S    {systemd} /sbin/init2 root         0 SW   [kthreadd]3 root         0 SW   [pool_workqueue_]4 root         0 IW<  [kworker/R-slub_]5 root         0 IW<  [kworker/R-netns]6 root         0 IW   [kworker/0:0-dev]7 root         0 IW<  [kworker/0:0H-kb]8 root         0 IW   [kworker/u2:0-ev]9 root         0 IW<  [kworker/R-mm_pe]10 root         0 IW   [rcu_tasks_rude_]11 root         0 IW   [rcu_tasks_trace]12 root         0 SW   [ksoftirqd/0]13 root         0 SW   [kdevtmpfs]14 root         0 IW<  [kworker/R-inet_]15 root         0 SW   [oom_reaper]16 root         0 IW   [kworker/u2:1-ev]17 root         0 IW<  [kworker/R-write]18 root         0 IW<  [kworker/R-kbloc]19 root         0 SW   [watchdogd]20 root         0 IW   [kworker/0:1-dev]21 root         0 SW   [kswapd0]22 root         0 IW   [kworker/0:2-dev]23 root         0 IW   [kworker/0:3-eve]24 root         0 IW   [kworker/0:4-eve]25 root         0 SW   [hwrng]26 root         0 SW   [card0-crtc0]27 root         0 IW<  [kworker/u3:0]28 root         0 IW   [kworker/u2:2-ev]29 root         0 IW<  [kworker/R-nbd0-]30 root         0 IW<  [kworker/R-nbd1-]31 root         0 IW<  [kworker/R-nbd2-]32 root         0 IW<  [kworker/R-nbd3-]33 root         0 IW<  [kworker/R-nbd4-]34 root         0 IW<  [kworker/R-nbd5-]35 root         0 IW<  [kworker/R-nbd6-]36 root         0 IW<  [kworker/R-nbd7-]37 root         0 IW<  [kworker/R-nbd8-]38 root         0 IW<  [kworker/R-nbd9-]39 root         0 IW<  [kworker/R-nbd10]40 root         0 IW<  [kworker/R-nbd11]41 root         0 IW<  [kworker/R-nbd12]42 root         0 IW<  [kworker/R-nbd13]43 root         0 IW<  [kworker/R-nbd14]44 root         0 IW<  [kworker/R-nbd15]45 root         0 SW   [irq/38-aspeed-v]46 root         0 IW<  [kworker/R-mld]47 root         0 IW<  [kworker/R-ipv6_]89 root         0 SWN  [jffs2_gcd_mtd5]99 root         0 IW<  [kworker/0:1H]120 root     15644 S    /usr/lib/systemd/systemd-journald156 systemd-  7536 S    /usr/lib/systemd/systemd-resolved157 systemd- 16348 S    /usr/lib/systemd/systemd-timesyncd167 root      3844 S    /usr/lib/systemd/systemd-udevd174 systemd-  8800 S    /usr/lib/systemd/systemd-networkd220 messageb  6324 S    /usr/bin/dbus-broker-launch --scope system --audit222 messageb  2884 S    dbus-broker --log 4 --controller 9 --machine-id d21f666aea624a3b8a37ba09a2631ee3 --max-bytes 536870912 --max-fds 40223 avahi     4764 S    avahi-daemon: running [romulus.local]224 root     15296 S    /usr/libexec/bmcwebd225 root      2980 S    /usr/sbin/klogd -n226 root      2980 S    /usr/sbin/syslogd -n231 root      3820 S    /usr/sbin/obmc-console-server --config /etc/obmc-console/server.ttyVUART0.conf ttyVUART0233 root      6016 S    phosphor-dump-monitor235 root     13148 S    /usr/bin/openpower-update-manager236 root      3620 S    btbridged238 root     41696 S    power_control.exe 3000 10239 root     15044 S    /usr/sbin/nscd240 root     13828 S    /usr/bin/phosphor-certificate-manager --endpoint truststore --path /etc/ssl/certs/authority --type authority --unit242 root     14224 S    /usr/bin/phosphor-certificate-manager --endpoint https --path /etc/ssl/certs/https/server.pem --type server --unit245 root     14092 S    /usr/bin/phosphor-certificate-manager --endpoint ldap --path /etc/nslcd/certs/cert.pem --type client --unit248 root      6020 S    /usr/bin/phosphor-gpio-monitor --path=/dev/input/by-path/platform-gpio-keys-event --key=135 --polarity=1 --target=i260 root     18948 S    /usr/bin/health-monitor262 root      9448 S    /usr/libexec/phosphor-led-sysfs/phosphor-ledcontroller263 root      5512 S    /usr/sbin/slpd265 root      6584 S    /usr/bin/phosphor-srvcfg-manager

6、登录WEB

https://127.0.0.1:2443/

7、SSH登录

sunny@ubuntu:~$ ssh -p 2222 root@127.0.0.1The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established.ECDSA key fingerprint is SHA256:1qMjJ+TbkvpF17Y8y/R9d+xVUE4lu0nN7YxZHNaQwhU.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.root@127.0.0.1's password: root@romulus:~# pwd/home/root

相关文章:

Ubuntu下用QEMU模拟运行OpenBMC

1、前言 在调试过程中&#xff0c;安装了很多依赖库&#xff0c;具体没有记录。关于kvm&#xff0c;也没理清具体有什么作用。本文仅记录&#xff0c;用QEMU成功的将OpenBMC跑起来的过程&#xff0c;做备忘&#xff0c;也供大家参考。 2、环境信息 VMware Workstation 15 Pro…...

机器学习在自然语言处理中的应用与实践

引言 自然语言处理&#xff08;Natural Language Processing&#xff0c;NLP&#xff09;是人工智能领域的一个重要分支&#xff0c;旨在使计算机能够理解、生成和处理人类语言。随着机器学习技术的不断发展&#xff0c;NLP领域取得了显著的进展。机器学习为自然语言处理提供了…...

文件操作助手

文件操作助手 在我们实现一个大型项目时&#xff0c;往往会有一个公共模块&#xff0c;这个公共模块是公用的&#xff0c;里面可能会包含文件操作助手、字符串操作助手、时间戳操作助手… 而我们今天就来实现一个文件操作助手&#xff0c;里面包含的功能有&#xff1a; 判断…...

专题|Python贝叶斯网络BN动态推理因果建模:MLE/Bayes、有向无环图DAG可视化分析呼吸疾病、汽车效能数据2实例合集

原文链接&#xff1a;https://tecdat.cn/?p41199 作为数据科学家&#xff0c;我们始终在探索能够有效处理复杂系统不确定性的建模工具。本专题合集系统性地解构了贝叶斯网络&#xff08;BN&#xff09;这一概率图模型在当代数据分析中的创新应用&#xff0c;通过开源工具bnlea…...

Java单例模式中的饿汉模式和懒汉模式

Java单例模式中的饿汉模式和懒汉模式 一、单例模式的显著特点单一实例全局访问 二、饿汉模式&#xff1a;急切的实例创建者三、懒汉模式&#xff1a;延迟的实例构建者1. 不考虑线程安全的初始版本2. 引入同步机制解决线程安全问题3. 优化性能&#xff1a;避免重复进入同步块4. …...

理解操作系统(一)冯诺依曼结构和什么是操作系统

认识冯诺依曼系统 操作系统概念与定位 深⼊理解进程概念&#xff0c;了解PCB 学习进程状态&#xff0c;学会创建进程&#xff0c;掌握僵⼫进程和孤⼉进程&#xff0c;及其形成原因和危害 1. 冯诺依曼体系结构 我们常⻅的计算机&#xff0c;如笔记本。我们不常⻅的计算机&am…...

Git的认识安装及创建配置本地仓库

目录 Git的作用安装Git创建Git仓库配置本地仓库git config user.name/email(添加配置)以及git config --unset.name/email(删除配置)git config --global user.name/email以及git config --global --unset user.name/email(name和email适用于当前机器的所有Git仓库中) 感谢各位…...

【el-upload】el-upload组件 - list-type=“picture“ 时,文件预览展示优化

目录 问题图el-upload预览组件 PicturePreview效果展示 问题图 el-upload <el-uploadref"upload"multipledragaction"#":auto-upload"false":file-list"fileList"name"files":accept".png,.jpg,.jpeg,.JGP,.JPEG,.…...

Uthana,AI 3D角色动画生成平台

Uthana是什么 Uthana 是专注于3D角色动画生成的AI平台。平台基于简单的文字描述、参考视频或动作库搜索&#xff0c;快速为用户生成逼真的动画&#xff0c;支持适配任何骨骼结构的模型。Uthana 提供风格迁移、API集成和定制模型训练等功能&#xff0c;满足不同用户需求。平台提…...

面试常问系列(二)-神经网络参数初始化之自注意力机制

目录 &#xff08;一&#xff09;、transformer中的自注意力机制为什么要除以根号d&#xff1f; 1. 点积的方差问题 2. 缩放的作用 3. 类比初始化方法 4. 实验验证 5.总结 &#xff08;一&#xff09;、transformer中的自注意力机制为什么要除以根号d&#xff1f; 在Tra…...

Linux冯诺依曼体系与计算机系统架构认知(8)

文章目录 前言一、冯诺依曼体系冯•诺依曼体系结构推导内存提高冯•诺依曼体系结构效率的方法你用QQ和朋友聊天时数据的流动过程与冯•诺依曼体系结构相关的一些知识 二、计算机层次结构分析操作系统(Operator System)驱动层的作用与意义系统调用接口(system call)用户操作接口…...

解决用户同时登录轮询获取用户信息错乱,使用WebSocket和Server-Sent Events (SSE)

为什么更推荐WebSocket Server-Sent Events (SSE) 是一种服务器向客户端推送数据的单向通信协议&#xff0c;适合某些场景&#xff0c;在解决用户同时登录和实时获取用户信息的问题上&#xff0c;WebSocket 是更好的选择。 1. SSE 的局限性 单向通信 SSE 是单向的&#xff0…...

LLM之RAG理论(十四)| RAG 最佳实践

RAG 的过程很复杂&#xff0c;包含许多组成部分。我们如何确定现有的 RAG 方法及其最佳组合&#xff0c;以确定最佳 RAG 实践&#xff1f; 论文 《Searching for Best Practices in Retrieval-Augmented Generation》给出了回答。 本文将从以下三方面进行介绍&#xff1a; 首先…...

[RoarCTF 2019]Easy Calc-3.23BUUCTF练习day5(2)

[RoarCTF 2019]Easy Calc-3.23BUUCTF练习day5(2) 解题过程 查看源码 发现calc.php页面&#xff0c;访问一下 分析代码 首先获取$_GET[num]的值并赋给变量$str。然后定义了一个黑名单数组$blacklist&#xff0c;包含了一系列被禁止的字符或转义字符&#xff0c;如空格、制表…...

hadoop集群配置-ssh无密登录

1.ssh-keygen -t rsa 2.ssh-copy-id hadoop1 3.ssh roothadoop1 退出 exit...

【C++教程】break语句

在 C 中&#xff0c;break 是一个控制流语句&#xff0c;用于立即终止当前所在的循环或 switch 语句的执行&#xff0c;并跳出其作用域。以下是 break 的详细用法及场景&#xff1a; 1. 在循环中使用 break break 会直接终止当前所在的循环&#xff08;for、while、do-while&a…...

MinGW与使用VScode写C语言适配

压缩包 通过网盘分享的文件&#xff1a;MinGW.zip 链接: https://pan.baidu.com/s/1QB-Zkuk2lCIZuVSHc-5T6A 提取码: 2c2q 需要下载的插件 1.翻译 找到VScode页面&#xff0c;从上数第4个&#xff0c;点击扩展&#xff08;以下通此&#xff09; 搜索---Chinese--点击---安装--o…...

openharmony中hilog实证记录说明(3.1和5.0版本)

每次用这个工具hilog都有一些小用法记不清&#xff0c;需要花一些时间去查去分析使用方法&#xff0c;为了给丰富多彩的生活留出更多的时间&#xff0c;所以汇总整理共享来了&#xff0c;它来了它来了~~~~~~~~~ 开始是想通过3.1来汇总的&#xff0c;但实际测试发现openharmony…...

算法刷题整理合集(七)·【算法赛】

本篇博客旨在记录自已的算法刷题练习成长&#xff0c;里面注有详细的代码注释以及和个人的思路想法&#xff0c;希望可以给同道之人些许帮助。本人也是算法小白&#xff0c;水平有限&#xff0c;如果文章中有什么错误或遗漏之处&#xff0c;望各位可以在评论区指正出来&#xf…...

Android Studio控制台中文乱码解决方案

前些天发现了一个蛮有意思的人工智能学习网站,8个字形容一下"通俗易懂&#xff0c;风趣幽默"&#xff0c;感觉非常有意思,忍不住分享一下给大家。 &#x1f449;点击跳转到教程 前言&#xff1a; 在项目调试过程中&#xff0c;用华为手机调试控制台没任何问题&#x…...

BUAA XCPC 2025 Spring Training 2

C \color{green}{\texttt{C}} C [Problem Discription] \color{blue}{\texttt{[Problem Discription]}} [Problem Discription] 给定一棵以 1 1 1 为根的树&#xff0c;记 a i a_{i} ai​ 表示节点 i i i 的权值&#xff0c; lca( i , j ) \text{lca(}i,j) lca(i,j) 表示节…...

Edge浏览器如何默认启动某个工作区 / 为工作区添加快捷方式

Edge浏览器的工作区确实非常好用&#xff0c;可以多端同步标签页。但是打开Edge时默认是没有在工作区的状态&#xff0c;这个状态下的标签页可能会丢失。所以我研究了一下&#xff0c;如何点击快捷方式时自动启动一个工作区&#xff0c;方法如下&#xff1a; 先找到WorkspaceCa…...

Cherry Studio搭建本地知识库,结合DeepSeek实现RAG

Cherry Studio搭建本地知识库&#xff0c;结合DeepSeek实现RAG CherryStudioCherryStudio 简介环境准备 模型配置本地知识创建1、新建知识库2、添加文件3、添加网址或者网站4、搜索知识库 结合DeepSeek实现RAG1、选择知识库2、进行提问 常见问题与解决方案 CherryStudio Cherr…...

【Android】VehiclePropertyAccess引起CarService崩溃

VehiclePropertyAccess引起CarService崩溃 VehiclePropertyAccess VehiclePropertyAccess属性&#xff0c;用于定义车辆属性的访问权限。权限包括 读&#xff1a;READ&#xff0c;只可以读取&#xff0c;不能写入。 VehiclePropertyAccess:READ写&#xff1a;WRITE&#xf…...

深度剖析:复制带随机指针的链表算法实现

在链表相关的算法中&#xff0c;复制一个带有随机指针的链表是一个经典且具有一定难度的问题。本文将深入分析一段用C语言实现的复制带随机指针链表的代码&#xff0c;通过模块化的方式详细解释每段代码的作用&#xff0c;帮助读者更好地理解这一复杂算法。 作者主页&#xf…...

Java 大视界 -- Java 大数据在智慧文旅旅游目的地营销与品牌传播中的应用(150)

&#x1f496;亲爱的朋友们&#xff0c;热烈欢迎来到 青云交的博客&#xff01;能与诸位在此相逢&#xff0c;我倍感荣幸。在这飞速更迭的时代&#xff0c;我们都渴望一方心灵净土&#xff0c;而 我的博客 正是这样温暖的所在。这里为你呈上趣味与实用兼具的知识&#xff0c;也…...

SQLMesh SCD-2 时间维度实战:餐饮菜单价格演化追踪

场景背景&#xff1a;动态菜单价格管理 考虑某连锁餐厅的菜单管理系统&#xff0c;需要记录食品价格的历史变更轨迹。业务需求包括&#xff1a; 记录每次价格调整的时间点支持历史价格查询&#xff08;如"2020年1月2日汉堡多少钱"&#xff09;维护当前有效价格清单…...

uniapp自身bug | uniapp+vue3打包后 index.html无法直接运行

前提&#xff1a; 已经修改了基础路径 打开打包文件&#xff0c;双击运行index.html报错&#xff0c;无法访问页面 uniappvue2项目是可以正常运行的 vue3修改publicPath: ./后&#xff0c;也是可以正常访问打包文件中的index.html 点进控制台提供的链接&#xff1a;https:/…...

数据分析面试--京东

1.考察日期函数的应用 select Order_date, count(distinct user_id) as uv from (select user_id, Order_date, row_number() over(partition by user_id order by Order_date) as new_tagfrom ord where date_diff(current_date(), Order_date)<30 ) t where new_tag1 gro…...

Centos7搭建Zabbix4.x监控HCL模拟网络设备:zabbix-server搭建及监控基础04

兰生幽谷&#xff0c;不为莫服而不芳&#xff1b; 君子行义&#xff0c;不为莫知而止休。 4.OID查看工具Getif安装及使用 找度娘下载Getif&#xff0c;该软件比较老&#xff0c;可以用来查看OID编码&#xff0c;我的宿主机是Win11,无法安装。所以只有到虚拟机win12去安装&am…...