Use INITRAMFS_FSTYPES to build a u-boot ramdisk

do_generate_flash() was manually packaging the initramfs cpio archive as
a u-boot ramdisk legacy image.  Add the u-boot type to
INITRAMFS_FSTYPES to use the existing infrastructure instead.

NOTE: if you have an existing build directory, this change may cause the
build to fail while creating symlinks.  This is caused by the .u-boot
file changing from an actual file to a symlink.

Change-Id: I9fa69620f97452671f89675768b1d1f33dbe97f2
Signed-off-by: Rick Altherr <raltherr@google.com>
diff --git a/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass b/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass
index 5c99126..bb2ddd2 100644
--- a/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass
+++ b/meta-phosphor/classes/obmc-phosphor-image_types_uboot.bbclass
@@ -66,12 +66,13 @@
        if [ ! -f $ddir/$initrd ]; then
               bbfatal "initrd file ${ddir}/${initrd} does not exist"
        fi
+       if [ ! -f $ddir/$uinitrd ]; then
+              bbfatal "uinitrd file ${ddir}/${uinitrd} does not exist"
+       fi
        if [ ! -f $ddir/$rootfs ]; then
               bbfatal "Rootfs file ${ddir}/${rootfs} does not exist"
        fi
 
-       oe_mkimage  "${initrd}" "${INITRD_CTYPE}" || bbfatal "oe_mkimage initrd"
-
        mk_nor_image ${ddir}/${rwfs} ${RWFS_SIZE}
        if [ "${OVERLAY_BASETYPE}" != jffs2 ]; then
               mkfs.${OVERLAY_BASETYPE} ${OVERLAY_MKFS_OPTS} ${ddir}/${rwfs} || \
diff --git a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
index 3fe9e9f..e52d8a3 100644
--- a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
+++ b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
@@ -20,7 +20,7 @@
 IMAGE_CLASSES += "obmc-phosphor-image_types_uboot"
 
 INITRAMFS_CTYPE ?= "lzma"
-INITRAMFS_FSTYPES += "cpio.${INITRAMFS_CTYPE}"
+INITRAMFS_FSTYPES += "cpio.${INITRAMFS_CTYPE} cpio.${INITRAMFS_CTYPE}.u-boot"
 
 MACHINE_FEATURES_BACKFILL_CONSIDERED = "qemu-usermode"