aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-04-10 15:07:01 -0700
committerJuro Bystricky <juro.bystricky@intel.com>2017-04-10 15:11:05 -0700
commitbd4e0ee3e64063cdfaaaad48a109fba5325b75a3 (patch)
treef7b868f81597de5af94391ec56d646cc2520763b
parentd861fa09fd8bff014fe45cd4ec40d1f04ce799d3 (diff)
downloadmeta-zephyr-bd4e0ee3e64063cdfaaaad48a109fba5325b75a3.tar.gz
meta-zephyr-bd4e0ee3e64063cdfaaaad48a109fba5325b75a3.tar.bz2
meta-zephyr-bd4e0ee3e64063cdfaaaad48a109fba5325b75a3.zip
siteinfo-zephyr.bbclass: refactor siteinfo
Move all SITEINFO_EXTRA_DATAFUNCS and PACKAGEQA_EXTRA_MACHDEFFUNCS from various tune files (tune-arc.inc, tune-iamcu.inc, tune-nios2.inc) into a a new siteinfo-zephyr.bbclass file. Although the original code did not result in any obvious errors, in fact it did cause some multiconfig problems. [YOCTO#11166] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-rw-r--r--classes/siteinfo-zephyr.bbclass28
-rw-r--r--conf/distro/zephyr.conf2
-rw-r--r--conf/machine/include/tune-arc.inc13
-rw-r--r--conf/machine/include/tune-iamcu.inc7
-rw-r--r--conf/machine/include/tune-nios2.inc6
5 files changed, 30 insertions, 26 deletions
diff --git a/classes/siteinfo-zephyr.bbclass b/classes/siteinfo-zephyr.bbclass
new file mode 100644
index 0000000..d84fd3a
--- /dev/null
+++ b/classes/siteinfo-zephyr.bbclass
@@ -0,0 +1,28 @@
+
+def arc_siteinfo_setfunc(archinfo, osinfo, targetinfo, d):
+ archinfo['arc'] = "endian-little bit-32 "
+ osinfo['linux'] = "common-linux common-glibc"
+ targetinfo['arc-linux'] = "arc-linux"
+ return archinfo, osinfo, targetinfo
+
+SITEINFO_EXTRA_DATAFUNCS += "arc_siteinfo_setfunc"
+
+def arc_machdata_setfunc(machdata, d):
+ machdata["elf"] = { "arc" : (195, 0, 0, True, 32), }
+ return machdata
+
+PACKAGEQA_EXTRA_MACHDEFFUNCS += "arc_machdata_setfunc"
+
+def iamcu_siteinfo_setfunc(archinfo, osinfo, targetinfo, d):
+ archinfo['iamcu'] = "endian-little bit-32 "
+ osinfo['linux'] = "common-linux common-glibc"
+ targetinfo['iamcu-linux'] = "iamcu-linux"
+ return archinfo, osinfo, targetinfo
+
+SITEINFO_EXTRA_DATAFUNCS += "iamcu_siteinfo_setfunc"
+
+def nios2_machdata_setfunc(machdata, d):
+ machdata["elf"] = {"nios2": (113, 0, 0, True, 32), }
+ return machdata
+
+PACKAGEQA_EXTRA_MACHDEFFUNCS += "nios2_machdata_setfunc" \ No newline at end of file
diff --git a/conf/distro/zephyr.conf b/conf/distro/zephyr.conf
index 0c6a8b3..580ae2a 100644
--- a/conf/distro/zephyr.conf
+++ b/conf/distro/zephyr.conf
@@ -12,3 +12,5 @@ TEST_TARGET = "QemuTargetZephyr"
TEST_SUITES = "zephyr"
TOOLCHAIN_TARGET_TASK += " newlib"
+INHERIT += "siteinfo-zephyr"
+
diff --git a/conf/machine/include/tune-arc.inc b/conf/machine/include/tune-arc.inc
index 56ddd3b..4bb6f4f 100644
--- a/conf/machine/include/tune-arc.inc
+++ b/conf/machine/include/tune-arc.inc
@@ -19,16 +19,3 @@ TUNEVALID[nodata] = "ARC no-delete-null-pointer-checks"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-delete-null-pointer-checks', ' -fno-delete-null-pointer-checks', '', d)}"
AVAILTUNES += "no-delete-null-pointer-checks"
-def arc_siteinfo_setfunc(archinfo, osinfo, targetinfo, d):
- archinfo['arc'] = "endian-little bit-32 "
- osinfo['linux'] = "common-linux common-glibc"
- targetinfo['arc-linux'] = "arc-linux"
- return archinfo, osinfo, targetinfo
-
-SITEINFO_EXTRA_DATAFUNCS = "arc_siteinfo_setfunc"
-
-def arc_machdata_setfunc(machdata, d):
- machdata["elf"] = { "arc" : (195, 0, 0, True, 32), }
- return machdata
-
-PACKAGEQA_EXTRA_MACHDEFFUNCS = "arc_machdata_setfunc"
diff --git a/conf/machine/include/tune-iamcu.inc b/conf/machine/include/tune-iamcu.inc
index 59160c3..6935375 100644
--- a/conf/machine/include/tune-iamcu.inc
+++ b/conf/machine/include/tune-iamcu.inc
@@ -8,12 +8,5 @@ TUNE_CCARGS = "-miamcu -m32"
TUNE_ARCH = "i586"
TUNEVALID[iamcu] = "Intel MCU"
-def iamcu_siteinfo_setfunc(archinfo, osinfo, targetinfo, d):
- archinfo['iamcu'] = "endian-little bit-32 "
- osinfo['linux'] = "common-linux common-glibc"
- targetinfo['iamcu-linux'] = "iamcu-linux"
- return archinfo, osinfo, targetinfo
-
-SITEINFO_EXTRA_DATAFUNCS = "iamcu_siteinfo_setfunc"
PACKAGE_EXTRA_ARCHS_tune-iamcu = "iamcu"
diff --git a/conf/machine/include/tune-nios2.inc b/conf/machine/include/tune-nios2.inc
index 80db79d..c74326d 100644
--- a/conf/machine/include/tune-nios2.inc
+++ b/conf/machine/include/tune-nios2.inc
@@ -10,10 +10,4 @@ TUNE_CCARGS = ""
TUNEVALID[nios2] = "Altera Nios2"
-def nios2_machdata_setfunc(machdata, d):
- machdata["elf"] = {"nios2": (113, 0, 0, True, 32), }
- return machdata
-
-PACKAGEQA_EXTRA_MACHDEFFUNCS = "nios2_machdata_setfunc"
-
PACKAGE_EXTRA_ARCHS_tune-nios2 = "nios2"