Enable UBI support for a platform

Kun Zhao zkxz at hotmail.com
Sat Sep 5 10:02:59 AEST 2020


Hi Team,

My platform is based on ast2500, and I’ve already been able to built out the ubi image. But when I tried to test it with qemu, it just stopped at u-boot because ‘can’t get kernel image,

qemu-system-arm: Aspeed iBT has no chardev backend


U-Boot 2016.07 (Sep 04 2020 - 19:47:48 +0000)

       Watchdog enabled
DRAM:  496 MiB
Flash: 32 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   MAC0 : RGMII
MAC1 : RGMII
FTGMAC100#0
Error: FTGMAC100#0 address not set.
, FTGMAC100#1
Error: FTGMAC100#1 address not set.

Hit any key to stop autoboot:  0
Wrong Image Format for bootm command
ERROR: can't get kernel image!
ast#

And I found the bootargs is not right,

ast# print
baudrate=115200
bootargs=console=ttyS4,115200n8 root=/dev/ram rw
bootcmd=bootm 20080000
bootdelay=2

Checked in the build folder for tmp/work/myplatform-openbmc-linux-gnueabi/u-boot-aspeed/1_v2016.07+gitAUTOINC+1ded9fa3a2-r0/ and found the none of the following patches are there,
0002-config-ast-common-hack-bootopts.patch
0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch
0004-config-ast-common-Add-conditional-factory-reset-comm.patch
0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch

I think that’s why the bootargs is not correct.

This is the details of how I enabled the ubi support in my platform recipes,

1. In meta-myplatform/conf/distro/openbmc-myplatform.conf, I added,
require conf/distro/include/phosphor-base.inc
require conf/distro/include/phosphor-ubi.inc

2. In meta-myplatform/conf/machine/myplatform.conf, I added,
IMAGE_FSTYPES += " mtd-ubi mtd-ubi-tar"
OBMC_MACHINE_FEATURES += " obmc-ubi-fs"

Do I miss anything?

Thanks.

Best regards,

Kun Zhao
/*
  zkxz at hotmail.com<mailto:zkxz at hotmail.com>
*/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200905/6f5a945c/attachment-0001.htm>


More information about the openbmc mailing list