diff options
author | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2017-12-06 16:06:35 -0800 |
---|---|---|
committer | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2017-12-13 16:11:14 -0800 |
commit | a18947c20dba2c0c38db8bde1ad4684995df4bbd (patch) | |
tree | 917bf2abbe439a6f99ede8cfafb25812dca54a9a /classes | |
parent | 6ddc5873b0ede30e6542f0ab151a6236acc37944 (diff) | |
download | meta-xilinx-a18947c20dba2c0c38db8bde1ad4684995df4bbd.tar.gz |
meta-xilinx: Restructuring meta-xilinx to support multiple layers
As discussed previously on mailing list, we are proceeding with layer
restructuring. For rocko release we will have the following layers
meta-xilinx
->meta-xilinx-bsp (current meta-xilinx)
->meta-xilinx-contrib
In the subsequent releases we will add other layers from Xilinx
meta-xilinx
->meta-xilinx-bsp (current meta-xilinx)
->meta-petalinux
->meta-xilinx-tools
->meta-xilinx-contrib
This will provide one clone to get all the required meta layers from
Xilinx for a complete solution, and the users can blacklist any layer
which they don't want to use using bblayer.conf.
This will enables us to help our vendors/partners to add their reference
designs, board definitions etc.
Recipe changes :
* Move reference design zybo-linux-bd.bb to meta-xilinx-contrib
* Move kernel patches realted to zybo-linux-bd-zynq7 board to
meta-xilinx-contrib
* Update README
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image-types-xilinx-qemu.bbclass | 10 | ||||
-rw-r--r-- | classes/qemuboot-xilinx.bbclass | 27 | ||||
-rw-r--r-- | classes/xilinx-fetch-restricted.bbclass | 35 | ||||
-rw-r--r-- | classes/xilinx-platform-init.bbclass | 14 | ||||
-rw-r--r-- | classes/zynqmp-pmu.bbclass | 122 |
5 files changed, 0 insertions, 208 deletions
diff --git a/classes/image-types-xilinx-qemu.bbclass b/classes/image-types-xilinx-qemu.bbclass deleted file mode 100644 index 59dfabfc..00000000 --- a/classes/image-types-xilinx-qemu.bbclass +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # Define the 'qemu-sd' conversion type | ||
2 | # | ||
3 | # This conversion type pads any image to the 256K boundary to ensure that the | ||
4 | # image file can be used directly with QEMU's SD emulation which requires the | ||
5 | # block device to match that of valid SD card sizes (which are multiples of | ||
6 | # 256K). | ||
7 | |||
8 | CONVERSIONTYPES_append = " qemu-sd" | ||
9 | CONVERSION_CMD_qemu-sd = "cp ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qemu-sd; truncate -s %256K ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qemu-sd" | ||
10 | CONVERSION_DEPENDS_qemu-sd = "coreutils-native" | ||
diff --git a/classes/qemuboot-xilinx.bbclass b/classes/qemuboot-xilinx.bbclass deleted file mode 100644 index 024626cb..00000000 --- a/classes/qemuboot-xilinx.bbclass +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | |||
2 | # enable the overrides for the context of the conf only | ||
3 | OVERRIDES .= ":qemuboot-xilinx" | ||
4 | |||
5 | # setup the target binary | ||
6 | QB_SYSTEM_NAME_prepend = "qemu-xilinx/" | ||
7 | |||
8 | # Default machine targets for Xilinx QEMU (FDT Generic) | ||
9 | QB_MACHINE_aarch64 = "-machine arm-generic-fdt" | ||
10 | QB_MACHINE_arm = "-machine arm-generic-fdt-7series" | ||
11 | QB_MACHINE_microblaze = "-machine microblaze-generic-fdt-plnx" | ||
12 | |||
13 | # defaults | ||
14 | QB_DEFAULT_KERNEL ?= "none" | ||
15 | |||
16 | inherit qemuboot | ||
17 | |||
18 | # rewrite the qemuboot with the custom sysroot bindir | ||
19 | python do_write_qemuboot_conf_append() { | ||
20 | val = os.path.join(d.getVar('BASE_WORKDIR'), d.getVar('BUILD_SYS'), 'qemu-xilinx-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/') | ||
21 | cf.set('config_bsp', 'STAGING_BINDIR_NATIVE', '%s' % val) | ||
22 | |||
23 | # write out the updated version from this append | ||
24 | with open(qemuboot, 'w') as f: | ||
25 | cf.write(f) | ||
26 | } | ||
27 | |||
diff --git a/classes/xilinx-fetch-restricted.bbclass b/classes/xilinx-fetch-restricted.bbclass deleted file mode 100644 index a778ec7d..00000000 --- a/classes/xilinx-fetch-restricted.bbclass +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | # This class is setup to override the default fetching for the target recipe. | ||
2 | # When fetching it forces PREMIRROR only fetching so that no attempts are made | ||
3 | # to fetch the Xilinx downloads that are restricted to authenticated users only. | ||
4 | # | ||
5 | # The purpose of this class is to allow for automatation with pre-downloaded | ||
6 | # content or content that is available with curated/user defined pre-mirrors | ||
7 | # and or pre-populated downloads/ directories. | ||
8 | |||
9 | python do_fetch() { | ||
10 | xilinx_restricted_url = "xilinx.com/member/forms/download" | ||
11 | |||
12 | src_uri = (d.getVar('SRC_URI') or "").split() | ||
13 | if len(src_uri) == 0: | ||
14 | return | ||
15 | |||
16 | for i in src_uri: | ||
17 | if xilinx_restricted_url in i: | ||
18 | # force the use of premirrors only, do not attempt download from xilinx.com | ||
19 | d.setVar("BB_FETCH_PREMIRRORONLY", "1") | ||
20 | break | ||
21 | |||
22 | try: | ||
23 | fetcher = bb.fetch2.Fetch(src_uri, d) | ||
24 | fetcher.download() | ||
25 | except bb.fetch2.NetworkAccess as e: | ||
26 | if xilinx_restricted_url in e.url: | ||
27 | # fatal on access to xilinx.com restricted downloads, print the url for manual download | ||
28 | bb.fatal("The following download cannot be fetched automatically. " \ | ||
29 | "Please manually download the file and place it in the 'downloads' directory (or on an available PREMIRROR).\n" \ | ||
30 | " %s" % (e.url.split(";")[0])) | ||
31 | else: | ||
32 | bb.fatal(str(e)) | ||
33 | except bb.fetch2.BBFetchException as e: | ||
34 | bb.fatal(str(e)) | ||
35 | } | ||
diff --git a/classes/xilinx-platform-init.bbclass b/classes/xilinx-platform-init.bbclass deleted file mode 100644 index 5d099500..00000000 --- a/classes/xilinx-platform-init.bbclass +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | # This class should be included by any recipe that wants to access or provide | ||
2 | # the platform init source files which are used to initialize a Zynq or ZynqMP | ||
3 | # SoC. | ||
4 | |||
5 | # Define the path to the xilinx platform init code/headers | ||
6 | PLATFORM_INIT_DIR ?= "/usr/src/xilinx-platform-init" | ||
7 | |||
8 | PLATFORM_INIT_STAGE_DIR = "${STAGING_DIR_HOST}${PLATFORM_INIT_DIR}" | ||
9 | |||
10 | # Target files use for platform init | ||
11 | PLATFORM_INIT_FILES ?= "" | ||
12 | PLATFORM_INIT_FILES_zynq = "ps7_init_gpl.c ps7_init_gpl.h" | ||
13 | PLATFORM_INIT_FILES_zynqmp = "psu_init_gpl.c psu_init_gpl.h" | ||
14 | |||
diff --git a/classes/zynqmp-pmu.bbclass b/classes/zynqmp-pmu.bbclass deleted file mode 100644 index 714eb96a..00000000 --- a/classes/zynqmp-pmu.bbclass +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | # | ||
2 | # This class handles configuring a recipe to build for the ZynqMP PMU | ||
3 | # architecture. The reason for this class is due to limitations of multilib | ||
4 | # with regards to multiple architectures (which do not work correctly). | ||
5 | # | ||
6 | # This class is specifically intended to extend the binutils-cross, gcc-cross, | ||
7 | # newlib, libgloss and pmu-firmware recipes so that binaries can be emitted | ||
8 | # which target the PMU architecture alongside building for the APU architecture | ||
9 | # (ARM64). But the class can be applied globally via BBCLASSEXTEND in for | ||
10 | # example a <machine>.conf. | ||
11 | # | ||
12 | # This class is almost the same as a multilib variant with custom TUNE_* setup | ||
13 | # to allow for a switched TUNE_ARCH. | ||
14 | # | ||
15 | |||
16 | ORIG_TARGET_ARCH := "${TARGET_ARCH}" | ||
17 | |||
18 | # zynqmp-pmu target arch (hardcoded based on pre-gen data from arch-microblaze.inc) | ||
19 | DEFAULTTUNE = "microblaze" | ||
20 | ABIEXTENSION = "" | ||
21 | TUNE_ARCH = "microblazeel" | ||
22 | #TUNE_FEATURES_tune-microblaze += "v9.2 barrel-shift pattern-compare" | ||
23 | TUNE_CCARGS = "-mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mno-xl-reorder -mcpu=v9.2 -mxl-soft-mul -mxl-soft-div" | ||
24 | TUNE_LDARGS = "" | ||
25 | TUNE_ASARGS = "" | ||
26 | TUNE_PKGARCH = "microblazeel-v9.2-bs-cmp" | ||
27 | TARGET_OS = "elf" | ||
28 | TARGET_FPU = "fpu-soft" | ||
29 | |||
30 | # rebuild the MACHINE overrides | ||
31 | MACHINEOVERRIDES = "${MACHINE}${@':${SOC_FAMILY}' if d.getVar('SOC_FAMILY') else ''}:microblaze" | ||
32 | |||
33 | # override tune provided archs | ||
34 | PACKAGE_EXTRA_ARCHS = "${TUNE_PKGARCH}" | ||
35 | |||
36 | # baremetal equivalent config (note the tclibc is not included, this is purely | ||
37 | # for recipes/etc that check for the value) | ||
38 | TCLIBC = "baremetal" | ||
39 | LIBCEXTENSION = "" | ||
40 | LIBCOVERRIDE = ":libc-baremetal" | ||
41 | USE_NLS = "no" | ||
42 | IMAGE_LINGUAS = "" | ||
43 | LIBC_DEPENDENCIES = "" | ||
44 | |||
45 | # gcc-cross specific baremetal setup (due to the override order this is important) | ||
46 | EXTRA_OECONF_pn-${MLPREFIX}gcc-cross-${TARGET_ARCH}_append = " --without-headers" | ||
47 | |||
48 | EXTRA_OECONF_GCC_FLOAT = "" | ||
49 | |||
50 | # Setup a multiarch like prefix. | ||
51 | prefix = "/usr/${TARGET_SYS}" | ||
52 | # Make sure GCC can search in the prefix dir (for libgcc) | ||
53 | TOOLCHAIN_OPTIONS += "-B${RECIPE_SYSROOT}${includedir}/ -B${RECIPE_SYSROOT}${libdir}/" | ||
54 | TOOLCHAIN_OPTIONS += "-I =${includedir} -L =${libdir}" | ||
55 | |||
56 | python multitarget_zynqmp_pmu_virtclass_handler () { | ||
57 | variant = "zynqmp-pmu" | ||
58 | pn = d.getVar("PN") | ||
59 | if not (pn.startswith(variant + "-") or pn.endswith("-" + variant)): | ||
60 | return | ||
61 | |||
62 | if bb.data.inherits_class('native', e.data) or bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data): | ||
63 | raise bb.parse.SkipPackage("Can't extend native/nativesdk/crosssdk recipes") | ||
64 | |||
65 | initialpn = e.data.getVar("PN").replace("-" + variant, "").replace(variant + "-", "") | ||
66 | e.data.setVar("MLPREFIX", variant + "-") | ||
67 | e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-" + variant) | ||
68 | |||
69 | # hide multilib variants, this class is not one but this works around recipes thinking it is (due to MLPREFIX). | ||
70 | e.data.setVar("MULTILIB_VARIANTS", "") | ||
71 | |||
72 | # work around for -cross recipes that embed the TARGET_ARCH value | ||
73 | if bb.data.inherits_class('cross', e.data): | ||
74 | if initialpn.endswith("-" + d.getVar("ORIG_TARGET_ARCH")): | ||
75 | initialpn = initialpn.replace("-" + d.getVar("ORIG_TARGET_ARCH"), "-" + d.getVar("TARGET_ARCH")) | ||
76 | |||
77 | e.data.setVar("PN", variant + "-" + initialpn) | ||
78 | } | ||
79 | |||
80 | addhandler multitarget_zynqmp_pmu_virtclass_handler | ||
81 | multitarget_zynqmp_pmu_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise" | ||
82 | |||
83 | python () { | ||
84 | variant = "zynqmp-pmu" | ||
85 | pn = d.getVar("PN") | ||
86 | if not pn.startswith(variant + "-"): | ||
87 | return | ||
88 | |||
89 | if pn.endswith("gcc-cross-" + d.getVar("TARGET_ARCH")): | ||
90 | # work around, DEPENDS _remove being immediate in gcc-cross | ||
91 | d.setVar("DEPENDS_remove", "virtual/%slibc-for-gcc" % d.getVar("TARGET_PREFIX")) | ||
92 | |||
93 | if pn.endswith("libgcc"): | ||
94 | # work around, strip depends on libc via do_package* tasks (this class cannot set ASSUME_PROVIDED += libc) | ||
95 | for i in ["do_package", "do_package_write_ipk", "do_package_write_deb", "do_package_write_rpm"]: | ||
96 | sanitized = " ".join([dep for dep in d.getVarFlag(i, "depends").split() if not dep.startswith("virtual/%s-libc" % variant)]) | ||
97 | d.setVarFlag(i, "depends", sanitized) | ||
98 | |||
99 | import oe.classextend | ||
100 | |||
101 | clsextend = oe.classextend.ClassExtender(variant, d) | ||
102 | |||
103 | clsextend.map_depends_variable("DEPENDS") | ||
104 | clsextend.map_variable("PROVIDES") | ||
105 | |||
106 | clsextend.rename_packages() | ||
107 | clsextend.rename_package_variables((d.getVar("PACKAGEVARS") or "").split()) | ||
108 | |||
109 | clsextend.map_packagevars() | ||
110 | clsextend.map_regexp_variable("PACKAGES_DYNAMIC") | ||
111 | clsextend.map_variable("PACKAGE_INSTALL") | ||
112 | } | ||
113 | |||
114 | # microblaze elf insane definitions not currently in insane.bbclass | ||
115 | PACKAGEQA_EXTRA_MACHDEFFUNCS += "package_qa_get_machine_dict_microblazeelf" | ||
116 | def package_qa_get_machine_dict_microblazeelf(machdata, d): | ||
117 | machdata["elf"] = { | ||
118 | "microblaze": (189, 0, 0, False, 32), | ||
119 | "microblazeeb":(189, 0, 0, False, 32), | ||
120 | "microblazeel":(189, 0, 0, True, 32), | ||
121 | } | ||
122 | return machdata | ||