aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOng Boon Leong <boon.leong.ong@intel.com>2014-10-15 15:10:01 +0800
committerBrendan Le Foll <brendan.le.foll@intel.com>2014-11-10 15:07:23 +0000
commit655f198a8d7c4403a4aecea9ce67204ef38cf4a8 (patch)
treee352fa4d79c391e351ac3981164aa6648a6d30e4
parent964f1e0633b97c7ce44cfd6c28e312067e9d67c3 (diff)
downloadmeta-intel-quark-655f198a8d7c4403a4aecea9ce67204ef38cf4a8.tar.gz
meta-intel-quark-655f198a8d7c4403a4aecea9ce67204ef38cf4a8.tar.bz2
meta-intel-quark-655f198a8d7c4403a4aecea9ce67204ef38cf4a8.zip
meta-quark-bsp,grub: add PACKAGECONFIG to enable/disable GRUB test code
Grub package is released with test code in order to allow developer to modify and test out-of-box. This PACKAGECONFIG by default disable test code by append CFLAG with -DINTEL_QUARK_TEST=0. To enable test code automatically, simply append CFLAG with -DINTEL_QUARK_TEST=1. To enable test code to be executed during grub, user has two choices: (a) uncomment PACKAGECONFIG = "grub_test" ,OR (b) in conf/local.conf, add PACKAGECONFIG_pn-grub = "grub_test" Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
-rw-r--r--recipes-bsp/grub/grub_0.97.bb7
1 files changed, 6 insertions, 1 deletions
diff --git a/recipes-bsp/grub/grub_0.97.bb b/recipes-bsp/grub/grub_0.97.bb
index 9429052..82563e4 100644
--- a/recipes-bsp/grub/grub_0.97.bb
+++ b/recipes-bsp/grub/grub_0.97.bb
@@ -21,7 +21,12 @@ SRC_URI = "git://github.com/vathpela/grub-fedora.git"
SRC_URI += "file://quark.patch"
-CFLAGS_append = " -Os -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused -Wno-pointer-sign "
+# To build GRUB with test code automatically loaded, simply uncomment this line
+# or add PACKAGECONFIG_pn-grub="grub_test" under conf/local.conf
+#PACKAGECONFIG ?= "grub_test"
+
+CFLAGS_append = " -Os -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused -Wno-pointer-sign \
+ -DINTEL_QUARK_TEST=${@base_contains('PACKAGECONFIG', 'grub_test', '1', '0', d)}"
S = "${WORKDIR}/git"
SEPB = "${S}"