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 /meta-xilinx-bsp/classes/xilinx-fetch-restricted.bbclass | |
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 'meta-xilinx-bsp/classes/xilinx-fetch-restricted.bbclass')
-rw-r--r-- | meta-xilinx-bsp/classes/xilinx-fetch-restricted.bbclass | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/classes/xilinx-fetch-restricted.bbclass b/meta-xilinx-bsp/classes/xilinx-fetch-restricted.bbclass new file mode 100644 index 00000000..a778ec7d --- /dev/null +++ b/meta-xilinx-bsp/classes/xilinx-fetch-restricted.bbclass | |||
@@ -0,0 +1,35 @@ | |||
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 | } | ||