meta-phosphor: Create debug tarball image
Change-Id: I50a03205faf28f6ae19bf3ff1c0e58f7b0448bc5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/classes/obmc-phosphor-debug-tarball.bbclass b/classes/obmc-phosphor-debug-tarball.bbclass
new file mode 100644
index 0000000..e2a7f71
--- /dev/null
+++ b/classes/obmc-phosphor-debug-tarball.bbclass
@@ -0,0 +1,16 @@
+inherit image
+inherit obmc-phosphor-license
+
+IMAGE_FSTYPES = "tar.xz"
+IMAGE_INSTALL_append = " packagegroup-obmc-phosphor-debugtools"
+
+# Override from image_types.bbclass to restrict tarball to /usr tree.
+IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS}/usr ."
+
+# Remove packages installed by 'extrausers'.
+IMAGE_INSTALL_remove = "base-passwd shadow"
+EXTRA_USERS_PARAMS = ""
+
+# Remove extra packages defaulted by image.bbclass.
+PACKAGE_INSTALL = "${IMAGE_INSTALL}"
+IMAGE_LINGUAS = ""