meta-phosphor: network: allow disabling u-boot env

Not all systems allow modifying the u-boot environment, so make this a
PACKAGECONFIG option instead of assuming it's available.

Also add the missing RDEPENDS on u-boot-fw-utils when this feature is
enabled.

(From meta-phosphor rev: 62bd55d849c1f606d31c1f535e09e4ac39d04d7e)

Change-Id: Ida9827a64ed1e2b23b60586ba5f7bf1bfa57dd85
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb b/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb
index 0928c95..a4de745 100644
--- a/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb
+++ b/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb
@@ -20,6 +20,11 @@
 DEPENDS += "phosphor-logging"
 DEPENDS += "libnl"
 
+PACKAGECONFIG ??= "uboot-env"
+
+UBOOT_ENV_RDEPENDS = "${@d.getVar('PREFERRED_PROVIDER_u-boot-fw-utils', True) or 'u-boot-fw-utils'}"
+PACKAGECONFIG[uboot-env] = "--with-uboot-env,--without-uboot-env,,${UBOOT_ENV_RDEPENDS}"
+
 S = "${WORKDIR}/git"
 
 SERVICE_FILE = "xyz.openbmc_project.Network.service"