Around 05/29/2019 05:25AM in some timezone, Deng Tyler wrote:
>Hi all:
> I encounter bmc firmware update fail issue and message is "Verify
>error: update: --no-flash --ignore-mount --no-save-files
>--no-restore-files --no-clean-saved-files\nERROR: Unable to find mtd
>partition for image-bmc.\n".
>
>I check my flash partition and found that I lost "bmc" partition as
>below:
>cat /proc/mtd
>dev: size erasesize name
>mtd0: 00060000 00001000 "u-boot"
>mtd1: 00020000 00001000 "u-boot-env"
>mtd2: 00440000 00001000 "kernel"
>mtd3: 01740000 00001000 "rofs"
>mtd4: 00400000 00001000 "rwfs"
>ls -l /dev/mtd
>lrwxrwxrwx 1 root root 7 May 23 11:56 kernel ->
>../mtd2
>lrwxrwxrwx 1 root root 7 May 23 11:56 rofs ->
>../mtd3
>lrwxrwxrwx 1 root root 7 May 23 11:56 rwfs ->
>../mtd4
>lrwxrwxrwx 1 root root 7 May 23 11:56 u-boot ->
>../mtd0
>lrwxrwxrwx 1 root root 7 May 23 11:56 u-boot-env
>-> ../mtd1
Since your mtd numbers start at 0, the problem is the whole flash
partition is missing. You are missing a kernel config option:
config MTD_PARTITIONED_MASTER
bool "Retain master device when partitioned"
default n
depends on MTD
help
For historical reasons, by default, either a master is present or
several partitions are present, but not both. The concern was that
data listed in multiple partitions was dangerous; however, SCSI does
this and it is frequently useful for applications. This config option
leaves the master in even if the device is partitioned. It also makes
the parent of the partition device be the master device, rather than
what lies behind the master.
>
>I tried to add bmc partition in dts
>&bootspi {
> status = "okay";
> flash@0 {
> status = "okay";
> m25p,fast-read;
> label = "bmc";
> spi-max-frequency = <50000000>;
>#include "openbmc-flash-layout.dtsi"
> };
>};
>
>but there still is no "bmc" partition. Could someone give any
>suggestion? thanks.
>
>Tyler