Yocto 2.4
Move OpenBMC to Yocto 2.4(rocko)
Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I12057b18610d6fb0e6903c60213690301e9b0c67
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.cfg b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.cfg
new file mode 100644
index 0000000..4ee8e36
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.cfg
@@ -0,0 +1,12 @@
+CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_NF_NAT=m
+CONFIG_NF_CONNTRACK_IPV4=y
+
+CONFIG_DM_THIN_PROVISIONING=m
+
+
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+
+CONFIG_OVERLAY_FS=y
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.scc b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.scc
new file mode 100644
index 0000000..e317456
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Enable Features needed by docker in addition to LXC features"
+define KFEATURE_COMPATIBILITY board
+
+kconf non-hardware docker.cfg
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.cfg b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.cfg
index fa2344a..c25d60f 100644
--- a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.cfg
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.cfg
@@ -15,7 +15,7 @@
CONFIG_NET_NS=y
CONFIG_CLS_CGROUP=m
-CONFIG_BLK_CGROUP=m
+CONFIG_BLK_CGROUP=y
CONFIG_NETPRIO_CGROUP=m
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.1.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.1.bbappend
deleted file mode 100644
index f3be89e..0000000
--- a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.1.bbappend
+++ /dev/null
@@ -1,19 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://xt-checksum.scc \
- file://ebtables.scc \
- file://vswitch.scc \
- file://lxc.scc \
- "
-KERNEL_FEATURES_append = " features/kvm/qemu-kvm-enable.scc"
-
-KERNEL_MODULE_AUTOLOAD += "openvswitch"
-KERNEL_MODULE_AUTOLOAD += "kvm"
-KERNEL_MODULE_AUTOLOAD += "kvm-amd"
-KERNEL_MODULE_AUTOLOAD += "kvm-intel"
-
-# aufs kernel support required for xen-image-minimal
-KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
-
-# xen kernel support
-SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.10.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.10.bbappend
index f3be89e..617cacc 100644
--- a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.10.bbappend
@@ -1,19 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://xt-checksum.scc \
- file://ebtables.scc \
- file://vswitch.scc \
- file://lxc.scc \
- "
-KERNEL_FEATURES_append = " features/kvm/qemu-kvm-enable.scc"
-
-KERNEL_MODULE_AUTOLOAD += "openvswitch"
-KERNEL_MODULE_AUTOLOAD += "kvm"
-KERNEL_MODULE_AUTOLOAD += "kvm-amd"
-KERNEL_MODULE_AUTOLOAD += "kvm-intel"
-
-# aufs kernel support required for xen-image-minimal
-KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
-
-# xen kernel support
-SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
+require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.12.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.12.bbappend
new file mode 100644
index 0000000..617cacc
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.12.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.4.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.4.bbappend
index f3be89e..617cacc 100644
--- a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.4.bbappend
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -1,19 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://xt-checksum.scc \
- file://ebtables.scc \
- file://vswitch.scc \
- file://lxc.scc \
- "
-KERNEL_FEATURES_append = " features/kvm/qemu-kvm-enable.scc"
-
-KERNEL_MODULE_AUTOLOAD += "openvswitch"
-KERNEL_MODULE_AUTOLOAD += "kvm"
-KERNEL_MODULE_AUTOLOAD += "kvm-amd"
-KERNEL_MODULE_AUTOLOAD += "kvm-intel"
-
-# aufs kernel support required for xen-image-minimal
-KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
-
-# xen kernel support
-SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
+require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.9.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.9.bbappend
index f3be89e..617cacc 100644
--- a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.9.bbappend
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.9.bbappend
@@ -1,19 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://xt-checksum.scc \
- file://ebtables.scc \
- file://vswitch.scc \
- file://lxc.scc \
- "
-KERNEL_FEATURES_append = " features/kvm/qemu-kvm-enable.scc"
-
-KERNEL_MODULE_AUTOLOAD += "openvswitch"
-KERNEL_MODULE_AUTOLOAD += "kvm"
-KERNEL_MODULE_AUTOLOAD += "kvm-amd"
-KERNEL_MODULE_AUTOLOAD += "kvm-intel"
-
-# aufs kernel support required for xen-image-minimal
-KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
-
-# xen kernel support
-SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
+require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_virtualization.inc b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_virtualization.inc
new file mode 100644
index 0000000..9905ed9
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_virtualization.inc
@@ -0,0 +1,20 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
+
+SRC_URI += "file://xt-checksum.scc \
+ file://ebtables.scc \
+ file://vswitch.scc \
+ file://lxc.scc \
+ file://docker.scc \
+ "
+KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'features/kvm/qemu-kvm-enable.scc', '', d)}"
+
+KERNEL_MODULE_AUTOLOAD += "openvswitch"
+KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm', '', d)}"
+KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-amd', '', d)}"
+KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-intel', '', d)}"
+
+# aufs kernel support required for xen-image-minimal
+KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
+
+# xen kernel support
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"