meta-aspeed: linux: enable ubi support based on file system type
Both the `obmc-static-norootfs` and `obmc-ubi-fs` DISTRO_FEATURES
enable an image that utilizes ubifs. Key off this in meta-aspeed
to apply the correct kernel config snippet.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I15b0e24e9d0e454651a50b2d997b6aee01432ab9
diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc b/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc
index 73f0614..6785a93 100644
--- a/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc
+++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc
@@ -13,6 +13,9 @@
file://rsa_oem_fitimage_key.key;sha256sum=eeb4ff2ebbfbd97b6254fe6dbaeea41067e54c65176c233ec7b2ab2decf1ddcd \
file://rsa_oem_fitimage_key.crt;sha256sum=45f5a55497cce8040999bf9f3214d471ac7b83ab7acef41c4425a34662e8372e \
${@bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'file://tpm/tpm2.scc file://tpm/tpm2.cfg', '', d)} \
+ ${@bb.utils.contains_any('DISTRO_FEATURES', \
+ 'obmc-static-norootfs obmc-ubi-fs', \
+ 'file://ubi/ubi.scc file://ubi/ubi.cfg', '', d)} \
"
LINUX_VERSION_EXTENSION ?= "-${SRCREV}"
diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed/ubi/ubi.cfg b/meta-aspeed/recipes-kernel/linux/linux-aspeed/ubi/ubi.cfg
new file mode 100644
index 0000000..8538111
--- /dev/null
+++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/ubi/ubi.cfg
@@ -0,0 +1,4 @@
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_UBIFS_FS=y
diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed/ubi/ubi.scc b/meta-aspeed/recipes-kernel/linux/linux-aspeed/ubi/ubi.scc
new file mode 100644
index 0000000..f725f63
--- /dev/null
+++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/ubi/ubi.scc
@@ -0,0 +1,3 @@
+define KFEATURE_DESCRIPTION "Enable UBIFS"
+
+kconf hardware ubi.cfg