首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >“图像太大”不断发生在openbmc映像上,用于Raspberrypi平台。

“图像太大”不断发生在openbmc映像上,用于Raspberrypi平台。
EN

Stack Overflow用户
提问于 2021-09-01 06:21:27
回答 1查看 612关注 0票数 1

谁能给我个建议,为Raspberrypi平台制作一个openbmc图像?在我尝试之前,我查看了相关的文件,并相信一个openbmc图像可以工作在覆盆子。比如OpenBMC与树莓Pi (2或3)和建立bmcweb?https://kevinleeblog.github.io/project1/2019/11/25/openbmc-for-raspberry-pi-zero/

因此,我遵循这些说明,并尝试了以下步骤。

#1: Git将openbmc.git克隆到本地PC上。

代码语言:javascript
运行
复制
tm@tm-VB1:~/Rpi4-64$ git clone https://github.com/openbmc/openbmc.git

Snip the logs but it looks no problem.

Receiving objects: 100% (182121/182121), 84.10 MiB | 5.55 MiB/s, done.

Resolving deltas: 100% (96860/96860), done.

#2:为覆盆子设置TEMPLATECONF

代码语言:javascript
运行
复制
tm@tm-VB1:~/Rpi4-64$ export TEMPLATECONF=meta-evb/meta-evb-raspberrypi/conf

tm@tm-VB1:~/Rpi4-64$ echo $TEMPLATECONF

meta-evb/meta-evb-raspberrypi/conf

#3:通过"openbmc-env"设置环境

代码语言:javascript
运行
复制
tm@tm-VB1:~/Rpi4-64/openbmc$ . openbmc-env 

### Initializing OE build env ###

Snip the logs but it looks no problem. As you know, the script automatically creates a subdirectory,build, under openbmc.


Common targets are:
  obmc-phosphor-image

tm@tm-VB1:~/Rpi4-64/openbmc/build$

#4:更改目录,并为我的Raspberrypi平台编辑local.conf .

代码语言:javascript
运行
复制
tm@tm-VB1:~/Rpi4-64/openbmc/build$ cat ./conf/local.conf

Snip the log for unchanged part.

MACHINE ??= "raspberrypi4-64"   <<< Change here for my platform.

DL_DIR ?= "/home/tm/Yocto/downloads"           <<< Add here for build-time reduction at retry.

SSTATE_DIR ?= "/home/tm/Yocto/sstate-cache"   <<< Add here for build-time reduction at retry.

#5:根据以下建议更改FLASH_SIZE变量. https://github.com/openbmc/openbmc/issues/3590

代码语言:javascript
运行
复制
tm@tm-VB1:~/Rpi4-64/openbmc/meta-phosphor/classes$ cat image_types_phosphor.bbclass 

Snip the log.

# Flash characteristics in KB unless otherwise noted

FLASH_SIZE ?= "131072"        <<< I changed only this variable from 32768 to 131072.

#6:比特面包开始了.

代码语言:javascript
运行
复制
tm@tm-VB1:~/Rpi4-64/openbmc/bitbake obmc-phosphor-image

然后,错误发生了。

代码语言:javascript
运行
复制
ERROR: Logfile of failure stored in: /home/tm/Rpi/openbmc/build/tmp/work/raspberrypi-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/temp/log.do_generate_static.2055074
DEBUG: Executing python function do_generate_static
DEBUG: Executing shell function do_mk_static_nor_image
32768+0 records in
32768+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 0.09147 s, 367 MB/s
DEBUG: Shell function do_mk_static_nor_image finished
DEBUG: Considering file size=495980 name=/home/tm/Rpi/openbmc/build/tmp/deploy/images/raspberrypi/u-boot.bin
DEBUG: Spanning start=0K end=512K
DEBUG: Compare needed=495980 available=524288 margin=28308
484+1 records in
484+1 records out
495980 bytes (496 kB, 484 KiB) copied, 0.00120141 s, 413 MB/s
DEBUG: Considering file size=8266960 name=/home/tm/Rpi/openbmc/build/tmp/deploy/images/raspberrypi/fitImage-obmc-phosphor-initramfs-raspberrypi-raspberrypi
DEBUG: Spanning start=512K end=4864K
>>>DEBUG: Compare needed=8266960 available=4456448 margin=-3810512
ERROR: Image '/home/tm/Rpi/openbmc/build/tmp/deploy/images/raspberrypi/fitImage-obmc-phosphor-initramfs-raspberrypi-raspberrypi' is too large!
DEBUG: Python function do_generate_static finished

说保证金=-3810512.

现在,我的第二次尝试。删除了整个openbmc目录,并执行了上面的相同步骤。但这一次,我将FLASH_SIZE从32768改为262144。结果如下所示。

代码语言:javascript
运行
复制
ERROR: obmc-phosphor-image-1.0-r0 do_generate_static: Image '/home/tm/Rpi4/openbmc/build/tmp/deploy/images/raspberrypi4/u-boot.bin' is too large!
ERROR: Logfile of failure stored in: /home/tm/Rpi4/openbmc/build/tmp/work/raspberrypi4-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/temp/log.do_generate_static.2061792
ERROR: Task (/openbmc/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb:do_generate_static) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3915 tasks of which 2633 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/openbmc/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb:do_generate_static
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

tm@tm-VB1:~/Rpi4/openbmc/build$ cat /home/tm/Rpi4/openbmc/build/tmp/work/raspberrypi4-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/temp/log.do_generate_static.2061792
DEBUG: Executing python function do_generate_static
DEBUG: Executing shell function do_mk_static_nor_image
32768+0 records in
32768+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 0.177223 s, 189 MB/s
DEBUG: Shell function do_mk_static_nor_image finished
DEBUG: Considering file size=548224 name=/home/tm/Rpi4/openbmc/build/tmp/deploy/images/raspberrypi4/u-boot.bin
DEBUG: Spanning start=0K end=512K
>>>DEBUG: Compare needed=548224 available=524288 margin=-23936
ERROR: Image '/home/tm/Rpi4/openbmc/build/tmp/deploy/images/raspberrypi4/u-boot.bin' is too large!
DEBUG: Python function do_generate_static finished
tm@tm-VB1:~/Rpi4/openbmc/build$ 

说保证金=-23936.

好的。图像太大了。所以,我的第三次尝试。我删除了整个openbmc目录,并执行了上述步骤。但这一次,我将FLASH_SIZE从32768改为9437184。结果如下所示。

代码语言:javascript
运行
复制
ERROR: obmc-phosphor-image-1.0-r0 do_generate_static: Image '/home/tm/Rpi4/openbmc/build/tmp/deploy/images/raspberrypi4/u-boot.bin' is too large!
ERROR: Logfile of failure stored in: /home/tm/Rpi4/openbmc/build/tmp/work/raspberrypi4-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/temp/log.do_generate_static.2058361
ERROR: Task (/openbmc/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb:do_generate_static) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3935 tasks of which 0 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/openbmc/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb:do_generate_static
Summary: There were 4 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
tm@tm-VB1:~/Rpi4/openbmc$ 

tm@tm-VB1:~/Rpi4/openbmc$ cat /home/tm/Rpi4/openbmc/build/tmp/work/raspberrypi4-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/temp/log.do_generate_static.2058361
DEBUG: Executing python function do_generate_static
DEBUG: Executing shell function do_mk_static_nor_image
32768+0 records in
32768+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 0.173685 s, 193 MB/s
DEBUG: Shell function do_mk_static_nor_image finished
DEBUG: Considering file size=548224 name=/home/tm/Rpi4/openbmc/build/tmp/deploy/images/raspberrypi4/u-boot.bin
DEBUG: Spanning start=0K end=512K
>>>DEBUG: Compare needed=548224 available=524288 margin=-23936
ERROR: Image '/home/tm/Rpi4/openbmc/build/tmp/deploy/images/raspberrypi4/u-boot.bin' is too large!
DEBUG: Python function do_generate_static finished
tm@tm-VB1:~/Rpi4/openbmc$ 

表示,其保证金与256 It的案例相同。

我的第四次尝试。我删除了整个openbmc目录,并执行了上述步骤。我将机器??=“raspberilli4-64”改为"raspberrypi2“,但这一次,我将FLASH_SIZE从32768改为33554432。

以前的结果是一样的.

我的第五次尝试。我删除了整个openbmc目录,并执行了上述步骤。我使用机器??= "raspberrypi2“,但这一次,我将FLASH_SIZE从32768改为67108864。

以前的结果是一样的.

在我尝试了几种变体之后,它总是说“图像太大了”,尽管我把FLASH_SIZE改成了大得多的。因此,我想知道我是否遗漏了一些重要的配置,或者除了FLASH_SIZE之外,它还需要另一个参数来修复这个问题。顺便说一句,我试过罗穆卢斯并成功了。

我的环境是ubuntu-20.04.2.0-桌面-amd64 64。

我真的很感激有人能给我建议,让我做这件事。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-09-02 16:57:09

有趣的是,我没有为您提供快速修复,但我确实注意到过大的分区是uboot分区。uboot是安装在机器上的一个较小的单独二进制文件。看起来,您的uboot构建超过512 k,分区设置为512 k。您的闪存大小是大规模的FLASH_SIZE = 9437184",比一个gig更大(因为FLASH_SIZE在K中)

如果我是你,我将首先尝试为raspberry pi构建一个较早版本的openbmc。(它过去可以工作,所以您只需要在uboot扩展到大之前找到提交)。用git向后移动一个月,直到你发现它有效为止。

如果这样做不起作用,我将尝试修改分区表。这里是你失败的地方

  • 这看起来很好,建筑,uboot映像看起来很好
  • 增加内核偏移使如果生成,但是openbmc中的其他目标对此解决方案并不满意。因此,可能pi将不得不覆盖分区表(如果uboot不能缩小)

无论您做什么,在github上打开一个问题并分享您的更改。还可以使用不和谐格瑞特

我只是重复了这个问题。我们应该修好它

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69008701

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档