[PATCH v3 0/6] openbmc: Use JFFS2 for RW overlay filesystem

Andrew Jeffery andrew at aj.id.au
Wed Feb 24 01:44:57 AEDT 2016


The changes now include support for migrating between arbitrary^ filesystem
types (tested back and forth between ext4 and jffs2). The final patch in the
series switches the RWFS image to JFFS2. Lastly, a couple of clean-ups are
thrown in.

NOTE: This series requires the (pending) kernel fix for the spi-nor driver, and
is why I haven't done this as a pull-request. The fix has been applied to
openbmc/linux but is not yet integrated into openbmc/openbmc. If you'd like to
test this series I've added an extra patch which hacks the fix in. You can
fetch it all from github:

    git fetch git at github.com:amboar/openbmc.git jffs2-mtd6

Upgrading the BMC should be done in two stages after building the necessary
images:

1. Build image-kernel, image-initramfs and image-rwfs
2. Apply image-kernel and image-initramfs, and after the reboot,
3. Apply image-rwfs

To apply an image file, copy the it into /run/initramfs on the BMC, then reboot
(the BMC).

^ Migration is limited to filesystems detected by blkid(1), and JFFS2. JFFS2 is
  assumed if the filesystem is not identified by blkid(1).

Since v2:

  * Minor whitespace changes for consistency

  Address further suggestions from Milton:

  * Support migration with RW FS type detection in obmc-{init,update}.sh
  * Use bitbake OVERRIDES support for mkfs options
  * Pre-fill images with 0xFF to set NOR to erased state

Since v1:

  Address comments from Milton:

  * Drop mtd-utils-jffs2 for busybox-provided functionality
  * Drop re-arrangement of variables in obmc-{init,update}.sh
  * Simplify generation of image-rwfs
  * Move hard-coded ext4 mkfs options to (commented) options variable
  * Split out mount message fix

Andrew Jeffery (6):
  oe_mkimage: Use consistent indentation
  obmc-init.sh: Fix FS type in mount failure message
  obmc-{init,update}.sh: Cope with alternate RW FS types
  openbmc: Generate images that erase empty NOR sections
  openbmc: Lift mkfs opts to variables and use OVERRIDES capability
  openbmc: Switch RW FS from ext4 to jffs2

 meta-phosphor/classes/image-overlay.bbclass        |  2 +-
 .../obmc-phosphor-image_types_uboot.bbclass        | 29 +++++++++++++++++-----
 .../obmc-phosphor-initfs/files/obmc-init.sh        | 17 +++++++++++--
 .../obmc-phosphor-initfs/files/obmc-update.sh      | 18 +++++++++++---
 4 files changed, 54 insertions(+), 12 deletions(-)

-- 
2.5.0



More information about the openbmc mailing list