diff options
author | Saul Wold <sgw@linux.intel.com> | 2017-09-26 09:17:57 -0700 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2017-09-26 09:17:57 -0700 |
commit | 4fe91aacc358b690fae06a994001113213f1905b (patch) | |
tree | 5e0e29f6bf0ad70543cf8897ecaa3ef5a87060a8 | |
parent | a98b71ccadc1458bf3a959e328d5ae814eb7e9b3 (diff) | |
download | meta-intel-qat-4fe91aacc358b690fae06a994001113213f1905b.tar.gz |
Removal of meta-intel content to make meta-intel-qat standalone
Signed-off-by: Saul Wold <sgw@linux.intel.com>
244 files changed, 16 insertions, 9647 deletions
diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 9b38eb5..0000000 --- a/CHANGELOG +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | This file will only list major changes that occur within a release. | ||
2 | For a full list of changes, view the git log of the repository. | ||
3 | |||
4 | Pyro Release 5/2017 | ||
5 | =================== | ||
6 | |||
7 | Changed default kernel provider from linux-yocto to linux-intel. | ||
8 | ---------------------------------------------------------------- | ||
9 | Linux-intel is an Intel(R)-maintained kernel based on the latest stable | ||
10 | branch, along with backports from upstream to better support Intel(R) | ||
11 | hardware. The intel-linux kernel also has a branch with the preempt-rt | ||
12 | patches applied, providing a preempt-rt kernel with no additional work. | ||
13 | |||
14 | Added QEMU support. | ||
15 | ------------------- | ||
16 | We now build several virtio drivers into the kernel by default, and | ||
17 | have qemuboot.conf files for intel-corei7-64 and intel-core2-32 | ||
18 | targets. This allows one to do basic testing on meta-intel images | ||
19 | without having to use hardware. The virtio drivers are added via | ||
20 | KERNEL_FEATURES_INTEL_COMMON. This prevents them from being added to | ||
21 | custom kernels by default. They can be removed by adding the | ||
22 | following to a conf or kernel bbappend file: | ||
23 | KERNEL_FEATURES_INTEL_COMMON_remove = “cfg/virtio.scc†| ||
24 | OVMF firmware is also built and can be used in order to emulate a UEFI | ||
25 | environment. A full runqemu command line for intel-corei7-64 could look | ||
26 | like this: | ||
27 | runqemu core-image-minimal intel-corei7-64 wic ovmf | ||
28 | |||
29 | Musl support | ||
30 | ------------ | ||
31 | Meta-intel is now compatible with the musl C library. You can specify musl | ||
32 | As your C library by adding the following to your local.conf: | ||
33 | TCLIBC = “musl†| ||
34 | Note: there is a known failure with DPDK. | ||
35 | |||
36 | X32 support | ||
37 | ----------- | ||
38 | The meta-intel layer can now build with the x32 tune settings in a multi-lib | ||
39 | setting, it will not work in as the primary MACHINE tune as the bootloader needs | ||
40 | to be built as a 64bit binary. The setup for this would be as follows: | ||
41 | require conf/multilib.conf | ||
42 | MULTILIBS = "multilib:libx32 | ||
43 | DEFAULTTUNE_virtclass-multilib-libx32 = "corei7-64-x32" | ||
diff --git a/MAINTAINERS b/MAINTAINERS deleted file mode 100644 index 443041d..0000000 --- a/MAINTAINERS +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | This file contains a list of BSP maintainers for the BSPs contained in | ||
2 | the meta-intel repository. | ||
3 | |||
4 | The purpose of this file is to provide contact information for | ||
5 | specific BSPs and other code contained within meta-intel. You should | ||
6 | address questions and patches for a particular BSP or other code to | ||
7 | the appropriate maintainer listed in this file, cc'ing the meta-intel | ||
8 | mailing list. This ensures that your question or patch will be | ||
9 | addressed by the appropriate person, and that it will be seen by other | ||
10 | users who may be facing similar problems or questions. | ||
11 | |||
12 | Please see the top-level README file for guidelines relating to the | ||
13 | details of submitting patches, reporting problems, or asking questions | ||
14 | about any of the BSPs or other recipes contained within meta-intel. | ||
15 | |||
16 | Descriptions of section entries: | ||
17 | |||
18 | M: Mail patches to: FullName <address@domain> | ||
19 | F: Files and directories with wildcard patterns. | ||
20 | A trailing slash includes all files and subdirectory files. | ||
21 | F: common/ all files in and below common | ||
22 | F: common/* all files in common, but not below | ||
23 | One pattern per line. Multiple F: lines acceptable. | ||
24 | |||
25 | Please keep this list in alphabetical order. | ||
26 | |||
27 | Maintainers List (try to look for most precise areas first) | ||
28 | |||
29 | ----------------------------------- | ||
30 | COMMON | ||
31 | M: Saul Wold <sgw@linux.intel.com> | ||
32 | F: common/ | ||
33 | |||
34 | TLK | ||
35 | M: Saul Wold <sgw@linux.intel.com> | ||
36 | F: meta-tlk/ | ||
@@ -1,5 +1,5 @@ | |||
1 | meta-intel | 1 | meta-qat |
2 | ========== | 2 | ======== |
3 | 3 | ||
4 | This README file contains information on building and booting | 4 | This README file contains information on building and booting |
5 | meta-intel BSP layers. Please see the corresponding sections below | 5 | meta-intel BSP layers. Please see the corresponding sections below |
@@ -28,406 +28,10 @@ This layer depends on: | |||
28 | branch: rocko | 28 | branch: rocko |
29 | 29 | ||
30 | 30 | ||
31 | Table of Contents | 31 | Guidelines for submitting patches |
32 | ================= | ||
33 | |||
34 | I. Overview | ||
35 | II. Building and booting meta-intel BSP layers | ||
36 | a. Building the intel-common and quark BSP layers | ||
37 | b. Booting the intel-common BSP images | ||
38 | c. Booting the intel-quark BSP image on a Galileo board | ||
39 | III. Technical Miscellany | ||
40 | Benefits of using meta-intel | ||
41 | The intel-common kernel package architecture | ||
42 | Intel-specific machine features | ||
43 | IV. Tested Hardware | ||
44 | V. Guidelines for submitting patches | ||
45 | |||
46 | |||
47 | I. Overview | ||
48 | =========== | ||
49 | |||
50 | This is the location for Intel-maintained BSPs. | ||
51 | |||
52 | For details on the intel-common and intel-quark BSPs, see the | ||
53 | information below. | ||
54 | |||
55 | For all others, please see the README files contained in the | ||
56 | individual BSP layers for BSP-specific information. | ||
57 | |||
58 | If you have problems with or questions about a particular BSP, please | ||
59 | contact the maintainer listed in the MAINTAINERS file directly (cc:ing | ||
60 | the Yocto mailing list puts it in the archive and helps other people | ||
61 | who might have the same questions in the future), but please try to do | ||
62 | the following first: | ||
63 | |||
64 | - look in the Yocto Project Bugzilla | ||
65 | (http://bugzilla.yoctoproject.org/) to see if a problem has | ||
66 | already been reported | ||
67 | |||
68 | - look through recent entries of the meta-intel | ||
69 | (https://lists.yoctoproject.org/pipermail/meta-intel/) and Yocto | ||
70 | (https://lists.yoctoproject.org/pipermail/yocto/) mailing list | ||
71 | archives to see if other people have run into similar problems or | ||
72 | had similar questions answered. | ||
73 | |||
74 | If you believe you have encountered a bug, you can open a new bug and | ||
75 | enter the details in the Yocto Project Bugzilla | ||
76 | (http://bugzilla.yoctoproject.org/). If you're relatively certain | ||
77 | that it's a bug against the BSP itself, please use the 'Yocto Project | ||
78 | Components: BSPs | meta-intel' category for the bug; otherwise, please | ||
79 | submit the bug against the most likely category for the problem - if | ||
80 | you're wrong, it's not a big deal and the bug will be recategorized | ||
81 | upon triage. | ||
82 | |||
83 | |||
84 | II. Building and booting meta-intel BSP layers | ||
85 | ============================================== | ||
86 | |||
87 | The following sections contain information on building and booting the | ||
88 | BSPs contained in the meta-intel layer. | ||
89 | |||
90 | Note that these instructions specifically cover the intel-common and | ||
91 | quark BSPs, which may or may not be applicable to other BSPs contained | ||
92 | in this layer - if a given BSP contains its own README, that version | ||
93 | should be used instead, and these instructions can be ignored. | ||
94 | |||
95 | a. Building the intel-common and quark BSP layers | ||
96 | ------------------------------------------------- | ||
97 | |||
98 | In order to build an image with BSP support for a given release, you | ||
99 | need to download the corresponding BSP tarball from the 'Board Support | ||
100 | Package (BSP) Downloads' page of the Yocto Project website (or | ||
101 | equivalently, check out the appropriate branch from the meta-intel git | ||
102 | repository, see below). For the intel-common and quark BSPs, those | ||
103 | tarballs would correspond to the following choices in the BSP | ||
104 | downloads section: | ||
105 | |||
106 | - Intel-core2-32 Intel® Common Core BSP (Intel-core2-32) | ||
107 | - Intel-core2-32 Intel® Common Core BSP (Intel-quark) | ||
108 | - Intel-corei7-64 Intel® Common Core BSP (Intel-corei7-64) | ||
109 | |||
110 | The intel-* BSPs, also known as the intel-common BSPs, provide a few | ||
111 | carefully selected tune options and generic hardware support to cover | ||
112 | the majority of current Intel CPUs and devices. The naming follows the | ||
113 | convention of intel-<TUNE>-<BITS>, where TUNE is the gcc cpu-type | ||
114 | (used with mtune and march typically) and BITS is either 32 bit or 64 | ||
115 | bit. | ||
116 | |||
117 | Having done that, and assuming you extracted the BSP tarball contents | ||
118 | at the top-level of your yocto build tree, you can build a BSP image | ||
119 | by adding the location of the meta-intel layer to bblayers.conf e.g.: | ||
120 | |||
121 | yocto/meta-intel \ | ||
122 | |||
123 | To enable a particular machine, you need to add a MACHINE line naming | ||
124 | the BSP to the local.conf file: | ||
125 | |||
126 | MACHINE ?= "xxx" | ||
127 | |||
128 | where 'xxx' is replaced by one of the following BSP names: | ||
129 | |||
130 | - intel-core2-32 | ||
131 | |||
132 | This BSP is optimized for the Core2 family of CPUs as well as all | ||
133 | Atom CPUs prior to the Silvermont core. | ||
134 | |||
135 | - intel-corei7-64 | ||
136 | |||
137 | This BSP is optimized for Nehalem and later Core and Xeon CPUs as | ||
138 | well as Silvermont and later Atom CPUs, such as the Baytrail SoCs. | ||
139 | |||
140 | - intel-quark | ||
141 | |||
142 | This BSP is optimized for Quark-based systems. | ||
143 | |||
144 | You should then be able to build an image as such: | ||
145 | |||
146 | $ source oe-init-build-env | ||
147 | $ bitbake core-image-sato | ||
148 | |||
149 | At the end of a successful build, you should have an image that | ||
150 | you can boot from a USB flash drive (see instructions on how to do | ||
151 | that below, in the section 'Booting the intel-common BSP images'). | ||
152 | |||
153 | As an alternative to downloading the BSP tarball, you can also work | ||
154 | directly from the meta-intel git repository. For each BSP in the | ||
155 | 'meta-intel' repository, there are multiple branches, one | ||
156 | corresponding to each major release starting with 'laverne' (0.90), in | ||
157 | addition to the latest code which tracks the current master (note that | ||
158 | not all BSPs are present in every release). Instead of extracting | ||
159 | a BSP tarball at the top level of your yocto build tree, you can | ||
160 | equivalently check out the appropriate branch from the meta-intel | ||
161 | repository at the same location. | ||
162 | |||
163 | b. Booting the intel-common BSP images | ||
164 | -------------------------------------- | ||
165 | |||
166 | If you downloaded the BSP tarball, you will find bootable images in | ||
167 | the /binary directory. If you've built your own image, either from | ||
168 | the downloaded BSP layer or from the meta-intel git repository, you'll | ||
169 | find the bootable image in the build/tmp/deploy/images/xxx directory, | ||
170 | where again 'xxx' refers to the machine name used in the build. | ||
171 | |||
172 | The BSP /binary directory or build contains bootable live images, | ||
173 | which can be used to directly boot Yocto off of a USB flash drive. | ||
174 | |||
175 | Under Linux, insert a USB flash drive. Assuming the USB flash drive | ||
176 | takes device /dev/sdf, use dd to copy the image to it. For example: | ||
177 | |||
178 | $ dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf | ||
179 | $ sync | ||
180 | $ eject /dev/sdf | ||
181 | |||
182 | This should give you a bootable USB flash device. Insert the device | ||
183 | into a bootable USB socket on the target, and power on. This should | ||
184 | result in a system booted to the Sato graphical desktop. | ||
185 | |||
186 | If you want a terminal, use the arrows at the top of the UI to move to | ||
187 | different pages of available applications, one of which is named | ||
188 | 'Terminal'. Clicking that should give you a root terminal. | ||
189 | |||
190 | If you want to ssh into the system, you can use the root terminal to | ||
191 | ifconfig the IP address and use that to ssh in. The root password is | ||
192 | empty, so to log in type 'root' for the user name and hit 'Enter' at | ||
193 | the Password prompt: and you should be in. | ||
194 | |||
195 | If you find you're getting corrupt images on the USB (it doesn't show | ||
196 | the syslinux boot: prompt, or the boot: prompt contains strange | ||
197 | characters), try doing this first: | ||
198 | |||
199 | $ dd if=/dev/zero of=/dev/sdf bs=1M count=512 | ||
200 | |||
201 | c. Booting the intel-quark BSP image on a Galileo board | ||
202 | ------------------------------------------------------- | ||
203 | |||
204 | If you downloaded the BSP tarball, you will find bootable images in | ||
205 | the /binary directory. If you've built your own image, either from | ||
206 | the downloaded BSP layer or from the meta-intel git repository, you'll | ||
207 | find the bootable image in the build/tmp/deploy/images/xxx directory, | ||
208 | where again 'xxx' refers to the machine name used in the build. | ||
209 | |||
210 | The Galileo board can boot off of either an SD card or USB storage | ||
211 | media that has a special disk layout. The 'wic' tool can be used to | ||
212 | create directly bootable images for either of the two formats via the | ||
213 | following steps. As of meta-intel 6.0-morty-2.2 or newer, wic images are | ||
214 | created automatically during build time, and the manual use of wic is | ||
215 | not necessary. By default, the galileodisk-sd wic kickstart file is used, | ||
216 | which targets SD cards. This can be changed by setting the WKS_FILE to | ||
217 | something else in local.conf, such as the following: | ||
218 | |||
219 | WKS_FILE = “galileodisk-usb†| ||
220 | |||
221 | If your build is successful, a .wic image will be created in the usual | ||
222 | deploy directory. Write this image to an SD card: | ||
223 | |||
224 | $ sudo dd if=/path/to/image/image-name.wic of=/dev/your_sd_dev | ||
225 | $ sync | ||
226 | $ sudo eject /dev/your_sd_dev | ||
227 | |||
228 | Insert the SD card into the Galileo and power on. | ||
229 | |||
230 | The Galileo board can boot from an hddimg formatted USB drive as well, | ||
231 | but currently only live-boot, and not installation, is supported. | ||
232 | An image in hddimg format is generated when you build the quark BSP. | ||
233 | You can follow the procedure in II.b to use dd command to prepare your USB | ||
234 | drive, then press F7 key during startup to bring up the boot option menu. | ||
235 | Choose the UEFI USB boot option for the drive to boot the system. If the board | ||
236 | already passes this stage and show a grub boot menu, you can press 'c' | ||
237 | key and then type "quit" in grub shell. The board should come back to | ||
238 | the UEFI boot menu. | ||
239 | |||
240 | III. Technical Miscellany | ||
241 | ========================= | ||
242 | |||
243 | Benefits of using meta-intel | ||
244 | ---------------------------- | ||
245 | |||
246 | Using meta-intel has the following benefits over a generic BSP: | ||
247 | |||
248 | tune flags | ||
249 | ++++++++++ | ||
250 | intel-* MACHINEs each have different compilation flags appropriate for their | ||
251 | targeted hardware sets. intel-corei7-64 has tune flags appropriate for modern | ||
252 | 64-bit Intel Core i microarchitecture, and includes instruction sets up to | ||
253 | SSE4.2. intel-core2-32 has tune flags appropriate for legacy 32-bit Intel Core2 | ||
254 | microarchitecture, and includes instruction sets up to SSE3. intel-quark | ||
255 | contains a subset of the intel-core2-32 instruction set, as quark does not | ||
256 | support prefix locking instructions. | ||
257 | |||
258 | linux-intel kernel | ||
259 | ++++++++++++++++++ | ||
260 | The linux-intel kernel is an initiative to bring better Intel(R) hardware | ||
261 | support to the current LTS linux kernel. It contains a base LTS kernel with | ||
262 | additional backports from upstream Intel drivers. In addition, a default kernel | ||
263 | config containing most features found on Intel boards is supplied via the | ||
264 | yocto-kernel-cache. | ||
265 | |||
266 | graphics stack | ||
267 | ++++++++++++++ | ||
268 | Meta-intel provides the latest Intel Graphics Linux Stack drivers to support | ||
269 | Intel hardware as defined by the https://01.org/linuxgraphics. | ||
270 | |||
271 | Other software | ||
272 | ++++++++++++++ | ||
273 | * intel ucode - provides the latest microcode updates for Intel processors | ||
274 | |||
275 | * thermald - which proactively controls thermal, using P-states, T-states, and | ||
276 | the Intel power clamp driver. | ||
277 | (https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon) | ||
278 | |||
279 | * RMC - Runtime Machine Configuration, which allows the bootload to determine | ||
280 | board and CPU information in order to set specific kernel command line | ||
281 | information at startup. | ||
282 | |||
283 | The intel-common kernel package architecture | ||
284 | -------------------------------------------- | ||
285 | |||
286 | These BSPs use what we call the intel-common Linux kernel package | ||
287 | architecture. This includes core2-32-intel-common and | ||
288 | corei7-64-intel-common. These kernel packages can also be used by any | ||
289 | of the BSPs in meta-intel that choose to include the | ||
290 | intel-common-pkgarch.inc file. | ||
291 | |||
292 | To minimize the proliferation of vendor trees, reduce the sources we | ||
293 | must support, and consolidate QA efforts, all BSP maintainers are | ||
294 | encouraged to make use of the intel-common Linux kernel package | ||
295 | architecture. | ||
296 | |||
297 | Intel-specific machine features | ||
298 | ------------------------------- | ||
299 | |||
300 | The meta-intel layer makes some additional machine features available | ||
301 | to BSPs. These machine features can be used in a BSP layer in the | ||
302 | same way that machine features are used in other layers based on | ||
303 | oe-core, via the MACHINE_FEATURES variable. | ||
304 | |||
305 | Requirements | ||
306 | ++++++++++++ | ||
307 | |||
308 | The meta-intel-specific machine features are only available to a BSP | ||
309 | when the meta-intel layer is included in the build configuration, and | ||
310 | the meta-intel.inc file is included in the machine configuration of | ||
311 | that BSP. | ||
312 | |||
313 | To make these features available for your machine, you will need to: | ||
314 | |||
315 | 1. include a configuration line such as the below in bblayers.conf | ||
316 | BBLAYERS += "<local path>/meta-intel" | ||
317 | 2. include the following line in the machine configuration file | ||
318 | require conf/machine/include/meta-intel.inc | ||
319 | |||
320 | Once the above requirements are met, the machine features provided by | ||
321 | the meta-intel layer will be available for the BSP to use. | ||
322 | |||
323 | Available machine features | ||
324 | ++++++++++++++++++++++++++ | ||
325 | |||
326 | Currently, the meta-intel layer makes the following set of | ||
327 | Intel-specific machine features available: | ||
328 | |||
329 | * intel-ucode | ||
330 | |||
331 | These machine features can be included by listing them in the | ||
332 | MACHINE_FEATURES variable in the machine configuration file. For | ||
333 | example: | ||
334 | |||
335 | MACHINE_FEATURES += "intel-ucode" | ||
336 | |||
337 | Machine feature details | ||
338 | +++++++++++++++++++++++ | ||
339 | |||
340 | * intel-ucode | ||
341 | |||
342 | This feature provides support for microcode updates to Intel | ||
343 | processors. The intel-ucode feature runs at early boot and uses | ||
344 | the microcode data file added by the feature into the BSP's | ||
345 | initrd. It also puts the userland microcode-updating tool, | ||
346 | iucode_tool, into the target images along with the microcode data | ||
347 | file. | ||
348 | |||
349 | Q. Why might a user want to enable the intel-ucode feature? | ||
350 | |||
351 | A. Intel releases microcode updates to correct processor behavior | ||
352 | as documented in the respective processor specification | ||
353 | updates. While the normal approach to getting such microcode | ||
354 | updates is via a BIOS upgrade, this can be an administrative | ||
355 | hassle and not always possible in the field. The intel-ucode | ||
356 | feature enables the microcode update capability present in the | ||
357 | Linux kernel. It provides an easy path for upgrading processor | ||
358 | microcode without the need to change the BIOS. If the feature | ||
359 | is enabled, it is also possible to update the existing target | ||
360 | images with a newer microcode update in the future. | ||
361 | |||
362 | Q. How would a user bundle only target-specific microcode in the | ||
363 | target image? | ||
364 | |||
365 | A. The Intel microcode data file released by Intel contains | ||
366 | microcode updates for multiple processors. If the BSP image is | ||
367 | meant to run on only a certain subset of processor types, a | ||
368 | processor-specific subset of microcode can be bundled into the | ||
369 | target image via the UCODE_FILTER_PARAMETERS variable. This | ||
370 | works by listing a sequence of iucode-tool parameters in the | ||
371 | UCODE_FILTER_PARAMETERS variable, which in this case will | ||
372 | select only the specific microcode relevant to the BSP. For | ||
373 | more information on the underlying parameters refer to the | ||
374 | iucode-tool manual page at http://manned.org/iucode-tool | ||
375 | |||
376 | To define a set of parameters for microcode-filtering via the | ||
377 | UCODE_FILTER_PARAMETERS variable, one needs to identify the | ||
378 | cpuid signatures of all the processors the BSP is meant to run | ||
379 | on. One way to determine the cpuid signature for a specific | ||
380 | processor is to build and run an intel-ucode-feature-enabled | ||
381 | image on the target hardware, without first assigning any value | ||
382 | to the UCODE_FILTER_PARAMETERS variable, and then once the | ||
383 | image is booted, run the "ucode_tool -S" command to have the | ||
384 | ucode tool scan the system for processor signatures. These | ||
385 | signatures can then be used in the UCODE_FILTER_PARAMETERS | ||
386 | variable in conjunction with -s parameter. For example, for | ||
387 | the fri2 BSP, the cpuid can be determined as such: | ||
388 | |||
389 | [root@fri2 ~]# iucode_tool -S | ||
390 | iucode_tool: system has processor(s) with signature 0x00020661 | ||
391 | |||
392 | Given that output, a suitable UCODE_FILTER_PARAMETERS variable | ||
393 | definition could be specified in the machine configuration as | ||
394 | such: | ||
395 | |||
396 | UCODE_FILTER_PARAMETERS = "-s 0x00020661" | ||
397 | |||
398 | Q. Are there any reasons a user might want to disable the | ||
399 | intel-ucode feature? | ||
400 | |||
401 | A. The microcode data file and associated tools occupy a small | ||
402 | amount of space (a few KB) on the target image. BSPs which are | ||
403 | highly sensitive to target image size and which are not | ||
404 | experiencing microcode-related issues might consider not | ||
405 | enabling this feature. | ||
406 | |||
407 | |||
408 | IV. Tested Hardware | ||
409 | =================== | ||
410 | |||
411 | The following undergo regular basic testing with their respective MACHINE types. | ||
412 | Note that both 64-bit and 32-bit firmware is available for the MinnowBoard | ||
413 | Turbot, so it is tested against both intel-corei7-64 and intel-core2-32. | ||
414 | |||
415 | intel-corei7-64: | ||
416 | NUC6i5SYH | ||
417 | MinnowBoard Turbot | ||
418 | Braswell RVP | ||
419 | |||
420 | intel-core2-32: | ||
421 | MinnowBoard Turbot | ||
422 | |||
423 | Intel-quark: | ||
424 | Galileo 2 | ||
425 | |||
426 | |||
427 | V. Guidelines for submitting patches | ||
428 | ==================================== | 32 | ==================================== |
429 | 33 | ||
430 | Please submit any patches against meta-intel BSPs to the meta-intel | 34 | Please submit any patches against meta-dpdk to the meta-intel |
431 | mailing list (meta-intel@yoctoproject.org). Also, if your patches are | 35 | mailing list (meta-intel@yoctoproject.org). Also, if your patches are |
432 | available via a public git repository, please also include a URL to | 36 | available via a public git repository, please also include a URL to |
433 | the repo and branch containing your patches as that makes it easier | 37 | the repo and branch containing your patches as that makes it easier |
diff --git a/README.sources b/README.sources deleted file mode 100644 index ee72e54..0000000 --- a/README.sources +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | The sources for the packages comprising the images shipped with this | ||
2 | BSP can be found at the following location: | ||
3 | |||
4 | http://downloads.yoctoproject.org/mirror/sources/ | ||
5 | |||
6 | The metadata used to generate the images shipped with this BSP, in | ||
7 | addition to the code contained in this BSP, can be found at the | ||
8 | following location: | ||
9 | |||
10 | http://downloads.yoctoproject.org/releases/yocto/yocto-2.1/poky-krogoth-15.0.tar.bz2 | ||
11 | |||
12 | The metadata used to generate the images shipped with this BSP, in | ||
13 | addition to the code contained in this BSP, can also be found at the | ||
14 | following locations: | ||
15 | |||
16 | git://git.yoctoproject.org/poky.git | ||
17 | git://git.yoctoproject.org/meta-intel | ||
diff --git a/classes/rmc-boot.bbclass b/classes/rmc-boot.bbclass deleted file mode 100644 index 37c3e30..0000000 --- a/classes/rmc-boot.bbclass +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | # rmc-boot bbclass | ||
2 | # Deploy central RMC database file to ESP | ||
3 | |||
4 | IMAGE_INSTALL_append = " rmc" | ||
5 | RMC_BOOTLOADER ?= "systemd-boot" | ||
6 | |||
7 | inherit ${RMC_BOOTLOADER} | ||
8 | |||
9 | do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy" | ||
10 | |||
11 | efi_populate_append() { | ||
12 | if [ -f ${DEPLOY_DIR_IMAGE}/rmc.db ]; then | ||
13 | install -m 0400 ${DEPLOY_DIR_IMAGE}/rmc.db ${DEST}/rmc.db | ||
14 | else | ||
15 | rm -f ${DEST}/rmc.db | ||
16 | fi | ||
17 | } | ||
diff --git a/classes/rmc-db.bbclass b/classes/rmc-db.bbclass deleted file mode 100644 index 72594d6..0000000 --- a/classes/rmc-db.bbclass +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | # RMC database bbclass | ||
2 | # provide functions to generate RMC database file on build host (native) | ||
3 | |||
4 | DEPENDS += "rmc-native" | ||
5 | |||
6 | # rmc_generate_db() | ||
7 | # $1: a list of directories. Each directory holds directories for a group of | ||
8 | # boards. | ||
9 | # $2: path_name of rmc generates database file and records | ||
10 | # | ||
11 | # WARNING: content of directory of database file will be removed. | ||
12 | # | ||
13 | # Each board directory shall contain a fingerprint file (*.fp) at least, with | ||
14 | # optional file blob(s) associated to the type of board. If a board directory | ||
15 | # has no file blob, no record is created for that board. | ||
16 | # | ||
17 | # An example of two directories each of which contains two boards for RMC: | ||
18 | # (All file and directory names are for illustration purpose.) | ||
19 | # | ||
20 | # dir_1/ | ||
21 | # board_1/ | ||
22 | # board_1_fingerprint.fp | ||
23 | # file_1.blob | ||
24 | # board_2/ | ||
25 | # board_2.fp | ||
26 | # dir_2/ | ||
27 | # board_3/ | ||
28 | # b3.fp | ||
29 | # file_1.blob | ||
30 | # file_2.conf | ||
31 | # board_4/ | ||
32 | # board_foo.fp | ||
33 | # mylib.config | ||
34 | # | ||
35 | # To generate a RMC database "rmc.db" with data of all (actually 3) of boards in | ||
36 | # a directory "deploy_dir": | ||
37 | # | ||
38 | # rmc_generate_db "dir_1 dir_2" "deploy_dir/rmc.db" | ||
39 | # | ||
40 | # The board_2 will be skipped. No record or any data for it is packed in | ||
41 | # generated database because it only contains a fingerprint file. | ||
42 | # | ||
43 | |||
44 | rmc_generate_db () { | ||
45 | RMC_BOARD_DIRS=$1 | ||
46 | |||
47 | if [ "$#" -ne 2 ]; then | ||
48 | echo "rmc_generate_db(): Wrong number of arguments: $#" | ||
49 | return 1 | ||
50 | fi | ||
51 | |||
52 | RMC_DB_DIR=$(dirname "$2") | ||
53 | RMC_RECORDS="" | ||
54 | |||
55 | rm -rf ${RMC_DB_DIR} | ||
56 | mkdir -p ${RMC_DB_DIR} | ||
57 | |||
58 | # generate rmc database | ||
59 | for topdir in ${RMC_BOARD_DIRS}; do | ||
60 | # For all board dirs in a topdir: | ||
61 | CUR_BOARD_DIRS=$(find ${topdir}/* -type d) | ||
62 | for board_dir in ${CUR_BOARD_DIRS}; do | ||
63 | CUR_FINGERPRINT=$(find ${board_dir}/ -name "*.fp") | ||
64 | |||
65 | # disallow a board directory without any fingerprint file in it. | ||
66 | if [ -z "${CUR_FINGERPRINT}" ]; then | ||
67 | echo "Cannot find RMC fingerprint file in ${board_dir}" | ||
68 | return 1 | ||
69 | fi | ||
70 | |||
71 | CUR_FILES=$(find ${board_dir}/ -type f |grep -v '\.fp$' || true) | ||
72 | |||
73 | # allow a directory only with fingerprint file. Developer may | ||
74 | # check in fingerprint for future use. | ||
75 | if [ -z "${CUR_FILES}" ]; then | ||
76 | continue | ||
77 | fi | ||
78 | |||
79 | for fp in ${CUR_FINGERPRINT}; do | ||
80 | fullname=$(basename ${fp}) | ||
81 | CUR_TAG="${fullname%.*}" | ||
82 | CUR_RECORD=${RMC_DB_DIR}/${CUR_TAG}.rec | ||
83 | rmc -R -f ${fp} -b ${CUR_FILES} -o ${CUR_RECORD} | ||
84 | RMC_RECORDS="${RMC_RECORDS} ${CUR_RECORD}" | ||
85 | done | ||
86 | done | ||
87 | done | ||
88 | |||
89 | if [ ! -z "${RMC_RECORDS}" ]; then | ||
90 | rmc -D ${RMC_RECORDS} -o "$2" | ||
91 | fi | ||
92 | } | ||
diff --git a/classes/uefi-comboapp.bbclass b/classes/uefi-comboapp.bbclass deleted file mode 100644 index 5c3ca8c..0000000 --- a/classes/uefi-comboapp.bbclass +++ /dev/null | |||
@@ -1,151 +0,0 @@ | |||
1 | # This class brings a more generic version of the UEFI combo app from refkit to meta-intel. | ||
2 | # It uses a combo file, containing kernel, initramfs and | ||
3 | # command line, presented to the BIOS as UEFI application, by prepending | ||
4 | # it with the efi stub obtained from systemd-boot. | ||
5 | |||
6 | # Don't add syslinux or build an ISO | ||
7 | PCBIOS_forcevariable = "0" | ||
8 | NOISO_forcevariable = "1" | ||
9 | |||
10 | # image-live.bbclass will default INITRD_LIVE to the image INITRD_IMAGE creates. | ||
11 | # We want behavior to be consistent whether or not "live" is in IMAGE_FSTYPES, so | ||
12 | # we default INITRD_LIVE to the INITRD_IMAGE as well. | ||
13 | INITRD_IMAGE ?= "core-image-minimal-initramfs" | ||
14 | INITRD_LIVE ?= " ${@ ('${DEPLOY_DIR_IMAGE}/' + d.getVar('INITRD_IMAGE', expand=True) + '-${MACHINE}.cpio.gz') if d.getVar('INITRD_IMAGE', True) else ''}" | ||
15 | |||
16 | do_uefiapp[depends] += " \ | ||
17 | intel-microcode:do_deploy \ | ||
18 | systemd-boot:do_deploy \ | ||
19 | virtual/kernel:do_deploy \ | ||
20 | " | ||
21 | |||
22 | # INITRD_IMAGE is added to INITRD_LIVE, which we use to create our initrd, so depend on it if it is set | ||
23 | do_uefiapp[depends] += "${@ '${INITRD_IMAGE}:do_image_complete' if d.getVar('INITRD_IMAGE') else ''}" | ||
24 | |||
25 | # The image does without traditional bootloader. | ||
26 | # In its place, instead, it uses a single UEFI executable binary, which is | ||
27 | # composed by: | ||
28 | # - an UEFI stub | ||
29 | # The linux kernel can generate a UEFI stub, however the one from systemd-boot can fetch | ||
30 | # the command line from a separate section of the EFI application, avoiding the need to | ||
31 | # rebuild the kernel. | ||
32 | # - the kernel | ||
33 | # - an initramfs (optional) | ||
34 | |||
35 | def create_uefiapp(d, uuid=None, app_suffix=''): | ||
36 | import glob, re | ||
37 | from subprocess import check_call | ||
38 | |||
39 | build_dir = d.getVar('B') | ||
40 | deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE') | ||
41 | image_link_name = d.getVar('IMAGE_LINK_NAME') | ||
42 | |||
43 | cmdline = '%s/cmdline.txt' % build_dir | ||
44 | linux = '%s/%s' % (deploy_dir_image, d.getVar('KERNEL_IMAGETYPE')) | ||
45 | initrd = '%s/initrd' % build_dir | ||
46 | |||
47 | stub_path = '%s/linux*.efi.stub' % deploy_dir_image | ||
48 | stub = glob.glob(stub_path)[0] | ||
49 | m = re.match(r"\S*(ia32|x64)(.efi)\S*", os.path.basename(stub)) | ||
50 | app = "boot%s%s%s" % (m.group(1), app_suffix, m.group(2)) | ||
51 | executable = '%s/%s.%s' % (deploy_dir_image, image_link_name, app) | ||
52 | |||
53 | if d.getVar('INITRD_LIVE'): | ||
54 | with open(initrd, 'wb') as dst: | ||
55 | for cpio in d.getVar('INITRD_LIVE').split(): | ||
56 | with open(cpio, 'rb') as src: | ||
57 | dst.write(src.read()) | ||
58 | initrd_cmd = "--add-section .initrd=%s --change-section-vma .initrd=0x3000000 " % initrd | ||
59 | else: | ||
60 | initrd_cmd = "" | ||
61 | |||
62 | root = 'root=PARTUUID=%s' % uuid if uuid else '' | ||
63 | |||
64 | with open(cmdline, 'w') as f: | ||
65 | f.write('%s %s' % (d.getVar('APPEND'), root)) | ||
66 | |||
67 | objcopy_cmd = ("objcopy " | ||
68 | "--add-section .cmdline=%s --change-section-vma .cmdline=0x30000 " | ||
69 | "--add-section .linux=%s --change-section-vma .linux=0x40000 " | ||
70 | "%s %s %s") % \ | ||
71 | (cmdline, linux, initrd_cmd, stub, executable) | ||
72 | |||
73 | check_call(objcopy_cmd, shell=True) | ||
74 | |||
75 | python create_uefiapps () { | ||
76 | # We must clean up anything that matches the expected output pattern, to ensure that | ||
77 | # the next steps do not accidentally use old files. | ||
78 | import glob | ||
79 | pattern = d.expand('${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi') | ||
80 | for old_efi in glob.glob(pattern): | ||
81 | os.unlink(old_efi) | ||
82 | uuid = d.getVar('DISK_SIGNATURE_UUID') | ||
83 | create_uefiapp(d, uuid=uuid) | ||
84 | } | ||
85 | |||
86 | # This is intentionally split into different parts. This way, derived | ||
87 | # classes or images can extend the individual parts. We can also use | ||
88 | # whatever language (shell script or Python) is more suitable. | ||
89 | python do_uefiapp() { | ||
90 | bb.build.exec_func('create_uefiapps', d) | ||
91 | } | ||
92 | |||
93 | do_uefiapp[vardeps] += "APPEND DISK_SIGNATURE_UUID INITRD_LIVE KERNEL_IMAGETYPE IMAGE_LINK_NAME" | ||
94 | |||
95 | uefiapp_deploy_at() { | ||
96 | dest=$1 | ||
97 | for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do | ||
98 | target=`basename $i` | ||
99 | target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` | ||
100 | cp --preserve=timestamps -r $i $dest/$target | ||
101 | done | ||
102 | } | ||
103 | |||
104 | do_uefiapp_deploy() { | ||
105 | rm -rf ${IMAGE_ROOTFS}/boot/* | ||
106 | dest=${IMAGE_ROOTFS}/boot/EFI/BOOT | ||
107 | mkdir -p $dest | ||
108 | uefiapp_deploy_at $dest | ||
109 | } | ||
110 | |||
111 | do_uefiapp_deploy[depends] += "${PN}:do_uefiapp" | ||
112 | |||
113 | |||
114 | # This decides when/how we add our tasks to the image | ||
115 | python () { | ||
116 | image_fstypes = d.getVar('IMAGE_FSTYPES', True) | ||
117 | initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES', True) | ||
118 | |||
119 | # Don't add any of these tasks to initramfs images | ||
120 | if initramfs_fstypes not in image_fstypes: | ||
121 | bb.build.addtask('uefiapp', 'do_image', 'do_rootfs', d) | ||
122 | bb.build.addtask('uefiapp_deploy', 'do_image', 'do_rootfs', d) | ||
123 | } | ||
124 | |||
125 | SIGN_AFTER ?= "do_uefiapp" | ||
126 | SIGN_BEFORE ?= "do_uefiapp_deploy" | ||
127 | SIGNING_DIR ?= "${DEPLOY_DIR_IMAGE}" | ||
128 | SIGNING_BINARIES ?= "${IMAGE_LINK_NAME}.boot*.efi" | ||
129 | inherit uefi-sign | ||
130 | |||
131 | # Legacy hddimg support below this line | ||
132 | efi_hddimg_populate() { | ||
133 | uefiapp_deploy_at "$1" | ||
134 | } | ||
135 | |||
136 | build_efi_cfg() { | ||
137 | # The command line is built into the combo app, so this is a null op | ||
138 | : | ||
139 | } | ||
140 | |||
141 | populate_kernel_append() { | ||
142 | # The kernel and initrd are built into the app, so we don't need these | ||
143 | if [ -f $dest/initrd ]; then | ||
144 | rm $dest/initrd | ||
145 | fi | ||
146 | if [ -f $dest/vmlinuz ]; then | ||
147 | rm $dest/vmlinuz | ||
148 | fi | ||
149 | } | ||
150 | |||
151 | IMAGE_FEATURES[validitems] += "secureboot" | ||
diff --git a/classes/uefi-sign.bbclass b/classes/uefi-sign.bbclass deleted file mode 100644 index e8f203b..0000000 --- a/classes/uefi-sign.bbclass +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | # By default, sign all .efi binaries in ${B} after compiling and before deploying | ||
2 | SIGNING_DIR ?= "${B}" | ||
3 | SIGNING_BINARIES ?= "*.efi" | ||
4 | SIGN_AFTER ?= "do_compile" | ||
5 | SIGN_BEFORE ?= "do_deploy" | ||
6 | |||
7 | python () { | ||
8 | import os | ||
9 | import hashlib | ||
10 | |||
11 | # Ensure that if the signing key or cert change, we rerun the uefiapp process | ||
12 | if bb.utils.contains('IMAGE_FEATURES', 'secureboot', True, False, d): | ||
13 | for varname in ('SECURE_BOOT_SIGNING_CERT', 'SECURE_BOOT_SIGNING_KEY'): | ||
14 | filename = d.getVar(varname) | ||
15 | if filename is None: | ||
16 | bb.fatal('%s is not set.' % varname) | ||
17 | if not os.path.isfile(filename): | ||
18 | bb.fatal('%s=%s is not a file.' % (varname, filename)) | ||
19 | with open(filename, 'rb') as f: | ||
20 | data = f.read() | ||
21 | hash = hashlib.sha256(data).hexdigest() | ||
22 | d.setVar('%s_HASH' % varname, hash) | ||
23 | |||
24 | # Must reparse and thus rehash on file changes. | ||
25 | bb.parse.mark_dependency(d, filename) | ||
26 | |||
27 | bb.build.addtask('uefi_sign', d.getVar('SIGN_BEFORE'), d.getVar('SIGN_AFTER'), d) | ||
28 | |||
29 | # Original binary needs to be regenerated if the hash changes since we overwrite it | ||
30 | # SIGN_AFTER isn't necessarily when it gets generated, but its our best guess | ||
31 | d.appendVarFlag(d.getVar('SIGN_AFTER'), 'vardeps', 'SECURE_BOOT_SIGNING_CERT_HASH SECURE_BOOT_SIGNING_KEY_HASH') | ||
32 | } | ||
33 | |||
34 | do_uefi_sign() { | ||
35 | if [ -f ${SECURE_BOOT_SIGNING_KEY} ] && [ -f ${SECURE_BOOT_SIGNING_CERT} ]; then | ||
36 | for i in `find ${SIGNING_DIR}/ -name '${SIGNING_BINARIES}'`; do | ||
37 | sbsign --key ${SECURE_BOOT_SIGNING_KEY} --cert ${SECURE_BOOT_SIGNING_CERT} $i | ||
38 | sbverify --cert ${SECURE_BOOT_SIGNING_CERT} $i.signed | ||
39 | mv $i.signed $i | ||
40 | done | ||
41 | fi | ||
42 | } | ||
43 | |||
44 | do_uefi_sign[depends] += "sbsigntool-native:do_populate_sysroot" | ||
45 | |||
46 | do_uefi_sign[vardeps] += "SECURE_BOOT_SIGNING_CERT_HASH \ | ||
47 | SECURE_BOOT_SIGNING_KEY_HASH \ | ||
48 | SIGNING_BINARIES SIGNING_DIR \ | ||
49 | SIGN_BEFORE SIGN_AFTER \ | ||
50 | " | ||
diff --git a/common/custom-licenses/BSD_LMS b/common/custom-licenses/BSD_LMS deleted file mode 100755 index 2ea28ff..0000000 --- a/common/custom-licenses/BSD_LMS +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | Copyright (C) 2004-2012 Intel Corporation. All rights reserved. | ||
2 | |||
3 | • This license covers the sources of the Local Manageability Service (LMS). | ||
4 | For licensing information for the LMS build scripts, please refer to the file build_script_license.txt. | ||
5 | |||
6 | Redistribution and use in source and binary forms, with or without | ||
7 | modification, are permitted provided that the following conditions are met: | ||
8 | |||
9 | - Redistributions of source code must retain the above copyright notice, | ||
10 | this list of conditions and the following disclaimer. | ||
11 | |||
12 | - Redistributions in binary form must reproduce the above copyright notice, | ||
13 | this list of conditions and the following disclaimer in the documentation | ||
14 | and/or other materials provided with the distribution. | ||
15 | |||
16 | - Neither the name of Intel Corporation. nor the names of its | ||
17 | contributors may be used to endorse or promote products derived from this | ||
18 | software without specific prior written permission. | ||
19 | |||
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
23 | ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
24 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
27 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
28 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
30 | POSSIBILITY OF SUCH DAMAGE. | ||
diff --git a/common/custom-licenses/Intel-Microcode-License b/common/custom-licenses/Intel-Microcode-License deleted file mode 100644 index af5b41c..0000000 --- a/common/custom-licenses/Intel-Microcode-License +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | INTEL SOFTWARE LICENSE AGREEMENT | ||
2 | |||
3 | IMPORTANT - READ BEFORE COPYING, INSTALLING OR USING. | ||
4 | Do not use or load this software and any associated materials (collectively, | ||
5 | the "Software") until you have carefully read the following terms and | ||
6 | conditions. By loading or using the Software, you agree to the terms of this | ||
7 | Agreement. If you do not wish to so agree, do not install or use the Software. | ||
8 | |||
9 | LICENSES: Please Note: | ||
10 | - If you are a network administrator, the "Site License" below shall | ||
11 | apply to you. | ||
12 | - If you are an end user, the "Single User License" shall apply to you. | ||
13 | - If you are an original equipment manufacturer (OEM), the "OEM License" | ||
14 | shall apply to you. | ||
15 | |||
16 | SITE LICENSE. You may copy the Software onto your organization's computers | ||
17 | for your organization's use, and you may make a reasonable number of | ||
18 | back-up copies of the Software, subject to these conditions: | ||
19 | |||
20 | 1. This Software is licensed for use only in conjunction with Intel | ||
21 | component products. Use of the Software in conjunction with non-Intel | ||
22 | component products is not licensed hereunder. | ||
23 | 2. You may not copy, modify, rent, sell, distribute or transfer any part | ||
24 | of the Software except as provided in this Agreement, and you agree to | ||
25 | prevent unauthorized copying of the Software. | ||
26 | 3. You may not reverse engineer, decompile, or disassemble the Software. | ||
27 | 4. You may not sublicense or permit simultaneous use of the Software by | ||
28 | more than one user. | ||
29 | 5. The Software may include portions offered on terms in addition to those | ||
30 | set out here, as set out in a license accompanying those portions. | ||
31 | |||
32 | SINGLE USER LICENSE. You may copy the Software onto a single computer for | ||
33 | your personal, noncommercial use, and you may make one back-up copy of the | ||
34 | Software, subject to these conditions: | ||
35 | |||
36 | 1. This Software is licensed for use only in conjunction with Intel | ||
37 | component products. Use of the Software in conjunction with non-Intel | ||
38 | component products is not licensed hereunder. | ||
39 | 2. You may not copy, modify, rent, sell, distribute or transfer any part | ||
40 | of the Software except as provided in this Agreement, and you agree to | ||
41 | prevent unauthorized copying of the Software. | ||
42 | 3. You may not reverse engineer, decompile, or disassemble the Software. | ||
43 | 4. You may not sublicense or permit simultaneous use of the Software by | ||
44 | more than one user. | ||
45 | 5. The Software may include portions offered on terms in addition to those | ||
46 | set out here, as set out in a license accompanying those portions. | ||
47 | |||
48 | OEM LICENSE: You may reproduce and distribute the Software only as an | ||
49 | integral part of or incorporated in Your product or as a standalone | ||
50 | Software maintenance update for existing end users of Your products, | ||
51 | excluding any other standalone products, subject to these conditions: | ||
52 | |||
53 | 1. This Software is licensed for use only in conjunction with Intel | ||
54 | component products. Use of the Software in conjunction with non-Intel | ||
55 | component products is not licensed hereunder. | ||
56 | 2. You may not copy, modify, rent, sell, distribute or transfer any part | ||
57 | of the Software except as provided in this Agreement, and you agree to | ||
58 | prevent unauthorized copying of the Software. | ||
59 | 3. You may not reverse engineer, decompile, or disassemble the Software. | ||
60 | 4. You may only distribute the Software to your customers pursuant to a | ||
61 | written license agreement. Such license agreement may be a "break-the- | ||
62 | seal" license agreement. At a minimum such license shall safeguard | ||
63 | Intel's ownership rights to the Software. | ||
64 | 5. The Software may include portions offered on terms in addition to those | ||
65 | set out here, as set out in a license accompanying those portions. | ||
66 | |||
67 | NO OTHER RIGHTS. No rights or licenses are granted by Intel to You, expressly | ||
68 | or by implication, with respect to any proprietary information or patent, | ||
69 | copyright, mask work, trademark, trade secret, or other intellectual property | ||
70 | right owned or controlled by Intel, except as expressly provided in this | ||
71 | Agreement. | ||
72 | |||
73 | OWNERSHIP OF SOFTWARE AND COPYRIGHTS. Title to all copies of the Software | ||
74 | remains with Intel or its suppliers. The Software is copyrighted and | ||
75 | protected by the laws of the United States and other countries, and | ||
76 | international treaty provisions. You may not remove any copyright notices | ||
77 | from the Software. Intel may make changes to the Software, or to items | ||
78 | referenced therein, at any time without notice, but is not obligated to | ||
79 | support or update the Software. Except as otherwise expressly provided, Intel | ||
80 | grants no express or implied right under Intel patents, copyrights, | ||
81 | trademarks, or other intellectual property rights. You may transfer the | ||
82 | Software only if the recipient agrees to be fully bound by these terms and if | ||
83 | you retain no copies of the Software. | ||
84 | |||
85 | LIMITED MEDIA WARRANTY. If the Software has been delivered by Intel on | ||
86 | physical media, Intel warrants the media to be free from material physical | ||
87 | defects for a period of ninety days after delivery by Intel. If such a defect | ||
88 | is found, return the media to Intel for replacement or alternate delivery of | ||
89 | the Software as Intel may select. | ||
90 | |||
91 | EXCLUSION OF OTHER WARRANTIES. EXCEPT AS PROVIDED ABOVE, THE SOFTWARE IS | ||
92 | PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND | ||
93 | INCLUDING WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A | ||
94 | PARTICULAR PURPOSE. Intel does not warrant or assume responsibility for the | ||
95 | accuracy or completeness of any information, text, graphics, links or other | ||
96 | items contained within the Software. | ||
97 | |||
98 | LIMITATION OF LIABILITY. IN NO EVENT SHALL INTEL OR ITS SUPPLIERS BE LIABLE | ||
99 | FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, | ||
100 | BUSINESS INTERRUPTION, OR LOST INFORMATION) ARISING OUT OF THE USE OF OR | ||
101 | INABILITY TO USE THE SOFTWARE, EVEN IF INTEL HAS BEEN ADVISED OF THE | ||
102 | POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS PROHIBIT EXCLUSION OR | ||
103 | LIMITATION OF LIABILITY FOR IMPLIED WARRANTIES OR CONSEQUENTIAL OR INCIDENTAL | ||
104 | DAMAGES, SO THE ABOVE LIMITATION MAY NOT APPLY TO YOU. YOU MAY ALSO HAVE | ||
105 | OTHER LEGAL RIGHTS THAT VARY FROM JURISDICTION TO JURISDICTION. | ||
106 | |||
107 | TERMINATION OF THIS AGREEMENT. Intel may terminate this Agreement at any time | ||
108 | if you violate its terms. Upon termination, you will immediately destroy the | ||
109 | Software or return all copies of the Software to Intel. | ||
110 | |||
111 | APPLICABLE LAWS. Claims arising under this Agreement shall be governed by the | ||
112 | laws of California, excluding its principles of conflict of laws and the | ||
113 | United Nations Convention on Contracts for the Sale of Goods. You may not | ||
114 | export the Software in violation of applicable export laws and regulations. | ||
115 | Intel is not obligated under any other agreements unless they are in writing | ||
116 | and signed by an authorized representative of Intel. | ||
117 | |||
118 | GOVERNMENT RESTRICTED RIGHTS. The Software is provided with "RESTRICTED | ||
119 | RIGHTS." Use, duplication, or disclosure by the Government is subject to | ||
120 | restrictions as set forth in FAR52.227-14 and DFAR252.227-7013 et seq. or its | ||
121 | successor. Use of the Software by the Government constitutes acknowledgment | ||
122 | of Intel's proprietary rights therein. Contractor or Manufacturer is Intel | ||
123 | 2200 Mission College Blvd., Santa Clara, CA 95052. | ||
diff --git a/common/recipes-bsp/amt/files/atnetworktool-printf-fix.patch b/common/recipes-bsp/amt/files/atnetworktool-printf-fix.patch deleted file mode 100644 index 6bb03e3..0000000 --- a/common/recipes-bsp/amt/files/atnetworktool-printf-fix.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | Add a missing debug ifdef causing compilation problems. | ||
2 | |||
3 | Upstream-Status: Submitted | ||
4 | |||
5 | Signed-off-by: Tom Zanussi <tom.zanussi (a] intel.com> | ||
6 | |||
7 | Index: lms-7.1.20/src/tools/ATNetworkTool.cpp | ||
8 | =================================================================== | ||
9 | --- lms-7.1.20.orig/src/tools/ATNetworkTool.cpp 2012-04-30 23:24:56.693879920 -0500 | ||
10 | +++ lms-7.1.20/src/tools/ATNetworkTool.cpp 2012-04-30 23:25:32.363473948 -0500 | ||
11 | @@ -302,7 +302,9 @@ | ||
12 | close(s); | ||
13 | return -1; | ||
14 | } | ||
15 | +#ifdef LMS_NET_DEBUG | ||
16 | printf("successfully binded local\n"); | ||
17 | +#endif | ||
18 | |||
19 | } | ||
20 | if (bind(s, addr, addrlen) == -1) { | ||
diff --git a/common/recipes-bsp/amt/files/readlink-declaration.patch b/common/recipes-bsp/amt/files/readlink-declaration.patch deleted file mode 100644 index 0246d50..0000000 --- a/common/recipes-bsp/amt/files/readlink-declaration.patch +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | Add a missing include causing compilation (missing declaration) problems. | ||
2 | |||
3 | Upstream-Status: Submitted | ||
4 | |||
5 | Signed-off-by: Tom Zanussi <tom.zanussi (a] intel.com> | ||
6 | |||
7 | Index: lms-7.1.20/src/tools/ATVersion.cpp | ||
8 | =================================================================== | ||
9 | --- lms-7.1.20.orig/src/tools/ATVersion.cpp 2012-05-29 20:34:34.061997035 -0500 | ||
10 | +++ lms-7.1.20/src/tools/ATVersion.cpp 2012-05-29 20:35:22.671412948 -0500 | ||
11 | @@ -40,6 +40,7 @@ | ||
12 | #include <cerrno> | ||
13 | #include <fstream> | ||
14 | #include <dirent.h> | ||
15 | +#include <unistd.h> | ||
16 | |||
17 | #define AT_VERSION_ARGUMENT "--version" | ||
18 | #define AT_VERSION_MAXSIZE 40 | ||
diff --git a/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch b/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch deleted file mode 100644 index e28d45a..0000000 --- a/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 518a3a277c89a3d6b0a9d3ee552cfa33a1dbd5c6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Mon, 23 Jan 2017 20:45:08 +0200 | ||
4 | Subject: [PATCH 1/2] Include sys/select.h for fd_set() | ||
5 | |||
6 | This is needed at least on musl. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
10 | --- | ||
11 | src/mei/MEILinux.cpp | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/src/mei/MEILinux.cpp b/src/mei/MEILinux.cpp | ||
15 | index 1e9d28f..631270e 100755 | ||
16 | --- a/src/mei/MEILinux.cpp | ||
17 | +++ b/src/mei/MEILinux.cpp | ||
18 | @@ -37,6 +37,7 @@ | ||
19 | #include <cerrno> | ||
20 | #include <fcntl.h> | ||
21 | #include <sys/ioctl.h> | ||
22 | +#include <sys/select.h> | ||
23 | #include <unistd.h> | ||
24 | #include <stdint.h> | ||
25 | #include <aio.h> | ||
26 | -- | ||
27 | 2.1.4 | ||
28 | |||
diff --git a/common/recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch b/common/recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch deleted file mode 100644 index 17b206e..0000000 --- a/common/recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 8d737ba9745bef223c3d3b96899f11c26102ea04 Mon Sep 17 00:00:00 2001 | ||
2 | From: Saul Wold <sgw@linux.intel.com> | ||
3 | Date: Mon, 16 May 2016 09:01:05 -0700 | ||
4 | Subject: [PATCH] Protocol.cpp: Add whitespace for gcc6 compile error | ||
5 | |||
6 | When moving from C++-3 -> C++11 additiona white space is required between | ||
7 | User-defined literals. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
12 | --- | ||
13 | src/Protocol.cpp | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/Protocol.cpp b/src/Protocol.cpp | ||
17 | index 1c21a0f..3a4a9bb 100755 | ||
18 | --- a/src/Protocol.cpp | ||
19 | +++ b/src/Protocol.cpp | ||
20 | @@ -1428,7 +1428,7 @@ int Protocol::_handleFQDNChange(const char *fqdn) | ||
21 | char host[FQDN_MAX_SIZE + 1]; | ||
22 | #define LMS_MAX_LINE_LEN 1023 | ||
23 | char line[LMS_MAX_LINE_LEN + 1]; | ||
24 | -#define LMS_LINE_SIG_FIRST_WORDS(a) "# LMS GENERATED "a" " | ||
25 | +#define LMS_LINE_SIG_FIRST_WORDS(a) "# LMS GENERATED " a " " | ||
26 | #define LMS_LINE_SIG_LAST_WORD "LINE" | ||
27 | #define LMS_LINE_SIG_LAST_WORD_LEN 4 | ||
28 | #define LMS_LINE_SIG(a) LMS_LINE_SIG_FIRST_WORDS(a) LMS_LINE_SIG_LAST_WORD | ||
29 | -- | ||
30 | 2.5.0 | ||
31 | |||
diff --git a/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch b/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch deleted file mode 100644 index fa2e29a..0000000 --- a/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 0adc925ca9e005f93d77f373ccda2a6c6cc3ff2f Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Mon, 23 Jan 2017 20:46:50 +0200 | ||
4 | Subject: [PATCH 2/2] Use proper netinet/in.h API | ||
5 | |||
6 | in6addr is only guaranteed to contain this member: | ||
7 | uint8_t s6_addr[16] | ||
8 | Use that instead of the glibc implementation detail __in6_u. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
12 | --- | ||
13 | src/tools/ATNetworkTool.cpp | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/tools/ATNetworkTool.cpp b/src/tools/ATNetworkTool.cpp | ||
17 | index 66e27df..0789c79 100755 | ||
18 | --- a/src/tools/ATNetworkTool.cpp | ||
19 | +++ b/src/tools/ATNetworkTool.cpp | ||
20 | @@ -207,7 +207,7 @@ int ATNetworkTool::GetSockPeerIP(int sock, ATAddressList & peerAddresses, int &e | ||
21 | if(sa->sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&addr)) //if(IN6_IS_ADDR_V4COMPAT(&addr)) | ||
22 | { | ||
23 | struct in_addr demapped_addr; | ||
24 | - memcpy(&demapped_addr.s_addr, &addr.__in6_u.__u6_addr8[12], 4); | ||
25 | + memcpy(&demapped_addr.s_addr, &addr.s6_addr[12], 4); | ||
26 | |||
27 | struct sockaddr_in sa_in; | ||
28 | sa_in.sin_family = AF_INET; | ||
29 | -- | ||
30 | 2.1.4 | ||
31 | |||
diff --git a/common/recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch b/common/recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch deleted file mode 100644 index 433d301..0000000 --- a/common/recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | Fix device file referance to /dev/mei0, remove select post write. | ||
2 | |||
3 | LMS uses /dev/mei character device which is absent on current kernel versions causing LMS fail to initialize. LMS sends messages to MEI with a post select timeout. Select timeout causes SendMessage to fail causing LMS to not to communicate properly with MEI. | ||
4 | |||
5 | Adding /dev/mei0 device file reference to check first and then /dev/mei sucessfully initializes LMS. Rely on write return length and remove select with timeout to fix communication with MEI. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Anand Vastrad <anand.vastrad@intel.com> | ||
10 | --- | ||
11 | src/mei/MEILinux.cpp | 43 +++++++------------------------------------ | ||
12 | 1 file changed, 7 insertions(+), 36 deletions(-) | ||
13 | |||
14 | diff --git a/src/mei/MEILinux.cpp b/src/mei/MEILinux.cpp | ||
15 | index 1e9d28f..6d23f54 100755 | ||
16 | --- a/src/mei/MEILinux.cpp | ||
17 | +++ b/src/mei/MEILinux.cpp | ||
18 | @@ -94,13 +94,17 @@ bool MEILinux::Init(unsigned char reqProtocolVersion) | ||
19 | Deinit(); | ||
20 | } | ||
21 | |||
22 | - _fd = open("/dev/mei", O_RDWR); | ||
23 | + _fd = open("/dev/mei0", O_RDWR); | ||
24 | |||
25 | if (_fd == -1 ) { | ||
26 | if (_verbose) { | ||
27 | - fprintf(stderr, "Error: Cannot establish a handle to the MEI driver\n"); | ||
28 | + fprintf(stderr, "Warning: Cannot establish a handle to the MEI driver mei0, retrying with mei \n"); | ||
29 | + } | ||
30 | + _fd = open("/dev/mei", O_RDWR); | ||
31 | + if (_fd == -1 ) { | ||
32 | + fprintf(stderr, "Error: Cannot establish a handle to the MEI driver mei\n"); | ||
33 | + return false; | ||
34 | } | ||
35 | - return false; | ||
36 | } | ||
37 | _initialized = true; | ||
38 | |||
39 | @@ -181,13 +185,7 @@ int MEILinux::ReceiveMessage(unsigned char *buffer, int len, unsigned long timeo | ||
40 | int MEILinux::SendMessage(const unsigned char *buffer, int len, unsigned long timeout) | ||
41 | { | ||
42 | int rv = 0; | ||
43 | - int return_length =0; | ||
44 | int error = 0; | ||
45 | - fd_set set; | ||
46 | - struct timeval tv; | ||
47 | - | ||
48 | - tv.tv_sec = timeout / 1000; | ||
49 | - tv.tv_usec =(timeout % 1000) * 1000000; | ||
50 | |||
51 | if (_verbose) { | ||
52 | fprintf(stdout, "call write length = %d\n", len); | ||
53 | @@ -198,35 +196,8 @@ int MEILinux::SendMessage(const unsigned char *buffer, int len, unsigned long ti | ||
54 | if (_verbose) { | ||
55 | fprintf(stderr,"write failed with status %d %d\n", rv, error); | ||
56 | } | ||
57 | - goto out; | ||
58 | - } | ||
59 | - | ||
60 | - return_length = rv; | ||
61 | - | ||
62 | - FD_ZERO(&set); | ||
63 | - FD_SET(_fd, &set); | ||
64 | - rv = select(_fd+1 ,&set, NULL, NULL, &tv); | ||
65 | - if (rv > 0 && FD_ISSET(_fd, &set)) { | ||
66 | - if (_verbose) { | ||
67 | - fprintf(stderr, "write success\n"); | ||
68 | - } | ||
69 | } | ||
70 | - else if (rv == 0) { | ||
71 | - if (_verbose) { | ||
72 | - fprintf(stderr, "write failed on timeout with status\n"); | ||
73 | - } | ||
74 | - goto out; | ||
75 | - } | ||
76 | - else { //rv<0 | ||
77 | - if (_verbose) { | ||
78 | - fprintf(stderr, "write failed on select with status %d\n", rv); | ||
79 | - } | ||
80 | - goto out; | ||
81 | - } | ||
82 | - | ||
83 | - rv = return_length; | ||
84 | |||
85 | -out: | ||
86 | if (rv < 0) { | ||
87 | Deinit(); | ||
88 | } | ||
89 | -- | ||
90 | 2.7.4 | ||
91 | |||
diff --git a/common/recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch b/common/recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch deleted file mode 100644 index 04f584a..0000000 --- a/common/recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch +++ /dev/null | |||
@@ -1,2647 +0,0 @@ | |||
1 | Added Intel AMT ME real time notification infra to LMS. | ||
2 | |||
3 | Notification support now actively captures all the INTEL AMT ME events by plugging in to APF infra. | ||
4 | These events message are in the WsMan XML format. WsMan XML is parsed to get the AlertID and Message arguments. | ||
5 | A map is initialized initially by reading AMTAlerts.xml which provides alertid,messageArguements and verbose description. | ||
6 | From AlertID, verbose description is obtained and then using d-bus infra verbose description is notified to the user. | ||
7 | |||
8 | src/tools/utils.cpp Utils class provides static methods for string manipulation and desktop notification. | ||
9 | src/tools/miniXmlParser.cpp MiniXmlParser class provide methods for parsing the xmlBuffer, validation and retreving tag/value. | ||
10 | src/tools/httpParser.cpp HttpParser class provides method to parse http response buffer and populate header,body,headerfields properties. | ||
11 | src/alertDescription.cpp AlertDescription class parses AMTAlerts.xml like xml to populate map of alertId-Arguments and verbose desctiption. | ||
12 | src/alertIndication.cpp AlertIndication class provides binding to some xmlTags. It uses MiniXmlParse to parse xmlBuffer and provides access methods to some of the fields. | ||
13 | src/defaultAlerts.cpp provides default AlertID-Description paris. This is used in absence of AMTAlerts.xml. | ||
14 | src/notifyDesktop.sh is script which uses d-bus infra to pop up desktop notification. The following script can be modified based on device environment and libraries installed. | ||
15 | src/LMEConnection.cpp has modified the buffer 4x times because of the size of AMT ME Xml data. | ||
16 | src/Protocol.cpp [ _UNSHandler(char *data, int dataLength) ] has changes to recieve AMT ME event data, gracefully process the data and close the channel. | ||
17 | |||
18 | src/tools/miniXmlParser.cpp has derived work from http://info.meshcentral.com/downloads/MeshAgentFullSource.rar microstack. Author: Bryan Y Roe <bryan.y.roe@intel.com>/Intel Corporation. | ||
19 | |||
20 | Upstream-Status: Pending | ||
21 | |||
22 | Signed-off-by: AnandVastrad <anand.vastrad@intel.com> | ||
23 | --- | ||
24 | Makefile.in | 2 + | ||
25 | src/AMTAlerts.xml | 464 ++++++++++++++++++++++++++++++++++++++++++++ | ||
26 | src/LMEConnection.cpp | 2 +- | ||
27 | src/Makefile.am | 3 + | ||
28 | src/Makefile.in | 172 ++++++++++++++-- | ||
29 | src/Makefile.inc | 20 +- | ||
30 | src/Protocol.cpp | 191 +++++++++++++++--- | ||
31 | src/Protocol.h | 8 +- | ||
32 | src/alertDescription.cpp | 144 ++++++++++++++ | ||
33 | src/alertDescription.h | 45 +++++ | ||
34 | src/alertIndication.cpp | 90 +++++++++ | ||
35 | src/alertIndication.h | 54 ++++++ | ||
36 | src/defaultAlerts.h | 43 ++++ | ||
37 | src/notifyDesktop.sh | 10 + | ||
38 | src/tools/httpParser.cpp | 101 ++++++++++ | ||
39 | src/tools/httpParser.h | 49 +++++ | ||
40 | src/tools/miniXmlParser.cpp | 375 +++++++++++++++++++++++++++++++++++ | ||
41 | src/tools/miniXmlParser.h | 51 +++++ | ||
42 | src/tools/utils.cpp | 185 ++++++++++++++++++ | ||
43 | src/tools/utils.h | 57 ++++++ | ||
44 | src/tools/xmlNode.cpp | 45 +++++ | ||
45 | src/tools/xmlNode.h | 49 +++++ | ||
46 | 22 files changed, 2105 insertions(+), 55 deletions(-) | ||
47 | mode change 100755 => 100644 Makefile.in | ||
48 | create mode 100755 src/AMTAlerts.xml | ||
49 | mode change 100755 => 100644 src/Makefile.in | ||
50 | create mode 100644 src/alertDescription.cpp | ||
51 | create mode 100644 src/alertDescription.h | ||
52 | create mode 100644 src/alertIndication.cpp | ||
53 | create mode 100644 src/alertIndication.h | ||
54 | create mode 100644 src/defaultAlerts.h | ||
55 | create mode 100644 src/notifyDesktop.sh | ||
56 | create mode 100644 src/tools/httpParser.cpp | ||
57 | create mode 100644 src/tools/httpParser.h | ||
58 | create mode 100644 src/tools/miniXmlParser.cpp | ||
59 | create mode 100644 src/tools/miniXmlParser.h | ||
60 | create mode 100644 src/tools/utils.cpp | ||
61 | create mode 100644 src/tools/utils.h | ||
62 | create mode 100644 src/tools/xmlNode.cpp | ||
63 | create mode 100644 src/tools/xmlNode.h | ||
64 | |||
65 | diff --git a/Makefile.in b/Makefile.in | ||
66 | old mode 100755 | ||
67 | new mode 100644 | ||
68 | index f90be60..e1a248b | ||
69 | --- a/Makefile.in | ||
70 | +++ b/Makefile.in | ||
71 | @@ -133,6 +133,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
72 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
73 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
74 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
75 | +PACKAGE_URL = @PACKAGE_URL@ | ||
76 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
77 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
78 | RANLIB = @RANLIB@ | ||
79 | @@ -185,6 +186,7 @@ pdfdir = @pdfdir@ | ||
80 | prefix = @prefix@ | ||
81 | program_transform_name = @program_transform_name@ | ||
82 | psdir = @psdir@ | ||
83 | +runstatedir = @runstatedir@ | ||
84 | sbindir = @sbindir@ | ||
85 | sharedstatedir = @sharedstatedir@ | ||
86 | sysconfdir = @sysconfdir@ | ||
87 | diff --git a/src/AMTAlerts.xml b/src/AMTAlerts.xml | ||
88 | new file mode 100755 | ||
89 | index 0000000..ddb3383 | ||
90 | --- /dev/null | ||
91 | +++ b/src/AMTAlerts.xml | ||
92 | @@ -0,0 +1,464 @@ | ||
93 | +<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
94 | +<!-- Copyright (c) Intel Corporation, 2010 All Rights Reserved. --> | ||
95 | +<Alerts> | ||
96 | +<Alert> | ||
97 | +<Id>iAMT0001</Id> | ||
98 | +<Arg></Arg> | ||
99 | +<Message>System Defense Policy triggered.</Message> | ||
100 | +</Alert> | ||
101 | +<Alert> | ||
102 | +<Id>iAMT0002</Id> | ||
103 | +<Arg></Arg> | ||
104 | +<Message>Agent Presence Agent not started.</Message> | ||
105 | +</Alert> | ||
106 | +<Alert> | ||
107 | +<Id>iAMT0003</Id> | ||
108 | +<Arg></Arg> | ||
109 | +<Message>Agent Presence Agent stopped.</Message> | ||
110 | +</Alert> | ||
111 | +<Alert> | ||
112 | +<Id>iAMT0004</Id> | ||
113 | +<Arg></Arg> | ||
114 | +<Message>Agent Presence: running.</Message> | ||
115 | +</Alert> | ||
116 | +<Alert> | ||
117 | +<Id>iAMT0005</Id> | ||
118 | +<Arg></Arg> | ||
119 | +<Message>Agent Presence: expired.</Message> | ||
120 | +</Alert> | ||
121 | +<Alert> | ||
122 | +<Id>iAMT0006</Id> | ||
123 | +<Arg></Arg> | ||
124 | +<Message>Agent Presence: suspended.</Message> | ||
125 | +</Alert> | ||
126 | +<Alert> | ||
127 | +<Id>iAMT0007</Id> | ||
128 | +<Arg></Arg> | ||
129 | +<Message>Host software attempt to disable AMT Network link detected.</Message> | ||
130 | +</Alert> | ||
131 | +<Alert> | ||
132 | +<Id>iAMT0008</Id> | ||
133 | +<Arg></Arg> | ||
134 | +<Message>Host software attempt to disable AMT Network link detected -- Host Network link blocked.</Message> | ||
135 | +</Alert> | ||
136 | +<Alert> | ||
137 | +<Id>iAMT0009</Id> | ||
138 | +<Arg></Arg> | ||
139 | +<Message>AMT clock or FLASH wear-out protection disabled.</Message> | ||
140 | +</Alert> | ||
141 | +<Alert> | ||
142 | +<Id>iAMT0010</Id> | ||
143 | +<Arg></Arg> | ||
144 | +<Message>Intel(R) AMT Network Interface: Heuristics defense slow threshold trespassed.</Message> | ||
145 | +</Alert> | ||
146 | +<Alert> | ||
147 | +<Id>iAMT0011</Id> | ||
148 | +<Arg></Arg> | ||
149 | +<Message>Intel(R) AMT Network Interface: Heuristics defense fast threshold trespassed.</Message> | ||
150 | +</Alert> | ||
151 | +<Alert> | ||
152 | +<Id>iAMT0012</Id> | ||
153 | +<Arg></Arg> | ||
154 | +<Message>Intel(R) AMT Network Interface: Heuristics defense factory defined threshold trespassed.</Message> | ||
155 | +</Alert> | ||
156 | +<Alert> | ||
157 | +<Id>iAMT0013</Id> | ||
158 | +<Arg></Arg> | ||
159 | +<Message>Intel(R) AMT Network Interface: Heuristics defense Encounter timeout expired.</Message> | ||
160 | +</Alert> | ||
161 | +<Alert> | ||
162 | +<Id>iAMT0014</Id> | ||
163 | +<Arg></Arg> | ||
164 | +<Message>General certificate error.</Message> | ||
165 | +</Alert> | ||
166 | +<Alert> | ||
167 | +<Id>iAMT0015</Id> | ||
168 | +<Arg></Arg> | ||
169 | +<Message>Certificate expired.</Message> | ||
170 | +</Alert> | ||
171 | +<Alert> | ||
172 | +<Id>iAMT0016</Id> | ||
173 | +<Arg></Arg> | ||
174 | +<Message>No trusted root certificate.</Message> | ||
175 | +</Alert> | ||
176 | +<Alert> | ||
177 | +<Id>iAMT0017</Id> | ||
178 | +<Arg></Arg> | ||
179 | +<Message>Not configured to work with server certificate.</Message> | ||
180 | +</Alert> | ||
181 | +<Alert> | ||
182 | +<Id>iAMT0018</Id> | ||
183 | +<Arg></Arg> | ||
184 | +<Message>Certificate revoked.</Message> | ||
185 | +</Alert> | ||
186 | +<Alert> | ||
187 | +<Id>iAMT0019</Id> | ||
188 | +<Arg></Arg> | ||
189 | +<Message>RSA exponent too large.</Message> | ||
190 | +</Alert> | ||
191 | +<Alert> | ||
192 | +<Id>iAMT0020</Id> | ||
193 | +<Arg></Arg> | ||
194 | +<Message>RSA modulus too large.</Message> | ||
195 | +</Alert> | ||
196 | +<Alert> | ||
197 | +<Id>iAMT0021</Id> | ||
198 | +<Arg></Arg> | ||
199 | +<Message>Unsupported digest.</Message> | ||
200 | +</Alert> | ||
201 | +<Alert> | ||
202 | +<Id>iAMT0022</Id> | ||
203 | +<Arg></Arg> | ||
204 | +<Message>Distinguished name too long.</Message> | ||
205 | +</Alert> | ||
206 | +<Alert> | ||
207 | +<Id>iAMT0023</Id> | ||
208 | +<Arg></Arg> | ||
209 | +<Message>Key usage missing.</Message> | ||
210 | +</Alert> | ||
211 | +<Alert> | ||
212 | +<Id>iAMT0024</Id> | ||
213 | +<Arg></Arg> | ||
214 | +<Message>General SSL handshake error.</Message> | ||
215 | +</Alert> | ||
216 | +<Alert> | ||
217 | +<Id>iAMT0025</Id> | ||
218 | +<Arg></Arg> | ||
219 | +<Message>General 802.1x error.</Message> | ||
220 | +</Alert> | ||
221 | +<Alert> | ||
222 | +<Id>iAMT0026</Id> | ||
223 | +<Arg></Arg> | ||
224 | +<Message>AMT Diagnostic AlertEAC error - General NAC error.</Message> | ||
225 | +</Alert> | ||
226 | +<Alert> | ||
227 | +<Id>iAMT0027</Id> | ||
228 | +<Arg></Arg> | ||
229 | +<Message>AMT Diagnostic AlertEAC error - attempt to get a NAC posture while AMT NAC is disabled.</Message> | ||
230 | +</Alert> | ||
231 | +<Alert> | ||
232 | +<Id>iAMT0028</Id> | ||
233 | +<Arg></Arg> | ||
234 | +<Message>AMT Diagnostic AlertEAC error - attempt to get a posture of an unsupported type.</Message> | ||
235 | +</Alert> | ||
236 | +<Alert> | ||
237 | +<Id>iAMT0029</Id> | ||
238 | +<Arg></Arg> | ||
239 | +<Message>Audit log storage is 50% full.</Message> | ||
240 | +</Alert> | ||
241 | +<Alert> | ||
242 | +<Id>iAMT0030</Id> | ||
243 | +<Arg></Arg> | ||
244 | +<Message>Audit log storage is 75% full.</Message> | ||
245 | +</Alert> | ||
246 | +<Alert> | ||
247 | +<Id>iAMT0031</Id> | ||
248 | +<Arg></Arg> | ||
249 | +<Message>Audit log storage is 85% full.</Message> | ||
250 | +</Alert> | ||
251 | +<Alert> | ||
252 | +<Id>iAMT0032</Id> | ||
253 | +<Arg></Arg> | ||
254 | +<Message>Audit log storage is 95% full.</Message> | ||
255 | +</Alert> | ||
256 | +<Alert> | ||
257 | +<Id>iAMT0033</Id> | ||
258 | +<Arg></Arg> | ||
259 | +<Message>Audit log storage is full.</Message> | ||
260 | +</Alert> | ||
261 | +<Alert> | ||
262 | +<Id>iAMT0034</Id> | ||
263 | +<Arg></Arg> | ||
264 | +<Message>Firmware Update Event - Partial.</Message> | ||
265 | +</Alert> | ||
266 | +<Alert> | ||
267 | +<Id>iAMT0035</Id> | ||
268 | +<Arg></Arg> | ||
269 | +<Message>Firmware Update Event - Failure.</Message> | ||
270 | +</Alert> | ||
271 | +<Alert> | ||
272 | +<Id>iAMT0036</Id> | ||
273 | +<Arg></Arg> | ||
274 | +<Message>Remote connectivity initiated.</Message> | ||
275 | +</Alert> | ||
276 | +<Alert> | ||
277 | +<Id>iAMT0037</Id> | ||
278 | +<Arg></Arg> | ||
279 | +<Message>ME Presence event.</Message> | ||
280 | +</Alert> | ||
281 | +<Alert> | ||
282 | +<Id>iAMT0038</Id> | ||
283 | +<Arg>0</Arg> | ||
284 | +<Message>AMT is being unprovisioned using BIOS command.</Message> | ||
285 | +</Alert> | ||
286 | +<Alert> | ||
287 | +<Id>iAMT0038</Id> | ||
288 | +<Arg>1</Arg> | ||
289 | +<Message>AMT is being unprovisioned using Local MEI command.</Message> | ||
290 | +</Alert> | ||
291 | +<Alert> | ||
292 | +<Id>iAMT0038</Id> | ||
293 | +<Arg>2</Arg> | ||
294 | +<Message>AMT is being unprovisioned using Local WS-MAN/SOAP command.</Message> | ||
295 | +</Alert> | ||
296 | +<Alert> | ||
297 | +<Id>iAMT0038</Id> | ||
298 | +<Arg>3</Arg> | ||
299 | +<Message>AMT is being unprovisioned using Remote WS-MAN/SOAP command.</Message> | ||
300 | +</Alert> | ||
301 | +<Alert> | ||
302 | +<Id>iAMT0050</Id> | ||
303 | +<Arg></Arg> | ||
304 | +<Message>User Notification Alert - General Notification.</Message> | ||
305 | +</Alert> | ||
306 | +<Alert> | ||
307 | +<Id>iAMT0050</Id> | ||
308 | +<Arg>16</Arg> | ||
309 | +<Message>User Notification Alert - Circuit Breaker notification (CB Drop TX filter hit.).</Message> | ||
310 | +</Alert> | ||
311 | +<Alert> | ||
312 | +<Id>iAMT0050</Id> | ||
313 | +<Arg>17</Arg> | ||
314 | +<Message>User Notification Alert - Circuit Breaker notification (CB Rate Limit TX filter hit.).</Message> | ||
315 | +</Alert> | ||
316 | +<Alert> | ||
317 | +<Id>iAMT0050</Id> | ||
318 | +<Arg>18</Arg> | ||
319 | +<Message>User Notification Alert - Circuit Breaker notification (CB Drop RX filter hit.).</Message> | ||
320 | +</Alert> | ||
321 | +<Alert> | ||
322 | +<Id>iAMT0050</Id> | ||
323 | +<Arg>19</Arg> | ||
324 | +<Message>User Notification Alert - Circuit Breaker notification (CB Rate Limit RX filter hit.).</Message> | ||
325 | +</Alert> | ||
326 | +<Alert> | ||
327 | +<Id>iAMT0050</Id> | ||
328 | +<Arg>32</Arg> | ||
329 | +<Message>User Notification Alert - EAC notification.</Message> | ||
330 | +</Alert> | ||
331 | +<Alert> | ||
332 | +<Id>iAMT0050</Id> | ||
333 | +<Arg>48</Arg> | ||
334 | +<Message>User Notification Alert - Remote diagnostics - (Remote Redirection session started - SOL).</Message> | ||
335 | +</Alert> | ||
336 | +<Alert> | ||
337 | +<Id>iAMT0050</Id> | ||
338 | +<Arg>49</Arg> | ||
339 | +<Message>User Notification Alert - Remote diagnostics - (Remote Redirection session stopped - SOL).</Message> | ||
340 | +</Alert> | ||
341 | +<Alert> | ||
342 | +<Id>iAMT0050</Id> | ||
343 | +<Arg>50</Arg> | ||
344 | +<Message>User Notification Alert - Remote diagnostics. (Remote Redirection session started - IDE-R).</Message> | ||
345 | +</Alert> | ||
346 | +<Alert> | ||
347 | +<Id>iAMT0050</Id> | ||
348 | +<Arg>51</Arg> | ||
349 | +<Message>User Notification Alert - Remote diagnostics. (Remote Redirection session stopped - IDE-R).</Message> | ||
350 | +</Alert> | ||
351 | +<Alert> | ||
352 | +<Id>iAMT0050</Id> | ||
353 | +<Arg>66</Arg> | ||
354 | +<Message>User Notification Alert - WLAN notification (Host profile mismatch - Management Interface ignored).</Message> | ||
355 | +</Alert> | ||
356 | +<Alert> | ||
357 | +<Id>iAMT0050</Id> | ||
358 | +<Arg>67</Arg> | ||
359 | +<Message>User Notification Alert - WLAN notification (Management device overrides host radio).</Message> | ||
360 | +</Alert> | ||
361 | +<Alert> | ||
362 | +<Id>iAMT0050</Id> | ||
363 | +<Arg>68</Arg> | ||
364 | +<Message>User Notification Alert - WLAN notification (Host profile security mismatch).</Message> | ||
365 | +</Alert> | ||
366 | +<Alert> | ||
367 | +<Id>iAMT0050</Id> | ||
368 | +<Arg>69</Arg> | ||
369 | +<Message>User Notification Alert - WLAN notification (Management device relinquishes control over host Radio).</Message> | ||
370 | +</Alert> | ||
371 | +<Alert> | ||
372 | +<Id>iAMT0051</Id> | ||
373 | +<Arg></Arg> | ||
374 | +<Message>User Notification Alert - SecIo event.</Message> | ||
375 | +</Alert> | ||
376 | +<Alert> | ||
377 | +<Id>iAMT0051</Id> | ||
378 | +<Arg>0</Arg> | ||
379 | +<Message>User Notification Alert - SecIo event semaphore at host.</Message> | ||
380 | +</Alert> | ||
381 | +<Alert> | ||
382 | +<Id>iAMT0051</Id> | ||
383 | +<Arg>1</Arg> | ||
384 | +<Message>User Notification Alert - semaphore at ME.</Message> | ||
385 | +</Alert> | ||
386 | +<Alert> | ||
387 | +<Id>iAMT0051</Id> | ||
388 | +<Arg>2</Arg> | ||
389 | +<Message>User Notification Alert - SecIo event - semaphore timeout.</Message> | ||
390 | +</Alert> | ||
391 | +<Alert> | ||
392 | +<Id>iAMT0052</Id> | ||
393 | +<Arg></Arg> | ||
394 | +<Message>User Notification Alert - KVM session event.</Message> | ||
395 | +</Alert> | ||
396 | +<Alert> | ||
397 | +<Id>iAMT0052</Id> | ||
398 | +<Arg>0</Arg> | ||
399 | +<Message>User Notification Alert - KVM session requested.</Message> | ||
400 | +</Alert> | ||
401 | +<Alert> | ||
402 | +<Id>iAMT0052</Id> | ||
403 | +<Arg>1</Arg> | ||
404 | +<Message>User Notification Alert - KVM session started.</Message> | ||
405 | +</Alert> | ||
406 | +<Alert> | ||
407 | +<Id>iAMT0052</Id> | ||
408 | +<Arg>2</Arg> | ||
409 | +<Message>User Notification Alert - KVM session stopped.</Message> | ||
410 | +</Alert> | ||
411 | +<Alert> | ||
412 | +<Id>iAMT0053</Id> | ||
413 | +<Arg></Arg> | ||
414 | +<Message>User Notification Alert - RCS notification.</Message> | ||
415 | +</Alert> | ||
416 | +<Alert> | ||
417 | +<Id>iAMT0053</Id> | ||
418 | +<Arg>50</Arg> | ||
419 | +<Message>User Notification Alert - RCS notification (HW button pressed. Connection initiated automatically).</Message> | ||
420 | +</Alert> | ||
421 | +<Alert> | ||
422 | +<Id>iAMT0053</Id> | ||
423 | +<Arg>52</Arg> | ||
424 | +<Message>User Notification Alert - RCS notification (HW button pressed. Connection wasn't initiated automatically).</Message> | ||
425 | +</Alert> | ||
426 | +<Alert> | ||
427 | +<Id>iAMT0053</Id> | ||
428 | +<Arg>53</Arg> | ||
429 | +<Message>User Notification Alert - RCS notification (Contracts updated).</Message> | ||
430 | +</Alert> | ||
431 | +<Alert> | ||
432 | +<Id>iAMT0054</Id> | ||
433 | +<Arg></Arg> | ||
434 | +<Message>User Notification Alert - WLAN notification. Wireless Profile sync enablement state changed.</Message> | ||
435 | +</Alert> | ||
436 | +<Alert> | ||
437 | +<Id>iAMT0055</Id> | ||
438 | +<Arg></Arg> | ||
439 | +<Message>User Notification Alert - Provisioning state change notification.</Message> | ||
440 | +</Alert> | ||
441 | +<Alert> | ||
442 | +<Id>iAMT0055</Id> | ||
443 | +<Arg>0</Arg> | ||
444 | +<Message>User Notification Alert - Provisioning state change notification - Pre-configuration.</Message> | ||
445 | +</Alert> | ||
446 | +<Alert> | ||
447 | +<Id>iAMT0055</Id> | ||
448 | +<Arg>1</Arg> | ||
449 | +<Message>User Notification Alert - Provisioning state change notification - In configuration.</Message> | ||
450 | +</Alert> | ||
451 | +<Alert> | ||
452 | +<Id>iAMT0055</Id> | ||
453 | +<Arg>2</Arg> | ||
454 | +<Message>User Notification Alert - Provisioning state change notification - Post-configuration.</Message> | ||
455 | +</Alert> | ||
456 | +<Alert> | ||
457 | +<Id>iAMT0055</Id> | ||
458 | +<Arg>3</Arg> | ||
459 | +<Message>User Notification Alert - Provisioning state change notification - unprovision process has started.</Message> | ||
460 | +</Alert> | ||
461 | +<Alert> | ||
462 | +<Id>iAMT0056</Id> | ||
463 | +<Arg></Arg> | ||
464 | +<Message>User Notification Alert - System Defense change notification.</Message> | ||
465 | +</Alert> | ||
466 | +<Alert> | ||
467 | +<Id>iAMT0057</Id> | ||
468 | +<Arg></Arg> | ||
469 | +<Message>User Notification Alert - Network State change notification.</Message> | ||
470 | +</Alert> | ||
471 | +<Alert> | ||
472 | +<Id>iAMT0058</Id> | ||
473 | +<Arg></Arg> | ||
474 | +<Message>User Notification Alert - Remote Access change notification.</Message> | ||
475 | +</Alert> | ||
476 | +<Alert> | ||
477 | +<Id>iAMT0058</Id> | ||
478 | +<Arg>1</Arg> | ||
479 | +<Message>User Notification Alert - Remote Access change notification - tunnel is closed.</Message> | ||
480 | +</Alert> | ||
481 | +<Alert> | ||
482 | +<Id>iAMT0058</Id> | ||
483 | +<Arg>1</Arg> | ||
484 | +<Message>User Notification Alert - Remote Access change notification - tunnel is open.</Message> | ||
485 | +</Alert> | ||
486 | +<Alert> | ||
487 | +<Id>iAMT0059</Id> | ||
488 | +<Arg></Arg> | ||
489 | +<Message>User Notification Alert - KVM enabled event.</Message> | ||
490 | +</Alert> | ||
491 | +<Alert> | ||
492 | +<Id>iAMT0059</Id> | ||
493 | +<Arg>0</Arg> | ||
494 | +<Message>User Notification Alert - KVM enabled event - KVM disabled.</Message> | ||
495 | +</Alert> | ||
496 | +<Alert> | ||
497 | +<Id>iAMT0059</Id> | ||
498 | +<Arg>1</Arg> | ||
499 | +<Message>User Notification Alert - KVM enabled event - KVM enabled (both from MEBx and PTNI).</Message> | ||
500 | +</Alert> | ||
501 | +<Alert> | ||
502 | +<Id>iAMT0060</Id> | ||
503 | +<Arg></Arg> | ||
504 | +<Message>User Notification Alert - SecIO configuration event.</Message> | ||
505 | +</Alert> | ||
506 | +<Alert> | ||
507 | +<Id>iAMT0061</Id> | ||
508 | +<Arg></Arg> | ||
509 | +<Message>ME FW reset occurred.</Message> | ||
510 | +</Alert> | ||
511 | +<Alert> | ||
512 | +<Id>iAMT0062</Id> | ||
513 | +<Arg></Arg> | ||
514 | +<Message>User Notification Alert - IpSyncEnabled event.</Message> | ||
515 | +</Alert> | ||
516 | +<Alert> | ||
517 | +<Id>iAMT0062</Id> | ||
518 | +<Arg>0</Arg> | ||
519 | +<Message>User Notification Alert - IpSyncEnabled event - IpSync disabled.</Message> | ||
520 | +</Alert> | ||
521 | +<Alert> | ||
522 | +<Id>iAMT0062</Id> | ||
523 | +<Arg>1</Arg> | ||
524 | +<Message>User Notification Alert - IpSyncEnabled event - IpSync enabled.</Message> | ||
525 | +</Alert> | ||
526 | +<Alert> | ||
527 | +<Id>iAMT0063</Id> | ||
528 | +<Arg></Arg> | ||
529 | +<Message>User Notification Alert - HTTP Proxy sync enabled event.</Message> | ||
530 | +</Alert> | ||
531 | +<Alert> | ||
532 | +<Id>iAMT0063</Id> | ||
533 | +<Arg>0</Arg> | ||
534 | +<Message>User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync disabled.</Message> | ||
535 | +</Alert> | ||
536 | +<Alert> | ||
537 | +<Id>iAMT0063</Id> | ||
538 | +<Arg>1</Arg> | ||
539 | +<Message>User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync enabled.</Message> | ||
540 | +</Alert> | ||
541 | +<Alert> | ||
542 | +<Id>iAMT0064</Id> | ||
543 | +<Arg></Arg> | ||
544 | +<Message>User Notification Alert - User Consent event.</Message> | ||
545 | +</Alert> | ||
546 | +<Alert> | ||
547 | +<Id>iAMT0064</Id> | ||
548 | +<Arg>1</Arg> | ||
549 | +<Message>User Notification Alert - User Consent event - User Consent granted.</Message> | ||
550 | +</Alert> | ||
551 | +<Alert> | ||
552 | +<Id>iAMT0064</Id> | ||
553 | +<Arg>2</Arg> | ||
554 | +<Message>User Notification Alert - User Consent event - User Consent ended.</Message> | ||
555 | +</Alert> | ||
556 | +</Alerts> | ||
557 | diff --git a/src/LMEConnection.cpp b/src/LMEConnection.cpp | ||
558 | index f3e7a2b..d192626 100755 | ||
559 | --- a/src/LMEConnection.cpp | ||
560 | +++ b/src/LMEConnection.cpp | ||
561 | @@ -48,7 +48,7 @@ extern glue plugin; | ||
562 | |||
563 | const GUID LMEConnection::_guid = {0x6733a4db, 0x0476, 0x4e7b, {0xb3, 0xaf, 0xbc, 0xfc, 0x29, 0xbe, 0xe7, 0xa7}}; | ||
564 | |||
565 | -const UINT32 LMEConnection::RX_WINDOW_SIZE = 1024; | ||
566 | +const UINT32 LMEConnection::RX_WINDOW_SIZE = 4096; | ||
567 | |||
568 | LMEConnection::LMEConnection(bool verbose) : | ||
569 | _reqID(0), | ||
570 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
571 | index 42d9f47..364427b 100755 | ||
572 | --- a/src/Makefile.am | ||
573 | +++ b/src/Makefile.am | ||
574 | @@ -1,4 +1,7 @@ | ||
575 | sbin_PROGRAMS=lms | ||
576 | +dist_bin_SCRIPTS=notifyDesktop.sh | ||
577 | +xml_dir=$(datadir)/xml | ||
578 | +xml__DATA=AMTAlerts.xml | ||
579 | |||
580 | SYNCLIB_SRCDIR=SyncLib/src | ||
581 | SYNCLIB_HDRDIR=SyncLib/Include | ||
582 | diff --git a/src/Makefile.in b/src/Makefile.in | ||
583 | old mode 100755 | ||
584 | new mode 100644 | ||
585 | index c6fe1ba..7b6cafd | ||
586 | --- a/src/Makefile.in | ||
587 | +++ b/src/Makefile.in | ||
588 | @@ -14,6 +14,8 @@ | ||
589 | |||
590 | @SET_MAKE@ | ||
591 | |||
592 | + | ||
593 | + | ||
594 | srcdir = @srcdir@ | ||
595 | top_srcdir = @top_srcdir@ | ||
596 | VPATH = @srcdir@ | ||
597 | @@ -37,9 +39,9 @@ POST_UNINSTALL = : | ||
598 | build_triplet = @build@ | ||
599 | host_triplet = @host@ | ||
600 | sbin_PROGRAMS = lms$(EXEEXT) | ||
601 | -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ | ||
602 | - $(srcdir)/Makefile.inc $(srcdir)/iatshareddata.h.in \ | ||
603 | - $(srcdir)/plugin.h.in | ||
604 | +DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \ | ||
605 | + $(srcdir)/Makefile.in $(srcdir)/Makefile.inc \ | ||
606 | + $(srcdir)/iatshareddata.h.in $(srcdir)/plugin.h.in | ||
607 | subdir = src | ||
608 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
609 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac | ||
610 | @@ -48,14 +50,17 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
611 | mkinstalldirs = $(install_sh) -d | ||
612 | CONFIG_HEADER = $(top_builddir)/config.h | ||
613 | CONFIG_CLEAN_FILES = plugin.h iatshareddata.h | ||
614 | -am__installdirs = "$(DESTDIR)$(sbindir)" | ||
615 | +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" \ | ||
616 | + "$(DESTDIR)$(xml_dir)" | ||
617 | sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) | ||
618 | PROGRAMS = $(sbin_PROGRAMS) | ||
619 | am__objects_1 = main.$(OBJEXT) LMEConnection.$(OBJEXT) \ | ||
620 | ConfigConnection.$(OBJEXT) Protocol.$(OBJEXT) glue.$(OBJEXT) \ | ||
621 | - ChannelGenerator.$(OBJEXT) | ||
622 | + ChannelGenerator.$(OBJEXT) alertIndication.$(OBJEXT) \ | ||
623 | + alertDescription.$(OBJEXT) | ||
624 | am__objects_2 = ATVersion.$(OBJEXT) ATNetworkTool.$(OBJEXT) \ | ||
625 | - daemonize.$(OBJEXT) | ||
626 | + daemonize.$(OBJEXT) utils.$(OBJEXT) miniXmlParser.$(OBJEXT) \ | ||
627 | + xmlNode.$(OBJEXT) httpParser.$(OBJEXT) | ||
628 | am__objects_3 = MEILinux.$(OBJEXT) MNGCommand.$(OBJEXT) \ | ||
629 | FWULCommand.$(OBJEXT) PTHICommand.$(OBJEXT) | ||
630 | am__objects_4 = EventLinux.$(OBJEXT) SemaphoreLinux.$(OBJEXT) \ | ||
631 | @@ -68,6 +73,8 @@ am__objects_7 = $(am__objects_6) $(am__objects_6) $(am__objects_6) \ | ||
632 | am_lms_OBJECTS = $(am__objects_5) $(am__objects_7) | ||
633 | lms_OBJECTS = $(am_lms_OBJECTS) | ||
634 | lms_LDADD = $(LDADD) | ||
635 | +dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT) | ||
636 | +SCRIPTS = $(dist_bin_SCRIPTS) | ||
637 | DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) | ||
638 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
639 | am__depfiles_maybe = depfiles | ||
640 | @@ -89,6 +96,14 @@ LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
641 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
642 | SOURCES = $(lms_SOURCES) | ||
643 | DIST_SOURCES = $(lms_SOURCES) | ||
644 | +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
645 | +am__vpath_adj = case $$p in \ | ||
646 | + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
647 | + *) f=$$p;; \ | ||
648 | + esac; | ||
649 | +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | ||
650 | +xml_DATA_INSTALL = $(INSTALL_DATA) | ||
651 | +DATA = $(xml__DATA) | ||
652 | ETAGS = etags | ||
653 | CTAGS = ctags | ||
654 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
655 | @@ -150,6 +165,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
656 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
657 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
658 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
659 | +PACKAGE_URL = @PACKAGE_URL@ | ||
660 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
661 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
662 | RANLIB = @RANLIB@ | ||
663 | @@ -202,10 +218,14 @@ pdfdir = @pdfdir@ | ||
664 | prefix = @prefix@ | ||
665 | program_transform_name = @program_transform_name@ | ||
666 | psdir = @psdir@ | ||
667 | +runstatedir = @runstatedir@ | ||
668 | sbindir = @sbindir@ | ||
669 | sharedstatedir = @sharedstatedir@ | ||
670 | sysconfdir = @sysconfdir@ | ||
671 | target_alias = @target_alias@ | ||
672 | +dist_bin_SCRIPTS = notifyDesktop.sh | ||
673 | +xml_dir = $(datadir)/xml | ||
674 | +xml__DATA = AMTAlerts.xml | ||
675 | SYNCLIB_SRCDIR = SyncLib/src | ||
676 | SYNCLIB_HDRDIR = SyncLib/Include | ||
677 | MEI_DIR = mei | ||
678 | @@ -238,11 +258,19 @@ $(MEI_DIR)/PTHICommand.cpp | ||
679 | |||
680 | TOOLS_HDRS = $(TOOLS_DIR)/ATVersion.h \ | ||
681 | $(TOOLS_DIR)/ATNetworkTool.h \ | ||
682 | -$(TOOLS_DIR)/daemonize.h | ||
683 | +$(TOOLS_DIR)/daemonize.h \ | ||
684 | +$(TOOLS_DIR)/utils.h \ | ||
685 | +$(TOOLS_DIR)/miniXmlParser.h \ | ||
686 | +$(TOOLS_DIR)/xmlNode.h \ | ||
687 | +$(TOOLS_DIR)/httpParser.h | ||
688 | |||
689 | TOOLS_SRCS = $(TOOLS_DIR)/ATVersion.cpp \ | ||
690 | $(TOOLS_DIR)/ATNetworkTool.cpp \ | ||
691 | -$(TOOLS_DIR)/daemonize.cpp | ||
692 | +$(TOOLS_DIR)/daemonize.cpp \ | ||
693 | +$(TOOLS_DIR)/utils.cpp \ | ||
694 | +$(TOOLS_DIR)/miniXmlParser.cpp \ | ||
695 | +$(TOOLS_DIR)/xmlNode.cpp \ | ||
696 | +$(TOOLS_DIR)/httpParser.cpp | ||
697 | |||
698 | MAIN_HDRS = types.h \ | ||
699 | Channel.h \ | ||
700 | @@ -254,14 +282,18 @@ ConfigConnection.h \ | ||
701 | Protocol.h \ | ||
702 | glue.h \ | ||
703 | version.h \ | ||
704 | -ChannelGenerator.h | ||
705 | +ChannelGenerator.h \ | ||
706 | +alertIndication.h \ | ||
707 | +alertDescription.h | ||
708 | |||
709 | MAIN_SRCS = main.cpp \ | ||
710 | LMEConnection.cpp \ | ||
711 | ConfigConnection.cpp \ | ||
712 | Protocol.cpp \ | ||
713 | glue.cpp \ | ||
714 | -ChannelGenerator.cpp | ||
715 | +ChannelGenerator.cpp \ | ||
716 | +alertIndication.cpp \ | ||
717 | +alertDescription.cpp | ||
718 | |||
719 | SRCS = $(MAIN_SRCS) \ | ||
720 | $(TOOLS_SRCS) \ | ||
721 | @@ -342,6 +374,25 @@ clean-sbinPROGRAMS: | ||
722 | lms$(EXEEXT): $(lms_OBJECTS) $(lms_DEPENDENCIES) | ||
723 | @rm -f lms$(EXEEXT) | ||
724 | $(CXXLINK) $(lms_LDFLAGS) $(lms_OBJECTS) $(lms_LDADD) $(LIBS) | ||
725 | +install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) | ||
726 | + @$(NORMAL_INSTALL) | ||
727 | + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" | ||
728 | + @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ | ||
729 | + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
730 | + if test -f $$d$$p; then \ | ||
731 | + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ | ||
732 | + echo " $(dist_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ | ||
733 | + $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ | ||
734 | + else :; fi; \ | ||
735 | + done | ||
736 | + | ||
737 | +uninstall-dist_binSCRIPTS: | ||
738 | + @$(NORMAL_UNINSTALL) | ||
739 | + @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ | ||
740 | + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ | ||
741 | + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ | ||
742 | + rm -f "$(DESTDIR)$(bindir)/$$f"; \ | ||
743 | + done | ||
744 | |||
745 | mostlyclean-compile: | ||
746 | -rm -f *.$(OBJEXT) | ||
747 | @@ -355,17 +406,23 @@ distclean-compile: | ||
748 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConfigConnection.Po@am__quote@ | ||
749 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EventLinux.Po@am__quote@ | ||
750 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FWULCommand.Po@am__quote@ | ||
751 | -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MEILinux.Po@am__quote@ | ||
752 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LMEConnection.Po@am__quote@ | ||
753 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MEILinux.Po@am__quote@ | ||
754 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MNGCommand.Po@am__quote@ | ||
755 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PTHICommand.Po@am__quote@ | ||
756 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Protocol.Po@am__quote@ | ||
757 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RWLock.Po@am__quote@ | ||
758 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SemaphoreLinux.Po@am__quote@ | ||
759 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThreadLinux.Po@am__quote@ | ||
760 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alertDescription.Po@am__quote@ | ||
761 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alertIndication.Po@am__quote@ | ||
762 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daemonize.Po@am__quote@ | ||
763 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glue.Po@am__quote@ | ||
764 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpParser.Po@am__quote@ | ||
765 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ | ||
766 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miniXmlParser.Po@am__quote@ | ||
767 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ | ||
768 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlNode.Po@am__quote@ | ||
769 | |||
770 | .cpp.o: | ||
771 | @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ | ||
772 | @@ -430,6 +487,62 @@ daemonize.obj: $(TOOLS_DIR)/daemonize.cpp | ||
773 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
774 | @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o daemonize.obj `if test -f '$(TOOLS_DIR)/daemonize.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/daemonize.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/daemonize.cpp'; fi` | ||
775 | |||
776 | +utils.o: $(TOOLS_DIR)/utils.cpp | ||
777 | +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils.o -MD -MP -MF "$(DEPDIR)/utils.Tpo" -c -o utils.o `test -f '$(TOOLS_DIR)/utils.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/utils.cpp; \ | ||
778 | +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/utils.Tpo" "$(DEPDIR)/utils.Po"; else rm -f "$(DEPDIR)/utils.Tpo"; exit 1; fi | ||
779 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/utils.cpp' object='utils.o' libtool=no @AMDEPBACKSLASH@ | ||
780 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
781 | +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils.o `test -f '$(TOOLS_DIR)/utils.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/utils.cpp | ||
782 | + | ||
783 | +utils.obj: $(TOOLS_DIR)/utils.cpp | ||
784 | +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils.obj -MD -MP -MF "$(DEPDIR)/utils.Tpo" -c -o utils.obj `if test -f '$(TOOLS_DIR)/utils.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/utils.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/utils.cpp'; fi`; \ | ||
785 | +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/utils.Tpo" "$(DEPDIR)/utils.Po"; else rm -f "$(DEPDIR)/utils.Tpo"; exit 1; fi | ||
786 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/utils.cpp' object='utils.obj' libtool=no @AMDEPBACKSLASH@ | ||
787 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
788 | +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils.obj `if test -f '$(TOOLS_DIR)/utils.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/utils.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/utils.cpp'; fi` | ||
789 | + | ||
790 | +miniXmlParser.o: $(TOOLS_DIR)/miniXmlParser.cpp | ||
791 | +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT miniXmlParser.o -MD -MP -MF "$(DEPDIR)/miniXmlParser.Tpo" -c -o miniXmlParser.o `test -f '$(TOOLS_DIR)/miniXmlParser.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/miniXmlParser.cpp; \ | ||
792 | +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/miniXmlParser.Tpo" "$(DEPDIR)/miniXmlParser.Po"; else rm -f "$(DEPDIR)/miniXmlParser.Tpo"; exit 1; fi | ||
793 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/miniXmlParser.cpp' object='miniXmlParser.o' libtool=no @AMDEPBACKSLASH@ | ||
794 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
795 | +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o miniXmlParser.o `test -f '$(TOOLS_DIR)/miniXmlParser.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/miniXmlParser.cpp | ||
796 | + | ||
797 | +miniXmlParser.obj: $(TOOLS_DIR)/miniXmlParser.cpp | ||
798 | +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT miniXmlParser.obj -MD -MP -MF "$(DEPDIR)/miniXmlParser.Tpo" -c -o miniXmlParser.obj `if test -f '$(TOOLS_DIR)/miniXmlParser.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/miniXmlParser.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/miniXmlParser.cpp'; fi`; \ | ||
799 | +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/miniXmlParser.Tpo" "$(DEPDIR)/miniXmlParser.Po"; else rm -f "$(DEPDIR)/miniXmlParser.Tpo"; exit 1; fi | ||
800 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/miniXmlParser.cpp' object='miniXmlParser.obj' libtool=no @AMDEPBACKSLASH@ | ||
801 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
802 | +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o miniXmlParser.obj `if test -f '$(TOOLS_DIR)/miniXmlParser.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/miniXmlParser.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/miniXmlParser.cpp'; fi` | ||
803 | + | ||
804 | +xmlNode.o: $(TOOLS_DIR)/xmlNode.cpp | ||
805 | +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT xmlNode.o -MD -MP -MF "$(DEPDIR)/xmlNode.Tpo" -c -o xmlNode.o `test -f '$(TOOLS_DIR)/xmlNode.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/xmlNode.cpp; \ | ||
806 | +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/xmlNode.Tpo" "$(DEPDIR)/xmlNode.Po"; else rm -f "$(DEPDIR)/xmlNode.Tpo"; exit 1; fi | ||
807 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/xmlNode.cpp' object='xmlNode.o' libtool=no @AMDEPBACKSLASH@ | ||
808 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
809 | +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o xmlNode.o `test -f '$(TOOLS_DIR)/xmlNode.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/xmlNode.cpp | ||
810 | + | ||
811 | +xmlNode.obj: $(TOOLS_DIR)/xmlNode.cpp | ||
812 | +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT xmlNode.obj -MD -MP -MF "$(DEPDIR)/xmlNode.Tpo" -c -o xmlNode.obj `if test -f '$(TOOLS_DIR)/xmlNode.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/xmlNode.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/xmlNode.cpp'; fi`; \ | ||
813 | +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/xmlNode.Tpo" "$(DEPDIR)/xmlNode.Po"; else rm -f "$(DEPDIR)/xmlNode.Tpo"; exit 1; fi | ||
814 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/xmlNode.cpp' object='xmlNode.obj' libtool=no @AMDEPBACKSLASH@ | ||
815 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
816 | +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o xmlNode.obj `if test -f '$(TOOLS_DIR)/xmlNode.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/xmlNode.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/xmlNode.cpp'; fi` | ||
817 | + | ||
818 | +httpParser.o: $(TOOLS_DIR)/httpParser.cpp | ||
819 | +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT httpParser.o -MD -MP -MF "$(DEPDIR)/httpParser.Tpo" -c -o httpParser.o `test -f '$(TOOLS_DIR)/httpParser.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/httpParser.cpp; \ | ||
820 | +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/httpParser.Tpo" "$(DEPDIR)/httpParser.Po"; else rm -f "$(DEPDIR)/httpParser.Tpo"; exit 1; fi | ||
821 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/httpParser.cpp' object='httpParser.o' libtool=no @AMDEPBACKSLASH@ | ||
822 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
823 | +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o httpParser.o `test -f '$(TOOLS_DIR)/httpParser.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/httpParser.cpp | ||
824 | + | ||
825 | +httpParser.obj: $(TOOLS_DIR)/httpParser.cpp | ||
826 | +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT httpParser.obj -MD -MP -MF "$(DEPDIR)/httpParser.Tpo" -c -o httpParser.obj `if test -f '$(TOOLS_DIR)/httpParser.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/httpParser.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/httpParser.cpp'; fi`; \ | ||
827 | +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/httpParser.Tpo" "$(DEPDIR)/httpParser.Po"; else rm -f "$(DEPDIR)/httpParser.Tpo"; exit 1; fi | ||
828 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/httpParser.cpp' object='httpParser.obj' libtool=no @AMDEPBACKSLASH@ | ||
829 | +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
830 | +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o httpParser.obj `if test -f '$(TOOLS_DIR)/httpParser.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/httpParser.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/httpParser.cpp'; fi` | ||
831 | + | ||
832 | MEILinux.o: $(MEI_DIR)/MEILinux.cpp | ||
833 | @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MEILinux.o -MD -MP -MF "$(DEPDIR)/MEILinux.Tpo" -c -o MEILinux.o `test -f '$(MEI_DIR)/MEILinux.cpp' || echo '$(srcdir)/'`$(MEI_DIR)/MEILinux.cpp; \ | ||
834 | @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/MEILinux.Tpo" "$(DEPDIR)/MEILinux.Po"; else rm -f "$(DEPDIR)/MEILinux.Tpo"; exit 1; fi | ||
835 | @@ -551,6 +664,23 @@ clean-libtool: | ||
836 | distclean-libtool: | ||
837 | -rm -f libtool | ||
838 | uninstall-info-am: | ||
839 | +install-xml_DATA: $(xml__DATA) | ||
840 | + @$(NORMAL_INSTALL) | ||
841 | + test -z "$(xml_dir)" || $(mkdir_p) "$(DESTDIR)$(xml_dir)" | ||
842 | + @list='$(xml__DATA)'; for p in $$list; do \ | ||
843 | + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
844 | + f=$(am__strip_dir) \ | ||
845 | + echo " $(xml_DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(xml_dir)/$$f'"; \ | ||
846 | + $(xml_DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(xml_dir)/$$f"; \ | ||
847 | + done | ||
848 | + | ||
849 | +uninstall-xml_DATA: | ||
850 | + @$(NORMAL_UNINSTALL) | ||
851 | + @list='$(xml__DATA)'; for p in $$list; do \ | ||
852 | + f=$(am__strip_dir) \ | ||
853 | + echo " rm -f '$(DESTDIR)$(xml_dir)/$$f'"; \ | ||
854 | + rm -f "$(DESTDIR)$(xml_dir)/$$f"; \ | ||
855 | + done | ||
856 | |||
857 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
858 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
859 | @@ -629,9 +759,9 @@ distdir: $(DISTFILES) | ||
860 | done | ||
861 | check-am: all-am | ||
862 | check: check-am | ||
863 | -all-am: Makefile $(PROGRAMS) | ||
864 | +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) | ||
865 | installdirs: | ||
866 | - for dir in "$(DESTDIR)$(sbindir)"; do \ | ||
867 | + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(xml_dir)"; do \ | ||
868 | test -z "$$dir" || $(mkdir_p) "$$dir"; \ | ||
869 | done | ||
870 | install: install-am | ||
871 | @@ -679,11 +809,11 @@ info: info-am | ||
872 | |||
873 | info-am: | ||
874 | |||
875 | -install-data-am: | ||
876 | +install-data-am: install-xml_DATA | ||
877 | @$(NORMAL_INSTALL) | ||
878 | $(MAKE) $(AM_MAKEFLAGS) install-data-hook | ||
879 | |||
880 | -install-exec-am: install-sbinPROGRAMS | ||
881 | +install-exec-am: install-dist_binSCRIPTS install-sbinPROGRAMS | ||
882 | |||
883 | install-info: install-info-am | ||
884 | |||
885 | @@ -709,20 +839,22 @@ ps: ps-am | ||
886 | |||
887 | ps-am: | ||
888 | |||
889 | -uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS | ||
890 | +uninstall-am: uninstall-dist_binSCRIPTS uninstall-info-am \ | ||
891 | + uninstall-sbinPROGRAMS uninstall-xml_DATA | ||
892 | |||
893 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
894 | clean-libtool clean-sbinPROGRAMS ctags distclean \ | ||
895 | distclean-compile distclean-generic distclean-libtool \ | ||
896 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
897 | install install-am install-data install-data-am \ | ||
898 | - install-data-hook install-exec install-exec-am install-info \ | ||
899 | - install-info-am install-man install-sbinPROGRAMS install-strip \ | ||
900 | + install-data-hook install-dist_binSCRIPTS install-exec \ | ||
901 | + install-exec-am install-info install-info-am install-man \ | ||
902 | + install-sbinPROGRAMS install-strip install-xml_DATA \ | ||
903 | installcheck installcheck-am installdirs maintainer-clean \ | ||
904 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
905 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
906 | - tags uninstall uninstall-am uninstall-info-am \ | ||
907 | - uninstall-sbinPROGRAMS | ||
908 | + tags uninstall uninstall-am uninstall-dist_binSCRIPTS \ | ||
909 | + uninstall-info-am uninstall-sbinPROGRAMS uninstall-xml_DATA | ||
910 | |||
911 | |||
912 | install-data-hook: | ||
913 | diff --git a/src/Makefile.inc b/src/Makefile.inc | ||
914 | index 079503c..8d7e7ab 100755 | ||
915 | --- a/src/Makefile.inc | ||
916 | +++ b/src/Makefile.inc | ||
917 | @@ -26,11 +26,19 @@ $(MEI_DIR)/PTHICommand.cpp | ||
918 | |||
919 | TOOLS_HDRS=$(TOOLS_DIR)/ATVersion.h \ | ||
920 | $(TOOLS_DIR)/ATNetworkTool.h \ | ||
921 | -$(TOOLS_DIR)/daemonize.h | ||
922 | +$(TOOLS_DIR)/daemonize.h \ | ||
923 | +$(TOOLS_DIR)/utils.h \ | ||
924 | +$(TOOLS_DIR)/miniXmlParser.h \ | ||
925 | +$(TOOLS_DIR)/xmlNode.h \ | ||
926 | +$(TOOLS_DIR)/httpParser.h | ||
927 | |||
928 | TOOLS_SRCS=$(TOOLS_DIR)/ATVersion.cpp \ | ||
929 | $(TOOLS_DIR)/ATNetworkTool.cpp \ | ||
930 | -$(TOOLS_DIR)/daemonize.cpp | ||
931 | +$(TOOLS_DIR)/daemonize.cpp \ | ||
932 | +$(TOOLS_DIR)/utils.cpp \ | ||
933 | +$(TOOLS_DIR)/miniXmlParser.cpp \ | ||
934 | +$(TOOLS_DIR)/xmlNode.cpp \ | ||
935 | +$(TOOLS_DIR)/httpParser.cpp | ||
936 | |||
937 | MAIN_HDRS=types.h \ | ||
938 | Channel.h \ | ||
939 | @@ -42,14 +50,18 @@ ConfigConnection.h \ | ||
940 | Protocol.h \ | ||
941 | glue.h \ | ||
942 | version.h \ | ||
943 | -ChannelGenerator.h | ||
944 | +ChannelGenerator.h \ | ||
945 | +alertIndication.h \ | ||
946 | +alertDescription.h | ||
947 | |||
948 | MAIN_SRCS=main.cpp \ | ||
949 | LMEConnection.cpp \ | ||
950 | ConfigConnection.cpp \ | ||
951 | Protocol.cpp \ | ||
952 | glue.cpp \ | ||
953 | -ChannelGenerator.cpp | ||
954 | +ChannelGenerator.cpp \ | ||
955 | +alertIndication.cpp \ | ||
956 | +alertDescription.cpp | ||
957 | |||
958 | SRCS=$(MAIN_SRCS) \ | ||
959 | $(TOOLS_SRCS) \ | ||
960 | diff --git a/src/Protocol.cpp b/src/Protocol.cpp | ||
961 | index 3a4a9bb..c3de5cc 100755 | ||
962 | --- a/src/Protocol.cpp | ||
963 | +++ b/src/Protocol.cpp | ||
964 | @@ -28,6 +28,7 @@ | ||
965 | * POSSIBILITY OF SUCH DAMAGE. | ||
966 | *******************************************************************************/ | ||
967 | |||
968 | + | ||
969 | #ifdef HAVE_CONFIG_H | ||
970 | #include "config.h" | ||
971 | #endif | ||
972 | @@ -42,7 +43,8 @@ | ||
973 | #include <fcntl.h> | ||
974 | #include <netdb.h> | ||
975 | #include <syslog.h> | ||
976 | -#include "strings.h" | ||
977 | +#include <vector> | ||
978 | +#include <string.h> | ||
979 | |||
980 | #define _stprintf_s snprintf | ||
981 | #define strnicmp strncasecmp | ||
982 | @@ -53,6 +55,11 @@ | ||
983 | #include "LMS_if.h" | ||
984 | #include "Lock.h" | ||
985 | #include "ATNetworkTool.h" | ||
986 | +#include "utils.h" | ||
987 | +#include "httpParser.h" | ||
988 | +#include "miniXmlParser.h" | ||
989 | +#include "alertIndication.h" | ||
990 | +#include "alertDescription.h" | ||
991 | |||
992 | |||
993 | const LMEProtocolVersionMessage Protocol::MIN_PROT_VERSION(1, 0); | ||
994 | @@ -99,9 +106,9 @@ bool Protocol::Init(EventLogCallback cb, void *param) | ||
995 | PRINT("Protocol::Init started\n"); | ||
996 | _eventLog = cb; | ||
997 | _eventLogParam = param; | ||
998 | + _UNSSenderChannel = INVALID_CHANNEL; | ||
999 | |||
1000 | DeinitFull(); | ||
1001 | - | ||
1002 | { | ||
1003 | Lock dl(_deinitLock); | ||
1004 | _deinitReq = false; | ||
1005 | @@ -1170,10 +1177,112 @@ void Protocol::_removeFromMaps(Channel *c) | ||
1006 | _channelToSocket.erase(c->GetSenderChannel()); | ||
1007 | _socketToChannel.erase(s); | ||
1008 | } | ||
1009 | -void Protocol::_UNSConnection() | ||
1010 | + | ||
1011 | +std::string Protocol::_PACKET_BODY_LENGTH="Content-Length"; | ||
1012 | +std::string Protocol::_NOTIFICATION_HEADER="Intel Management Engine Notification"; | ||
1013 | +int Protocol::_UNSHandler(char *data, int dataLength) | ||
1014 | { | ||
1015 | - PRINT("UNS event\n"); | ||
1016 | + PRINT("UNS event data\n"); | ||
1017 | + char *pBuffer = NULL; | ||
1018 | + static char *sBuffer = NULL; | ||
1019 | + static int sBufferLength = 0; | ||
1020 | + int rc = -1; | ||
1021 | + unsigned int packetBodyLength = 0; | ||
1022 | + HttpParser httpParser; | ||
1023 | + std::string httpBody; | ||
1024 | + AlertIndication alertIndication; | ||
1025 | + | ||
1026 | + //printf("Processing notification message %d\n", newNotification); | ||
1027 | + | ||
1028 | + //Init if new notification. Append recieved notification bytes to existing buffer otherwise. | ||
1029 | + if (_newNotification == true) | ||
1030 | + { if (sBuffer != NULL) { | ||
1031 | + delete []sBuffer; | ||
1032 | + } | ||
1033 | + sBuffer = NULL; | ||
1034 | + sBufferLength = 0; | ||
1035 | + } | ||
1036 | + | ||
1037 | + if (sBuffer == NULL) { | ||
1038 | + sBufferLength = 0; | ||
1039 | + sBuffer = new char[(dataLength+1) *sizeof(char)]; | ||
1040 | + memcpy(sBuffer, data, dataLength); | ||
1041 | + } else { | ||
1042 | + pBuffer = new char[(sBufferLength + dataLength + 1)*sizeof(char)]; | ||
1043 | + memcpy(pBuffer, sBuffer, sBufferLength); | ||
1044 | + memcpy(pBuffer+sBufferLength, data, dataLength); | ||
1045 | + delete []sBuffer; | ||
1046 | + sBuffer = pBuffer; | ||
1047 | + } | ||
1048 | + | ||
1049 | + sBufferLength += dataLength; | ||
1050 | + sBuffer[sBufferLength] = '\0'; | ||
1051 | + | ||
1052 | + do { | ||
1053 | + | ||
1054 | + if (httpParser.parse(sBuffer) != 0) { | ||
1055 | + break; | ||
1056 | + } | ||
1057 | + | ||
1058 | + if (httpParser.getHeaderField(_PACKET_BODY_LENGTH).empty()) { | ||
1059 | + break; | ||
1060 | + } | ||
1061 | + | ||
1062 | + packetBodyLength = stoi(httpParser.getHeaderField(_PACKET_BODY_LENGTH)); | ||
1063 | + | ||
1064 | + if (packetBodyLength == 0) { | ||
1065 | + break; | ||
1066 | + } | ||
1067 | + | ||
1068 | + httpBody = httpParser.getBody(); | ||
1069 | + if (httpBody.size() < packetBodyLength) { | ||
1070 | + break; | ||
1071 | + } | ||
1072 | + | ||
1073 | + if (alertIndication.initFromXml((char*)httpBody.c_str(), httpBody.size())) { | ||
1074 | + break; | ||
1075 | + } | ||
1076 | + | ||
1077 | + std::string alertIDString(alertIndication.getMessageID().data, alertIndication.getMessageID().dataLength); | ||
1078 | + if (alertIDString.empty()) { | ||
1079 | + break; | ||
1080 | + } | ||
1081 | + | ||
1082 | + /*Check if we have match only with ID, if fails then use MessageArguments and checkagain */ | ||
1083 | + std::string alertDescription; | ||
1084 | + std::string _alertDescription; | ||
1085 | + std::string notificationBody; | ||
1086 | + std::string messageArguments; | ||
1087 | + alertDescription = AlertDescription::getAlertDescription(alertIDString); | ||
1088 | + messageArguments = std::string(alertIndication.getMessageArguments().data, alertIndication.getMessageArguments().dataLength); | ||
1089 | + | ||
1090 | + if (alertDescription.empty()) { | ||
1091 | + alertIDString += "-" + messageArguments; | ||
1092 | + alertDescription = AlertDescription::getAlertDescription(alertIDString); | ||
1093 | + } else { | ||
1094 | + _alertDescription = messageArguments; | ||
1095 | + } | ||
1096 | + | ||
1097 | + notificationBody = std::string(alertIndication.getIndicationTime().data, alertIndication.getIndicationTime().dataLength); | ||
1098 | + if (alertDescription.empty()) { | ||
1099 | + notificationBody += " " + alertIDString; | ||
1100 | + } else { | ||
1101 | + if (_alertDescription.empty()) { | ||
1102 | + notificationBody += " " + alertDescription; | ||
1103 | + } else { | ||
1104 | + notificationBody += " : " + _alertDescription + " : " + alertDescription; | ||
1105 | + } | ||
1106 | + } | ||
1107 | + | ||
1108 | + Utils::notifyDesktop(_NOTIFICATION_HEADER, notificationBody, true); | ||
1109 | + rc = 0; | ||
1110 | + | ||
1111 | + } while(0); | ||
1112 | + | ||
1113 | + return rc; | ||
1114 | + | ||
1115 | } | ||
1116 | + | ||
1117 | int Protocol::_sendHostFQDN() | ||
1118 | { | ||
1119 | char localName[FQDN_MAX_SIZE] = "\0"; | ||
1120 | @@ -1195,12 +1304,15 @@ void Protocol::_apfChannelOpen(LMEChannelOpenRequestMessage *chOpenMsg, int *sta | ||
1121 | " Recipient channel %d for address %s, port %d.\n", | ||
1122 | chOpenMsg->SenderChannel, | ||
1123 | chOpenMsg->Address.c_str(), chOpenMsg->Port); | ||
1124 | + | ||
1125 | if(chOpenMsg->Port==0) | ||
1126 | { | ||
1127 | - _UNSConnection(); | ||
1128 | - _sendHostFQDN(); | ||
1129 | - return; | ||
1130 | + _UNSSenderChannel = chOpenMsg->SenderChannel; | ||
1131 | + _lme.ChannelOpenReplySuccess(_UNSSenderChannel, _UNSRecipientChannel); | ||
1132 | + _newNotification = true; | ||
1133 | + return; | ||
1134 | } | ||
1135 | + | ||
1136 | SOCKET s = ATNetworkTool::Connect(chOpenMsg->Address.c_str(), | ||
1137 | chOpenMsg->Port, error, PF_UNSPEC); | ||
1138 | if (s == INVALID_SOCKET) { | ||
1139 | @@ -1282,33 +1394,41 @@ PortForwardRequest *Protocol::_apfChannelClose(LMEChannelCloseMessage *chClMsg) | ||
1140 | Lock l(_channelsLock); | ||
1141 | PRINT("_apfChannelClose: RecipientChannel=%d\n",chClMsg->RecipientChannel); | ||
1142 | |||
1143 | - | ||
1144 | - ChannelToSocketMap::iterator it = _channelToSocket.find(chClMsg->RecipientChannel); | ||
1145 | - if (it != _channelToSocket .end()) | ||
1146 | - { | ||
1147 | - SOCKET s = it->second; | ||
1148 | - Channel *c = _socketToChannel[s]; | ||
1149 | - switch(c->GetStatus()) { | ||
1150 | - case Channel::OPEN: | ||
1151 | - c->SetStatus(Channel::CLOSED); | ||
1152 | - | ||
1153 | - _lme.ChannelClose(c->GetRecipientChannel(), c->GetSenderChannel()); | ||
1154 | - PRINT("Channel %d was closed by Intel AMT.\n", c->GetSenderChannel()); | ||
1155 | + do { | ||
1156 | + if (chClMsg->RecipientChannel == _UNSRecipientChannel) | ||
1157 | + { | ||
1158 | + //UNS event channel close. | ||
1159 | + //We have not created a channel on LMS side, hence ignore | ||
1160 | break; | ||
1161 | + } | ||
1162 | |||
1163 | - case Channel::WAITING_CLOSE: | ||
1164 | - PRINT("Received reply by Intel AMT on closing channel %d.\n", c->GetSenderChannel()); | ||
1165 | - break; | ||
1166 | + ChannelToSocketMap::iterator it = _channelToSocket.find(chClMsg->RecipientChannel); | ||
1167 | + if (it != _channelToSocket .end()) | ||
1168 | + { | ||
1169 | + SOCKET s = it->second; | ||
1170 | + Channel *c = _socketToChannel[s]; | ||
1171 | + switch(c->GetStatus()) { | ||
1172 | + case Channel::OPEN: | ||
1173 | + c->SetStatus(Channel::CLOSED); | ||
1174 | + | ||
1175 | + _lme.ChannelClose(c->GetRecipientChannel(), c->GetSenderChannel()); | ||
1176 | + PRINT("Channel %d was closed by Intel AMT.\n", c->GetSenderChannel()); | ||
1177 | + break; | ||
1178 | |||
1179 | - case Channel::CLOSED: | ||
1180 | - case Channel::NOT_OPENED: | ||
1181 | - break; | ||
1182 | - } | ||
1183 | + case Channel::WAITING_CLOSE: | ||
1184 | + PRINT("Received reply by Intel AMT on closing channel %d.\n", c->GetSenderChannel()); | ||
1185 | + break; | ||
1186 | |||
1187 | - _removeFromMaps(c); | ||
1188 | - clPFwdReq = _closeMChannel(c); | ||
1189 | + case Channel::CLOSED: | ||
1190 | + case Channel::NOT_OPENED: | ||
1191 | + break; | ||
1192 | + } | ||
1193 | + | ||
1194 | + _removeFromMaps(c); | ||
1195 | + clPFwdReq = _closeMChannel(c); | ||
1196 | |||
1197 | - } | ||
1198 | + } | ||
1199 | + } while(0); | ||
1200 | |||
1201 | _channelGenerator.FreeChannel(chClMsg->RecipientChannel); | ||
1202 | |||
1203 | @@ -1320,6 +1440,18 @@ PortForwardRequest *Protocol::_apfChannelData(LMEChannelDataMessage *chDMsg, int | ||
1204 | PortForwardRequest *clPFwdReq = NULL; | ||
1205 | |||
1206 | do { | ||
1207 | + if (chDMsg->RecipientChannel == _UNSRecipientChannel) | ||
1208 | + | ||
1209 | + { | ||
1210 | + if (_UNSHandler((char*)chDMsg->Data, chDMsg->DataLength) == 0) | ||
1211 | + { | ||
1212 | + _lme.ChannelClose(_UNSSenderChannel, _UNSRecipientChannel); | ||
1213 | + } | ||
1214 | + _newNotification = false; | ||
1215 | + //UNS event data handle. | ||
1216 | + //We have not created a channel on LMS side, hence break | ||
1217 | + break; | ||
1218 | + } | ||
1219 | Lock l(_channelsLock); | ||
1220 | |||
1221 | ChannelToSocketMap::iterator it = _channelToSocket.find(chDMsg->RecipientChannel); | ||
1222 | @@ -1341,6 +1473,7 @@ PortForwardRequest *Protocol::_apfChannelData(LMEChannelDataMessage *chDMsg, int | ||
1223 | int senderr = 0; | ||
1224 | int count = _send(channel->GetSocket(), (char *)chDMsg->Data, | ||
1225 | chDMsg->DataLength, senderr); | ||
1226 | + | ||
1227 | PRINT("Sent %d bytes of %d from Intel AMT to channel %d with socket %d.\n", | ||
1228 | count, chDMsg->DataLength, chDMsg->RecipientChannel, | ||
1229 | channel->GetSocket()); | ||
1230 | diff --git a/src/Protocol.h b/src/Protocol.h | ||
1231 | index a4ef419..858cb78 100755 | ||
1232 | --- a/src/Protocol.h | ||
1233 | +++ b/src/Protocol.h | ||
1234 | @@ -46,6 +46,7 @@ | ||
1235 | |||
1236 | #define SOCKET int | ||
1237 | #define INVALID_SOCKET (SOCKET)(~0) | ||
1238 | +#define INVALID_CHANNEL -1 | ||
1239 | #define SOCKET_ERROR (-1) | ||
1240 | |||
1241 | |||
1242 | @@ -120,7 +121,7 @@ private: | ||
1243 | PortForwardRequest *_apfChannelData(LMEChannelDataMessage *chDMsg, int *status); | ||
1244 | void _LmeReceive(void *buffer, unsigned int len, int *status); | ||
1245 | void _signalSelect(); | ||
1246 | - void _UNSConnection(); | ||
1247 | + int _UNSHandler(char *buffer, int len); | ||
1248 | bool _acceptConnection(SOCKET s, unsigned int port); | ||
1249 | int _rxFromSocket(SOCKET s); | ||
1250 | int _handleFQDNChange(const char *fqdn); | ||
1251 | @@ -192,6 +193,11 @@ private: | ||
1252 | typedef std::set<unsigned int> listenPortSet; | ||
1253 | listenPortSet _listenFailReported; | ||
1254 | ChannelGenerator _channelGenerator; | ||
1255 | + static const unsigned int _UNSRecipientChannel = 55555; | ||
1256 | + unsigned int _UNSSenderChannel; | ||
1257 | + bool _newNotification; | ||
1258 | + static std::string _PACKET_BODY_LENGTH; | ||
1259 | + static std::string _NOTIFICATION_HEADER; | ||
1260 | }; | ||
1261 | |||
1262 | #endif | ||
1263 | diff --git a/src/alertDescription.cpp b/src/alertDescription.cpp | ||
1264 | new file mode 100644 | ||
1265 | index 0000000..f05f940 | ||
1266 | --- /dev/null | ||
1267 | +++ b/src/alertDescription.cpp | ||
1268 | @@ -0,0 +1,144 @@ | ||
1269 | +/******************************************************************************* | ||
1270 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
1271 | + * | ||
1272 | + * Redistribution and use in source and binary forms, with or without | ||
1273 | + * modification, are permitted provided that the following conditions are met: | ||
1274 | + * | ||
1275 | + * - Redistributions of source code must retain the above copyright notice, | ||
1276 | + * this list of conditions and the following disclaimer. | ||
1277 | + * | ||
1278 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
1279 | + * this list of conditions and the following disclaimer in the documentation | ||
1280 | + * and/or other materials provided with the distribution. | ||
1281 | + * | ||
1282 | + * - Neither the name of Intel Corporation. nor the names of its | ||
1283 | + * contributors may be used to endorse or promote products derived from this | ||
1284 | + * software without specific prior written permission. | ||
1285 | + * | ||
1286 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
1287 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
1288 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
1289 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
1290 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
1291 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
1292 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
1293 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
1294 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
1295 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
1296 | + * POSSIBILITY OF SUCH DAMAGE. | ||
1297 | + *******************************************************************************/ | ||
1298 | +#include "alertDescription.h" | ||
1299 | +#include "miniXmlParser.h" | ||
1300 | +#include <sstream> | ||
1301 | +#include <fstream> | ||
1302 | +#include "defaultAlerts.h" | ||
1303 | +#include "types.h" | ||
1304 | + | ||
1305 | +bool AlertDescription::classInited = false; | ||
1306 | +std::string AlertDescription::alertXmlFile = "/usr/local/share/xml/AMTAlerts.xml"; | ||
1307 | +std::string AlertDescription::alertXmlFile1 = "/usr/share/xml/AMTAlerts.xml"; | ||
1308 | +std::map<std::string,std::string> AlertDescription::alertDescriptionMap; | ||
1309 | + | ||
1310 | +void AlertDescription::initAlertDescription() { | ||
1311 | + | ||
1312 | + char *value = NULL; | ||
1313 | + unsigned int valueLength = 0; | ||
1314 | + bool fromFile = false; | ||
1315 | + std::string alertIdArg; | ||
1316 | + std::stringstream ss; | ||
1317 | + std::string xmlData; | ||
1318 | + CDataLen id; | ||
1319 | + CDataLen arg; | ||
1320 | + CDataLen description; | ||
1321 | + MiniXmlParser xmlParser; | ||
1322 | + std::list<CDataLen>defaultAlertsList; | ||
1323 | + std::list<CDataLen>::iterator it; | ||
1324 | + | ||
1325 | + do { | ||
1326 | + if (classInited) { | ||
1327 | + break; | ||
1328 | + } | ||
1329 | + | ||
1330 | + std::ifstream is(alertXmlFile, std::ifstream::in); | ||
1331 | + if (is.good()) { | ||
1332 | + ss << is.rdbuf(); | ||
1333 | + xmlData = ss.str(); | ||
1334 | + fromFile = true; | ||
1335 | + } else { | ||
1336 | + std::ifstream _is(alertXmlFile1, std::ifstream::in); | ||
1337 | + if (_is.good()) { | ||
1338 | + ss << _is.rdbuf(); | ||
1339 | + xmlData = ss.str(); | ||
1340 | + fromFile = true; | ||
1341 | + } | ||
1342 | + _is.close(); | ||
1343 | + } | ||
1344 | + is.close(); | ||
1345 | + | ||
1346 | + /* Parse alert descriptions from xml file, if file is absent use the default ones */ | ||
1347 | + if (fromFile) { | ||
1348 | + /* From xml file */ | ||
1349 | + if (xmlParser.parse((char*)xmlData.c_str(), xmlData.size()) == 0) { | ||
1350 | + /* Process alert xml of form | ||
1351 | + * <Alerts><Alert><Id>iAMT0052</Id><Arg>1</Arg></Alert> <Alert>...</Alert> ...<Alerts> | ||
1352 | + */ | ||
1353 | + if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "Alerts", 6, NULL, 0, &value, &valueLength) == 0 ) { | ||
1354 | + while (xmlParser.getXmlTagValue(NULL, "Alert", 5, NULL, 0, &value, &valueLength) == 0) { | ||
1355 | + xmlParser.getXmlTagValue(NULL, "Id", 2, NULL, 0, &value, &valueLength); | ||
1356 | + id.data = value; | ||
1357 | + id.dataLength = valueLength; | ||
1358 | + | ||
1359 | + xmlParser.getXmlTagValue(NULL, "Arg", 3, NULL, 0, &value, &valueLength); | ||
1360 | + arg.data = value; | ||
1361 | + arg.dataLength = valueLength; | ||
1362 | + | ||
1363 | + alertIdArg = std::string(id.data, id.dataLength) + "-" + std::string(arg.data, arg.dataLength); | ||
1364 | + | ||
1365 | + xmlParser.getXmlTagValue(NULL, "Message", 7, NULL, 0, &value, &valueLength); | ||
1366 | + alertDescriptionMap.insert(std::pair<std::string, std::string>(alertIdArg, std::string(value, valueLength))); | ||
1367 | + } | ||
1368 | + classInited = true; | ||
1369 | + } | ||
1370 | + } else { | ||
1371 | + PRINT("Failed to parse XML\n"); | ||
1372 | + } | ||
1373 | + } else { | ||
1374 | + /* Using default XML alerts descriptions */ | ||
1375 | + defaultAlertsList = Utils::split(DEFAULT_ALERTS , DEFAULT_ALERTS_LENGTH , ";", 1); | ||
1376 | + for (CDataLen alert: defaultAlertsList) { | ||
1377 | + std::list<CDataLen> alertIdDescription = Utils::split(alert.data, alert.dataLength, ":", 1); | ||
1378 | + if (alertIdDescription.size() >= 2) { | ||
1379 | + it = alertIdDescription.begin(); | ||
1380 | + id.data = it->data; | ||
1381 | + id.dataLength = it->dataLength; | ||
1382 | + it++; | ||
1383 | + description.data = it->data; | ||
1384 | + description.dataLength = it->dataLength; | ||
1385 | + /* Add to std::map for faster retreival */ | ||
1386 | + alertDescriptionMap.insert(std::pair<std::string, std::string>(std::string(id.data, id.dataLength), | ||
1387 | + std::string(description.data, description.dataLength))); | ||
1388 | + } | ||
1389 | + } | ||
1390 | + classInited = true; | ||
1391 | + } | ||
1392 | + } while(0); | ||
1393 | +} | ||
1394 | + | ||
1395 | + | ||
1396 | +std::string AlertDescription::getAlertDescription(std::string alert) { | ||
1397 | + CDataLen alertDescription; | ||
1398 | + std::map<std::string, std::string>::iterator it; | ||
1399 | + | ||
1400 | + if (classInited == false) { | ||
1401 | + initAlertDescription(); | ||
1402 | + } | ||
1403 | + | ||
1404 | + if (classInited && alertDescriptionMap.empty() == false) { | ||
1405 | + it = alertDescriptionMap.find(alert); | ||
1406 | + if (it != alertDescriptionMap.end()) { | ||
1407 | + return it->second; | ||
1408 | + } | ||
1409 | + } | ||
1410 | + | ||
1411 | + return ""; | ||
1412 | +}; | ||
1413 | diff --git a/src/alertDescription.h b/src/alertDescription.h | ||
1414 | new file mode 100644 | ||
1415 | index 0000000..6413f2a | ||
1416 | --- /dev/null | ||
1417 | +++ b/src/alertDescription.h | ||
1418 | @@ -0,0 +1,45 @@ | ||
1419 | +/******************************************************************************* | ||
1420 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
1421 | + * | ||
1422 | + * Redistribution and use in source and binary forms, with or without | ||
1423 | + * modification, are permitted provided that the following conditions are met: | ||
1424 | + * | ||
1425 | + * - Redistributions of source code must retain the above copyright notice, | ||
1426 | + * this list of conditions and the following disclaimer. | ||
1427 | + * | ||
1428 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
1429 | + * this list of conditions and the following disclaimer in the documentation | ||
1430 | + * and/or other materials provided with the distribution. | ||
1431 | + * | ||
1432 | + * - Neither the name of Intel Corporation. nor the names of its | ||
1433 | + * contributors may be used to endorse or promote products derived from this | ||
1434 | + * software without specific prior written permission. | ||
1435 | + * | ||
1436 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
1437 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
1438 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
1439 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
1440 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
1441 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
1442 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
1443 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
1444 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
1445 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
1446 | + * POSSIBILITY OF SUCH DAMAGE. | ||
1447 | + *******************************************************************************/ | ||
1448 | +#ifndef _ALERTDESCRIPTION_H | ||
1449 | +#define _AlERTDESCRIPTION_H | ||
1450 | +#include "utils.h" | ||
1451 | +#include <string> | ||
1452 | +#include <map> | ||
1453 | +class AlertDescription { | ||
1454 | + protected: | ||
1455 | + static bool classInited; | ||
1456 | + static std::string alertXmlFile; | ||
1457 | + static std::string alertXmlFile1; | ||
1458 | + static void initAlertDescription(); | ||
1459 | + static std::map<std::string, std::string> alertDescriptionMap; | ||
1460 | + public: | ||
1461 | + static std::string getAlertDescription(std::string alert); | ||
1462 | +}; | ||
1463 | +#endif | ||
1464 | diff --git a/src/alertIndication.cpp b/src/alertIndication.cpp | ||
1465 | new file mode 100644 | ||
1466 | index 0000000..ed14abd | ||
1467 | --- /dev/null | ||
1468 | +++ b/src/alertIndication.cpp | ||
1469 | @@ -0,0 +1,90 @@ | ||
1470 | +/******************************************************************************* | ||
1471 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
1472 | + * | ||
1473 | + * Redistribution and use in source and binary forms, with or without | ||
1474 | + * modification, are permitted provided that the following conditions are met: | ||
1475 | + * | ||
1476 | + * - Redistributions of source code must retain the above copyright notice, | ||
1477 | + * this list of conditions and the following disclaimer. | ||
1478 | + * | ||
1479 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
1480 | + * this list of conditions and the following disclaimer in the documentation | ||
1481 | + * and/or other materials provided with the distribution. | ||
1482 | + * | ||
1483 | + * - Neither the name of Intel Corporation. nor the names of its | ||
1484 | + * contributors may be used to endorse or promote products derived from this | ||
1485 | + * software without specific prior written permission. | ||
1486 | + * | ||
1487 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
1488 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
1489 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
1490 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
1491 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
1492 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
1493 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
1494 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
1495 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
1496 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
1497 | + * POSSIBILITY OF SUCH DAMAGE. | ||
1498 | + *******************************************************************************/ | ||
1499 | +#include "miniXmlParser.h" | ||
1500 | +#include "alertIndication.h" | ||
1501 | +#include <string.h> | ||
1502 | + | ||
1503 | +const char* AlertIndication::CLASS_URI = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_AlertIndication"; | ||
1504 | +void AlertIndication::initAlertIndication(char *ns, unsigned int nsLen) { | ||
1505 | + | ||
1506 | + char *value = NULL; | ||
1507 | + unsigned int valueLen= 0; | ||
1508 | + | ||
1509 | + if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "MessageID", strlen("MessageID"), ns, nsLen, &value, &valueLen) == 0) { | ||
1510 | + messageID.data = value; | ||
1511 | + messageID.dataLength = valueLen; | ||
1512 | + } | ||
1513 | + | ||
1514 | + if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "MessageArguments", strlen("MessageArguments"), ns, nsLen, &value, &valueLen) == 0) { | ||
1515 | + messageArguments.data = value; | ||
1516 | + messageArguments.dataLength = valueLen; | ||
1517 | + } | ||
1518 | + | ||
1519 | + if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "IndicationTime", strlen("IndicationTime"), ns, nsLen, &value, &valueLen) == 0) { | ||
1520 | + if (xmlParser.getXmlTagValue(NULL, "Datetime", strlen("Datetime"), NULL, 0, &value, &valueLen) == 0) { | ||
1521 | + indicationTime.data = value; | ||
1522 | + indicationTime.dataLength = valueLen; | ||
1523 | + } | ||
1524 | + } | ||
1525 | +} | ||
1526 | + | ||
1527 | +int AlertIndication::initFromXml(char *buffer, unsigned int bufferLen) { | ||
1528 | + | ||
1529 | + char *nsPrefix = NULL; | ||
1530 | + int rc = 0; | ||
1531 | + unsigned int nsPrefixLen = 0; | ||
1532 | + | ||
1533 | + do { | ||
1534 | + if (buffer == NULL || bufferLen == 0) { | ||
1535 | + rc = -1; | ||
1536 | + break; | ||
1537 | + } | ||
1538 | + | ||
1539 | + if (xmlParser.parse(buffer, bufferLen)) { | ||
1540 | + rc = -1; | ||
1541 | + break; | ||
1542 | + } | ||
1543 | + | ||
1544 | + if (xmlParser.getNSPrefix(xmlParser.getRootNode(), (char*)CLASS_URI, CLASS_URI_LEN, &nsPrefix, &nsPrefixLen)) { | ||
1545 | + rc = -1; | ||
1546 | + break; | ||
1547 | + } | ||
1548 | + | ||
1549 | + initAlertIndication(nsPrefix, nsPrefixLen); | ||
1550 | + | ||
1551 | + } while(0); | ||
1552 | + | ||
1553 | + return rc; | ||
1554 | +} | ||
1555 | + | ||
1556 | +CDataLen AlertIndication::getMessageArguments() { return messageArguments; }; | ||
1557 | +CDataLen AlertIndication::getIndicationTime() { return indicationTime; }; | ||
1558 | +CDataLen AlertIndication::getMessageID() { return messageID; }; | ||
1559 | + | ||
1560 | diff --git a/src/alertIndication.h b/src/alertIndication.h | ||
1561 | new file mode 100644 | ||
1562 | index 0000000..cf6dc51 | ||
1563 | --- /dev/null | ||
1564 | +++ b/src/alertIndication.h | ||
1565 | @@ -0,0 +1,54 @@ | ||
1566 | +/******************************************************************************* | ||
1567 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
1568 | + * | ||
1569 | + * Redistribution and use in source and binary forms, with or without | ||
1570 | + * modification, are permitted provided that the following conditions are met: | ||
1571 | + * | ||
1572 | + * - Redistributions of source code must retain the above copyright notice, | ||
1573 | + * this list of conditions and the following disclaimer. | ||
1574 | + * | ||
1575 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
1576 | + * this list of conditions and the following disclaimer in the documentation | ||
1577 | + * and/or other materials provided with the distribution. | ||
1578 | + * | ||
1579 | + * - Neither the name of Intel Corporation. nor the names of its | ||
1580 | + * contributors may be used to endorse or promote products derived from this | ||
1581 | + * software without specific prior written permission. | ||
1582 | + * | ||
1583 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
1584 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
1585 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
1586 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
1587 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
1588 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
1589 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
1590 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
1591 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
1592 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
1593 | + * POSSIBILITY OF SUCH DAMAGE. | ||
1594 | + *******************************************************************************/ | ||
1595 | +#ifndef __ALERTINDICATION_H | ||
1596 | +#define __ALERTINDICATION_H | ||
1597 | + | ||
1598 | +#include "utils.h" | ||
1599 | +#include <map> | ||
1600 | + | ||
1601 | +class AlertIndication { | ||
1602 | + private: | ||
1603 | + MiniXmlParser xmlParser; | ||
1604 | + CDataLen messageArguments; | ||
1605 | + CDataLen indicationTime; | ||
1606 | + CDataLen messageID; | ||
1607 | + void initAlertIndication(char *ns, unsigned int nsLen); | ||
1608 | + | ||
1609 | + public: | ||
1610 | + static const char* CLASS_URI; | ||
1611 | + static const int CLASS_URI_LEN = 69; | ||
1612 | + int initFromXml(char *buffer, unsigned int bufferLen); | ||
1613 | + CDataLen getMessageArguments(); | ||
1614 | + CDataLen getMessageID(); | ||
1615 | + CDataLen getIndicationTime(); | ||
1616 | + | ||
1617 | +}; | ||
1618 | + | ||
1619 | +#endif | ||
1620 | diff --git a/src/defaultAlerts.h b/src/defaultAlerts.h | ||
1621 | new file mode 100644 | ||
1622 | index 0000000..23283f8 | ||
1623 | --- /dev/null | ||
1624 | +++ b/src/defaultAlerts.h | ||
1625 | @@ -0,0 +1,43 @@ | ||
1626 | +#ifndef _DEFAULTALERTS_H | ||
1627 | +#define _DEFAULTALERTS_H | ||
1628 | +#define DEFAULT_ALERTS_LENGTH 6257 | ||
1629 | +#define DEFAULT_ALERTS "iAMT0001-:System Defense Policy triggered.;iAMT0002-:Agent Presence Agent not started.;iAMT0003-:Agent Presence Agent stopped.;iAMT0004-:Agent Presence: running.;\ | ||
1630 | +iAMT0005-:Agent Presence: expired.;iAMT0006-:Agent Presence: suspended.;iAMT0007-:Host software attempt to disable AMT Network link detected.;\ | ||
1631 | +iAMT0008-:Host software attempt to disable AMT Network link detected -- Host Network link blocked.;iAMT0009-:AMT clock or FLASH wear-out protection disabled.;\ | ||
1632 | +iAMT0010-:Intel(R) AMT Network Interface: Heuristics defense slow threshold trespassed.;iAMT0011-:Intel(R) AMT Network Interface: Heuristics defense fast threshold trespassed.;\ | ||
1633 | +iAMT0012-:Intel(R) AMT Network Interface: Heuristics defense factory defined threshold trespassed.;iAMT0013-:Intel(R) AMT Network Interface: Heuristics defense Encounter timeout expired.;\ | ||
1634 | +iAMT0014-:General certificate error.;iAMT0015-:Certificate expired.;iAMT0016-:No trusted root certificate.;iAMT0017-:Not configured to work with server certificate.;iAMT0018-:Certificate revoked.;\ | ||
1635 | +iAMT0019-:RSA exponent too large.;iAMT0020-:RSA modulus too large.;iAMT0021-:Unsupported digest.;iAMT0022-:Distinguished name too long.;iAMT0023-:Key usage missing.;\ | ||
1636 | +iAMT0024-:General SSL handshake error.;iAMT0025-:General 802.1x error.;iAMT0026-:AMT Diagnostic AlertEAC error - General NAC error.;\ | ||
1637 | +iAMT0027-:AMT Diagnostic AlertEAC error - attempt to get a NAC posture while AMT NAC is disabled.;iAMT0028-:AMT Diagnostic AlertEAC error - attempt to get a posture of an unsupported type.;\ | ||
1638 | +iAMT0029-:Audit log storage is 50% full.;iAMT0030-:Audit log storage is 75% full.;iAMT0031-:Audit log storage is 85% full.;iAMT0032-:Audit log storage is 95% full.;\ | ||
1639 | +iAMT0033-:Audit log storage is full.;iAMT0034-:Firmware Update Event - Partial.;iAMT0035-:Firmware Update Event - Failure.;iAMT0036-:Remote connectivity initiated.;\ | ||
1640 | +iAMT0037-:ME Presence event.;iAMT0038-0:AMT is being unprovisioned using BIOS command.;iAMT0038-1:AMT is being unprovisioned using Local MEI command.;\ | ||
1641 | +iAMT0038-2:AMT is being unprovisioned using Local WS-MAN/SOAP command.;iAMT0038-3:AMT is being unprovisioned using Remote WS-MAN/SOAP command.;\ | ||
1642 | +iAMT0050-:User Notification Alert - General Notification.;iAMT0050-16:User Notification Alert - Circuit Breaker notification (CB Drop TX filter hit.).;\ | ||
1643 | +iAMT0050-17:User Notification Alert - Circuit Breaker notification (CB Rate Limit TX filter hit.).;iAMT0050-18:User Notification Alert - Circuit Breaker notification (CB Drop RX filter hit.).;\ | ||
1644 | +iAMT0050-19:User Notification Alert - Circuit Breaker notification (CB Rate Limit RX filter hit.).;iAMT0050-32:User Notification Alert - EAC notification.;\ | ||
1645 | +iAMT0050-48:User Notification Alert - Remote diagnostics - (Remote Redirection session started - SOL).;iAMT0050-49:User Notification Alert - Remote diagnostics - (Remote Redirection session stopped - SOL).;\ | ||
1646 | +iAMT0050-50:User Notification Alert - Remote diagnostics. (Remote Redirection session started - IDE-R).;iAMT0050-51:User Notification Alert - Remote diagnostics. (Remote Redirection session stopped - IDE-R).;\ | ||
1647 | +iAMT0050-66:User Notification Alert - WLAN notification (Host profile mismatch - Management Interface ignored).;\ | ||
1648 | +iAMT0050-67:User Notification Alert - WLAN notification (Management device overrides host radio).;iAMT0050-68:User Notification Alert - WLAN notification (Host profile security mismatch).;\ | ||
1649 | +iAMT0050-69:User Notification Alert - WLAN notification (Management device relinquishes control over host Radio).;iAMT0051-:User Notification Alert - SecIo event.;\ | ||
1650 | +iAMT0051-0:User Notification Alert - SecIo event semaphore at host.;iAMT0051-1:User Notification Alert - semaphore at ME.;iAMT0051-2:User Notification Alert - SecIo event - semaphore timeout.;\ | ||
1651 | +iAMT0052-:User Notification Alert - KVM session event.;iAMT0052-0:User Notification Alert - KVM session requested.;iAMT0052-1:User Notification Alert - KVM session started.;\ | ||
1652 | +iAMT0052-2:User Notification Alert - KVM session stopped.;iAMT0053-:User Notification Alert - RCS notification.;\ | ||
1653 | +iAMT0053-50:User Notification Alert - RCS notification (HW button pressed. Connection initiated automatically).;\ | ||
1654 | +iAMT0053-52:User Notification Alert - RCS notification (HW button pressed. Connection wasn't initiated automatically).;iAMT0053-53:User Notification Alert - RCS notification (Contracts updated).;\ | ||
1655 | +iAMT0054-:User Notification Alert - WLAN notification. Wireless Profile sync enablement state changed.;iAMT0055-:User Notification Alert - Provisioning state change notification.;\ | ||
1656 | +iAMT0055-0:User Notification Alert - Provisioning state change notification - Pre-configuration.;iAMT0055-1:User Notification Alert - Provisioning state change notification - In configuration.;\ | ||
1657 | +iAMT0055-2:User Notification Alert - Provisioning state change notification - Post-configuration.;\ | ||
1658 | +iAMT0055-3:User Notification Alert - Provisioning state change notification - unprovision process has started.;iAMT0056-:User Notification Alert - System Defense change notification.;\ | ||
1659 | +iAMT0057-:User Notification Alert - Network State change notification.;iAMT0058-:User Notification Alert - Remote Access change notification.;\ | ||
1660 | +iAMT0058-1:User Notification Alert - Remote Access change notification - tunnel is closed.;iAMT0058-1:User Notification Alert - Remote Access change notification - tunnel is open.;\ | ||
1661 | +iAMT0059-:User Notification Alert - KVM enabled event.;iAMT0059-0:User Notification Alert - KVM enabled event - KVM disabled.;\ | ||
1662 | +iAMT0059-1:User Notification Alert - KVM enabled event - KVM enabled (both from MEBx and PTNI).;iAMT0060-:User Notification Alert - SecIO configuration event.;iAMT0061-:ME FW reset occurred.;\ | ||
1663 | +iAMT0062-:User Notification Alert - IpSyncEnabled event.;iAMT0062-0:User Notification Alert - IpSyncEnabled event - IpSync disabled.;\ | ||
1664 | +iAMT0062-1:User Notification Alert - IpSyncEnabled event - IpSync enabled.;iAMT0063-:User Notification Alert - HTTP Proxy sync enabled event.;\ | ||
1665 | +iAMT0063-0:User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync disabled.;iAMT0063-1:User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync enabled.;\ | ||
1666 | +iAMT0064-:User Notification Alert - User Consent event.;iAMT0064-1:User Notification Alert - User Consent event - User Consent granted.;\ | ||
1667 | +iAMT0064-2:User Notification Alert - User Consent event - User Consent ended.;" | ||
1668 | +#endif | ||
1669 | diff --git a/src/notifyDesktop.sh b/src/notifyDesktop.sh | ||
1670 | new file mode 100644 | ||
1671 | index 0000000..06bfd97 | ||
1672 | --- /dev/null | ||
1673 | +++ b/src/notifyDesktop.sh | ||
1674 | @@ -0,0 +1,10 @@ | ||
1675 | +#!/bin/sh | ||
1676 | +# get list of current users | ||
1677 | +for x in $(who | sort -u -k1,1 | awk '{print $1}'); do | ||
1678 | + # send message to anyone on display 0 | ||
1679 | + dbus_session_file=$(eval echo "~$x")/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-0 | ||
1680 | + if [ -e "$dbus_session_file" ]; then | ||
1681 | + su -l "$x" -c "source '$dbus_session_file'; export DISPLAY=:0; notify-send -u critical -t 2000 '$1' '$2'" | ||
1682 | + fi | ||
1683 | +done | ||
1684 | + | ||
1685 | diff --git a/src/tools/httpParser.cpp b/src/tools/httpParser.cpp | ||
1686 | new file mode 100644 | ||
1687 | index 0000000..38d2901 | ||
1688 | --- /dev/null | ||
1689 | +++ b/src/tools/httpParser.cpp | ||
1690 | @@ -0,0 +1,101 @@ | ||
1691 | +/******************************************************************************* | ||
1692 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
1693 | + * | ||
1694 | + * Redistribution and use in source and binary forms, with or without | ||
1695 | + * modification, are permitted provided that the following conditions are met: | ||
1696 | + * | ||
1697 | + * - Redistributions of source code must retain the above copyright notice, | ||
1698 | + * this list of conditions and the following disclaimer. | ||
1699 | + * | ||
1700 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
1701 | + * this list of conditions and the following disclaimer in the documentation | ||
1702 | + * and/or other materials provided with the distribution. | ||
1703 | + * | ||
1704 | + * - Neither the name of Intel Corporation. nor the names of its | ||
1705 | + * contributors may be used to endorse or promote products derived from this | ||
1706 | + * software without specific prior written permission. | ||
1707 | + * | ||
1708 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
1709 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
1710 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
1711 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
1712 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
1713 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
1714 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
1715 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
1716 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
1717 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
1718 | + * POSSIBILITY OF SUCH DAMAGE. | ||
1719 | + *******************************************************************************/ | ||
1720 | +#include "httpParser.h" | ||
1721 | +#include "utils.h" | ||
1722 | +#include "types.h" | ||
1723 | + | ||
1724 | +int HttpParser::parse(char *buffer) { | ||
1725 | + | ||
1726 | + std::vector<std::string> headerBody; | ||
1727 | + std::vector<std::string> header; | ||
1728 | + int rc = 0; | ||
1729 | + do { | ||
1730 | + if (buffer == NULL) { | ||
1731 | + rc = -1; | ||
1732 | + break; | ||
1733 | + } | ||
1734 | + | ||
1735 | + headerBody = Utils::split(buffer, "\r\n\r\n"); | ||
1736 | + if (headerBody.size() < 2) | ||
1737 | + { | ||
1738 | + PRINT("Failed to process httpHeader\n"); | ||
1739 | + rc = -1; | ||
1740 | + break; | ||
1741 | + } | ||
1742 | + | ||
1743 | + /* Entries in Header are seperated by \r\n */ | ||
1744 | + header = Utils::split((char*)headerBody[0].c_str(), "\r\n"); | ||
1745 | + | ||
1746 | + /* First line in header is the the header line | ||
1747 | + * e.g. POST <path> HTTP/1.1 | ||
1748 | + * e.g GET <path> HTTP/1.1 | ||
1749 | + */ | ||
1750 | + headerLine = header[0]; | ||
1751 | + | ||
1752 | + /* After headerline are the Fields | ||
1753 | + * e.g Content-Length:2204 | ||
1754 | + */ | ||
1755 | + for (unsigned int i=1; i< header.size(); i++) { | ||
1756 | + std::vector<std::string> field = Utils::split((char*)header[i].c_str(), ":"); | ||
1757 | + if (field.size() < 2) { | ||
1758 | + rc = -1; | ||
1759 | + break; | ||
1760 | + } | ||
1761 | + headerFields.insert(std::pair<std::string, std::string>(field[0], field[1])); | ||
1762 | + } | ||
1763 | + | ||
1764 | + if (rc) break; | ||
1765 | + | ||
1766 | + body = headerBody[1]; | ||
1767 | + } while(0); | ||
1768 | + | ||
1769 | + return rc; | ||
1770 | +} | ||
1771 | + | ||
1772 | +std::string HttpParser::getHeaderLine() { | ||
1773 | + return headerLine; | ||
1774 | +} | ||
1775 | + | ||
1776 | +std::string HttpParser::getHeaderField(std::string field) { | ||
1777 | + std::map<std::string,std::string>::iterator it; | ||
1778 | + std::string fieldValue = ""; | ||
1779 | + | ||
1780 | + it = headerFields.find(field); | ||
1781 | + if (it != headerFields.end()) | ||
1782 | + { | ||
1783 | + fieldValue = it->second; | ||
1784 | + } | ||
1785 | + | ||
1786 | + return fieldValue; | ||
1787 | +} | ||
1788 | + | ||
1789 | +std::string HttpParser::getBody() { | ||
1790 | + return body; | ||
1791 | +} | ||
1792 | diff --git a/src/tools/httpParser.h b/src/tools/httpParser.h | ||
1793 | new file mode 100644 | ||
1794 | index 0000000..a82d82a | ||
1795 | --- /dev/null | ||
1796 | +++ b/src/tools/httpParser.h | ||
1797 | @@ -0,0 +1,49 @@ | ||
1798 | +/******************************************************************************* | ||
1799 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
1800 | + * | ||
1801 | + * Redistribution and use in source and binary forms, with or without | ||
1802 | + * modification, are permitted provided that the following conditions are met: | ||
1803 | + * | ||
1804 | + * - Redistributions of source code must retain the above copyright notice, | ||
1805 | + * this list of conditions and the following disclaimer. | ||
1806 | + * | ||
1807 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
1808 | + * this list of conditions and the following disclaimer in the documentation | ||
1809 | + * and/or other materials provided with the distribution. | ||
1810 | + * | ||
1811 | + * - Neither the name of Intel Corporation. nor the names of its | ||
1812 | + * contributors may be used to endorse or promote products derived from this | ||
1813 | + * software without specific prior written permission. | ||
1814 | + * | ||
1815 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
1816 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
1817 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
1818 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
1819 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
1820 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
1821 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
1822 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
1823 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
1824 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
1825 | + * POSSIBILITY OF SUCH DAMAGE. | ||
1826 | + *******************************************************************************/ | ||
1827 | +#ifndef _HTTPPARSER_H | ||
1828 | +#define _HTTPPARSER_H | ||
1829 | +#include <vector> | ||
1830 | +#include <map> | ||
1831 | +#include <string> | ||
1832 | + | ||
1833 | +class HttpParser { | ||
1834 | + | ||
1835 | + public: | ||
1836 | + int parse(char *buffer); | ||
1837 | + std::string getHeaderLine(); | ||
1838 | + std::string getHeaderField(std::string field); | ||
1839 | + std::string getBody(); | ||
1840 | + private: | ||
1841 | + std::string headerLine; | ||
1842 | + std::map<std::string, std::string> headerFields; | ||
1843 | + std::string body; | ||
1844 | + | ||
1845 | +}; | ||
1846 | +#endif | ||
1847 | diff --git a/src/tools/miniXmlParser.cpp b/src/tools/miniXmlParser.cpp | ||
1848 | new file mode 100644 | ||
1849 | index 0000000..f1f0503 | ||
1850 | --- /dev/null | ||
1851 | +++ b/src/tools/miniXmlParser.cpp | ||
1852 | @@ -0,0 +1,375 @@ | ||
1853 | +/******************************************************************************* | ||
1854 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
1855 | + * | ||
1856 | + * Redistribution and use in source and binary forms, with or without | ||
1857 | + * modification, are permitted provided that the following conditions are met: | ||
1858 | + * | ||
1859 | + * - Redistributions of source code must retain the above copyright notice, | ||
1860 | + * this list of conditions and the following disclaimer. | ||
1861 | + * | ||
1862 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
1863 | + * this list of conditions and the following disclaimer in the documentation | ||
1864 | + * and/or other materials provided with the distribution. | ||
1865 | + * | ||
1866 | + * - Neither the name of Intel Corporation. nor the names of its | ||
1867 | + * contributors may be used to endorse or promote products derived from this | ||
1868 | + * software without specific prior written permission. | ||
1869 | + * | ||
1870 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
1871 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
1872 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
1873 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
1874 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
1875 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
1876 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
1877 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
1878 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
1879 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
1880 | + * POSSIBILITY OF SUCH DAMAGE. | ||
1881 | + *******************************************************************************/ | ||
1882 | +#include "miniXmlParser.h" | ||
1883 | +#include "utils.h" | ||
1884 | +#include <string.h> | ||
1885 | +#include <list> | ||
1886 | +#include <stack> | ||
1887 | +#include "types.h" | ||
1888 | + | ||
1889 | +MiniXmlParser::MiniXmlParser() { | ||
1890 | + rootNode = NULL; | ||
1891 | +} | ||
1892 | + | ||
1893 | +MiniXmlParser::~MiniXmlParser() { | ||
1894 | + if (rootNode) { | ||
1895 | + deleteXmlTree(rootNode); | ||
1896 | + rootNode = NULL; | ||
1897 | + } | ||
1898 | +} | ||
1899 | + | ||
1900 | +void MiniXmlParser::deleteXmlTree(XMLNode* rootNode) { | ||
1901 | + XMLNode* node = rootNode; | ||
1902 | + XMLNode* tempNode = NULL; | ||
1903 | + | ||
1904 | + while (node != NULL) { | ||
1905 | + tempNode = node->childNode; | ||
1906 | + delete node; | ||
1907 | + node = tempNode; | ||
1908 | + } | ||
1909 | +} | ||
1910 | + | ||
1911 | +int MiniXmlParser::validateXML(XMLNode const* rootNode) { | ||
1912 | + int rc = 0; | ||
1913 | + XMLNode* current = (XMLNode *)rootNode; | ||
1914 | + XMLNode* temp = NULL; | ||
1915 | + std::stack<XMLNode*> tagStack; | ||
1916 | + | ||
1917 | + while (current != NULL) { | ||
1918 | + if (current->tagName == NULL) { | ||
1919 | + PRINT("ValidateXML failed, foung a empty tag\n"); | ||
1920 | + rc = -1; | ||
1921 | + break; | ||
1922 | + } | ||
1923 | + | ||
1924 | + if (memcmp(current->tagName, "!", 1) == 0) { | ||
1925 | + temp = current; | ||
1926 | + current = tagStack.empty()?NULL:tagStack.top(); | ||
1927 | + if (current != NULL) { | ||
1928 | + current->childNode = temp->childNode; | ||
1929 | + } else { | ||
1930 | + current = temp; | ||
1931 | + } | ||
1932 | + } else if (current->startTag) { | ||
1933 | + current->parentNode = tagStack.empty()?NULL:tagStack.top(); | ||
1934 | + tagStack.push(current); | ||
1935 | + } else { | ||
1936 | + if (tagStack.empty() == false) { | ||
1937 | + temp = tagStack.top(); | ||
1938 | + tagStack.pop(); | ||
1939 | + } else { | ||
1940 | + temp = NULL; | ||
1941 | + } | ||
1942 | + if (temp != NULL) { | ||
1943 | + if (temp->tagLength == current->tagLength && memcmp(temp->tagName, current->tagName, current->tagLength) == 0) { | ||
1944 | + if (current->childNode != NULL) { | ||
1945 | + if (current->childNode->startTag != 0) { | ||
1946 | + temp->siblingNode = current->childNode; | ||
1947 | + } | ||
1948 | + } | ||
1949 | + temp->closingTag = current; | ||
1950 | + current->startingTag = temp; | ||
1951 | + } else { | ||
1952 | + PRINT("ValidateXML failed, Illegal tag\n"); | ||
1953 | + rc = -1; | ||
1954 | + break; | ||
1955 | + } | ||
1956 | + } else { | ||
1957 | + PRINT("ValidateXML failed, Illegal closing tag\n"); | ||
1958 | + rc = -1; | ||
1959 | + break; | ||
1960 | + } | ||
1961 | + } | ||
1962 | + current = current->childNode; | ||
1963 | + } | ||
1964 | + | ||
1965 | + if (tagStack.empty() == false) { | ||
1966 | + PRINT("ValidateXML failed, Incomplete XML\n"); | ||
1967 | + rc = -1; | ||
1968 | + } | ||
1969 | + | ||
1970 | + return rc; | ||
1971 | +} | ||
1972 | + | ||
1973 | +int MiniXmlParser::parse(char* buffer, unsigned int bufferLength) { | ||
1974 | + int validXml = -1; | ||
1975 | + XMLNode* node = NULL; | ||
1976 | + | ||
1977 | + node = _parse(buffer, bufferLength); | ||
1978 | + if (node) { | ||
1979 | + validXml = validateXML(node); | ||
1980 | + } | ||
1981 | + rootNode = node; | ||
1982 | + return validXml; | ||
1983 | +} | ||
1984 | + | ||
1985 | +XMLNode* MiniXmlParser::_parse(char const* buffer, unsigned int bufferLength) { | ||
1986 | + | ||
1987 | + char* tagName = NULL; | ||
1988 | + char* nsTag = NULL; | ||
1989 | + char* CommentEnd = NULL; | ||
1990 | + | ||
1991 | + int tagLength = 0; | ||
1992 | + int startTag = 0; | ||
1993 | + int emptyTag = 0; | ||
1994 | + int nsLength = 0; | ||
1995 | + int i = 0; | ||
1996 | + int CommentIndex = 0; | ||
1997 | + | ||
1998 | + std::list<CDataLen> xmlFields; | ||
1999 | + std::list<CDataLen> temp2; | ||
2000 | + std::list<CDataLen> tagValue; | ||
2001 | + | ||
2002 | + XMLNode *rootNode = NULL;; | ||
2003 | + XMLNode *current = NULL; | ||
2004 | + XMLNode *newNode = NULL; | ||
2005 | + std::list<CDataLen>::iterator it; | ||
2006 | + | ||
2007 | + if (buffer == NULL || bufferLength == 0) { | ||
2008 | + return NULL; | ||
2009 | + } | ||
2010 | + | ||
2011 | + xmlFields = Utils::split(buffer, bufferLength, "<", 1); | ||
2012 | + for (CDataLen xmlField: xmlFields) { | ||
2013 | + if (xmlField.dataLength != 0 && memcmp(xmlField.data, "?", 1) != 0 && (xmlField.data > CommentEnd)) { | ||
2014 | + /*Parse XML comments and ignore it.*/ | ||
2015 | + if (xmlField.dataLength > 3 && memcmp(xmlField.data, "!--", 3)==0) { | ||
2016 | + CommentIndex = 3; | ||
2017 | + while (((xmlField.data + CommentIndex) < (buffer + bufferLength)) && memcmp(xmlField.data + CommentIndex, "-->", 3) != 0) { | ||
2018 | + CommentIndex++; | ||
2019 | + } | ||
2020 | + CommentEnd = xmlField.data + CommentIndex; | ||
2021 | + continue; | ||
2022 | + } else { | ||
2023 | + emptyTag = 0; | ||
2024 | + /*if the first char is / after < then its ending tag, otherwise starting tag. ("</....") */ | ||
2025 | + if (memcmp(xmlField.data, "/", 1) == 0) { | ||
2026 | + startTag = 0; | ||
2027 | + xmlField.data = xmlField.data + 1; | ||
2028 | + xmlField.dataLength -= 1; | ||
2029 | + temp2 = Utils::split(xmlField.data, xmlField.dataLength, ">", 1); | ||
2030 | + } else { | ||
2031 | + | ||
2032 | + startTag = 1; | ||
2033 | + temp2 = Utils::split(xmlField.data, xmlField.dataLength, ">", 1); | ||
2034 | + if (temp2.front().dataLength > 0 && *(char*)(temp2.front().data-1) == '/') { | ||
2035 | + //".../>" are empty tags | ||
2036 | + emptyTag = 1; | ||
2037 | + } | ||
2038 | + } | ||
2039 | + } | ||
2040 | + /*split on ":" to get namespace:tagName*/ | ||
2041 | + tagValue = Utils::split(temp2.front().data, temp2.front().dataLength, ":", 1); | ||
2042 | + if (tagValue.size() == 1) { | ||
2043 | + nsTag = NULL; | ||
2044 | + nsLength = 0; | ||
2045 | + tagName = tagValue.front().data; | ||
2046 | + tagLength = tagValue.front().dataLength; | ||
2047 | + } else { | ||
2048 | + it = tagValue.begin(); | ||
2049 | + nsTag = it->data; | ||
2050 | + nsLength = it->dataLength; | ||
2051 | + it++; | ||
2052 | + tagName = it->data; | ||
2053 | + tagLength = it->dataLength; | ||
2054 | + } | ||
2055 | + tagValue.clear(); | ||
2056 | + temp2.clear(); | ||
2057 | + | ||
2058 | + /*Parse for multiple ns:tags and recompute the first tagLength*/ | ||
2059 | + for(i=0; i<tagLength; i++) { | ||
2060 | + if ((tagName[i] == ' ')||(tagName[i] == '/')||(tagName[i] == '>')||(tagName[i] == '\t')||(tagName[i] == '\r')||(tagName[i] == '\n')) { | ||
2061 | + if (i != 0) { | ||
2062 | + if (tagName[i]=='/') { | ||
2063 | + emptyTag = 1; | ||
2064 | + } | ||
2065 | + tagLength = i; | ||
2066 | + break; | ||
2067 | + } | ||
2068 | + } | ||
2069 | + } | ||
2070 | + | ||
2071 | + /*Create XML Node, populate properties and add it to the list*/ | ||
2072 | + if (tagLength != 0) { | ||
2073 | + newNode = new XMLNode(); | ||
2074 | + newNode->tagName = tagName; | ||
2075 | + newNode->tagLength = tagLength; | ||
2076 | + newNode->startTag = startTag; | ||
2077 | + newNode->nsTag = nsTag; | ||
2078 | + newNode->nsLength = nsLength; | ||
2079 | + | ||
2080 | + | ||
2081 | + if (rootNode == NULL) { | ||
2082 | + rootNode = newNode; | ||
2083 | + } | ||
2084 | + else { | ||
2085 | + current->childNode = newNode; | ||
2086 | + } | ||
2087 | + current = newNode; | ||
2088 | + | ||
2089 | + if (emptyTag) { | ||
2090 | + newNode = new XMLNode(); | ||
2091 | + newNode->tagName = tagName; | ||
2092 | + newNode->tagLength = tagLength; | ||
2093 | + newNode->nsTag = nsTag; | ||
2094 | + newNode->nsLength = nsLength; | ||
2095 | + | ||
2096 | + current->emptyTag = 1; | ||
2097 | + current->childNode = newNode; | ||
2098 | + current = newNode; | ||
2099 | + } | ||
2100 | + } | ||
2101 | + | ||
2102 | + } | ||
2103 | + } | ||
2104 | + | ||
2105 | + xmlFields.clear(); | ||
2106 | + return rootNode; | ||
2107 | +} | ||
2108 | + | ||
2109 | +/* | ||
2110 | + * Parse the XML Tree from rootNode and retrive value of a given key. | ||
2111 | + * If rootNode is passed as NULL, parsing resumes from last key retrieved node. | ||
2112 | + * Return 0 on Success , -1 otherwise. | ||
2113 | + * Inputs : XMLNode *rootNode, char *tag, unsigned int tagLen, char *ns, unsigned int nsLen | ||
2114 | + * Outputs: char** value, unsigned int *valueLen | ||
2115 | + */ | ||
2116 | +int MiniXmlParser::getXmlTagValue(XMLNode const* rootNode, char const* tag, unsigned int tagLen, char const* ns, unsigned int nsLen, char** value, unsigned int *valueLen) | ||
2117 | +{ | ||
2118 | + | ||
2119 | + static XMLNode *cur = (XMLNode*) rootNode; | ||
2120 | + static XMLNode *pcur = cur; | ||
2121 | + char *pValue = NULL; | ||
2122 | + bool found = false; | ||
2123 | + | ||
2124 | + if (tag == NULL) { | ||
2125 | + return -1; | ||
2126 | + } | ||
2127 | + | ||
2128 | + if (rootNode != NULL) { | ||
2129 | + cur = (XMLNode *) rootNode; | ||
2130 | + pcur = cur; | ||
2131 | + } | ||
2132 | + | ||
2133 | + while (cur != NULL) { | ||
2134 | + while (pcur != NULL) { | ||
2135 | + if (pcur->closingTag && memcmp((pcur->tagName), tag, tagLen) == 0) { | ||
2136 | + if (ns) { | ||
2137 | + if (memcmp(pcur->nsTag, ns, pcur->nsLength) == 0) { | ||
2138 | + found = true; | ||
2139 | + } | ||
2140 | + } else { | ||
2141 | + found = true; | ||
2142 | + } | ||
2143 | + | ||
2144 | + if (found) { | ||
2145 | + pValue = strstr(pcur->tagName, ">") + 1; | ||
2146 | + if (pcur->closingTag->nsLength) { | ||
2147 | + *valueLen = pcur->closingTag->nsTag - pValue - 2; | ||
2148 | + } else { | ||
2149 | + *valueLen = pcur->closingTag->tagName - pValue - 2; | ||
2150 | + } | ||
2151 | + *value = pValue; | ||
2152 | + pcur = pcur->childNode; | ||
2153 | + return 0; | ||
2154 | + } | ||
2155 | + } | ||
2156 | + pcur = pcur->childNode; | ||
2157 | + } | ||
2158 | + cur = cur->siblingNode; | ||
2159 | + pcur = cur; | ||
2160 | + } | ||
2161 | + | ||
2162 | + return -1; | ||
2163 | +} | ||
2164 | + | ||
2165 | +/* Returns Namespace prefix of given URI namespace | ||
2166 | + * Inputs : XMLNode *node, char *uri, unsigned int uriLen | ||
2167 | + * Outputs: char **nsPrefix, unsigned int *nsPrefixLen | ||
2168 | + */ | ||
2169 | +int MiniXmlParser::getNSPrefix(XMLNode const* node, char const* uri, unsigned int uriLen, char **nsPrefix, unsigned int *nsPrefixLen) { | ||
2170 | + | ||
2171 | + bool foundNS = false;; | ||
2172 | + char *tagEnd = NULL; | ||
2173 | + int rc = 0; | ||
2174 | + CDataLen tempNS; | ||
2175 | + CDataLen tempURI; | ||
2176 | + std::list<CDataLen> tags; | ||
2177 | + std::list<CDataLen> temp; | ||
2178 | + std::list<CDataLen> temp2; | ||
2179 | + std::list<CDataLen>::iterator it; | ||
2180 | + | ||
2181 | + if (node == NULL || uri == NULL) { | ||
2182 | + rc = -1; | ||
2183 | + return rc; | ||
2184 | + } | ||
2185 | + | ||
2186 | + tagEnd = strstr(node->tagName, ">"); | ||
2187 | + if (tagEnd && nsPrefix != NULL && nsPrefixLen != NULL) { | ||
2188 | + tags = Utils::split(node->tagName, tagEnd - node->tagName, " ", 1); | ||
2189 | + for (CDataLen tag: tags) { | ||
2190 | + temp = Utils::split(tag.data, tag.dataLength, ":", 1); | ||
2191 | + if (temp.size() >= 2) { | ||
2192 | + it = temp.begin(); | ||
2193 | + tempNS.data = it->data; | ||
2194 | + tempNS.dataLength = it->dataLength; | ||
2195 | + it++; | ||
2196 | + | ||
2197 | + if (memcmp(tempNS.data, "xmlns", 5) == 0) { | ||
2198 | + temp2 = Utils::split(it->data, it->dataLength, "=", 1); | ||
2199 | + if (temp2.size() >= 2) { | ||
2200 | + it = temp2.begin(); | ||
2201 | + tempNS.data = it->data; | ||
2202 | + tempNS.dataLength = it->dataLength; | ||
2203 | + it++; | ||
2204 | + } | ||
2205 | + } | ||
2206 | + //Ignore if first character is " or ' | ||
2207 | + if (it->data[0] == 34 || it->data[0] == 39) { | ||
2208 | + it->data = it->data + 1; | ||
2209 | + } | ||
2210 | + | ||
2211 | + if (memcmp(it->data, uri, uriLen) == 0) { | ||
2212 | + foundNS = true; | ||
2213 | + break; | ||
2214 | + } | ||
2215 | + } | ||
2216 | + } | ||
2217 | + } else { | ||
2218 | + rc = -1; | ||
2219 | + } | ||
2220 | + | ||
2221 | + if (rc == 0 && foundNS) { | ||
2222 | + *nsPrefix = tempNS.data; | ||
2223 | + *nsPrefixLen = tempNS.dataLength; | ||
2224 | + } | ||
2225 | + | ||
2226 | + return rc; | ||
2227 | +} | ||
2228 | diff --git a/src/tools/miniXmlParser.h b/src/tools/miniXmlParser.h | ||
2229 | new file mode 100644 | ||
2230 | index 0000000..ae0d234 | ||
2231 | --- /dev/null | ||
2232 | +++ b/src/tools/miniXmlParser.h | ||
2233 | @@ -0,0 +1,51 @@ | ||
2234 | +/******************************************************************************* | ||
2235 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
2236 | + * | ||
2237 | + * Redistribution and use in source and binary forms, with or without | ||
2238 | + * modification, are permitted provided that the following conditions are met: | ||
2239 | + * | ||
2240 | + * - Redistributions of source code must retain the above copyright notice, | ||
2241 | + * this list of conditions and the following disclaimer. | ||
2242 | + * | ||
2243 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
2244 | + * this list of conditions and the following disclaimer in the documentation | ||
2245 | + * and/or other materials provided with the distribution. | ||
2246 | + * | ||
2247 | + * - Neither the name of Intel Corporation. nor the names of its | ||
2248 | + * contributors may be used to endorse or promote products derived from this | ||
2249 | + * software without specific prior written permission. | ||
2250 | + * | ||
2251 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
2252 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
2253 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
2254 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
2255 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
2256 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
2257 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
2258 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
2259 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
2260 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
2261 | + * POSSIBILITY OF SUCH DAMAGE. | ||
2262 | + *******************************************************************************/ | ||
2263 | +#ifndef _MINIXMLPARSER_H | ||
2264 | +#define _MINIXMLPARSER_H | ||
2265 | +#include <iostream> | ||
2266 | +#include "xmlNode.h" | ||
2267 | + | ||
2268 | +class MiniXmlParser { | ||
2269 | + public: | ||
2270 | + MiniXmlParser(); | ||
2271 | + ~MiniXmlParser(); | ||
2272 | + int parse(char* buffer, unsigned int bufferLength); | ||
2273 | + XMLNode* getRootNode() { return rootNode; }; | ||
2274 | + int getXmlTagValue(XMLNode const* rootNode, char const *tag, unsigned int tagLen, char const* ns, unsigned int nsLen, char** value, unsigned int *valueLen); | ||
2275 | + int getNSPrefix(XMLNode const* nonde, char const* uri, unsigned int uriLen, char **nsPrefix, unsigned int *nsPrefixLen); | ||
2276 | + | ||
2277 | + private: | ||
2278 | + XMLNode* rootNode; | ||
2279 | + XMLNode* _parse(char const* buffer, unsigned int bufferLength); | ||
2280 | + /* Validates if the XML is well formed and sets up parent sibling pointers */ | ||
2281 | + int validateXML(XMLNode const* rootNode); | ||
2282 | + void deleteXmlTree(XMLNode *root); | ||
2283 | +}; | ||
2284 | +#endif | ||
2285 | diff --git a/src/tools/utils.cpp b/src/tools/utils.cpp | ||
2286 | new file mode 100644 | ||
2287 | index 0000000..ec20b28 | ||
2288 | --- /dev/null | ||
2289 | +++ b/src/tools/utils.cpp | ||
2290 | @@ -0,0 +1,185 @@ | ||
2291 | +/******************************************************************************* | ||
2292 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
2293 | + * | ||
2294 | + * Redistribution and use in source and binary forms, with or without | ||
2295 | + * modification, are permitted provided that the following conditions are met: | ||
2296 | + * | ||
2297 | + * - Redistributions of source code must retain the above copyright notice, | ||
2298 | + * this list of conditions and the following disclaimer. | ||
2299 | + * | ||
2300 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
2301 | + * this list of conditions and the following disclaimer in the documentation | ||
2302 | + * and/or other materials provided with the distribution. | ||
2303 | + * | ||
2304 | + * - Neither the name of Intel Corporation. nor the names of its | ||
2305 | + * contributors may be used to endorse or promote products derived from this | ||
2306 | + * software without specific prior written permission. | ||
2307 | + * | ||
2308 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
2309 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
2310 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
2311 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
2312 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
2313 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
2314 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
2315 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
2316 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
2317 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
2318 | + * POSSIBILITY OF SUCH DAMAGE. | ||
2319 | + *******************************************************************************/ | ||
2320 | +#include <string.h> | ||
2321 | +#include "utils.h" | ||
2322 | +#include <syslog.h> | ||
2323 | +#include <unistd.h> | ||
2324 | + | ||
2325 | +std::vector<std::string> Utils::split(char const * str, char const * delim) { | ||
2326 | + char* tok = (char*)str; | ||
2327 | + char* ptok = tok; | ||
2328 | + int delimLength = 0; | ||
2329 | + std::vector<std::string> splittedStrings; | ||
2330 | + | ||
2331 | + do { | ||
2332 | + if (str == NULL) { | ||
2333 | + break; | ||
2334 | + } | ||
2335 | + | ||
2336 | + if (delim == NULL) { | ||
2337 | + splittedStrings.push_back(std::string(str)); | ||
2338 | + break; | ||
2339 | + } | ||
2340 | + | ||
2341 | + delimLength = strlen(delim); | ||
2342 | + tok = strstr(ptok, delim); | ||
2343 | + while (tok) { | ||
2344 | + if (ptok != tok) { | ||
2345 | + splittedStrings.push_back(std::string(ptok, tok-ptok)); | ||
2346 | + } | ||
2347 | + ptok = tok + delimLength; | ||
2348 | + tok = strstr(ptok, delim); | ||
2349 | + } | ||
2350 | + | ||
2351 | + if (ptok != str+strlen(str)) { | ||
2352 | + splittedStrings.push_back(std::string(ptok, strlen(ptok))); | ||
2353 | + } | ||
2354 | + } while(0); | ||
2355 | + return splittedStrings; | ||
2356 | +} | ||
2357 | + | ||
2358 | + | ||
2359 | +char* Utils::strnstr(char const* haystack, unsigned int haystackLength, char const* needle, unsigned int needleLength) { | ||
2360 | + | ||
2361 | + char* needleInHaystack = NULL; | ||
2362 | + unsigned int j; | ||
2363 | + do { | ||
2364 | + if (haystack == NULL || needle == NULL) { | ||
2365 | + break; | ||
2366 | + } | ||
2367 | + | ||
2368 | + for (unsigned int i = 0; i < haystackLength; i++) { | ||
2369 | + if (haystack[i] == '\0' || ((haystackLength - i) < needleLength)) { | ||
2370 | + break; | ||
2371 | + } | ||
2372 | + | ||
2373 | + for (j = 0; j < needleLength; j++) { | ||
2374 | + if (haystack[i + j] != needle[j]) { | ||
2375 | + break; | ||
2376 | + } | ||
2377 | + } | ||
2378 | + | ||
2379 | + if (j == needleLength) { | ||
2380 | + //Found needle in haystack | ||
2381 | + needleInHaystack = (char*)&haystack[i]; | ||
2382 | + break; | ||
2383 | + } | ||
2384 | + } | ||
2385 | + } while(0); | ||
2386 | + return needleInHaystack; | ||
2387 | +} | ||
2388 | + | ||
2389 | +std::list<CDataLen> Utils::split(char const* str, unsigned int strLength, char const* delim, unsigned int delimLength) { | ||
2390 | + char* tok = (char*)str; | ||
2391 | + char* ptok = tok; | ||
2392 | + std::list<CDataLen> splittedStrings; | ||
2393 | + CDataLen dataLen; | ||
2394 | + | ||
2395 | + do { | ||
2396 | + if (str == NULL) { | ||
2397 | + break; | ||
2398 | + } | ||
2399 | + | ||
2400 | + if (delim == NULL) { | ||
2401 | + dataLen.data = (char*)str; | ||
2402 | + dataLen.dataLength = strLength; | ||
2403 | + splittedStrings.push_back(dataLen); | ||
2404 | + break; | ||
2405 | + } | ||
2406 | + | ||
2407 | + tok = Utils::strnstr(str, strLength, delim, delimLength); | ||
2408 | + while (tok) { | ||
2409 | + dataLen.data = ptok; | ||
2410 | + dataLen.dataLength = tok-ptok; | ||
2411 | + if (ptok!=tok) { | ||
2412 | + splittedStrings.push_back(dataLen); | ||
2413 | + } | ||
2414 | + ptok = tok + delimLength; | ||
2415 | + tok = Utils::strnstr(ptok, (str + strLength - ptok), delim, delimLength); | ||
2416 | + } | ||
2417 | + | ||
2418 | + if (ptok != (str + strLength)) { | ||
2419 | + dataLen.data = ptok; | ||
2420 | + dataLen.dataLength = str + strLength - ptok; | ||
2421 | + splittedStrings.push_back(dataLen); | ||
2422 | + } | ||
2423 | + } while (0); | ||
2424 | + return splittedStrings; | ||
2425 | +} | ||
2426 | + | ||
2427 | +std::string Utils::DEFAULT_NOTIFY_CMD="export DISPLAY=:0; notify-send -u critical -t 2000 "; | ||
2428 | +std::string Utils::NOTIFY_DESKTOP_SCRIPT="/usr/local/bin/notifyDesktop.sh"; | ||
2429 | +std::string Utils::NOTIFY_DESKTOP_SCRIPT1="/usr/bin/notifyDesktop.sh"; | ||
2430 | + | ||
2431 | +void Utils::notifyDesktop(std::string header, std::string body, bool logInSyslog) { | ||
2432 | + | ||
2433 | + std::string notifyCMD; | ||
2434 | + | ||
2435 | + if (! access (NOTIFY_DESKTOP_SCRIPT.c_str(), X_OK)) { | ||
2436 | + notifyCMD = NOTIFY_DESKTOP_SCRIPT + " '" + header + "' '" + body + "'"; | ||
2437 | + } else if (! access (NOTIFY_DESKTOP_SCRIPT1.c_str(), X_OK)) { | ||
2438 | + notifyCMD = NOTIFY_DESKTOP_SCRIPT1 + " '" + header + "' '" + body + "'"; | ||
2439 | + } else { | ||
2440 | + notifyCMD = DEFAULT_NOTIFY_CMD + " '" + header + "' '" + body + "'"; | ||
2441 | + } | ||
2442 | + | ||
2443 | + if (logInSyslog) { | ||
2444 | + syslog(LOG_INFO, "%s %s\n", header.c_str(), body.c_str()); | ||
2445 | + } | ||
2446 | + | ||
2447 | + system(notifyCMD.c_str()); | ||
2448 | +} | ||
2449 | + | ||
2450 | + | ||
2451 | +std::string Utils::format(const char *format , ...) { | ||
2452 | + char* buffer = NULL; | ||
2453 | + int bufferLength = 512; | ||
2454 | + int _bufferLength = 0; | ||
2455 | + va_list vl; | ||
2456 | + std::string formattedString(""); | ||
2457 | + | ||
2458 | + buffer = new char[bufferLength]; | ||
2459 | + if (buffer) { | ||
2460 | + va_start(vl, format); | ||
2461 | + | ||
2462 | + _bufferLength = vsnprintf(buffer, bufferLength, format, vl); | ||
2463 | + if (bufferLength <= _bufferLength) { | ||
2464 | + delete[] buffer; | ||
2465 | + buffer = new char[_bufferLength + 1]; | ||
2466 | + _bufferLength = vsnprintf(buffer, _bufferLength, format, vl); | ||
2467 | + } | ||
2468 | + | ||
2469 | + formattedString = std::string(buffer); | ||
2470 | + va_end(vl); | ||
2471 | + delete[] buffer; | ||
2472 | + } | ||
2473 | + | ||
2474 | + return formattedString; | ||
2475 | +} | ||
2476 | diff --git a/src/tools/utils.h b/src/tools/utils.h | ||
2477 | new file mode 100644 | ||
2478 | index 0000000..a7568fa | ||
2479 | --- /dev/null | ||
2480 | +++ b/src/tools/utils.h | ||
2481 | @@ -0,0 +1,57 @@ | ||
2482 | +/******************************************************************************* | ||
2483 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
2484 | + * | ||
2485 | + * Redistribution and use in source and binary forms, with or without | ||
2486 | + * modification, are permitted provided that the following conditions are met: | ||
2487 | + * | ||
2488 | + * - Redistributions of source code must retain the above copyright notice, | ||
2489 | + * this list of conditions and the following disclaimer. | ||
2490 | + * | ||
2491 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
2492 | + * this list of conditions and the following disclaimer in the documentation | ||
2493 | + * and/or other materials provided with the distribution. | ||
2494 | + * | ||
2495 | + * - Neither the name of Intel Corporation. nor the names of its | ||
2496 | + * contributors may be used to endorse or promote products derived from this | ||
2497 | + * software without specific prior written permission. | ||
2498 | + * | ||
2499 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
2500 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
2501 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
2502 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
2503 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
2504 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
2505 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
2506 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
2507 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
2508 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
2509 | + * POSSIBILITY OF SUCH DAMAGE. | ||
2510 | + *******************************************************************************/ | ||
2511 | + | ||
2512 | +#ifndef __UTILS_H | ||
2513 | +#define __UTILS_H | ||
2514 | +#include <iostream> | ||
2515 | +#include <vector> | ||
2516 | +#include <list> | ||
2517 | +#include <string> | ||
2518 | +#include <cstdarg> | ||
2519 | + | ||
2520 | +class CDataLen { | ||
2521 | + public: | ||
2522 | + char* data; | ||
2523 | + int dataLength; | ||
2524 | + CDataLen() { data = NULL; dataLength = 0; }; | ||
2525 | +}; | ||
2526 | + | ||
2527 | +class Utils { | ||
2528 | + public: | ||
2529 | + static std::string NOTIFY_DESKTOP_SCRIPT; | ||
2530 | + static std::string NOTIFY_DESKTOP_SCRIPT1; | ||
2531 | + static std::string DEFAULT_NOTIFY_CMD; | ||
2532 | + static std::vector<std::string> split(char const* str, char const * delim); | ||
2533 | + static std::list<CDataLen> split(char const* str, unsigned int strLength, char const* delim, unsigned int delimLength); | ||
2534 | + static char* strnstr(char const* haystack, unsigned int haystackLength, char const* needle, unsigned int needleLength); | ||
2535 | + static void notifyDesktop(std::string header, std::string body, bool logInSyslog); | ||
2536 | + static std::string format(const char *format , ...); | ||
2537 | +}; | ||
2538 | +#endif | ||
2539 | diff --git a/src/tools/xmlNode.cpp b/src/tools/xmlNode.cpp | ||
2540 | new file mode 100644 | ||
2541 | index 0000000..827cd3f | ||
2542 | --- /dev/null | ||
2543 | +++ b/src/tools/xmlNode.cpp | ||
2544 | @@ -0,0 +1,45 @@ | ||
2545 | +/******************************************************************************* | ||
2546 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
2547 | + * | ||
2548 | + * Redistribution and use in source and binary forms, with or without | ||
2549 | + * modification, are permitted provided that the following conditions are met: | ||
2550 | + * | ||
2551 | + * - Redistributions of source code must retain the above copyright notice, | ||
2552 | + * this list of conditions and the following disclaimer. | ||
2553 | + * | ||
2554 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
2555 | + * this list of conditions and the following disclaimer in the documentation | ||
2556 | + * and/or other materials provided with the distribution. | ||
2557 | + * | ||
2558 | + * - Neither the name of Intel Corporation. nor the names of its | ||
2559 | + * contributors may be used to endorse or promote products derived from this | ||
2560 | + * software without specific prior written permission. | ||
2561 | + * | ||
2562 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
2563 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
2564 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
2565 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
2566 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
2567 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
2568 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
2569 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
2570 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
2571 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
2572 | + * POSSIBILITY OF SUCH DAMAGE. | ||
2573 | + *******************************************************************************/ | ||
2574 | +#include "xmlNode.h" | ||
2575 | +#include <iostream> | ||
2576 | +XMLNode::XMLNode() { | ||
2577 | + tagName = NULL; | ||
2578 | + nsTag = NULL; | ||
2579 | + tagLength = 0; | ||
2580 | + nsLength = 0; | ||
2581 | + startTag = 0; | ||
2582 | + emptyTag = 0; | ||
2583 | + | ||
2584 | + closingTag = NULL; | ||
2585 | + startingTag = NULL; | ||
2586 | + parentNode = NULL; | ||
2587 | + childNode = NULL; | ||
2588 | + siblingNode = NULL; | ||
2589 | +} | ||
2590 | diff --git a/src/tools/xmlNode.h b/src/tools/xmlNode.h | ||
2591 | new file mode 100644 | ||
2592 | index 0000000..4a6c91e | ||
2593 | --- /dev/null | ||
2594 | +++ b/src/tools/xmlNode.h | ||
2595 | @@ -0,0 +1,49 @@ | ||
2596 | +/******************************************************************************* | ||
2597 | + * Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
2598 | + * | ||
2599 | + * Redistribution and use in source and binary forms, with or without | ||
2600 | + * modification, are permitted provided that the following conditions are met: | ||
2601 | + * | ||
2602 | + * - Redistributions of source code must retain the above copyright notice, | ||
2603 | + * this list of conditions and the following disclaimer. | ||
2604 | + * | ||
2605 | + * - Redistributions in binary form must reproduce the above copyright notice, | ||
2606 | + * this list of conditions and the following disclaimer in the documentation | ||
2607 | + * and/or other materials provided with the distribution. | ||
2608 | + * | ||
2609 | + * - Neither the name of Intel Corporation. nor the names of its | ||
2610 | + * contributors may be used to endorse or promote products derived from this | ||
2611 | + * software without specific prior written permission. | ||
2612 | + * | ||
2613 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' | ||
2614 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
2615 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
2616 | + * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS | ||
2617 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
2618 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
2619 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
2620 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
2621 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
2622 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
2623 | + * POSSIBILITY OF SUCH DAMAGE. | ||
2624 | + *******************************************************************************/ | ||
2625 | +#ifndef __XMLNODE_H | ||
2626 | +#define __XMLNODE_H | ||
2627 | +class XMLNode { | ||
2628 | + | ||
2629 | + public: | ||
2630 | + char* tagName; | ||
2631 | + char* nsTag; | ||
2632 | + int tagLength; | ||
2633 | + int nsLength; | ||
2634 | + int startTag; | ||
2635 | + int emptyTag; | ||
2636 | + | ||
2637 | + XMLNode* closingTag; | ||
2638 | + XMLNode* startingTag; | ||
2639 | + XMLNode* parentNode; | ||
2640 | + XMLNode* childNode; | ||
2641 | + XMLNode* siblingNode; | ||
2642 | + XMLNode(); | ||
2643 | +}; | ||
2644 | +#endif | ||
2645 | -- | ||
2646 | 2.9.3 | ||
2647 | |||
diff --git a/common/recipes-bsp/amt/lms7_7.1.20.bb b/common/recipes-bsp/amt/lms7_7.1.20.bb deleted file mode 100644 index eca3681..0000000 --- a/common/recipes-bsp/amt/lms7_7.1.20.bb +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | DESCRIPTION = "Intel Local Manageability Service allows applications \ | ||
2 | to access the Intel Active Management Technology (AMT) firmware via \ | ||
3 | the Intel Management Engine Interface (MEI)." | ||
4 | HOMEPAGE = "http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers" | ||
5 | |||
6 | LICENSE = "BSD_LMS" | ||
7 | |||
8 | PR = "r0" | ||
9 | BPN="lms" | ||
10 | PV_SUB = "25" | ||
11 | SRC_URI = "http://software.intel.com/sites/default/files/m/4/e/a/9/b/37962-${BPN}_${PV}.${PV_SUB}.zip \ | ||
12 | file://atnetworktool-printf-fix.patch \ | ||
13 | file://readlink-declaration.patch \ | ||
14 | file://0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch \ | ||
15 | file://0001-Include-sys-select.h-for-fd_set.patch \ | ||
16 | file://0002-Use-proper-netinet-in.h-API.patch \ | ||
17 | " | ||
18 | |||
19 | LOCALSRC = "file://${WORKDIR}/outputdir/${BPN}-${PV}-${PV_SUB}.tar.gz" | ||
20 | |||
21 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
22 | |||
23 | LIC_FILES_CHKSUM = "file://COPYING;md5=7264184cf88d9f27b719a9656255b47b" | ||
24 | |||
25 | SRC_URI[md5sum] = "687b76e78bfdbcf567c0e842c1fe240a" | ||
26 | SRC_URI[sha256sum] = "cc0457f0044e924794bb1aeae9a72c28666a525cd8a963d0d92970222946e75b" | ||
27 | |||
28 | inherit autotools update-rc.d | ||
29 | |||
30 | INITSCRIPT_NAME = "lms7" | ||
31 | INITSCRIPT_PARAMS = "defaults" | ||
32 | |||
33 | python do_unpack() { | ||
34 | s = d.getVar('S', True) | ||
35 | d.setVar('S', '${WORKDIR}/outputdir') | ||
36 | bb.build.exec_func('base_do_unpack', d) | ||
37 | # temorarily change SRC_URI for unpack | ||
38 | src_uri = d.getVar('SRC_URI', True) | ||
39 | d.setVar('SRC_URI', '${LOCALSRC}') | ||
40 | d.setVar('S', s) | ||
41 | bb.build.exec_func('base_do_unpack', d) | ||
42 | d.setVar('SRC_URI', src_uri) | ||
43 | } | ||
44 | |||
45 | |||
46 | do_install_append () { | ||
47 | mv ${D}/${sbindir}/lms ${D}/${sbindir}/lms7 | ||
48 | install -d ${D}${sysconfdir}/init.d | ||
49 | # The configure script looks at the host to decide where to put init | ||
50 | # scripts, so move it at the same time as renaming it. | ||
51 | if test -f ${D}${sysconfdir}/rc.d/init.d/lms ; then | ||
52 | mv ${D}${sysconfdir}/rc.d/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} | ||
53 | else | ||
54 | mv ${D}${sysconfdir}/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} | ||
55 | fi | ||
56 | sed -i 's/^NAME=lms/NAME=lms7/' ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} | ||
57 | rmdir ${D}${datadir} || : | ||
58 | } | ||
diff --git a/common/recipes-bsp/amt/lms8_8.0.0-7.bb b/common/recipes-bsp/amt/lms8_8.0.0-7.bb deleted file mode 100644 index 9b37b9b..0000000 --- a/common/recipes-bsp/amt/lms8_8.0.0-7.bb +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | DESCRIPTION = "Intel Local Manageability Service allows applications \ | ||
2 | to access the Intel Active Management Technology (AMT) firmware via \ | ||
3 | the Intel Management Engine Interface (MEI)." | ||
4 | HOMEPAGE = "http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers" | ||
5 | |||
6 | LICENSE = "BSD_LMS" | ||
7 | |||
8 | PR = "r0" | ||
9 | BPN="lms" | ||
10 | SRC_URI = "http://software.intel.com/sites/default/files/${BPN}-${PV}.tar.gz \ | ||
11 | file://readlink-declaration.patch \ | ||
12 | file://0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch \ | ||
13 | file://0001-Include-sys-select.h-for-fd_set.patch \ | ||
14 | file://0002-Use-proper-netinet-in.h-API.patch \ | ||
15 | file://0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch \ | ||
16 | file://0004-Intel-AMT-ME-real-time-notification-infra.patch \ | ||
17 | " | ||
18 | |||
19 | FILES_${PN} += "${datadir}/xml/AMTAlerts.xml" | ||
20 | |||
21 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
22 | |||
23 | LIC_FILES_CHKSUM = "file://COPYING;md5=ec77c894e8a1a89fa07aed2c76680ab8" | ||
24 | |||
25 | SRC_URI[md5sum] = "3cbd027a0e6e9ced8238478b24cde3c6" | ||
26 | SRC_URI[sha256sum] = "7077db6f2f381e67cb37565b20c40ff0c7d3f98f014e65622a4b4b66c2b1d637" | ||
27 | |||
28 | inherit autotools update-rc.d | ||
29 | |||
30 | INITSCRIPT_NAME = "lms8" | ||
31 | INITSCRIPT_PARAMS = "defaults" | ||
32 | |||
33 | |||
34 | do_install_append () { | ||
35 | mv ${D}/${sbindir}/lms ${D}/${sbindir}/lms8 | ||
36 | install -d ${D}${sysconfdir}/init.d | ||
37 | # The configure script looks at the host to decide where to put init | ||
38 | # scripts, so move it at the same time as renaming it. | ||
39 | if test -f ${D}${sysconfdir}/rc.d/init.d/lms ; then | ||
40 | mv ${D}${sysconfdir}/rc.d/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} | ||
41 | else | ||
42 | mv ${D}${sysconfdir}/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} | ||
43 | fi | ||
44 | sed -i 's/^NAME=lms/NAME=lms8/' ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} | ||
45 | rmdir ${D}${datadir} || : | ||
46 | } | ||
diff --git a/common/recipes-bsp/efilinux/efilinux/0001-Disable-address-of-packed-member-warning.patch b/common/recipes-bsp/efilinux/efilinux/0001-Disable-address-of-packed-member-warning.patch deleted file mode 100644 index afb9951..0000000 --- a/common/recipes-bsp/efilinux/efilinux/0001-Disable-address-of-packed-member-warning.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 7c171c1813651a3a02ad2cda361b42ebc7ce324d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Aug 2017 10:34:19 -0700 | ||
4 | Subject: [PATCH 1/2] Disable address-of-packed-member warning | ||
5 | |||
6 | Clang complains so make it happy | ||
7 | |||
8 | loaders/bzimage/bzimage.c:346:55: error: taking address of packed member 'base' of class or structure 'dt_addr_t' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] | ||
9 | err = emalloc(gdt.limit, 8, (EFI_PHYSICAL_ADDRESS *)&gdt.base); | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Makefile | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/Makefile b/Makefile | ||
19 | index a955e34..ff1b79b 100644 | ||
20 | --- a/Makefile | ||
21 | +++ b/Makefile | ||
22 | @@ -61,7 +61,7 @@ ifeq ($(ARCH),ia32) | ||
23 | endif | ||
24 | endif | ||
25 | ifeq ($(ARCH),x86_64) | ||
26 | - CFLAGS += -mno-red-zone | ||
27 | + CFLAGS += -mno-red-zone -Wno-address-of-packed-member | ||
28 | endif | ||
29 | |||
30 | LDFLAGS=-T $(LDSCRIPT) -Bsymbolic -shared -nostdlib -znocombreloc \ | ||
31 | -- | ||
32 | 2.14.1 | ||
33 | |||
diff --git a/common/recipes-bsp/efilinux/efilinux/0002-initialize-char-pointers.patch b/common/recipes-bsp/efilinux/efilinux/0002-initialize-char-pointers.patch deleted file mode 100644 index 127c187..0000000 --- a/common/recipes-bsp/efilinux/efilinux/0002-initialize-char-pointers.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 49053e4ff0f3550d019cdad8a93677c18fc69791 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Aug 2017 10:35:09 -0700 | ||
4 | Subject: [PATCH 2/2] initialize char pointers | ||
5 | |||
6 | Clang complains about using them without initializing | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | Upstream-Status: Pending | ||
11 | |||
12 | entry.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/entry.c b/entry.c | ||
16 | index 0aa6cdd..23ba51e 100644 | ||
17 | --- a/entry.c | ||
18 | +++ b/entry.c | ||
19 | @@ -402,9 +402,9 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *_table) | ||
20 | WCHAR *error_buf; | ||
21 | EFI_STATUS err; | ||
22 | EFI_LOADED_IMAGE *info; | ||
23 | - CHAR16 *name, *options; | ||
24 | + CHAR16 *name = NULL, *options; | ||
25 | UINT32 options_size; | ||
26 | - char *cmdline; | ||
27 | + char *cmdline = NULL; | ||
28 | |||
29 | InitializeLib(image, _table); | ||
30 | sys_table = _table; | ||
31 | -- | ||
32 | 2.14.1 | ||
33 | |||
diff --git a/common/recipes-bsp/efilinux/efilinux_1.1.bb b/common/recipes-bsp/efilinux/efilinux_1.1.bb deleted file mode 100644 index 63e80f8..0000000 --- a/common/recipes-bsp/efilinux/efilinux_1.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | DESCRIPTION = "A UEFI OS loader" | ||
2 | LICENSE = "BSD-2-Clause" | ||
3 | LIC_FILES_CHKSUM = "file://efilinux.h;beginline=5;endline=27;md5=f8d56e644672ac63fd81b55c205283ad" | ||
4 | |||
5 | DEPENDS = "gnu-efi" | ||
6 | |||
7 | inherit deploy | ||
8 | |||
9 | SRCREV = "a995826f9e43f1134baea61610eafd8c173bb776" | ||
10 | PV = "1.1+git${SRCPV}" | ||
11 | |||
12 | SRC_URI = "git://git.kernel.org/pub/scm/boot/efilinux/efilinux.git \ | ||
13 | file://0001-Disable-address-of-packed-member-warning.patch \ | ||
14 | file://0002-initialize-char-pointers.patch \ | ||
15 | " | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)' | ||
20 | |||
21 | EXTRA_OEMAKE = "INCDIR=${STAGING_INCDIR} LIBDIR=${STAGING_LIBDIR}" | ||
22 | |||
23 | # syslinux uses $LD for linking, strip `-Wl,' so it can work | ||
24 | export LDFLAGS = "`echo $LDFLAGS | sed 's/-Wl,//g'`" | ||
25 | |||
26 | do_deploy () { | ||
27 | install ${S}/efilinux.efi ${DEPLOYDIR}/efilinux.efi | ||
28 | } | ||
29 | addtask deploy before do_build after do_compile | ||
30 | |||
31 | python () { | ||
32 | ccargs = d.getVar('TUNE_CCARGS').split() | ||
33 | if '-mx32' in ccargs: | ||
34 | # use x86_64 EFI ABI | ||
35 | ccargs.remove('-mx32') | ||
36 | ccargs.append('-m64') | ||
37 | d.setVar('TUNE_CCARGS', ' '.join(ccargs)) | ||
38 | } | ||
diff --git a/common/recipes-bsp/formfactor/formfactor/machconfig b/common/recipes-bsp/formfactor/formfactor/machconfig deleted file mode 100644 index 73695fa..0000000 --- a/common/recipes-bsp/formfactor/formfactor/machconfig +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | # Note: superuser permission is required to run usbhid-dump | ||
2 | # successfully. | ||
3 | |||
4 | # HEX keys are according to the USB HID spec and USB HID usage table | ||
5 | # We can add more keys as needed in the future. | ||
6 | |||
7 | # This test may not be very accurate, as we only look for the first | ||
8 | # two lines of a descriptor section. Example: | ||
9 | # | ||
10 | # 001:003:000:DESCRIPTOR 1460501386.337809 | ||
11 | # 05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 03 | ||
12 | # 15 00 25 01 95 03 75 01 81 02 .. .. .. .. .. .. | ||
13 | # .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. | ||
14 | # | ||
15 | # By doing so we eliminate false matches when HEX keys are in the lines | ||
16 | # in the middle of the whole descriptor section. | ||
17 | |||
18 | if type usbhid-dump &>/dev/null; then | ||
19 | if USBHID_DUMP_OUTPUT=$(usbhid-dump -e descriptor 2>/dev/null|grep -A1 DESCRIPTOR); then | ||
20 | # checker for generic USB HID keyboard | ||
21 | USBHID_KBD_CMD="grep -E '^ 05 01 09 06'" | ||
22 | |||
23 | # checker for touch screen | ||
24 | USBHID_TS_CMD="grep -E '^ 05 0D 09 04'" | ||
25 | |||
26 | if echo "$USBHID_DUMP_OUTPUT"|eval $USBHID_TS_CMD &>/dev/null; then | ||
27 | HAVE_TOUCHSCREEN=1 | ||
28 | fi | ||
29 | |||
30 | if echo "$USBHID_DUMP_OUTPUT"|eval $USBHID_KBD_CMD &>/dev/null; then | ||
31 | HAVE_KEYBOARD=1 | ||
32 | else | ||
33 | # config script in OE will set HAVE_KEYBOARD=1 | ||
34 | # if we don't set any value. We have to explicitly | ||
35 | # tell it when keyboard is not detected. | ||
36 | HAVE_KEYBOARD=0 | ||
37 | fi | ||
38 | fi | ||
39 | fi | ||
diff --git a/common/recipes-bsp/formfactor/formfactor_0.0.bbappend b/common/recipes-bsp/formfactor/formfactor_0.0.bbappend deleted file mode 100644 index 6dd422a..0000000 --- a/common/recipes-bsp/formfactor/formfactor_0.0.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
diff --git a/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf deleted file mode 100644 index 74d33c8..0000000 --- a/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | # Mimic modprobe's install funcitonality with busybox's modprobe | ||
2 | install gma500_gfx dmesg | grep gma500_gfx_checked || { /etc/modprobe.d/gma500-gfx-check.sh || modprobe gma500_gfx; } | ||
diff --git a/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh deleted file mode 100644 index 75cda99..0000000 --- a/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Check for devices we wish to avoid gma500_gfx for | ||
4 | DEVICES="0x8119 0x4108" | ||
5 | |||
6 | # Checked flag to avoid infinite modprobe | ||
7 | echo "gma500_gfx_checked" >> /dev/kmsg; | ||
8 | |||
9 | for DEVICE in $DEVICES; do | ||
10 | if udevadm trigger --subsystem-match=pci --verbose --attr-match=device=$DEVICE | grep "pci" >> /dev/null ; then | ||
11 | echo "Found $DEVICE, avoiding gma500_gfx module" >> /dev/kmsg; | ||
12 | exit 0 | ||
13 | fi | ||
14 | done | ||
15 | exit 1 | ||
diff --git a/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb b/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb deleted file mode 100644 index 7b08064..0000000 --- a/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | SUMMARY = "Intel gma500_gfx fix for certain hardware" | ||
2 | DESCRIPTION = "Avoid inserting gma500_gfx module for certain hardware devices." | ||
3 | LICENSE="GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | ||
5 | |||
6 | SRC_URI = "file://gma500-gfx-check.conf \ | ||
7 | file://gma500-gfx-check.sh " | ||
8 | |||
9 | do_install(){ | ||
10 | install -d ${D}${sysconfdir}/modprobe.d/ | ||
11 | install -m 755 ${WORKDIR}/gma500-gfx-check.sh ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.sh | ||
12 | install -m 644 ${WORKDIR}/gma500-gfx-check.conf ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.conf | ||
13 | } | ||
14 | |||
15 | FILES_${PN}="${sysconfdir}/modprobe.d/gma500-gfx-check.conf \ | ||
16 | ${sysconfdir}/modprobe.d/gma500-gfx-check.sh" | ||
17 | |||
18 | COMPATIBLE_MACHINE = "intel-core2-32" | ||
diff --git a/common/recipes-bsp/rmc/boards/Galileo2/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/Galileo2/BOOTENTRY.CONFIG deleted file mode 100644 index dd1b911..0000000 --- a/common/recipes-bsp/rmc/boards/Galileo2/BOOTENTRY.CONFIG +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | boot.conf | ||
2 | install.conf | ||
3 | |||
diff --git a/common/recipes-bsp/rmc/boards/Galileo2/boot.conf b/common/recipes-bsp/rmc/boards/Galileo2/boot.conf deleted file mode 100644 index 580ea48..0000000 --- a/common/recipes-bsp/rmc/boards/Galileo2/boot.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Galileo Gen 2 boot | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=boot rootwait console=ttyS1,115200 | ||
diff --git a/common/recipes-bsp/rmc/boards/Galileo2/gallieo2.fp b/common/recipes-bsp/rmc/boards/Galileo2/gallieo2.fp deleted file mode 100755 index fe77d4d..0000000 --- a/common/recipes-bsp/rmc/boards/Galileo2/gallieo2.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/Galileo2/install.conf b/common/recipes-bsp/rmc/boards/Galileo2/install.conf deleted file mode 100644 index 688c2a8..0000000 --- a/common/recipes-bsp/rmc/boards/Galileo2/install.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Galileo Gen 2 install | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=install-efi rootwait console=ttyS1,115200 | ||
diff --git a/common/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM b/common/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM deleted file mode 100644 index 476b1fb..0000000 --- a/common/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | console=ttyS0,115200 | ||
diff --git a/common/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp b/common/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp deleted file mode 100644 index 9aa145f..0000000 --- a/common/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG deleted file mode 100644 index b2fabe8..0000000 --- a/common/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | boot.conf | ||
2 | install.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG b/common/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG deleted file mode 100644 index ca5f04b..0000000 --- a/common/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | efi_entry_dir:root:disk:770:/boot/loader/entries/ | ||
2 | boot.conf:root:disk:770:/boot/loader/entries/rmcboot.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh b/common/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh deleted file mode 100644 index 6694261..0000000 --- a/common/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | # There is no tty device on this board. | ||
2 | sed -i '/start_getty.\+ttyS.*/d' /tgt_root/etc/inittab | ||
diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf b/common/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf deleted file mode 100644 index b29fa45..0000000 --- a/common/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title NUC5i5RYB boot | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=boot rootwait | ||
diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf b/common/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf deleted file mode 100644 index 0dca3ca..0000000 --- a/common/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title NUC5i5RYB install | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=install-efi rootwait | ||
diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp b/common/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp deleted file mode 100644 index 5737477..0000000 --- a/common/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG deleted file mode 100644 index b2fabe8..0000000 --- a/common/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | boot.conf | ||
2 | install.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp b/common/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp deleted file mode 100644 index 86ecea7..0000000 --- a/common/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/T100-32bit/boot.conf b/common/recipes-bsp/rmc/boards/T100-32bit/boot.conf deleted file mode 100644 index f1578e0..0000000 --- a/common/recipes-bsp/rmc/boards/T100-32bit/boot.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title T100T(32bit) boot | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=boot loglevel=8 | ||
diff --git a/common/recipes-bsp/rmc/boards/T100-32bit/install.conf b/common/recipes-bsp/rmc/boards/T100-32bit/install.conf deleted file mode 100644 index 67e7eb1..0000000 --- a/common/recipes-bsp/rmc/boards/T100-32bit/install.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title T100T(32bit) install | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=install-efi | ||
diff --git a/common/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG deleted file mode 100644 index b2fabe8..0000000 --- a/common/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | boot.conf | ||
2 | install.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG b/common/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG deleted file mode 100644 index ecd2060..0000000 --- a/common/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | # Keep rmc Joule boot.conf instead of meta-intel default | ||
2 | efi_entry_dir:root:disk:770:/boot/loader/entries/ | ||
3 | boot.conf:root:disk:770:/boot/loader/entries/boot.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM b/common/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM deleted file mode 100644 index 08be5df..0000000 --- a/common/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | video=efifb maxcpus=4 reboot=efi kmemleak=off console=tty0 console=ttyS2,115200 | ||
diff --git a/common/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh b/common/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh deleted file mode 100644 index 30bbd28..0000000 --- a/common/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | # Joule uses only S2 for serial, so remove S0 | ||
2 | sed -i '/start_getty.\+ttyS0/d' /tgt_root/etc/inittab | ||
diff --git a/common/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp b/common/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp deleted file mode 100755 index 1a15028..0000000 --- a/common/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/broxton-m/bm.fp b/common/recipes-bsp/rmc/boards/broxton-m/bm.fp deleted file mode 100755 index 135a7a5..0000000 --- a/common/recipes-bsp/rmc/boards/broxton-m/bm.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/broxton-m/boot.conf b/common/recipes-bsp/rmc/boards/broxton-m/boot.conf deleted file mode 100644 index caa00c5..0000000 --- a/common/recipes-bsp/rmc/boards/broxton-m/boot.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Joule / Broxton-m | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=boot | ||
diff --git a/common/recipes-bsp/rmc/boards/broxton-m/install.conf b/common/recipes-bsp/rmc/boards/broxton-m/install.conf deleted file mode 100644 index 9cdd86b..0000000 --- a/common/recipes-bsp/rmc/boards/broxton-m/install.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Joule / Broxton-m Install | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=install-efi rootwait | ||
diff --git a/common/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp b/common/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp deleted file mode 100644 index d757614..0000000 --- a/common/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG deleted file mode 100644 index b2fabe8..0000000 --- a/common/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | boot.conf | ||
2 | install.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/minnowmax/boot.conf b/common/recipes-bsp/rmc/boards/minnowmax/boot.conf deleted file mode 100644 index 6e789cd..0000000 --- a/common/recipes-bsp/rmc/boards/minnowmax/boot.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Minnow Max boot | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=boot console=ttyS0,115200n8 | ||
diff --git a/common/recipes-bsp/rmc/boards/minnowmax/install.conf b/common/recipes-bsp/rmc/boards/minnowmax/install.conf deleted file mode 100644 index 1a493ae..0000000 --- a/common/recipes-bsp/rmc/boards/minnowmax/install.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Minnow Max install | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=install-efi console=ttyS0,115200n8 | ||
diff --git a/common/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp b/common/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp deleted file mode 100644 index 3c5a286..0000000 --- a/common/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG deleted file mode 100644 index b2fabe8..0000000 --- a/common/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | boot.conf | ||
2 | install.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf b/common/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf deleted file mode 100644 index 577e5d6..0000000 --- a/common/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Minnow Max B3 boot | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=boot console=ttyS0,115200n8 | ||
diff --git a/common/recipes-bsp/rmc/boards/minnowmaxB3/install.conf b/common/recipes-bsp/rmc/boards/minnowmaxB3/install.conf deleted file mode 100644 index cf500d6..0000000 --- a/common/recipes-bsp/rmc/boards/minnowmaxB3/install.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Minnow Max B3 install | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=install-efi console=ttyS0,115200n8 | ||
diff --git a/common/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp b/common/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp deleted file mode 100644 index ad3f0d6..0000000 --- a/common/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG deleted file mode 100644 index b2fabe8..0000000 --- a/common/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | boot.conf | ||
2 | install.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG b/common/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG deleted file mode 100644 index 8c5a767..0000000 --- a/common/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | # Keep rmc Mohonpeak boot.conf instead of meta-intel default | ||
2 | efi_entry_dir:root:disk:770:/boot/loader/entries/ | ||
3 | boot.conf:root:disk:770:/boot/loader/entries/boot.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM b/common/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM deleted file mode 100644 index 169056e..0000000 --- a/common/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | console=ttyS1,115200 console=tty1 | ||
diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh b/common/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh deleted file mode 100644 index 5f440c3..0000000 --- a/common/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | # Mohonpeak uses only S1 for serial, so remove S0 and S2 | ||
2 | sed -i '/start_getty.\+ttyS0/d' /tgt_root/etc/inittab | ||
3 | sed -i '/start_getty.\+ttyS2/d' /tgt_root/etc/inittab | ||
diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/boot.conf b/common/recipes-bsp/rmc/boards/mohonpeak/boot.conf deleted file mode 100644 index 5b7a0f6..0000000 --- a/common/recipes-bsp/rmc/boards/mohonpeak/boot.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Mohon Peak boot | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=boot | ||
diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/install.conf b/common/recipes-bsp/rmc/boards/mohonpeak/install.conf deleted file mode 100644 index dde3497..0000000 --- a/common/recipes-bsp/rmc/boards/mohonpeak/install.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title Mohon Peak Install | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=install-efi rootwait | ||
diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp b/common/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp deleted file mode 100644 index bc4bdae..0000000 --- a/common/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG deleted file mode 100644 index b2fabe8..0000000 --- a/common/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | boot.conf | ||
2 | install.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG b/common/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG deleted file mode 100644 index 7d5378b..0000000 --- a/common/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # This file specifies which file or dir RMC will install onto target. | ||
2 | # Note the absolute path is referred from mount points in installation. | ||
3 | efi_entry_dir:root:disk:770:/boot/loader/entries/ | ||
4 | boot.conf:root:disk:770:/boot/loader/entries/rmcboot.conf | ||
5 | mylibdir:root:root:770:/tgt_root/etc/mylib/ | ||
6 | mylib.conf:root:root:660:/tgt_root/etc/mylib/mylib.conf | ||
diff --git a/common/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM b/common/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM deleted file mode 100644 index 27943b4..0000000 --- a/common/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | i915.preliminary_hw_support=1 | ||
diff --git a/common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh b/common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh deleted file mode 100644 index bec3be4..0000000 --- a/common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # NUC Gen 6 specific retouch after RMC deployment | ||
2 | |||
3 | # The generated inittab from OE build causes error messages: | ||
4 | # "auth.err getty[615]: tcgetattr: Input/output error" | ||
5 | # in /var/log/messages because NUC Gen 6 doesn't have any | ||
6 | # serial tty. We delete line(s) here on target. | ||
7 | sed -i '/start_getty.\+ttyS.*/d' /tgt_root/etc/inittab | ||
diff --git a/common/recipes-bsp/rmc/boards/nucgen6/boot.conf b/common/recipes-bsp/rmc/boards/nucgen6/boot.conf deleted file mode 100644 index e6ecb02..0000000 --- a/common/recipes-bsp/rmc/boards/nucgen6/boot.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title NUC Gen6 boot | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=boot | ||
diff --git a/common/recipes-bsp/rmc/boards/nucgen6/install.conf b/common/recipes-bsp/rmc/boards/nucgen6/install.conf deleted file mode 100644 index 916bb04..0000000 --- a/common/recipes-bsp/rmc/boards/nucgen6/install.conf +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | title NUC Gen6 install | ||
2 | linux /vmlinuz | ||
3 | initrd /initrd | ||
4 | options LABEL=install-efi | ||
diff --git a/common/recipes-bsp/rmc/boards/nucgen6/mylib.conf b/common/recipes-bsp/rmc/boards/nucgen6/mylib.conf deleted file mode 100644 index fd8357c..0000000 --- a/common/recipes-bsp/rmc/boards/nucgen6/mylib.conf +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # This is a demo conf file read by an imagined program or library | ||
2 | # which reads this file at runtime to customize its behavior. | ||
3 | # rmc will deploy it to the location specified in INSTALLER.CONFIG. | ||
4 | |||
5 | lib.info = "V1.0 for rmc demo" | ||
6 | lib.board = "NUC gen 6" | ||
7 | prog.ui.layout = "minimal" | ||
diff --git a/common/recipes-bsp/rmc/boards/nucgen6/nuc6.fp b/common/recipes-bsp/rmc/boards/nucgen6/nuc6.fp deleted file mode 100644 index 834f800..0000000 --- a/common/recipes-bsp/rmc/boards/nucgen6/nuc6.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM b/common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM deleted file mode 100644 index 476b1fb..0000000 --- a/common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | console=ttyS0,115200 | ||
diff --git a/common/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp b/common/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp deleted file mode 100644 index e4c4165..0000000 --- a/common/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM b/common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM deleted file mode 100644 index 476b1fb..0000000 --- a/common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | console=ttyS0,115200 | ||
diff --git a/common/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp b/common/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp deleted file mode 100644 index 7f28f37..0000000 --- a/common/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp +++ /dev/null | |||
Binary files differ | |||
diff --git a/common/recipes-bsp/rmc/rmc-db.bb b/common/recipes-bsp/rmc/rmc-db.bb deleted file mode 100644 index f24ed11..0000000 --- a/common/recipes-bsp/rmc/rmc-db.bb +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | SUMMARY = "Central RMC Database" | ||
2 | DESCRIPTION = "Generate a centralized RMC database for RMC feature. \ | ||
3 | Fingerprints and data for all boards supported are specified by variable \ | ||
4 | RMC_BOARD_DATA_DIRS which is a list of top directories that contains \ | ||
5 | subdirectories for boards. Developers can add their top directories by appending \ | ||
6 | them to this variable in a rmc-db.bbappend.Refer to rmc-db bbclass for more \ | ||
7 | information." | ||
8 | |||
9 | LICENSE = "MIT" | ||
10 | |||
11 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
12 | |||
13 | S = "${WORKDIR}" | ||
14 | |||
15 | inherit rmc-db | ||
16 | |||
17 | RMC_BOARD_DATA_DIRS ?= "${THISDIR}/boards/" | ||
18 | RMC_DB_DIR = "${WORKDIR}/db" | ||
19 | |||
20 | # Let sstate be aware of change in any added board directories | ||
21 | do_generate_rmc_db[file-checksums] = "${@get_rmc_top_dirs_list(d)}" | ||
22 | |||
23 | # derived from get_lic_checksum_file_list(d) in base.bbclass in OE | ||
24 | def get_rmc_top_dirs_list(d): | ||
25 | dirlist = [] | ||
26 | dirs = d.getVar("RMC_BOARD_DATA_DIRS", True) or '' | ||
27 | topdirs = dirs.split() | ||
28 | for each in topdirs: | ||
29 | dirlist.append(each + ":" + str(os.path.exists(each))) | ||
30 | return " ".join(dirlist) | ||
31 | |||
32 | do_generate_rmc_db () { | ||
33 | rmc_generate_db "${RMC_BOARD_DATA_DIRS}" "${RMC_DB_DIR}"/rmc.db | ||
34 | } | ||
35 | |||
36 | addtask generate_rmc_db after do_compile | ||
37 | |||
38 | inherit deploy | ||
39 | |||
40 | do_deploy () { | ||
41 | if [ -f ${RMC_DB_DIR}/rmc.db ]; then | ||
42 | install -m 0400 ${RMC_DB_DIR}/rmc.db ${DEPLOYDIR} | ||
43 | else | ||
44 | rm -f ${DEPLOYDIR}/rmc.db | ||
45 | echo "Warning: no RMC central database found, skip deployment." | ||
46 | fi | ||
47 | } | ||
48 | |||
49 | addtask deploy after do_generate_rmc_db | ||
diff --git a/common/recipes-bsp/rmc/rmc-efi.bb b/common/recipes-bsp/rmc/rmc-efi.bb deleted file mode 100644 index 2a1c9a9..0000000 --- a/common/recipes-bsp/rmc/rmc-efi.bb +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | SUMMARY = "RMC (Runtime Machine Configuration) EFI library" | ||
2 | |||
3 | DESCRIPTION = "The RMC EFI library adds RMC support to existing EFI bootloaders" | ||
4 | |||
5 | LICENSE = "MIT" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8" | ||
8 | |||
9 | SRC_URI = "git://git.yoctoproject.org/rmc" | ||
10 | |||
11 | SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*" | ||
16 | |||
17 | TARGET_CFLAGS +="-Wl,--hash-style=both" | ||
18 | |||
19 | EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \ | ||
20 | RMC_INSTALL_LIB_PATH=${D}${libdir} \ | ||
21 | RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc" | ||
22 | |||
23 | SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong" | ||
24 | SECURITY_CFLAGS_append_class-target = " -fno-stack-protector" | ||
25 | |||
26 | python () { | ||
27 | ccargs = d.getVar('TUNE_CCARGS').split() | ||
28 | if '-mx32' in ccargs: | ||
29 | ccargs.remove('-mx32') | ||
30 | ccargs.append('-m64') | ||
31 | d.setVar('TUNE_CCARGS', ' '.join(ccargs)) | ||
32 | } | ||
33 | |||
34 | do_compile() { | ||
35 | oe_runmake -f Makefile.efi | ||
36 | } | ||
37 | |||
38 | do_install() { | ||
39 | oe_runmake -f Makefile.efi install | ||
40 | } | ||
diff --git a/common/recipes-bsp/rmc/rmc.bb b/common/recipes-bsp/rmc/rmc.bb deleted file mode 100644 index 8797644..0000000 --- a/common/recipes-bsp/rmc/rmc.bb +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | SUMMARY = "RMC (Runtime Machine Configuration)" | ||
2 | |||
3 | DESCRIPTION = "RMC project provides a tool and libraries to identify types \ | ||
4 | of hardware boards and access any file-based data specific to the board's \ | ||
5 | type at runtime in a centralized way. Software (clients) can have a generic \ | ||
6 | logic to query board-specific data from RMC without knowing the type of board. \ | ||
7 | This make it possible to have a generic software work running on boards which \ | ||
8 | require any quirks or customizations at a board or product level. \ | ||
9 | " | ||
10 | |||
11 | LICENSE = "MIT" | ||
12 | |||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8" | ||
14 | |||
15 | SRC_URI = "git://git.yoctoproject.org/rmc" | ||
16 | |||
17 | SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*" | ||
22 | |||
23 | TARGET_CFLAGS +="-Wl,--hash-style=both" | ||
24 | |||
25 | EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \ | ||
26 | RMC_INSTALL_BIN_PATH=${D}${bindir} \ | ||
27 | RMC_INSTALL_LIB_PATH=${D}${libdir} \ | ||
28 | RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc" | ||
29 | |||
30 | SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong" | ||
31 | SECURITY_CFLAGS_append_class-target = " -fno-stack-protector" | ||
32 | |||
33 | do_compile_class-target() { | ||
34 | oe_runmake | ||
35 | } | ||
36 | |||
37 | do_install() { | ||
38 | oe_runmake install | ||
39 | } | ||
40 | |||
41 | do_install_class-native() { | ||
42 | install -d ${D}${STAGING_BINDIR_NATIVE} | ||
43 | install -m 0755 ${S}/src/rmc ${D}${STAGING_BINDIR_NATIVE} | ||
44 | } | ||
45 | |||
46 | BBCLASSEXTEND = "native" | ||
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch deleted file mode 100644 index 8d0b614..0000000 --- a/common/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 58669ad764767afea4de53f8a97357773b1855ef Mon Sep 17 00:00:00 2001 | ||
2 | From: Saul Wold <sgw@linux.intel.com> | ||
3 | Date: Tue, 25 Oct 2016 12:54:08 -0700 | ||
4 | Subject: [PATCH] efi/boot.c: workaround for Joule BIOS hang | ||
5 | |||
6 | This patch should be removed when the BIOS is fixed | ||
7 | |||
8 | Authored-by: Steve Sakoman <steve@sakoman.com> | ||
9 | |||
10 | Upstream-Status: Inappropriate [machine specific workaround] | ||
11 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
12 | --- | ||
13 | src/boot/efi/boot.c | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c | ||
17 | index 3dcd9a5..3c6ed8c 100644 | ||
18 | --- a/src/boot/efi/boot.c | ||
19 | +++ b/src/boot/efi/boot.c | ||
20 | @@ -649,7 +649,7 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load | ||
21 | } | ||
22 | |||
23 | /* timeout disabled, wait for next key */ | ||
24 | - wait = TRUE; | ||
25 | + wait = FALSE; | ||
26 | continue; | ||
27 | } | ||
28 | |||
29 | -- | ||
30 | 2.7.4 | ||
31 | |||
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch deleted file mode 100644 index 2f248e2..0000000 --- a/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From fe1c2fdfe81f2ac2b41fe8543ba07f1911770d26 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
3 | Date: Sat, 21 May 2016 18:52:07 -0700 | ||
4 | Subject: [PATCH] sd-boot: Link RMC library into bootloader and stub | ||
5 | |||
6 | Add RMC library into bootloader binary and stub. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
11 | --- | ||
12 | Makefile.am | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/Makefile.am b/Makefile.am | ||
16 | index 305099ab6..9fb6f9b7b 100644 | ||
17 | --- a/Makefile.am | ||
18 | +++ b/Makefile.am | ||
19 | @@ -2802,7 +2802,7 @@ $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(t | ||
20 | |||
21 | $(systemd_boot_solib): $(systemd_boot_objects) | ||
22 | $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \ | ||
23 | - -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ | ||
24 | + -o $@ -lefi -lgnuefi -lrmcefi $(shell $(CC) -print-libgcc-file-name); \ | ||
25 | nm -D -u $@ | grep ' U ' && exit 1 || : | ||
26 | |||
27 | $(systemd_boot): $(systemd_boot_solib) | ||
28 | @@ -2852,7 +2852,7 @@ $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(t | ||
29 | |||
30 | $(stub_solib): $(stub_objects) | ||
31 | $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \ | ||
32 | - -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ | ||
33 | + -o $@ -lefi -lgnuefi -lrmcefi $(shell $(CC) -print-libgcc-file-name); \ | ||
34 | nm -D -u $@ | grep ' U ' && exit 1 || : | ||
35 | |||
36 | $(stub): $(stub_solib) | ||
37 | -- | ||
38 | 2.11.0 | ||
39 | |||
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-stub-check-LoadOptions-contains-data.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-stub-check-LoadOptions-contains-data.patch deleted file mode 100644 index 69acc8f..0000000 --- a/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-stub-check-LoadOptions-contains-data.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 87cd5a5e0f06ceb7f9dbdcc4029e0c279a38e6ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
3 | Date: Mon, 27 Feb 2017 10:04:03 +0200 | ||
4 | Subject: [PATCH] sd-boot: stub: check LoadOptions contains data | ||
5 | |||
6 | With some UEFI shells LoadOptionsSize is reported being > 0 | ||
7 | but the corresponding LoadOptions does not contain any data | ||
8 | (the first element has value 0). | ||
9 | |||
10 | When that happens, the stub feature that allows .cmdline to be | ||
11 | replaced by what's in LoadOptions ends up copying nothing/random | ||
12 | data to the kernel cmdline resulting in different kinds of boot | ||
13 | problems. | ||
14 | |||
15 | To fix this, add a check to see if LoadOptions contains data | ||
16 | before replacing the .cmdline. | ||
17 | |||
18 | Upstream-Status: Accepted [https://github.com/systemd/systemd/pull/5467] | ||
19 | |||
20 | Fixes [YOCTO #11078]. | ||
21 | |||
22 | Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
23 | --- | ||
24 | src/boot/efi/stub.c | 2 +- | ||
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c | ||
28 | index 7c1ffb1bc..b7d5d3cda 100644 | ||
29 | --- a/src/boot/efi/stub.c | ||
30 | +++ b/src/boot/efi/stub.c | ||
31 | @@ -87,7 +87,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | ||
32 | cmdline_len = szs[0]; | ||
33 | |||
34 | /* if we are not in secure boot mode, accept a custom command line and replace the built-in one */ | ||
35 | - if (!secure && loaded_image->LoadOptionsSize > 0) { | ||
36 | + if (!secure && loaded_image->LoadOptionsSize > 0 && *(CHAR16 *)loaded_image->LoadOptions != 0) { | ||
37 | CHAR16 *options; | ||
38 | CHAR8 *line; | ||
39 | UINTN i; | ||
40 | -- | ||
41 | 2.11.0 | ||
42 | |||
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch deleted file mode 100644 index e88012c..0000000 --- a/common/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch +++ /dev/null | |||
@@ -1,250 +0,0 @@ | |||
1 | From a3c4fc8c2847fe289a617bcba1d905f580f0e18d Mon Sep 17 00:00:00 2001 | ||
2 | From: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
3 | Date: Wed, 1 Jun 2016 16:32:22 -0700 | ||
4 | Subject: [PATCH 2/3] sd-boot: Load board-specific boot entries from RMC | ||
5 | database | ||
6 | |||
7 | RMC provides a centralized database file on ESP. The DB contains | ||
8 | fingerprints and any file blobs associated to physical boards. | ||
9 | Callers can fetch board-specific data with fingerprint info | ||
10 | collected from board at runtime if there is any record matched | ||
11 | board's fingerprint. | ||
12 | |||
13 | To let bootloader know which file blob in RMC should be queried, | ||
14 | a special config file BOOTENTRY.CONFIG is defined as: | ||
15 | |||
16 | boot.conf | ||
17 | install.conf | ||
18 | |||
19 | Bootloader calls RMC APIs and other functions to perform these | ||
20 | tasks before it shows boot menu to user: | ||
21 | |||
22 | (1) Load RMC database file from ESP | ||
23 | (2) Collect fingerprint data from board | ||
24 | (3) Query BOOTENTRY.CONFIG from RMC DB with fingerprint | ||
25 | (4) Parse BOOTENTRY.CONFIG to know names of boot entry files | ||
26 | (5) Query boot entry files one by one from RMC DB, and add | ||
27 | them into sd-boot config data. | ||
28 | |||
29 | The final effect is that bootloader will show board-specific | ||
30 | boot entries in boot menu to user. User then can choose one | ||
31 | of them to boot system with the selected configuration. | ||
32 | |||
33 | If any of these steps fails, bootloader simply skips loading | ||
34 | RMC configs or any entry file not successfully fetched from | ||
35 | RMC DB. Once any entry is loaded successfully from RMC DB, | ||
36 | bootloader skips loading any boot entries from ESP. | ||
37 | |||
38 | Upstream-Status: Pending | ||
39 | |||
40 | Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
41 | --- | ||
42 | src/boot/efi/boot.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++- | ||
43 | 1 file changed, 145 insertions(+), 2 deletions(-) | ||
44 | |||
45 | diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c | ||
46 | index 30c1ead..d1b029b 100644 | ||
47 | --- a/src/boot/efi/boot.c | ||
48 | +++ b/src/boot/efi/boot.c | ||
49 | @@ -15,6 +15,7 @@ | ||
50 | |||
51 | #include <efi.h> | ||
52 | #include <efilib.h> | ||
53 | +#include <rmc_api.h> | ||
54 | |||
55 | #include "console.h" | ||
56 | #include "disk.h" | ||
57 | @@ -33,6 +34,9 @@ static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot | ||
58 | |||
59 | static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE; | ||
60 | |||
61 | +static CHAR8* rmc_db; | ||
62 | +static rmc_fingerprint_t *rmc_fp; | ||
63 | + | ||
64 | enum loader_type { | ||
65 | LOADER_UNDEFINED, | ||
66 | LOADER_EFI, | ||
67 | @@ -1702,6 +1706,136 @@ static VOID config_free(Config *config) { | ||
68 | FreePool(config->entry_oneshot); | ||
69 | } | ||
70 | |||
71 | +/* Derived from line_get_key_value(), we could consolidate two functions later */ | ||
72 | +static CHAR8 *get_line(CHAR8 *content, UINT64 *pos) { | ||
73 | + CHAR8 *line; | ||
74 | + UINT64 linelen; | ||
75 | + | ||
76 | +skip: | ||
77 | + line = content + *pos; | ||
78 | + if (*line == '\0') | ||
79 | + return NULL; | ||
80 | + | ||
81 | + linelen = 0; | ||
82 | + while (line[linelen] && !strchra((CHAR8 *)"\n\r", line[linelen])) | ||
83 | + linelen++; | ||
84 | + | ||
85 | + /* move pos to next line */ | ||
86 | + *pos += linelen; | ||
87 | + if (content[*pos]) | ||
88 | + (*pos)++; | ||
89 | + | ||
90 | + /* empty line */ | ||
91 | + if (linelen == 0) | ||
92 | + goto skip; | ||
93 | + | ||
94 | + /* terminate line */ | ||
95 | + line[linelen] = '\0'; | ||
96 | + | ||
97 | + /* remove leading whitespace */ | ||
98 | + while (strchra((CHAR8 *)" \t", *line)) { | ||
99 | + line++; | ||
100 | + linelen--; | ||
101 | + } | ||
102 | + | ||
103 | + /* remove trailing whitespace */ | ||
104 | + while (linelen > 0 && strchra((CHAR8 *)" \t", line[linelen-1])) | ||
105 | + linelen--; | ||
106 | + line[linelen] = '\0'; | ||
107 | + | ||
108 | + if (*line == '#') | ||
109 | + goto skip; | ||
110 | + | ||
111 | + return line; | ||
112 | +} | ||
113 | + | ||
114 | +/* load rmc database file from ESP and try to get fingerprint. These | ||
115 | + * are essential information indicating we could query rmc data for | ||
116 | + * this board at least | ||
117 | + * return 0 if both database file and fingerprint can be obtained, otherwise | ||
118 | + * non-zero value is returned. | ||
119 | + * | ||
120 | + * Note: db and fp hold valid values only when this function returns 0. | ||
121 | + * Caller is responsible to free allocated memory pointed by *db and *fp when | ||
122 | + * this function returns 0. | ||
123 | + */ | ||
124 | + | ||
125 | +static UINTN rmc_initialize(EFI_FILE *root_dir, EFI_SYSTEM_TABLE *sys_table, CHAR8 **db, rmc_fingerprint_t **fp) { | ||
126 | + UINTN len; | ||
127 | + UINTN ret = 1; | ||
128 | + | ||
129 | + if (!db || !fp) | ||
130 | + return ret; | ||
131 | + | ||
132 | + *db = NULL; | ||
133 | + *fp = NULL; | ||
134 | + | ||
135 | + /* load rmc database */ | ||
136 | + len = file_read(root_dir, L"\\rmc.db", 0, 0, db); | ||
137 | + | ||
138 | + if (len <= 0) | ||
139 | + goto done; | ||
140 | + | ||
141 | + *fp = AllocateZeroPool(sizeof(rmc_fingerprint_t)); | ||
142 | + /* call rmc to get fingerprint. We will use single-action rmc APIs to query multiple files. | ||
143 | + * This should bring a better performance than calling double-action rmc API every time. | ||
144 | + */ | ||
145 | + if (rmc_get_fingerprint(sys_table, *fp)) | ||
146 | + goto done; | ||
147 | + | ||
148 | + ret = 0; | ||
149 | +done: | ||
150 | + if (ret) { | ||
151 | + FreePool(*db); | ||
152 | + FreePool(*fp); | ||
153 | + } | ||
154 | + | ||
155 | + return ret; | ||
156 | +} | ||
157 | + | ||
158 | +/* load RMC entries | ||
159 | + * return TRUE when at least one entry is loaded, otherwise, return FALSE | ||
160 | + */ | ||
161 | +static BOOLEAN config_load_rmc_entries(Config *config, EFI_HANDLE *device, CHAR16 *loaded_image_path, CHAR8 *db, rmc_fingerprint_t *fp) { | ||
162 | + CHAR8 *boot_entry = NULL; | ||
163 | + CHAR8 *boot_config = NULL; | ||
164 | + rmc_file_t rp; | ||
165 | + CHAR8 *line; | ||
166 | + UINT64 pos = 0; | ||
167 | + BOOLEAN ret = FALSE; | ||
168 | + | ||
169 | + if (!db || !fp) | ||
170 | + return ret; | ||
171 | + | ||
172 | + /* query boot entry config file */ | ||
173 | + if (rmc_query_file_by_fp(fp, db, "BOOTENTRY.CONFIG", &rp)) | ||
174 | + return ret; | ||
175 | + | ||
176 | + /* file blob read from rmc db is not necessarily null-terminated, and we | ||
177 | + * should keep mem where rmc db lives from change during parsing | ||
178 | + */ | ||
179 | + boot_config = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1); | ||
180 | + CopyMem(boot_config, rp.blob, rp.blob_len); | ||
181 | + boot_config[rp.blob_len] = '\0'; | ||
182 | + /* parse boot entry config */ | ||
183 | + while ((line = get_line(boot_config, &pos))) { | ||
184 | + if (rmc_query_file_by_fp(fp, db, (char *)line, &rp)) | ||
185 | + continue; | ||
186 | + if (rp.blob_len > 0) { | ||
187 | + boot_entry = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1); | ||
188 | + CopyMem(boot_entry, rp.blob, rp.blob_len); | ||
189 | + boot_entry[rp.blob_len] = '\0'; | ||
190 | + config_entry_add_from_file(config, device, | ||
191 | + stra_to_str(line), boot_entry, | ||
192 | + loaded_image_path); | ||
193 | + /* tell caller success when a RMC entry is loaded */ | ||
194 | + ret = TRUE; | ||
195 | + } | ||
196 | + } | ||
197 | + | ||
198 | + return ret; | ||
199 | +} | ||
200 | + | ||
201 | EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | ||
202 | CHAR16 *s; | ||
203 | CHAR8 *b; | ||
204 | @@ -1714,6 +1848,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | ||
205 | UINT64 init_usec; | ||
206 | BOOLEAN menu = FALSE; | ||
207 | CHAR16 uuid[37]; | ||
208 | + BOOLEAN rmc_entry = FALSE; | ||
209 | |||
210 | InitializeLib(image, sys_table); | ||
211 | init_usec = time_usec(); | ||
212 | @@ -1745,6 +1880,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | ||
213 | return EFI_LOAD_ERROR; | ||
214 | } | ||
215 | |||
216 | + /* Initialize rmc before loading any config */ | ||
217 | + rmc_initialize(root_dir, sys_table, &rmc_db, &rmc_fp); | ||
218 | |||
219 | /* the filesystem path to this image, to prevent adding ourselves to the menu */ | ||
220 | loaded_image_path = DevicePathToStr(loaded_image->FilePath); | ||
221 | @@ -1753,11 +1890,15 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | ||
222 | ZeroMem(&config, sizeof(Config)); | ||
223 | config_load_defaults(&config, root_dir); | ||
224 | |||
225 | + if (rmc_db && rmc_fp) | ||
226 | + rmc_entry = config_load_rmc_entries(&config, loaded_image->DeviceHandle, loaded_image_path, rmc_db, rmc_fp); | ||
227 | + | ||
228 | /* scan /EFI/Linux/ directory */ | ||
229 | config_entry_add_linux(&config, loaded_image, root_dir); | ||
230 | |||
231 | - /* scan /loader/entries/\*.conf files */ | ||
232 | - config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path); | ||
233 | + /* scan /loader/entries/\*.conf files only when no RMC entry is loaded */ | ||
234 | + if (rmc_entry == FALSE) | ||
235 | + config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path); | ||
236 | |||
237 | /* sort entries after version number */ | ||
238 | config_sort_entries(&config); | ||
239 | @@ -1851,6 +1992,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | ||
240 | out: | ||
241 | FreePool(loaded_image_path); | ||
242 | config_free(&config); | ||
243 | + FreePool(rmc_db); | ||
244 | + FreePool(rmc_fp); | ||
245 | uefi_call_wrapper(root_dir->Close, 1, root_dir); | ||
246 | uefi_call_wrapper(BS->CloseProtocol, 4, image, &LoadedImageProtocol, image, NULL); | ||
247 | return err; | ||
248 | -- | ||
249 | 2.7.4 | ||
250 | |||
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch deleted file mode 100644 index a4b6355..0000000 --- a/common/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | From 1e33f99e13a70c19c1f63f6ef1c5522a09adece6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
3 | Date: Mon, 20 Jun 2016 13:08:20 -0700 | ||
4 | Subject: [PATCH 3/3] sd-boot: Support global kernel command line fragment | ||
5 | |||
6 | Query file blob KBOOTPARAM from RMC. If it exists, we append | ||
7 | it to the new linux boot entry's cmdline. A boot entry could | ||
8 | be read from a .conf file on ESP, RMC database, or embedded | ||
9 | linux image. content in KBOOTPARAM is effective in all of | ||
10 | these cases. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
15 | --- | ||
16 | src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++ | ||
17 | 1 file changed, 34 insertions(+) | ||
18 | |||
19 | diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c | ||
20 | index d1b029b..8dffc48 100644 | ||
21 | --- a/src/boot/efi/boot.c | ||
22 | +++ b/src/boot/efi/boot.c | ||
23 | @@ -846,6 +846,40 @@ static VOID config_add_entry(Config *config, ConfigEntry *entry) { | ||
24 | config->entries = ReallocatePool(config->entries, | ||
25 | sizeof(VOID *) * config->entry_count, sizeof(VOID *) * i); | ||
26 | } | ||
27 | + | ||
28 | + /* rmc: a linux entry could be added from .conf file or an embedded linux image | ||
29 | + * we put appending global command line here to cover both of two cases. | ||
30 | + */ | ||
31 | + if (entry->type == LOADER_LINUX && rmc_db && rmc_fp) { | ||
32 | + rmc_file_t rmc_kp; | ||
33 | + | ||
34 | + if (!rmc_query_file_by_fp(rmc_fp, rmc_db, "KBOOTPARAM", &rmc_kp)) { | ||
35 | + CHAR8 *cmdline; | ||
36 | + CHAR16 *s; | ||
37 | + CHAR16 *t; | ||
38 | + CHAR16 *p; | ||
39 | + | ||
40 | + cmdline = AllocatePool(rmc_kp.blob_len * sizeof(CHAR8) + 1); | ||
41 | + CopyMem(cmdline, rmc_kp.blob, rmc_kp.blob_len); | ||
42 | + cmdline[rmc_kp.blob_len] = '\0'; | ||
43 | + p = stra_to_str(cmdline); | ||
44 | + t = p; | ||
45 | + | ||
46 | + while (*t) { | ||
47 | + if (*t == '\n') | ||
48 | + *t = '\0'; | ||
49 | + t++; | ||
50 | + } | ||
51 | + | ||
52 | + s = PoolPrint(L"%s %s", entry->options, p); | ||
53 | + FreePool(entry->options); | ||
54 | + FreePool(p); | ||
55 | + FreePool(cmdline); | ||
56 | + | ||
57 | + entry->options = s; | ||
58 | + } | ||
59 | + } | ||
60 | + | ||
61 | config->entries[config->entry_count++] = entry; | ||
62 | } | ||
63 | |||
64 | -- | ||
65 | 2.7.4 | ||
66 | |||
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch deleted file mode 100644 index 7508269..0000000 --- a/common/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | From 4cb9c65ea9c0eba3ba04d036dccd4a5ab3d2547b Mon Sep 17 00:00:00 2001 | ||
2 | From: Mikko Ylinen <mikko.ylinen@intel.com> | ||
3 | Date: Fri, 27 Jan 2017 13:31:45 +0200 | ||
4 | Subject: [PATCH] sd-boot: support global kernel command line in EFI stub | ||
5 | |||
6 | This change integrates rmc into EFI stub and supports a | ||
7 | global fragment (RMC KBOOTPARAM) that is appended to the | ||
8 | cmdline at boot. | ||
9 | |||
10 | The fragment is board-specific and read from the database. | ||
11 | |||
12 | Implements [YOCTO #10924]. | ||
13 | |||
14 | Upstream-status: Pending | ||
15 | |||
16 | Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com> | ||
17 | --- | ||
18 | src/boot/efi/stub.c | 33 +++++++++++++++++++++++++++++++++ | ||
19 | 1 file changed, 33 insertions(+) | ||
20 | |||
21 | diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c | ||
22 | index 1e250f34f..f3865199f 100644 | ||
23 | --- a/src/boot/efi/stub.c | ||
24 | +++ b/src/boot/efi/stub.c | ||
25 | @@ -13,6 +13,7 @@ | ||
26 | |||
27 | #include <efi.h> | ||
28 | #include <efilib.h> | ||
29 | +#include <rmc_api.h> | ||
30 | |||
31 | #include "disk.h" | ||
32 | #include "graphics.h" | ||
33 | @@ -48,6 +49,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | ||
34 | UINTN cmdline_len; | ||
35 | CHAR16 uuid[37]; | ||
36 | EFI_STATUS err; | ||
37 | + INTN len; | ||
38 | + CHAR8 *rmc_db = NULL; | ||
39 | + rmc_file_t rmc_file; | ||
40 | |||
41 | InitializeLib(image, sys_table); | ||
42 | |||
43 | @@ -112,6 +116,35 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | ||
44 | #endif | ||
45 | } | ||
46 | |||
47 | + len = file_read(root_dir, L"\\rmc.db", 0, 0, &rmc_db); | ||
48 | + if (len <= 0) | ||
49 | + rmc_db = NULL; | ||
50 | + | ||
51 | + /* If the board has a fragment in rmc database, append it to the cmdline */ | ||
52 | + if (rmc_db && !rmc_gimme_file(sys_table, rmc_db, "KBOOTPARAM", &rmc_file)) { | ||
53 | + CHAR8 *line; | ||
54 | + UINTN i = 0; | ||
55 | + UINTN j; | ||
56 | + | ||
57 | + line = AllocatePool(rmc_file.blob_len + cmdline_len + 2); | ||
58 | + | ||
59 | + while (i < cmdline_len && cmdline[i] != '\0') { | ||
60 | + line[i] = cmdline[i]; | ||
61 | + i++; | ||
62 | + } | ||
63 | + | ||
64 | + line[i++] = ' '; | ||
65 | + | ||
66 | + for (j=0; j < rmc_file.blob_len; j++) | ||
67 | + line[i+j] = rmc_file.blob[j]; | ||
68 | + line[i+j] = '\0'; | ||
69 | + | ||
70 | + cmdline = line; | ||
71 | + cmdline_len = i + j; | ||
72 | + | ||
73 | + FreePool(rmc_db); | ||
74 | + } | ||
75 | + | ||
76 | /* export the device path this image is started from */ | ||
77 | if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS) | ||
78 | efivar_set(L"LoaderDevicePartUUID", uuid, FALSE); | ||
79 | -- | ||
80 | 2.11.0 | ||
81 | |||
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc b/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc deleted file mode 100644 index 1172d53..0000000 --- a/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | DEPENDS_append_intel-x86-common = " rmc rmc-efi" | ||
2 | |||
3 | EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/lib" EFI_CFLAGS="-I${STAGING_INCDIR}/rmc -DRMC_EFI"' | ||
4 | |||
5 | SRC_URI_append_intel-x86-common = " \ | ||
6 | file://0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch \ | ||
7 | file://0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch \ | ||
8 | file://0003-sd-boot-Support-global-kernel-command-line-fragment.patch \ | ||
9 | file://0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch \ | ||
10 | file://0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch \ | ||
11 | file://0001-sd-boot-stub-check-LoadOptions-contains-data.patch \ | ||
12 | " | ||
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc b/common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc deleted file mode 100644 index fcce6ce..0000000 --- a/common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/lib" ' | ||
2 | |||
3 | SRC_URI_append_intel-x86-common = " \ | ||
4 | file://0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch \ | ||
5 | file://0001-sd-boot-stub-check-LoadOptions-contains-data.patch \ | ||
6 | " | ||
7 | |||
diff --git a/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend b/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend deleted file mode 100644 index 557c049..0000000 --- a/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/systemd-boot:" | ||
2 | |||
3 | # Pin systemd revision down for systemd-boot recipe. | ||
4 | # Patches could not be applied cleanly when systemd in OE is updated, | ||
5 | # though we don't expect a lot of changes could happen in bootloader. | ||
6 | # RMC is designed to support a large number of types of boards, so we | ||
7 | # should do explicit update with validation to prevent regression even | ||
8 | # resolving conflicts for a new tip could be done in a short time. | ||
9 | |||
10 | # Revision: systemd v232 in OE | ||
11 | SRCREV_intel-x86-common = "a1e2ef7ec912902d8142e7cb5830cbfb47dba86c" | ||
12 | |||
13 | include systemd-boot/${EFI_PROVIDER}.inc | ||
14 | |||
15 | PACKAGE_ARCH_intel-x86-common = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
16 | |||
17 | do_compile_append_intel-x86-common() { | ||
18 | oe_runmake linux${SYSTEMD_BOOT_EFI_ARCH}.efi.stub | ||
19 | } | ||
20 | |||
21 | do_deploy_append_intel-x86-common() { | ||
22 | install ${B}/linux*.efi.stub ${DEPLOYDIR} | ||
23 | } | ||
diff --git a/common/recipes-bsp/thermald/thermald_1.6.bb b/common/recipes-bsp/thermald/thermald_1.6.bb deleted file mode 100644 index e6cbb62..0000000 --- a/common/recipes-bsp/thermald/thermald_1.6.bb +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | SUMMARY = "Linux thermal daemon" | ||
2 | |||
3 | DESCRIPTION = "Thermal Daemon is a Linux daemon used to prevent the \ | ||
4 | overheating of platforms. This daemon monitors temperature and applies \ | ||
5 | compensation using available cooling methods." | ||
6 | |||
7 | HOMEPAGE = "https://github.com/01org/thermal_daemon" | ||
8 | |||
9 | DEPENDS = "dbus dbus-glib dbus-glib-native libxml2 glib-2.0 glib-2.0-native" | ||
10 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" | ||
11 | DEPENDS_append_libc-musl = " argp-standalone" | ||
12 | DEPENDS_append_toolchain-clang = " openmp" | ||
13 | LICENSE = "GPL-2.0" | ||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea8831610e926e2e469075b52bf08848" | ||
15 | |||
16 | SRC_URI = "git://github.com/intel/thermal_daemon/" | ||
17 | SRCREV = "5f1be4d9d6f3b27d2c9884f833ca05cdcb4428e0" | ||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit pkgconfig autotools systemd | ||
21 | |||
22 | FILES_${PN} += "${datadir}/dbus-1/system-services/*.service" | ||
23 | |||
24 | SYSTEMD_SERVICE_${PN} = "thermald.service" | ||
25 | |||
26 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
27 | |||
28 | CONFFILES_${PN} = " \ | ||
29 | ${sysconfdir}/thermald/thermal-conf.xml \ | ||
30 | ${sysconfdir}/thermald/thermal-cpu-cdev-order.xml \ | ||
31 | " | ||
32 | |||
33 | UPSTREAM_CHECK_URI = "https://github.com/01org/thermal_daemon/releases" | ||
diff --git a/common/recipes-core/images/core-image-minimal-initramfs.bbappend b/common/recipes-core/images/core-image-minimal-initramfs.bbappend deleted file mode 100644 index 4ddca37..0000000 --- a/common/recipes-core/images/core-image-minimal-initramfs.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # Use initramfs-framework instead of initramfs-live* | ||
2 | PACKAGE_INSTALL_remove_intel-x86-common = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi" | ||
3 | PACKAGE_INSTALL_append_intel-x86-common = " initramfs-framework-base initramfs-module-udev initramfs-module-setup-live initramfs-module-install-efi" | ||
4 | |||
5 | # Add i915 graphics firmware | ||
6 | PACKAGE_INSTALL_append_intel-x86-common = " linux-firmware-i915" | ||
diff --git a/common/recipes-core/images/core-image-tiny.bb b/common/recipes-core/images/core-image-tiny.bb deleted file mode 100644 index ed39fd7..0000000 --- a/common/recipes-core/images/core-image-tiny.bb +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | SUMMARY = "A tiny image just capable of allowing a device to boot from RAM, \ | ||
2 | this image recipe generates an image file which rather boots from initrd than \ | ||
3 | from storage, it achieves this by using wic to pick up the artifacts generated \ | ||
4 | by the core-image-tiny-initramfs image" | ||
5 | |||
6 | # The actual rootfs/initrd will be the one from core-image-tiny-initramfs, so | ||
7 | # we reset IMAGE_INSTALL to avoid building other things that will be pointless | ||
8 | IMAGE_INSTALL = "" | ||
9 | |||
10 | # Do not pollute the initrd image with rootfs features | ||
11 | IMAGE_FEATURES = "" | ||
12 | |||
13 | IMAGE_LINGUAS = " " | ||
14 | |||
15 | LICENSE = "MIT" | ||
16 | |||
17 | IMAGE_ROOTFS_SIZE ?= "8192" | ||
18 | |||
19 | IMAGE_FSTYPES = "wic" | ||
20 | inherit core-image | ||
21 | |||
22 | # We get some parts from image-live that we need in order to boot from initrd | ||
23 | INITRD_IMAGE_LIVE ?= "core-image-tiny-initramfs" | ||
24 | |||
25 | python() { | ||
26 | image_b = d.getVar('IMAGE_BASENAME') | ||
27 | initrd_i = d.getVar('INITRD_IMAGE_LIVE') | ||
28 | if image_b == initrd_i: | ||
29 | bb.error('INITRD_IMAGE_LIVE %s cannot use the requested IMAGE_FSTYPE' % initrd_i) | ||
30 | bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.') | ||
31 | elif initrd_i: | ||
32 | d.appendVarFlag('do_image', 'depends', ' %s:do_image_complete' % initrd_i) | ||
33 | } | ||
34 | |||
35 | WKS_FILE_intel-corei7-64 = "core-image-tiny.wks.in" | ||
36 | WKS_FILE_intel-core2-32 = "core-image-tiny.wks.in" | ||
37 | WKS_FILE_intel-quark = "mktinygalileodisk.wks" | ||
diff --git a/common/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh b/common/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh deleted file mode 100644 index a7a2ad4..0000000 --- a/common/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh +++ /dev/null | |||
@@ -1,342 +0,0 @@ | |||
1 | #!/bin/sh -e | ||
2 | # | ||
3 | # Copyright (c) 2016, Intel Corporation. | ||
4 | # All rights reserved. | ||
5 | # | ||
6 | # install.sh [device_name] [rootfs_name] | ||
7 | # | ||
8 | # This file is a copy of file with same name in OE: | ||
9 | # meta/recipes-core/initrdscripts/files/. We modify | ||
10 | # it for RMC feature to deploy file blobs from RMC | ||
11 | # database file to target. | ||
12 | |||
13 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
14 | |||
15 | # We need 20 Mb for the boot partition | ||
16 | boot_size=20 | ||
17 | |||
18 | # 5% for swap | ||
19 | swap_ratio=5 | ||
20 | |||
21 | # Get a list of hard drives | ||
22 | hdnamelist="" | ||
23 | live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'` | ||
24 | live_dev_name=${live_dev_name#\/dev/} | ||
25 | # Only strip the digit identifier if the device is not an mmc | ||
26 | case $live_dev_name in | ||
27 | mmcblk*) | ||
28 | ;; | ||
29 | nvme*) | ||
30 | ;; | ||
31 | *) | ||
32 | live_dev_name=${live_dev_name%%[0-9]*} | ||
33 | ;; | ||
34 | esac | ||
35 | |||
36 | echo "Searching for hard drives ..." | ||
37 | |||
38 | for device in `ls /sys/block/`; do | ||
39 | case $device in | ||
40 | loop*) | ||
41 | # skip loop device | ||
42 | ;; | ||
43 | sr*) | ||
44 | # skip CDROM device | ||
45 | ;; | ||
46 | ram*) | ||
47 | # skip ram device | ||
48 | ;; | ||
49 | *) | ||
50 | # skip the device LiveOS is on | ||
51 | # Add valid hard drive name to the list | ||
52 | case $device in | ||
53 | $live_dev_name*) | ||
54 | # skip the device we are running from | ||
55 | ;; | ||
56 | *) | ||
57 | hdnamelist="$hdnamelist $device" | ||
58 | ;; | ||
59 | esac | ||
60 | ;; | ||
61 | esac | ||
62 | done | ||
63 | |||
64 | if [ -z "${hdnamelist}" ]; then | ||
65 | echo "You need another device (besides the live device /dev/${live_dev_name}) to install the image. Installation aborted." | ||
66 | exit 1 | ||
67 | fi | ||
68 | |||
69 | TARGET_DEVICE_NAME="" | ||
70 | for hdname in $hdnamelist; do | ||
71 | # Display found hard drives and their basic info | ||
72 | echo "-------------------------------" | ||
73 | echo /dev/$hdname | ||
74 | if [ -r /sys/block/$hdname/device/vendor ]; then | ||
75 | echo -n "VENDOR=" | ||
76 | cat /sys/block/$hdname/device/vendor | ||
77 | fi | ||
78 | if [ -r /sys/block/$hdname/device/model ]; then | ||
79 | echo -n "MODEL=" | ||
80 | cat /sys/block/$hdname/device/model | ||
81 | fi | ||
82 | if [ -r /sys/block/$hdname/device/uevent ]; then | ||
83 | echo -n "UEVENT=" | ||
84 | cat /sys/block/$hdname/device/uevent | ||
85 | fi | ||
86 | echo | ||
87 | done | ||
88 | |||
89 | # Get user choice | ||
90 | while true; do | ||
91 | echo "Please select an install target or press n to exit ($hdnamelist ): " | ||
92 | read answer | ||
93 | if [ "$answer" = "n" ]; then | ||
94 | echo "Installation manually aborted." | ||
95 | exit 1 | ||
96 | fi | ||
97 | for hdname in $hdnamelist; do | ||
98 | if [ "$answer" = "$hdname" ]; then | ||
99 | TARGET_DEVICE_NAME=$answer | ||
100 | break | ||
101 | fi | ||
102 | done | ||
103 | if [ -n "$TARGET_DEVICE_NAME" ]; then | ||
104 | break | ||
105 | fi | ||
106 | done | ||
107 | |||
108 | if [ -n "$TARGET_DEVICE_NAME" ]; then | ||
109 | echo "Installing image on /dev/$TARGET_DEVICE_NAME ..." | ||
110 | else | ||
111 | echo "No hard drive selected. Installation aborted." | ||
112 | exit 1 | ||
113 | fi | ||
114 | |||
115 | device=/dev/$TARGET_DEVICE_NAME | ||
116 | |||
117 | # | ||
118 | # The udev automounter can cause pain here, kill it | ||
119 | # | ||
120 | rm -f /etc/udev/rules.d/automount.rules | ||
121 | rm -f /etc/udev/scripts/mount* | ||
122 | |||
123 | # | ||
124 | # Unmount anything the automounter had mounted | ||
125 | # | ||
126 | umount ${device}* 2> /dev/null || /bin/true | ||
127 | |||
128 | mkdir -p /tmp | ||
129 | |||
130 | # Create /etc/mtab if not present | ||
131 | if [ ! -e /etc/mtab ]; then | ||
132 | cat /proc/mounts > /etc/mtab | ||
133 | fi | ||
134 | |||
135 | disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//") | ||
136 | |||
137 | swap_size=$((disk_size*swap_ratio/100)) | ||
138 | rootfs_size=$((disk_size-boot_size-swap_size)) | ||
139 | |||
140 | rootfs_start=$((boot_size)) | ||
141 | rootfs_end=$((rootfs_start+rootfs_size)) | ||
142 | swap_start=$((rootfs_end)) | ||
143 | |||
144 | # MMC devices are special in a couple of ways | ||
145 | # 1) they use a partition prefix character 'p' | ||
146 | # 2) they are detected asynchronously (need rootwait) | ||
147 | rootwait="" | ||
148 | part_prefix="" | ||
149 | if [ ! "${device#/dev/mmcblk}" = "${device}" ] || \ | ||
150 | [ ! "${device#/dev/nvme}" = "${device}" ]; then | ||
151 | part_prefix="p" | ||
152 | rootwait="rootwait" | ||
153 | fi | ||
154 | bootfs=${device}${part_prefix}1 | ||
155 | rootfs=${device}${part_prefix}2 | ||
156 | swap=${device}${part_prefix}3 | ||
157 | |||
158 | echo "*****************" | ||
159 | echo "Boot partition size: $boot_size MB ($bootfs)" | ||
160 | echo "Rootfs partition size: $rootfs_size MB ($rootfs)" | ||
161 | echo "Swap partition size: $swap_size MB ($swap)" | ||
162 | echo "*****************" | ||
163 | echo "Deleting partition table on ${device} ..." | ||
164 | dd if=/dev/zero of=${device} bs=512 count=35 | ||
165 | |||
166 | echo "Creating new partition table on ${device} ..." | ||
167 | parted ${device} mklabel gpt | ||
168 | |||
169 | echo "Creating boot partition on $bootfs" | ||
170 | parted ${device} mkpart boot fat32 0% $boot_size | ||
171 | parted ${device} set 1 boot on | ||
172 | |||
173 | echo "Creating rootfs partition on $rootfs" | ||
174 | parted ${device} mkpart root ext3 $rootfs_start $rootfs_end | ||
175 | |||
176 | echo "Creating swap partition on $swap" | ||
177 | parted ${device} mkpart swap linux-swap $swap_start 100% | ||
178 | |||
179 | parted ${device} print | ||
180 | |||
181 | echo "Formatting $bootfs to vfat..." | ||
182 | mkfs.vfat $bootfs | ||
183 | |||
184 | echo "Formatting $rootfs to ext3..." | ||
185 | mkfs.ext3 $rootfs | ||
186 | |||
187 | echo "Formatting swap partition...($swap)" | ||
188 | mkswap $swap | ||
189 | |||
190 | mkdir /tgt_root | ||
191 | mkdir /src_root | ||
192 | mkdir -p /boot | ||
193 | |||
194 | # Handling of the target root partition | ||
195 | mount $rootfs /tgt_root | ||
196 | mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root | ||
197 | echo "Copying rootfs files..." | ||
198 | cp -a /src_root/* /tgt_root | ||
199 | if [ -d /tgt_root/etc/ ] ; then | ||
200 | boot_uuid=$(blkid -o value -s UUID ${bootfs}) | ||
201 | swap_part_uuid=$(blkid -o value -s PARTUUID ${swap}) | ||
202 | echo "/dev/disk/by-partuuid/$swap_part_uuid swap swap defaults 0 0" >> /tgt_root/etc/fstab | ||
203 | echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab | ||
204 | # We dont want udev to mount our root device while we're booting... | ||
205 | if [ -d /tgt_root/etc/udev/ ] ; then | ||
206 | echo "${device}" >> /tgt_root/etc/udev/mount.blacklist | ||
207 | fi | ||
208 | fi | ||
209 | |||
210 | # Handling of the target boot partition | ||
211 | mount $bootfs /boot | ||
212 | echo "Preparing boot partition..." | ||
213 | |||
214 | EFIDIR="/boot/EFI/BOOT" | ||
215 | mkdir -p $EFIDIR | ||
216 | # Copy the efi loader | ||
217 | cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR | ||
218 | |||
219 | # RMC deployment | ||
220 | RMC_CMD=/src_root/usr/bin/rmc | ||
221 | RMC_DB=/run/media/$1/rmc.db | ||
222 | |||
223 | # We don't want to quit when a step failed. For example, | ||
224 | # a file system could not support some operations. | ||
225 | set +e | ||
226 | |||
227 | if [ -f "${RMC_DB}" ] && [ -f "${RMC_CMD}" ]; then | ||
228 | echo "Found RMC database and tool, start RMC deployment" | ||
229 | # query INSTALLER.CONFIG from RMC DB | ||
230 | if ${RMC_CMD} -B INSTALLER.CONFIG -d "${RMC_DB}" -o /tmp/installer.config; then | ||
231 | while IFS=':' read -r NAME TGT_UID TGT_GID TGT_MODE TGT_PATH; do | ||
232 | # skip comment | ||
233 | # The regexp in grep works with busybox grep which doesn't | ||
234 | # seem to have a -P to recognize '\t'. But this expression could not | ||
235 | # work with gnu grep... | ||
236 | if echo "$NAME"|grep -q $'^[ \t]*#'; then | ||
237 | continue | ||
238 | fi | ||
239 | # check if we should create a directory (last char in target path is '/') | ||
240 | # or deploy a file | ||
241 | LAST_CHAR=$(echo "${TGT_PATH:$((${#TGT_PATH}-1)):1}") | ||
242 | |||
243 | # Do not bail out for failures but user should get stderr message | ||
244 | if [ ${LAST_CHAR} = "/" ]; then | ||
245 | # name field is skipped for directory | ||
246 | echo "DIR: ${TGT_UID}:${TGT_GID}:${TGT_MODE} => ${TGT_PATH}" | ||
247 | mkdir -p "$TGT_PATH" | ||
248 | chown "${TGT_UID}:${TGT_GID}" "$TGT_PATH" | ||
249 | chmod "${TGT_MODE}" "$TGT_PATH" | ||
250 | else | ||
251 | ${RMC_CMD} -B "${NAME}" -d "${RMC_DB}" -o "${TGT_PATH}" | ||
252 | echo "FILE: ${NAME}:${TGT_UID}:${TGT_GID}:${TGT_MODE} => ${TGT_PATH}" | ||
253 | chown "${TGT_UID}:${TGT_GID}" "$TGT_PATH" | ||
254 | chmod "${TGT_MODE}" "$TGT_PATH" | ||
255 | fi | ||
256 | done < /tmp/installer.config | ||
257 | rm -rf /tmp/installer.config | ||
258 | |||
259 | # remove rmc from target since we don't think it is a valid | ||
260 | # case to run rmc after installation. | ||
261 | rm -rf /tgt_root/usr/bin/rmc | ||
262 | echo "RMC deployment finished" | ||
263 | else | ||
264 | echo "INSTALLER.CONFIG is not found, skip RMC deployment" | ||
265 | fi | ||
266 | |||
267 | # Final retouching by calling post-install hook | ||
268 | if ${RMC_CMD} -B POSTINSTALL.sh -d "${RMC_DB}" -o /tmp/POSTINSTALL.sh; then | ||
269 | echo "Found POSTINSTALL.sh execute it..." | ||
270 | chmod 500 /tmp/POSTINSTALL.sh | ||
271 | /tmp/POSTINSTALL.sh | ||
272 | rm -rf /tmp/POSTINSTALL.sh | ||
273 | fi | ||
274 | fi | ||
275 | set -e | ||
276 | |||
277 | if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then | ||
278 | root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs}) | ||
279 | GRUBCFG="$EFIDIR/grub.cfg" | ||
280 | cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG | ||
281 | # Update grub config for the installed image | ||
282 | # Delete the install entry | ||
283 | sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG | ||
284 | # Delete the initrd lines | ||
285 | sed -i "/initrd /d" $GRUBCFG | ||
286 | # Delete any LABEL= strings | ||
287 | sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG | ||
288 | # Delete any root= strings | ||
289 | sed -i "s/ root=[^ ]*/ /g" $GRUBCFG | ||
290 | # Add the root= and other standard boot options | ||
291 | sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG | ||
292 | fi | ||
293 | |||
294 | if [ -d /run/media/$1/loader ]; then | ||
295 | rootuuid=$(blkid -o value -s PARTUUID ${rootfs}) | ||
296 | GUMMIBOOT_CFGS="/boot/loader/entries/*.conf" | ||
297 | if [ -d /boot/loader ]; then | ||
298 | # Don't override loader.conf RMC already deployed | ||
299 | if [ ! -f /boot/loader/loader.conf ]; then | ||
300 | cp /run/media/$1/loader/loader.conf /boot/loader/ | ||
301 | fi | ||
302 | # only copy built OE entries when RMC entries don't exist. | ||
303 | if [ ! -d /boot/loader/entries ] || [ ! ls /boot/loader/entries/*.conf &>/dev/null ]; then | ||
304 | cp -dr /run/media/$1/loader/entries /boot/loader | ||
305 | fi | ||
306 | else | ||
307 | # copy config files for gummiboot | ||
308 | cp -dr /run/media/$1/loader /boot | ||
309 | # delete the install entry | ||
310 | rm -f /boot/loader/entries/install.conf | ||
311 | fi | ||
312 | # delete the initrd lines | ||
313 | sed -i "/initrd /d" $GUMMIBOOT_CFGS | ||
314 | # delete any LABEL= strings | ||
315 | sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS | ||
316 | # delete any root= strings | ||
317 | sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS | ||
318 | # add the root= and other standard boot options | ||
319 | sed -i "s@options *@options root=PARTUUID=$rootuuid rw $rootwait quiet @" $GUMMIBOOT_CFGS | ||
320 | # if RMC feature presents, append global kernel command line fragment when it exists. | ||
321 | if [ -f "${RMC_DB}" ] && [ -f "${RMC_CMD}" ]; then | ||
322 | if ${RMC_CMD} -B KBOOTPARAM -d "${RMC_DB}" -o /tmp/kbootparam; then | ||
323 | sed -i "/^[ \t]*options/ s/$/ $(cat /tmp/kbootparam)/" $GUMMIBOOT_CFGS | ||
324 | rm /tmp/kbootparam | ||
325 | fi | ||
326 | fi | ||
327 | fi | ||
328 | |||
329 | cp /run/media/$1/vmlinuz /boot | ||
330 | |||
331 | umount /src_root | ||
332 | umount /tgt_root | ||
333 | umount /boot | ||
334 | |||
335 | sync | ||
336 | |||
337 | echo "Remove your installation media, and press ENTER" | ||
338 | |||
339 | read enter | ||
340 | |||
341 | echo "Rebooting..." | ||
342 | reboot -f | ||
diff --git a/common/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend b/common/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend deleted file mode 100644 index 0b3a1d3..0000000 --- a/common/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" | ||
2 | PACKAGE_ARCH_intel-x86-common = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
diff --git a/common/recipes-core/microcode/intel-microcode_20170707.bb b/common/recipes-core/microcode/intel-microcode_20170707.bb deleted file mode 100644 index 2244088..0000000 --- a/common/recipes-core/microcode/intel-microcode_20170707.bb +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | SUMMARY = "Intel Processor Microcode Datafile for Linux" | ||
2 | HOMEPAGE = "http://www.intel.com/" | ||
3 | DESCRIPTION = "The microcode data file contains the latest microcode\ | ||
4 | definitions for all Intel processors. Intel releases microcode updates\ | ||
5 | to correct processor behavior as documented in the respective processor\ | ||
6 | specification updates. While the regular approach to getting this microcode\ | ||
7 | update is via a BIOS upgrade, Intel realizes that this can be an\ | ||
8 | administrative hassle. The Linux operating system and VMware ESX\ | ||
9 | products have a mechanism to update the microcode after booting.\ | ||
10 | For example, this file will be used by the operating system mechanism\ | ||
11 | if the file is placed in the /etc/firmware directory of the Linux system." | ||
12 | |||
13 | LICENSE = "Intel-Microcode-License" | ||
14 | LIC_FILES_CHKSUM = "file://microcode.dat;md5=e5b1dc41901d2de706d4bccee94bbadc" | ||
15 | |||
16 | SRC_URI = "https://downloadmirror.intel.com/26925/eng/microcode-${PV}.tgz" | ||
17 | SRC_URI[md5sum] = "fe4bcb12e4600629a81fb65208c34248" | ||
18 | SRC_URI[sha256sum] = "4fd44769bf52a7ac11e90651a307aa6e56ca6e1a814e50d750ba8207973bee93" | ||
19 | |||
20 | DEPENDS = "iucode-tool-native" | ||
21 | S = "${WORKDIR}" | ||
22 | |||
23 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" | ||
24 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
25 | |||
26 | inherit deploy | ||
27 | |||
28 | # Use any of the iucode_tool parameters to filter specific microcodes from the data file | ||
29 | # For further information, check the iucode-tool's manpage : http://manned.org/iucode-tool | ||
30 | UCODE_FILTER_PARAMETERS ?= "" | ||
31 | |||
32 | do_compile() { | ||
33 | mkdir -p ${WORKDIR}/ucode/kernel/x86/microcode | ||
34 | ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \ | ||
35 | ${UCODE_FILTER_PARAMETERS} \ | ||
36 | --overwrite \ | ||
37 | --write-to=${WORKDIR}/microcode_${PV}.bin \ | ||
38 | ${WORKDIR}/microcode.dat | ||
39 | |||
40 | ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \ | ||
41 | ${UCODE_FILTER_PARAMETERS} \ | ||
42 | --overwrite \ | ||
43 | --write-earlyfw=${WORKDIR}/microcode_${PV}.cpio \ | ||
44 | ${WORKDIR}/microcode.dat | ||
45 | } | ||
46 | |||
47 | do_install() { | ||
48 | install -d ${D}${base_libdir}/firmware/intel-ucode/ | ||
49 | install ${WORKDIR}/microcode_${PV}.bin ${D}${base_libdir}/firmware/intel-ucode/ | ||
50 | cd ${D}${base_libdir}/firmware/intel-ucode/ | ||
51 | ln -sf microcode_${PV}.bin microcode.bin | ||
52 | } | ||
53 | |||
54 | do_deploy() { | ||
55 | install -d ${DEPLOYDIR} | ||
56 | install ${S}/microcode_${PV}.cpio ${DEPLOYDIR}/ | ||
57 | cd ${DEPLOYDIR} | ||
58 | rm -f microcode.cpio | ||
59 | ln -sf microcode_${PV}.cpio microcode.cpio | ||
60 | } | ||
61 | |||
62 | addtask deploy before do_build after do_compile | ||
63 | |||
64 | PACKAGES = "${PN}" | ||
65 | |||
66 | FILES_${PN} = "${base_libdir}" | ||
diff --git a/common/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch b/common/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch deleted file mode 100644 index ca97d2a..0000000 --- a/common/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 5f6826b3a59dedf508d5a6122362d69a4813e8e6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Saul Wold <sgw@linux.intel.com> | ||
3 | Date: Fri, 3 Feb 2017 16:08:51 -0800 | ||
4 | Subject: [PATCH] Makefile.am: Add arg-parse library for MUSL support | ||
5 | |||
6 | iucode-tool needs argp-standalone when used with MUSL, so add this | ||
7 | patch to the Makefile to link with argp | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
11 | --- | ||
12 | Makefile.am | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/Makefile.am b/Makefile.am | ||
16 | index 415a241..764fb61 100644 | ||
17 | --- a/Makefile.am | ||
18 | +++ b/Makefile.am | ||
19 | @@ -5,6 +5,7 @@ | ||
20 | sbin_PROGRAMS = iucode_tool | ||
21 | man_MANS = iucode_tool.8 | ||
22 | |||
23 | +iucode_tool_LDADD = -largp | ||
24 | iucode_tool_SOURCES = intel_microcode.h intel_microcode.c iucode_tool.c | ||
25 | EXTRA_DIST = autogen.sh CONTRIBUTING | ||
26 | |||
27 | -- | ||
28 | 2.7.4 | ||
29 | |||
diff --git a/common/recipes-core/microcode/iucode-tool_2.1.2.bb b/common/recipes-core/microcode/iucode-tool_2.1.2.bb deleted file mode 100644 index e1fb56f..0000000 --- a/common/recipes-core/microcode/iucode-tool_2.1.2.bb +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | SUMMARY = "Update Intel CPU microcode" | ||
2 | |||
3 | DESCRIPTION = "iucode_tool is a program to manipulate Intel i686 and X86-64\ | ||
4 | processor microcode update collections, and to use the kernel facilities to\ | ||
5 | update the microcode on Intel system processors. It can load microcode data\ | ||
6 | files in text and binary format, sort, list and filter the microcode updates\ | ||
7 | contained in these files, write selected microcode updates to a new file in\ | ||
8 | binary format, or upload them to the kernel. \ | ||
9 | It operates on microcode data downloaded directly from Intel:\ | ||
10 | http://feeds.downloadcenter.intel.com/rss/?p=2371\ | ||
11 | " | ||
12 | HOMEPAGE = "https://gitlab.com/iucode-tool/" | ||
13 | BUGTRACKER = "https://bugs.debian.org/cgi-bin/pkgreport.cgi?ordering=normal;archive=0;src=iucode-tool;repeatmerged=0" | ||
14 | |||
15 | LICENSE = "GPLv2+" | ||
16 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
17 | file://iucode_tool.c;beginline=1;endline=15;md5=5d8e3639c3b6a80e7d5e0e073933da16" | ||
18 | |||
19 | DEPENDS_append_libc-musl = " argp-standalone" | ||
20 | |||
21 | SRC_URI = "https://gitlab.com/iucode-tool/releases/raw/master/iucode-tool_${PV}.tar.xz" | ||
22 | SRC_URI_append_libc-musl = " file://0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch" | ||
23 | |||
24 | SRC_URI[md5sum] = "c6f131a0b69443f5498782a2335973fa" | ||
25 | SRC_URI[sha256sum] = "01f1c02ba6935e0ac8440fb594c2ef57ce4437fcbce539e3ef329f55a6fd71ab" | ||
26 | |||
27 | inherit autotools | ||
28 | |||
29 | BBCLASSEXTEND = "native" | ||
30 | |||
31 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" | ||
32 | |||
33 | UPSTREAM_CHECK_URI = "https://gitlab.com/iucode-tool/releases" | ||
diff --git a/common/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch b/common/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch deleted file mode 100644 index 62db063..0000000 --- a/common/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | From 48e511481d83c1614cd00a5a2edcf6b5d746b9c4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
3 | Date: Fri, 7 Apr 2017 12:06:14 +0300 | ||
4 | Subject: [PATCH] ovmf: RefkitTestCA: TEST UEFI SecureBoot | ||
5 | |||
6 | This patch adds refkit-db.cer (via xxd -i) in OVMF's db | ||
7 | signature database when used with EnrollDefaultKeys EFI | ||
8 | application. It's used for testing purposes only. | ||
9 | |||
10 | Images signed with refkit-db keys are allowed to boot. | ||
11 | |||
12 | Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
13 | --- | ||
14 | OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | 68 +++++++++++++++++++++++++++ | ||
15 | 1 file changed, 68 insertions(+) | ||
16 | |||
17 | diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | ||
18 | index 24ab977..a3c12ba 100644 | ||
19 | --- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | ||
20 | +++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | ||
21 | @@ -516,6 +516,73 @@ STATIC CONST UINT8 MicrosoftUefiCA[] = { | ||
22 | 0x07, 0x92, 0x9b, 0xf5, 0xa6, 0xbc, 0x59, 0x83, 0x58 | ||
23 | }; | ||
24 | |||
25 | +STATIC CONST UINT8 RefkitTestCA[] = { | ||
26 | + 0x30, 0x82, 0x02, 0xfb, 0x30, 0x82, 0x01, 0xe3, 0xa0, 0x03, 0x02, 0x01, | ||
27 | + 0x02, 0x02, 0x09, 0x00, 0xd4, 0xf6, 0x48, 0xc2, 0x68, 0x19, 0x91, 0xac, | ||
28 | + 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, | ||
29 | + 0x0b, 0x05, 0x00, 0x30, 0x14, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, | ||
30 | + 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, | ||
31 | + 0x62, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x34, 0x32, 0x30, 0x31, | ||
32 | + 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x34, | ||
33 | + 0x32, 0x30, 0x31, 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x30, 0x14, 0x31, | ||
34 | + 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, | ||
35 | + 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, 0x62, 0x30, 0x82, 0x01, 0x22, 0x30, | ||
36 | + 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, | ||
37 | + 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, | ||
38 | + 0x82, 0x01, 0x01, 0x00, 0xb4, 0x1c, 0x22, 0xa6, 0x22, 0x01, 0x57, 0xcd, | ||
39 | + 0xf1, 0x4f, 0xaf, 0x72, 0xe3, 0xd9, 0x01, 0x80, 0x50, 0x55, 0xef, 0x02, | ||
40 | + 0x5e, 0xeb, 0x99, 0x35, 0xcb, 0x7f, 0x2a, 0x79, 0xff, 0xb5, 0x3e, 0xec, | ||
41 | + 0x5d, 0x92, 0x06, 0x30, 0x20, 0xe7, 0x95, 0xad, 0xa4, 0x84, 0x2e, 0x3f, | ||
42 | + 0xfa, 0xd7, 0x46, 0xdd, 0x49, 0xa8, 0xe8, 0xe3, 0x79, 0x49, 0xf6, 0x8f, | ||
43 | + 0x0b, 0x1d, 0xfe, 0x63, 0xa8, 0xd1, 0x63, 0xa3, 0xd6, 0x0d, 0x4e, 0x6c, | ||
44 | + 0x66, 0x5c, 0xd6, 0x66, 0x26, 0xd1, 0x26, 0x98, 0xd4, 0x4f, 0x76, 0xc9, | ||
45 | + 0x65, 0x48, 0x58, 0x13, 0x08, 0x31, 0xbc, 0xe5, 0x47, 0x25, 0x65, 0x95, | ||
46 | + 0x39, 0x89, 0x5f, 0x02, 0xf1, 0xc5, 0x06, 0x17, 0x58, 0xca, 0x09, 0xfd, | ||
47 | + 0xf6, 0x1e, 0xc5, 0x97, 0xda, 0xa3, 0x4e, 0x1a, 0x48, 0xbe, 0xcf, 0x96, | ||
48 | + 0x27, 0x04, 0x4b, 0xb7, 0x6d, 0x67, 0xb6, 0x50, 0x18, 0x04, 0x73, 0x51, | ||
49 | + 0xd2, 0x6a, 0x2d, 0xdf, 0x3b, 0xab, 0xf2, 0x2d, 0x95, 0xd7, 0xa8, 0xb8, | ||
50 | + 0xa8, 0x30, 0xa1, 0xab, 0x8b, 0x92, 0x2b, 0x60, 0x3e, 0x3a, 0xe5, 0x86, | ||
51 | + 0x40, 0x71, 0xc1, 0x3f, 0x2d, 0x2e, 0x90, 0xe7, 0xd6, 0xec, 0xcc, 0xc2, | ||
52 | + 0x0b, 0x79, 0x83, 0x71, 0x6d, 0xf6, 0xa3, 0xa9, 0x4c, 0xcd, 0x46, 0x81, | ||
53 | + 0xdc, 0xef, 0xec, 0x51, 0xbe, 0x81, 0x2a, 0xf1, 0x78, 0x73, 0x41, 0xdb, | ||
54 | + 0x54, 0xce, 0x7c, 0xce, 0xa2, 0xe3, 0x90, 0x4f, 0x45, 0x1a, 0xf9, 0x3d, | ||
55 | + 0x88, 0xfc, 0x0e, 0xed, 0xd3, 0x69, 0x22, 0x4c, 0xfa, 0x0a, 0x69, 0xd1, | ||
56 | + 0x48, 0xc0, 0xaa, 0xa9, 0x3a, 0xb3, 0x8f, 0x10, 0x3a, 0x76, 0xa8, 0x0c, | ||
57 | + 0x7a, 0x3d, 0xd8, 0x79, 0xce, 0x1c, 0x96, 0x62, 0xf4, 0x06, 0xee, 0x47, | ||
58 | + 0xe8, 0xe0, 0x69, 0x91, 0xae, 0xea, 0x34, 0xcf, 0xda, 0xa8, 0xb4, 0x39, | ||
59 | + 0x5e, 0xf3, 0x7a, 0xd0, 0x88, 0x48, 0x47, 0x69, 0x02, 0x03, 0x01, 0x00, | ||
60 | + 0x01, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, | ||
61 | + 0x04, 0x16, 0x04, 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, | ||
62 | + 0x1a, 0x9f, 0x46, 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, | ||
63 | + 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, | ||
64 | + 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, 0x1a, 0x9f, 0x46, | ||
65 | + 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, 0x30, 0x0c, 0x06, | ||
66 | + 0x03, 0x55, 0x1d, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, | ||
67 | + 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, | ||
68 | + 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x8f, 0xd2, 0x84, 0x7c, 0x43, | ||
69 | + 0x47, 0xca, 0x6b, 0xfd, 0x87, 0x83, 0xd0, 0xef, 0x75, 0xd3, 0x20, 0x52, | ||
70 | + 0x73, 0x18, 0xaa, 0x32, 0x71, 0xfb, 0xa5, 0xf4, 0xc9, 0x11, 0xa3, 0x68, | ||
71 | + 0x4d, 0xb7, 0x9d, 0xe6, 0xd9, 0x46, 0x24, 0xdc, 0xc7, 0xc2, 0x3b, 0xf9, | ||
72 | + 0xb0, 0x98, 0xfc, 0xee, 0x34, 0x6e, 0x10, 0x9b, 0x3d, 0x44, 0x6e, 0x33, | ||
73 | + 0x09, 0x11, 0xb8, 0x29, 0xd6, 0x2d, 0x06, 0xcf, 0x67, 0x8f, 0x96, 0x85, | ||
74 | + 0x9d, 0x63, 0x72, 0xbf, 0x64, 0x5f, 0x0d, 0xe3, 0xc9, 0x63, 0x19, 0x71, | ||
75 | + 0xd4, 0x7d, 0x4c, 0x9c, 0x77, 0x46, 0xda, 0x20, 0x97, 0x6d, 0xbc, 0xdd, | ||
76 | + 0xc2, 0x1f, 0xf3, 0x40, 0x38, 0x1e, 0xe7, 0xcc, 0x55, 0x05, 0x72, 0xba, | ||
77 | + 0x24, 0x4f, 0xb3, 0x8a, 0x93, 0x0c, 0x30, 0x60, 0xda, 0x9f, 0x6f, 0x35, | ||
78 | + 0xf6, 0xfb, 0xb0, 0x1f, 0xb3, 0x00, 0xdd, 0xc4, 0xa6, 0xbc, 0xe2, 0x37, | ||
79 | + 0xc1, 0xa3, 0xef, 0xd9, 0xa1, 0x86, 0xf9, 0xeb, 0xa4, 0xa5, 0x45, 0x38, | ||
80 | + 0xff, 0x4e, 0x87, 0x4a, 0x41, 0xcf, 0x6e, 0x69, 0x7e, 0x97, 0xbe, 0x2d, | ||
81 | + 0x22, 0xbc, 0x8d, 0xa0, 0x1a, 0x21, 0x8f, 0x4b, 0x72, 0x90, 0x01, 0x5c, | ||
82 | + 0xba, 0xa5, 0x9c, 0x2d, 0xd7, 0x25, 0x24, 0xfc, 0xff, 0x5c, 0x58, 0x14, | ||
83 | + 0x46, 0x30, 0x09, 0x7c, 0x55, 0x64, 0x83, 0x0b, 0xb9, 0xdf, 0xcf, 0x25, | ||
84 | + 0xee, 0xec, 0xf7, 0xcb, 0xdb, 0xd1, 0x5b, 0x93, 0x93, 0xc8, 0x8a, 0x10, | ||
85 | + 0x46, 0xb8, 0xb0, 0x35, 0x1c, 0x6c, 0x0d, 0x8f, 0x03, 0x6a, 0x8f, 0x1b, | ||
86 | + 0x36, 0x68, 0xf3, 0x53, 0x89, 0x36, 0x5b, 0x21, 0x80, 0xde, 0xe3, 0x92, | ||
87 | + 0x52, 0x94, 0x97, 0x9d, 0x49, 0x89, 0x7d, 0x3e, 0xde, 0x29, 0x51, 0xba, | ||
88 | + 0x11, 0xf7, 0xba, 0x01, 0xf7, 0xab, 0xea, 0xc1, 0xa7, 0x2e, 0xa3, 0x4d, | ||
89 | + 0x65, 0xfd, 0x40, 0x71, 0xf1, 0xe2, 0x3f, 0x6c, 0x28, 0xcb, 0xd3 | ||
90 | +}; | ||
91 | + | ||
92 | // | ||
93 | // The most important thing about the variable payload is that it is a list of | ||
94 | // lists, where the element size of any given *inner* list is constant. | ||
95 | @@ -908,6 +975,7 @@ ShellAppMain ( | ||
96 | &gEfiImageSecurityDatabaseGuid, | ||
97 | MicrosoftPCA, sizeof MicrosoftPCA, &gEfiCallerIdGuid, | ||
98 | MicrosoftUefiCA, sizeof MicrosoftUefiCA, &gEfiCallerIdGuid, | ||
99 | + RefkitTestCA, sizeof RefkitTestCA, &gEfiCallerIdGuid, | ||
100 | NULL); | ||
101 | if (EFI_ERROR (Status)) { | ||
102 | return 1; | ||
103 | -- | ||
104 | 2.1.4 | ||
105 | |||
diff --git a/common/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb b/common/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb deleted file mode 100644 index b20f6e5..0000000 --- a/common/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | require recipes-core/ovmf/ovmf-shell-image.bb | ||
2 | |||
3 | WKS_SEARCH_PATH_append = ":${COREBASE}/meta/recipes-core/ovmf" | ||
4 | |||
5 | QB_DRIVE_TYPE = "/dev/vd" | ||
6 | |||
7 | do_image_append() { | ||
8 | cat > ${IMAGE_ROOTFS}/startup.nsh << EOF | ||
9 | EnrollDefaultKeys | ||
10 | reset | ||
11 | EOF | ||
12 | |||
13 | } | ||
diff --git a/common/recipes-core/ovmf/ovmf_%.bbappend b/common/recipes-core/ovmf/ovmf_%.bbappend deleted file mode 100644 index bbf5fa3..0000000 --- a/common/recipes-core/ovmf/ovmf_%.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" | ||
2 | |||
3 | SRC_URI_append_intel-x86-common = " \ | ||
4 | file://0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch \ | ||
5 | " | ||
6 | PACKAGECONFIG_append_intel-x86-common = " secureboot" | ||
diff --git a/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.19.bb b/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.19.bb deleted file mode 100644 index de9ed60..0000000 --- a/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.19.bb +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | require ${COREBASE}/meta/recipes-graphics/xorg-app/xorg-app-common.inc | ||
2 | |||
3 | SUMMARY = "Intel GPU tools" | ||
4 | DESCRIPTION = "Variety of small tools for testing intel graphics." | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=e4b3dd344780e0400593b21b115a6947" | ||
7 | |||
8 | LICENSE_append = " & ISC" | ||
9 | |||
10 | inherit autotools gtk-doc | ||
11 | |||
12 | DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 libxv libx11 libxext libxrandr procps" | ||
13 | RDEPENDS_${PN} += "bash" | ||
14 | RDEPENDS_${PN}-tests += "bash" | ||
15 | |||
16 | PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests" | ||
17 | |||
18 | SRC_URI[md5sum] = "4fdfa56acca3b046fc61fb12686656f3" | ||
19 | SRC_URI[sha256sum] = "a49c8ae7c0431c1f33cd9492f83ec4e06e98a48429178e4bd22d9a1a87e3b0f1" | ||
20 | |||
21 | PACKAGECONFIG ??= "" | ||
22 | PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind,libunwind" | ||
23 | |||
24 | EXTRA_OECONF = "--disable-nouveau --disable-shader-debugger" | ||
25 | COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" | ||
26 | COMPATIBLE_HOST_libc-musl_class-target = "null" | ||
27 | |||
28 | gputools_sysroot_preprocess() { | ||
29 | rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc | ||
30 | } | ||
31 | SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess" | ||
32 | |||
33 | FILES_${PN} += "${libdir}/intel_aubdump.so" | ||
34 | FILES_${PN}-benchmarks += "${libexecdir}/intel-gpu-tools/benchmarks" | ||
35 | FILES_${PN}-tests += "\ | ||
36 | ${libexecdir}/intel-gpu-tools/*\ | ||
37 | ${datadir}/intel-gpu-tools/1080p-right.png\ | ||
38 | ${datadir}/intel-gpu-tools/1080p-left.png\ | ||
39 | ${datadir}/intel-gpu-tools/pass.png\ | ||
40 | ${datadir}/intel-gpu-tools/test-list.txt" | ||
diff --git a/common/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb b/common/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb deleted file mode 100644 index 090efd6..0000000 --- a/common/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-video.inc | ||
2 | |||
3 | SUMMARY = "X.Org X server -- ASpeed Technologies graphics driver" | ||
4 | |||
5 | DESCRIPTION = "ast is an Xorg driver for ASpeed Technologies video cards" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=0b8c242f0218eea5caa949b7910a774b" | ||
8 | |||
9 | DEPENDS += "libpciaccess" | ||
10 | |||
11 | SRC_URI[md5sum] = "4f85febe48d51e53624550a96fc9e9ee" | ||
12 | SRC_URI[sha256sum] = "1edbbc55d47d3fd71dec99b15c2483e22738c642623a0fb86ef4a81a9067a2de" | ||
diff --git a/common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch b/common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch deleted file mode 100644 index ceae6df..0000000 --- a/common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=57606] | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From c9014a8f3c9b691b5aa7b1f3ec66cf7c84b8211b Mon Sep 17 00:00:00 2001 | ||
5 | From: Ross Burton <ross.burton@intel.com> | ||
6 | Date: Thu, 29 Nov 2012 11:00:43 +0000 | ||
7 | Subject: [PATCH] build: dont use AC_CHECK_FILE when enabling DRI | ||
8 | |||
9 | Automatically enabling or disabling a feature based on installed files isn't | ||
10 | deterministic, and AC_CHECK_FILE returns an error when cross-compiling. | ||
11 | |||
12 | Fix this by enabling DRI by default, and removing the explicit file checks as | ||
13 | pkg-config is good enough. | ||
14 | |||
15 | (#57606) | ||
16 | |||
17 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
18 | --- | ||
19 | configure.ac | 25 ++----------------------- | ||
20 | 1 file changed, 2 insertions(+), 23 deletions(-) | ||
21 | |||
22 | diff --git a/configure.ac b/configure.ac | ||
23 | index fca1a9c..d2aa2ed 100644 | ||
24 | --- a/configure.ac | ||
25 | +++ b/configure.ac | ||
26 | @@ -55,9 +55,9 @@ AC_ARG_WITH(xorg-module-dir, | ||
27 | [moduledir="$libdir/xorg/modules"]) | ||
28 | |||
29 | AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri], | ||
30 | - [Disable DRI support [[default=auto]]]), | ||
31 | + [Disable DRI support [[default=enabled]]]), | ||
32 | [DRI="$enableval"], | ||
33 | - [DRI=auto]) | ||
34 | + [DRI=yes]) | ||
35 | AC_ARG_ENABLE(exa, | ||
36 | AS_HELP_STRING([--disable-exa], | ||
37 | [Disable EXA support [[default=enabled]]]), | ||
38 | @@ -76,27 +76,6 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` | ||
39 | |||
40 | # Checks for libraries. | ||
41 | |||
42 | -if test "x$DRI" != xno; then | ||
43 | - AC_CHECK_FILE([${sdkdir}/dri.h], | ||
44 | - [have_dri_h="yes"], [have_dri_h="no"]) | ||
45 | - AC_CHECK_FILE([${sdkdir}/sarea.h], | ||
46 | - [have_sarea_h="yes"], [have_sarea_h="no"]) | ||
47 | - AC_CHECK_FILE([${sdkdir}/dristruct.h], | ||
48 | - [have_dristruct_h="yes"], [have_dristruct_h="no"]) | ||
49 | -fi | ||
50 | - | ||
51 | -AC_MSG_CHECKING([whether to include DRI support]) | ||
52 | -if test "x$DRI" = xauto; then | ||
53 | - if test "x$have_dri_h" = xyes && \ | ||
54 | - test "x$have_sarea_h" = xyes && \ | ||
55 | - test "x$have_dristruct_h" = xyes; then | ||
56 | - DRI="yes" | ||
57 | - else | ||
58 | - DRI="no" | ||
59 | - fi | ||
60 | -fi | ||
61 | -AC_MSG_RESULT([$DRI]) | ||
62 | - | ||
63 | AM_CONDITIONAL(DRI, test "x$DRI" = xyes) | ||
64 | if test "x$DRI" = xyes; then | ||
65 | PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto]) | ||
66 | -- | ||
67 | 1.7.10.4 | ||
68 | |||
diff --git a/common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.5.bb b/common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.5.bb deleted file mode 100644 index d30936b..0000000 --- a/common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.5.bb +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-video.inc | ||
2 | |||
3 | SUMMARY = "X.Org X server -- Matrox MGA display driver" | ||
4 | |||
5 | DESCRIPTION = "mga is an Xorg driver for Matrox video cards" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=bc1395d2cd32dfc5d6c57d2d8f83d3fc" | ||
8 | |||
9 | SRC_URI += "file://checkfile.patch" | ||
10 | |||
11 | DEPENDS += "virtual/libx11 libpciaccess" | ||
12 | |||
13 | PR = "r1" | ||
14 | |||
15 | COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)' | ||
16 | |||
17 | SRC_URI[md5sum] = "3ee2549247e01de3e7bce52c27483118" | ||
18 | SRC_URI[sha256sum] = "b663cd8e6364f7c4e2637b9fcab9861d0e3971518c73b00d213f6545a1289422" | ||
19 | |||
20 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri', '', d)}" | ||
21 | PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,drm xf86driproto,xserver-xorg-extension-dri" | ||
22 | |||
23 | RDEPENDS_${PN} = "xserver-xorg-module-exa" | ||
diff --git a/common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch b/common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch deleted file mode 100644 index 353126f..0000000 --- a/common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 3fcc81ad127c267018aed96a359bbf01db1bd8ee Mon Sep 17 00:00:00 2001 | ||
2 | From: Saul Wold <sgw@linux.intel.com> | ||
3 | Date: Sat, 1 Apr 2017 11:43:31 -0700 | ||
4 | Subject: [PATCH] zc: Force 4.10 get_user_pages_remote API | ||
5 | |||
6 | This change forces the newer API, as the linux-intel 4.9-LTS kernel | ||
7 | backported the 4.10 API change in the page handling code. | ||
8 | |||
9 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
10 | --- | ||
11 | zc.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/zc.c b/zc.c | ||
15 | index ae464ff..b2759ce 100644 | ||
16 | --- a/zc.c | ||
17 | +++ b/zc.c | ||
18 | @@ -65,7 +65,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write, | ||
19 | #elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)) | ||
20 | ret = get_user_pages_remote(task, mm, | ||
21 | (unsigned long)addr, pgcount, write, 0, pg, NULL); | ||
22 | -#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)) | ||
23 | +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) & 0) | ||
24 | ret = get_user_pages_remote(task, mm, | ||
25 | (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, | ||
26 | pg, NULL); | ||
diff --git a/common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend b/common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend deleted file mode 100644 index c59ddb2..0000000 --- a/common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
2 | |||
3 | python() { | ||
4 | # When we add more kernels for linux-intel, we may have to add a Version check | ||
5 | if (d.getVar("PREFERRED_PROVIDER_virtual/kernel") == "linux-intel"): | ||
6 | src_uri = d.getVar("SRC_URI") | ||
7 | d.setVar("SRC_URI", src_uri + | ||
8 | " file://0001-zc-Force-4.10-get_user_pages_remote-API.patch") | ||
9 | } | ||
diff --git a/common/recipes-kernel/intel-ethernet/ixgbe.bb b/common/recipes-kernel/intel-ethernet/ixgbe.bb deleted file mode 100644 index 5b6f031..0000000 --- a/common/recipes-kernel/intel-ethernet/ixgbe.bb +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | SUMMARY="ixgbe kernel driver for Intel Magnolia Park 10GbE" | ||
2 | DESCRIPTION="Intel 10-Gbps Ethernet driver for Magnolia Park" | ||
3 | AUTHOR = "Ong Boon Leong" | ||
4 | HOMEPAGE = "http://www.intel.com/network/connectivity/products/server_adapters.htm" | ||
5 | SECTION = "kernel/network" | ||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
8 | |||
9 | PV = "5.1.3" | ||
10 | PR = "r0" | ||
11 | |||
12 | SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/${PV}/ixgbe-${PV}.tar.gz" | ||
13 | SRC_URI += "file://0001-ixgbe-src-Makefile-change-make-install-to-make.patch" | ||
14 | |||
15 | SRC_URI[md5sum] = "ae35ed547aa6a5087672c3f70ce1e676" | ||
16 | SRC_URI[sha256sum] = "9f537d79bddf0a087a17af632d57812d26d26bcfebbd4bdcf10df656ff055bb4" | ||
17 | |||
18 | S = "${WORKDIR}/${PN}-${PV}/src" | ||
19 | SCRIPT_DIR = "${WORKDIR}/${PN}-${PV}/scripts" | ||
20 | |||
21 | EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" \ | ||
22 | BUILD_ARCH="${TARGET_ARCH}" PREFIX="${D}" \ | ||
23 | SYSTEM_MAP_FILE="${STAGING_KERNEL_BUILDDIR}/System.map-${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' | ||
24 | |||
25 | KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbe" | ||
26 | KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbe" | ||
27 | |||
28 | inherit module | ||
29 | |||
30 | do_install_append () { | ||
31 | # Install scripts/set_irq_affinity | ||
32 | install -d ${D}/etc/network | ||
33 | install -m 0755 ${SCRIPT_DIR}/set_irq_affinity ${D}/etc/network | ||
34 | } | ||
35 | |||
36 | #SSTATE_DUPWHITELIST += "${STAGING_DIR_HOST}/lib/modules/${KERNEL_VERSION}/" | ||
37 | |||
38 | PACKAGES += "${PN}-script" | ||
39 | |||
40 | FILES_${PN}-script += "/etc/network/set_irq_affinity" | ||
41 | |||
42 | #Ignore "ERROR: QA Issue: ixgbe: Files/directories were installed but not shipped" | ||
43 | INSANE_SKIP_${PN} = "installed-vs-shipped" | ||
diff --git a/common/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-src-Makefile-change-make-install-to-make.patch b/common/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-src-Makefile-change-make-install-to-make.patch deleted file mode 100644 index 88f5335..0000000 --- a/common/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-src-Makefile-change-make-install-to-make.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 09c7a5afa76530a3720d97726f2b372f72b0af08 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Goh, Wen Sen" <wen.sen.goh@intel.com> | ||
3 | Date: Wed, 22 Jun 2016 11:18:37 +0800 | ||
4 | Subject: [PATCH] ixgbe: src/Makefile: change make install to make | ||
5 | modules_install | ||
6 | |||
7 | Per guideline from Linux Documentation at | ||
8 | Documentation/kbuild/modules.txt | ||
9 | the correct target is "modules_install" not "install". | ||
10 | |||
11 | Upstream-Status: Inappropriate [It is tarball released by Intel Network | ||
12 | driver group] | ||
13 | |||
14 | --- | ||
15 | src/Makefile | 4 ++-- | ||
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/Makefile b/Makefile | ||
19 | index 852becb..480ecee 100644 | ||
20 | --- a/Makefile | ||
21 | +++ b/Makefile | ||
22 | @@ -136,7 +136,7 @@ clean: | ||
23 | @-rm -rf *.${MANSECTION}.gz *.ko | ||
24 | |||
25 | # Install the modules and manpage | ||
26 | -install: default manfile | ||
27 | +modules_install: default manfile | ||
28 | @echo "Copying manpages..." | ||
29 | @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz | ||
30 | @echo "Installing modules..." | ||
31 | @@ -191,6 +191,6 @@ help: | ||
32 | @echo ' Other variables may be available for tuning make process, see' | ||
33 | @echo ' Kernel Kbuild documentation for more information' | ||
34 | |||
35 | -.PHONY: default noisy clean manfile silent sparse ccc install uninstall help | ||
36 | +.PHONY: default noisy clean manfile silent sparse ccc modules_install uninstall help | ||
37 | |||
38 | endif # ifneq($(KERNELRELEASE),) | ||
39 | -- | ||
40 | 2.8.3 | ||
diff --git a/common/recipes-kernel/intel-ethernet/ixgbevf.bb b/common/recipes-kernel/intel-ethernet/ixgbevf.bb deleted file mode 100644 index bee601b..0000000 --- a/common/recipes-kernel/intel-ethernet/ixgbevf.bb +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | SUMMARY="ixgbevf kernel driver for Intel Magnolia Park 10GbE" | ||
2 | DESCRIPTION="Intel 10-Gbps Ethernet driver for Magnolia Park" | ||
3 | AUTHOR = "Ong Boon Leong" | ||
4 | HOMEPAGE = "http://www.intel.com/network/connectivity/products/server_adapters.htm" | ||
5 | SECTION = "kernel/network" | ||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
8 | |||
9 | PV = "4.1.2" | ||
10 | PR = "r0" | ||
11 | |||
12 | SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/${PV}/ixgbevf-${PV}.tar.gz" | ||
13 | SRC_URI += "file://0001-ixgbevf-src-Makefile-change-make-install-to-make.patch" | ||
14 | SRC_URI += "file://0002-ixgbevf_common.patch" | ||
15 | |||
16 | SRC_URI[md5sum] = "f02ec46369d1ca949a1e9d2e0eb74d5f" | ||
17 | SRC_URI[sha256sum] = "ab2824541f8a2d8f7b7d26ccbb46359ef551c5d4625fb333014e2b8023ac3ab6" | ||
18 | |||
19 | S = "${WORKDIR}/${PN}-${PV}/src" | ||
20 | SCRIPT_DIR = "${WORKDIR}/${PN}-${PV}/scripts" | ||
21 | |||
22 | EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" \ | ||
23 | BUILD_ARCH="${TARGET_ARCH}" PREFIX="${D}" \ | ||
24 | SYSTEM_MAP_FILE="${STAGING_KERNEL_BUILDDIR}/System.map-${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' | ||
25 | |||
26 | KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbevf" | ||
27 | KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbevf" | ||
28 | |||
29 | inherit module | ||
30 | |||
31 | do_install_append () { | ||
32 | # Install scripts/set_irq_affinity | ||
33 | install -d ${D}/etc/network | ||
34 | install -m 0755 ${SCRIPT_DIR}/set_irq_affinity ${D}/etc/network | ||
35 | } | ||
36 | |||
37 | #SSTATE_DUPWHITELIST += "${STAGING_DIR_HOST}/lib/modules/${KERNEL_VERSION}/" | ||
38 | |||
39 | PACKAGES += "${PN}-script" | ||
40 | |||
41 | FILES_${PN}-script += "/etc/network/set_irq_affinity" | ||
42 | |||
43 | #Ignore "ERROR: QA Issue: ixgbe: Files/directories were installed but not shipped" | ||
44 | INSANE_SKIP_${PN} = "installed-vs-shipped" | ||
diff --git a/common/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-src-Makefile-change-make-install-to-make.patch b/common/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-src-Makefile-change-make-install-to-make.patch deleted file mode 100644 index 8234f58..0000000 --- a/common/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-src-Makefile-change-make-install-to-make.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 511ee0d8d40a3e76b3e9875a96228ff370dbdfc6 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Goh, Wen Sen" <wen.sen.goh@intel.com> | ||
3 | Date: Wed, 22 Jun 2016 11:25:41 +0800 | ||
4 | Subject: [PATCH] ixgbevf_patch | ||
5 | |||
6 | --- | ||
7 | Makefile | 4 ++-- | ||
8 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/Makefile b/Makefile | ||
11 | index 8df134a..8d5660e 100644 | ||
12 | --- a/Makefile | ||
13 | +++ b/Makefile | ||
14 | @@ -100,7 +100,7 @@ clean: | ||
15 | @-rm -rf *.${MANSECTION}.gz *.ko | ||
16 | |||
17 | # Install the modules and manpage | ||
18 | -install: default manfile | ||
19 | +modules_install: default manfile | ||
20 | @echo "Copying manpages..." | ||
21 | @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz | ||
22 | @echo "Installing modules..." | ||
23 | @@ -145,6 +145,6 @@ help: | ||
24 | @echo ' Other variables may be available for tuning make process, see' | ||
25 | @echo ' Kernel Kbuild documentation for more information' | ||
26 | |||
27 | -.PHONY: default noisy clean manfile silent sparse ccc install uninstall help | ||
28 | +.PHONY: default noisy clean manfile silent sparse ccc modules_install uninstall help | ||
29 | |||
30 | endif # ifneq($(KERNELRELEASE),) | ||
31 | -- | ||
32 | 2.8.3 | ||
diff --git a/common/recipes-kernel/intel-ethernet/ixgbevf/0002-ixgbevf_common.patch b/common/recipes-kernel/intel-ethernet/ixgbevf/0002-ixgbevf_common.patch deleted file mode 100644 index d442e24..0000000 --- a/common/recipes-kernel/intel-ethernet/ixgbevf/0002-ixgbevf_common.patch +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | From f74fbcd821a394dec58263fd2c2ea62eae298b2f Mon Sep 17 00:00:00 2001 | ||
2 | From: "Goh, Wen Sen" <wen.sen.goh@intel.com> | ||
3 | Date: Sun, 26 Jun 2016 12:01:36 +0800 | ||
4 | Subject: [PATCH] ixgbevf patch | ||
5 | |||
6 | --- | ||
7 | common.mk | 1 + | ||
8 | 1 file changed, 1 insertion(+) | ||
9 | |||
10 | diff --git a/common.mk b/common.mk | ||
11 | index b9b01c7..228a926 100644 | ||
12 | --- a/common.mk | ||
13 | +++ b/common.mk | ||
14 | @@ -289,6 +289,7 @@ export INSTALL_MOD_DIR ?= updates/drivers/net/ethernet/intel/${DRIVER} | ||
15 | kernelbuild = ${MAKE} $(if ${GCC_I_SYS},CC="${GCC_I_SYS}") \ | ||
16 | ${CCFLAGS_VAR}="${EXTRA_CFLAGS}" \ | ||
17 | -C "${KSRC}" \ | ||
18 | + CONFIG_IXGBE=m \ | ||
19 | CONFIG_${DRIVER_UPPERCASE}=m \ | ||
20 | M="${CURDIR}" \ | ||
21 | ${2} ${1}; | ||
22 | -- | ||
23 | 2.8.3 | ||
diff --git a/common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch b/common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch deleted file mode 100644 index 1d4137b..0000000 --- a/common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From f69ff2fd27903ee052309179271f708d720a2f94 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
3 | Date: Thu, 10 Aug 2017 21:12:51 +0300 | ||
4 | Subject: [PATCH] Makefile.real: skip host install scripts | ||
5 | |||
6 | The scripts run in install target are relevant (and working) | ||
7 | only if the driver installation is run on the build host. | ||
8 | |||
9 | Skip the scripts when cross-compiling. | ||
10 | |||
11 | Upstream-Status: Inappropriate [Cross-Compile] | ||
12 | |||
13 | Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
14 | --- | ||
15 | Makefile.real | 5 ----- | ||
16 | 1 file changed, 5 deletions(-) | ||
17 | |||
18 | diff --git a/Makefile.real b/Makefile.real | ||
19 | index ba09f99..f5075de 100644 | ||
20 | --- a/Makefile.real | ||
21 | +++ b/Makefile.real | ||
22 | @@ -104,11 +104,6 @@ install: modules | ||
23 | @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \ | ||
24 | INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG) \ | ||
25 | modules_install | ||
26 | - @./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR) | ||
27 | - @./scripts/compress_modules.sh $(KLIB)/$(KMODDIR) | ||
28 | - @./scripts/check_depmod.sh | ||
29 | - @/sbin/depmod -a | ||
30 | - @./scripts/update-initramfs.sh $(KLIB) | ||
31 | @echo | ||
32 | @echo Your backported driver modules should be installed now. | ||
33 | @echo Reboot. | ||
34 | -- | ||
35 | 2.1.4 | ||
36 | |||
diff --git a/common/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf b/common/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf deleted file mode 100644 index a0e5f6f..0000000 --- a/common/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | # /etc/modprobe.d/iwlwifi.conf | ||
2 | # iwlwifi will dynamically load either iwldvm or iwlmvm depending on the | ||
3 | # microcode file installed on the system. When removing iwlwifi, first | ||
4 | # remove the iwl?vm module and then iwlwifi. | ||
5 | remove iwlwifi (/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm16 -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) && /sbin/modprobe -r mac80211 | ||
6 | |||
7 | #options iwlwifi lar_disable=1 | ||
8 | #options iwlwifi nvm_file="nvm-sfp-b2-open.bin" | ||
9 | options iwlmvm power_scheme=1 | ||
10 | |||
11 | # PCI BUS | ||
12 | |||
diff --git a/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb b/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb deleted file mode 100644 index f793a10..0000000 --- a/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | SUMMARY = "Intel Wireless LinuxCore kernel driver" | ||
2 | DESCRIPTION = "Intel Wireless LinuxCore kernel driver" | ||
3 | SECTION = "kernel" | ||
4 | LICENSE = "GPLv2" | ||
5 | |||
6 | REQUIRED_DISTRO_FEATURES = "wifi" | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
9 | |||
10 | inherit module | ||
11 | |||
12 | PV = "30" | ||
13 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV}" | ||
14 | SRC_URI += "file://0001-Makefile.real-skip-host-install-scripts.patch" | ||
15 | SRC_URI += "file://iwlwifi.conf" | ||
16 | |||
17 | SRCREV = "${AUTOREV}" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | EXTRA_OEMAKE = "INSTALL_MOD_PATH=${D} KLIB_BUILD=${KBUILD_OUTPUT}" | ||
22 | |||
23 | do_configure() { | ||
24 | CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT} | ||
25 | } | ||
26 | |||
27 | MODULES_INSTALL_TARGET="install" | ||
28 | |||
29 | do_install_append() { | ||
30 | ## install configs and service scripts | ||
31 | install -d ${D}${sysconfdir}/modprobe.d | ||
32 | install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d | ||
33 | } | ||
34 | |||
35 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" | ||
36 | |||
37 | RDEPENDS_${PN} = "linux-firmware-iwlwifi" | ||
38 | |||
39 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" | ||
40 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" | ||
41 | |||
42 | KERNEL_MODULE_PACKAGE_PREFIX = "backport-iwlwifi" | ||
diff --git a/common/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/common/recipes-kernel/linux-firmware/linux-firmware_%.bbappend deleted file mode 100644 index f6968af..0000000 --- a/common/recipes-kernel/linux-firmware/linux-firmware_%.bbappend +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | # meta-intel maintains a recipe that installs iwlwifi's LinuxCore wifi | ||
2 | # driver releases. For some iwfwifi LinuxCore supported wireless chips, the | ||
3 | # best/latest firmware blobs are found in the iwlwifi's linux-firmware.git fork. | ||
4 | # | ||
5 | # See: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release | ||
6 | # | ||
7 | # This bbappend fetches the -31.ucode (currently, for Intel Wireless 8260 | ||
8 | # only!) that is the best match for the iwlwifi LinuxCore release built. | ||
9 | # | ||
10 | # Note: keep these in sync when updating the iwlwifi_git.bb LinuxCore | ||
11 | # versions. | ||
12 | |||
13 | SRC_URI_append_intel-x86-common = " https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git/plain/iwlwifi-8000C-31.ucode?id=${IWLWIFI_SRCREV};name=iwlwifi-8000C-31" | ||
14 | |||
15 | IWLWIFI_SRCREV = "942f14f65363f33c3fd8a06db58c8ccca0559335" | ||
16 | |||
17 | SRC_URI[iwlwifi-8000C-31.md5sum] = "428a84a780bbe864a7af6a6734c4b529" | ||
18 | SRC_URI[iwlwifi-8000C-31.sha256sum] = "5a337c52f9d7a7cb5cb0a13c93232f4de742ed0debef757d68231bdb55455406" | ||
19 | |||
20 | do_install_append_intel-x86-common() { | ||
21 | # Copy the iwlwifi/LinuxCore required ucode for Intel Wireless 8260 | ||
22 | cp ${WORKDIR}/iwlwifi-8000C-31.ucode\?id\=${IWLWIFI_SRCREV} ${D}/${nonarch_base_libdir}/firmware/iwlwifi-8000C-31.ucode | ||
23 | } | ||
diff --git a/common/recipes-kernel/linux/linux-intel-rt_4.9.bb b/common/recipes-kernel/linux/linux-intel-rt_4.9.bb deleted file mode 100644 index 3fbe8fd..0000000 --- a/common/recipes-kernel/linux/linux-intel-rt_4.9.bb +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | |||
2 | require linux-intel.inc | ||
3 | |||
4 | # Skip processing of this recipe if it is not explicitly specified as the | ||
5 | # PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying | ||
6 | # to build multiple virtual/kernel providers, e.g. as dependency of | ||
7 | # core-image-rt-sdk, core-image-rt. | ||
8 | python () { | ||
9 | if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": | ||
10 | raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") | ||
11 | } | ||
12 | |||
13 | KBRANCH = "base-rt" | ||
14 | SRCREV_machine ?= "fc08e0615edccfb4d297c07531451cb7905fb4f4" | ||
15 | SRCREV_meta ?= "3ddaed3671efc2936efbebf4c5216e11b9dfd55d" | ||
16 | |||
17 | LINUX_KERNEL_TYPE = "preempt-rt" | ||
diff --git a/common/recipes-kernel/linux/linux-intel.inc b/common/recipes-kernel/linux/linux-intel.inc deleted file mode 100644 index 46f28ef..0000000 --- a/common/recipes-kernel/linux/linux-intel.inc +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | require recipes-kernel/linux/linux-yocto.inc | ||
2 | |||
3 | FILESEXTRAPATHS_prepend := "${THISDIR}/linux-intel:" | ||
4 | |||
5 | KERNEL_CONFIG_URI ?= " \ | ||
6 | git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA} \ | ||
7 | " | ||
8 | SRC_URI = " \ | ||
9 | git://github.com/01org/linux-intel-4.9.git;protocol=https;name=machine;branch=${KBRANCH}; \ | ||
10 | ${KERNEL_CONFIG_URI} \ | ||
11 | " | ||
12 | |||
13 | SRC_URI_append_core2-32-intel-common = " file://disable_skylake_sound.cfg" | ||
14 | |||
15 | |||
16 | LINUX_VERSION ?= "4.9.47" | ||
17 | LINUX_VERSION_EXTENSION ?= "-intel-pk-${LINUX_KERNEL_TYPE}" | ||
18 | |||
19 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
20 | |||
21 | KMETA = "kernel-meta" | ||
22 | KCONF_BSP_AUDIT_LEVEL = "2" | ||
23 | |||
24 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
25 | |||
26 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
27 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
28 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
29 | |||
30 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
31 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
32 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
33 | |||
34 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
35 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
36 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "features/qat/qat.scc" | ||
37 | |||
38 | # Functionality flags | ||
39 | KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" | ||
40 | KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" | ||
41 | |||
42 | KERNEL_MODULE_PROBECONF_corei7-64-intel-common += "snd-soc-skl" | ||
43 | module_conf_snd-soc-skl_corei7-64-intel-common = "blacklist snd-soc-skl" | ||
diff --git a/common/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg b/common/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg deleted file mode 100644 index f7d7322..0000000 --- a/common/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | # CONFIG_SND_SOC_INTEL_SKYLAKE is not set | ||
2 | # CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH is not set | ||
3 | # CONFIG_SND_SOC_INTEL_BXT_FLORIDA_MACH is not set | ||
4 | # CONFIG_SND_SOC_INTEL_BXT_RT298_MACH is not set | ||
5 | # CONFIG_SND_SOC_INTEL_BXT_TDF8532_MACH is not set | ||
6 | # CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH is not set | ||
7 | # CONFIG_SND_SOC_INTEL_SKL_RT286_MACH is not set | ||
8 | # CONFIG_SND_SOC_INTEL_CNL_WM8281_MACH is not set | ||
9 | # CONFIG_SND_SOC_INTEL_CNL_RT274_MACH is not set | ||
10 | # CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH is not set | ||
11 | # CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH is not set | ||
12 | # CONFIG_SND_SOC_INTEL_CNL_CS42L42_MACH is not set | ||
13 | # CONFIG_SND_SOC_INTEL_CNL_RT700_MACH is not set | ||
14 | # CONFIG_SND_SOC_INTEL_CNL_SVFPGA_MACH is not set | ||
diff --git a/common/recipes-kernel/linux/linux-intel_4.9.bb b/common/recipes-kernel/linux/linux-intel_4.9.bb deleted file mode 100644 index 4823c98..0000000 --- a/common/recipes-kernel/linux/linux-intel_4.9.bb +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | |||
2 | require linux-intel.inc | ||
3 | |||
4 | KBRANCH = "base" | ||
5 | SRCREV_machine ?= "2d533948da0a7c53a0a662d3764be166ba996d93" | ||
6 | SRCREV_meta ?= "3ddaed3671efc2936efbebf4c5216e11b9dfd55d" | ||
7 | |||
8 | # For Crystalforest and Romley | ||
9 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" | ||
10 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" | ||
11 | |||
12 | # Functionality flags | ||
13 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto-dev.bbappend b/common/recipes-kernel/linux/linux-yocto-dev.bbappend deleted file mode 100644 index ee33ecc..0000000 --- a/common/recipes-kernel/linux/linux-yocto-dev.bbappend +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
2 | |||
3 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
4 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
5 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
6 | |||
7 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
8 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
9 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
10 | |||
11 | # Quark / X1000 BSP Info | ||
12 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
13 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
14 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" | ||
15 | |||
16 | # NOTE: We do not set SRCREVs here as -dev is intended to be built with AUTOREV | ||
17 | # and setting them here breaks the default mechanism to use AUTOREV if the | ||
18 | # default SRCREV is set and linux-yocto-dev is the preferred provider. | ||
19 | |||
20 | # For Crystalforest and Romley | ||
21 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" | ||
22 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" | ||
23 | |||
24 | # For FRI2, NUC | ||
25 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" | ||
26 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto-rt_4.10.bbappend b/common/recipes-kernel/linux/linux-yocto-rt_4.10.bbappend deleted file mode 100644 index 17569a1..0000000 --- a/common/recipes-kernel/linux/linux-yocto-rt_4.10.bbappend +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
2 | |||
3 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
4 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
5 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
6 | |||
7 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
8 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
9 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
10 | |||
11 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
12 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
13 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto-rt_4.12.bbappend b/common/recipes-kernel/linux/linux-yocto-rt_4.12.bbappend deleted file mode 100644 index 17569a1..0000000 --- a/common/recipes-kernel/linux/linux-yocto-rt_4.12.bbappend +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
2 | |||
3 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
4 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
5 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
6 | |||
7 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
8 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
9 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
10 | |||
11 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
12 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
13 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto-rt_4.4.bbappend b/common/recipes-kernel/linux/linux-yocto-rt_4.4.bbappend deleted file mode 100644 index c18f4a1..0000000 --- a/common/recipes-kernel/linux/linux-yocto-rt_4.4.bbappend +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
2 | |||
3 | LINUX_VERSION_INTEL_COMMON = "4.4.87" | ||
4 | SRCREV_META_INTEL_COMMON ?= "804d2b3164ec25ed519fd695de9aa0908460c92e" | ||
5 | SRCREV_MACHINE_INTEL_COMMON ?= "d1ce34c9e66fe55382cc196fe7facbe7865c4eed" | ||
6 | |||
7 | KBRANCH_INTEL_COMMON = "standard/preempt-rt/intel/base" | ||
8 | |||
9 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
10 | |||
11 | LINUX_VERSION_core2-32-intel-common = "${LINUX_VERSION_INTEL_COMMON}" | ||
12 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
13 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
14 | KBRANCH_core2-32-intel-common = "${KBRANCH_INTEL_COMMON}" | ||
15 | SRCREV_meta_core2-32-intel-common ?= "${SRCREV_META_INTEL_COMMON}" | ||
16 | SRCREV_machine_core2-32-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" | ||
17 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
18 | |||
19 | LINUX_VERSION_corei7-64-intel-common = "${LINUX_VERSION_INTEL_COMMON}" | ||
20 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
21 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
22 | KBRANCH_corei7-64-intel-common = "${KBRANCH_INTEL_COMMON}" | ||
23 | SRCREV_meta_corei7-64-intel-common ?= "${SRCREV_META_INTEL_COMMON}" | ||
24 | SRCREV_machine_corei7-64-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" | ||
25 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
26 | |||
27 | LINUX_VERSION_i586-nlp-32-intel-common = "${LINUX_VERSION_INTEL_COMMON}" | ||
28 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
29 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
30 | KBRANCH_i586-nlp-32-intel-common = "${KBRANCH_INTEL_COMMON}" | ||
31 | SRCREV_meta_i586-nlp-32-intel-common ?= "${SRCREV_META_INTEL_COMMON}" | ||
32 | SRCREV_machine_i586-nlp-32-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" | ||
33 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto-rt_4.9.bbappend b/common/recipes-kernel/linux/linux-yocto-rt_4.9.bbappend deleted file mode 100644 index 9d2e3c0..0000000 --- a/common/recipes-kernel/linux/linux-yocto-rt_4.9.bbappend +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | KERNEL_FEATURES_INTEL_COMMON = "" | ||
2 | |||
3 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
4 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
5 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
6 | |||
7 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
8 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
9 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
10 | |||
11 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
12 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
13 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/common/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend deleted file mode 100644 index b8d3d81..0000000 --- a/common/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
2 | |||
3 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
4 | |||
5 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
6 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
7 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
8 | |||
9 | KBRANCH_i586-nlp-32-intel-common = "standard/tiny/base" | ||
10 | KBRANCH_core2-32-intel-common = "standard/tiny/base" | ||
11 | KBRANCH_corei7-64-intel-common = "standard/tiny/base" | ||
12 | |||
13 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
14 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
15 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
16 | |||
17 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
18 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
19 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/common/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend deleted file mode 100644 index b8d3d81..0000000 --- a/common/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
2 | |||
3 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
4 | |||
5 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
6 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
7 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
8 | |||
9 | KBRANCH_i586-nlp-32-intel-common = "standard/tiny/base" | ||
10 | KBRANCH_core2-32-intel-common = "standard/tiny/base" | ||
11 | KBRANCH_corei7-64-intel-common = "standard/tiny/base" | ||
12 | |||
13 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
14 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
15 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
16 | |||
17 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
18 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
19 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/common/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend deleted file mode 100644 index 54430e2..0000000 --- a/common/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
2 | |||
3 | EXTRA_OEMAKE = "LD=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/${TARGET_PREFIX}ld AR=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/${TARGET_PREFIX}gcc-ar" | ||
4 | |||
5 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
6 | |||
7 | LINUX_VERSION_i586-nlp-32-intel-common = "4.4.87" | ||
8 | LINUX_VERSION_core2-32-intel-common = "4.4.87" | ||
9 | LINUX_VERSION_corei7-64-intel-common = "4.4.87" | ||
10 | |||
11 | SRCREV_meta_i586-nlp-32-intel-common = "804d2b3164ec25ed519fd695de9aa0908460c92e" | ||
12 | SRCREV_meta_core2-32-intel-common = "804d2b3164ec25ed519fd695de9aa0908460c92e" | ||
13 | SRCREV_meta_corei7-64-intel-common = "804d2b3164ec25ed519fd695de9aa0908460c92e" | ||
14 | |||
15 | SRCREV_machine_i586-nlp-32-intel-common = "85b913cc9d5e13602d69e50bd9cf1a6ef242f9ee" | ||
16 | SRCREV_machine_core2-32-intel-common = "85b913cc9d5e13602d69e50bd9cf1a6ef242f9ee" | ||
17 | SRCREV_machine_corei7-64-intel-common = "85b913cc9d5e13602d69e50bd9cf1a6ef242f9ee" | ||
18 | |||
19 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
20 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
21 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
22 | |||
23 | KBRANCH_i586-nlp-32-intel-common = "standard/tiny/intel/base" | ||
24 | KBRANCH_core2-32-intel-common = "standard/tiny/intel/base" | ||
25 | KBRANCH_corei7-64-intel-common = "standard/tiny/intel/base" | ||
26 | |||
27 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
28 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
29 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
30 | |||
31 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
32 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
33 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto-tiny_4.9.bbappend b/common/recipes-kernel/linux/linux-yocto-tiny_4.9.bbappend deleted file mode 100644 index 9ecdb95..0000000 --- a/common/recipes-kernel/linux/linux-yocto-tiny_4.9.bbappend +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
2 | |||
3 | EXTRA_OEMAKE = "LD=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/${TARGET_PREFIX}ld AR=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/${TARGET_PREFIX}gcc-ar" | ||
4 | |||
5 | LINUX_VERSION_i586-nlp-32-intel-common = "4.9.13" | ||
6 | LINUX_VERSION_core2-32-intel-common = "4.9.13" | ||
7 | LINUX_VERSION_corei7-64-intel-common = "4.9.13" | ||
8 | |||
9 | SRCREV_meta_i586-nlp-32-intel-common = "8f3bc608ae61c5333043167fa31bac33be93c3de" | ||
10 | SRCREV_meta_core2-32-intel-common = "8f3bc608ae61c5333043167fa31bac33be93c3de" | ||
11 | SRCREV_meta_corei7-64-intel-common = "8f3bc608ae61c5333043167fa31bac33be93c3de" | ||
12 | |||
13 | SRCREV_machine_i586-nlp-32-intel-common = "95c0a80ee83f1cf8e59d733f36e8a9dfd50a0098" | ||
14 | SRCREV_machine_core2-32-intel-common = "95c0a80ee83f1cf8e59d733f36e8a9dfd50a0098" | ||
15 | SRCREV_machine_corei7-64-intel-common = "95c0a80ee83f1cf8e59d733f36e8a9dfd50a0098" | ||
16 | |||
17 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
18 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
19 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
20 | |||
21 | KBRANCH_i586-nlp-32-intel-common = "standard/tiny/base" | ||
22 | KBRANCH_core2-32-intel-common = "standard/tiny/base" | ||
23 | KBRANCH_corei7-64-intel-common = "standard/tiny/base" | ||
24 | |||
25 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
26 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
27 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
28 | |||
29 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
30 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
31 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto_%.bbappend b/common/recipes-kernel/linux/linux-yocto_%.bbappend deleted file mode 100644 index 7c29be1..0000000 --- a/common/recipes-kernel/linux/linux-yocto_%.bbappend +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | # The kernel build is 64-bit regardless, so include both common overrides. | ||
2 | # Without this, the kernel will be missing vars that make it buildable for the | ||
3 | # intel-corei7-64 machine. | ||
4 | MACHINEOVERRIDES_prepend_corei7-64-x32-intel-common = "corei7-64-intel-common:" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto_4.10.bbappend b/common/recipes-kernel/linux/linux-yocto_4.10.bbappend deleted file mode 100644 index 2050463..0000000 --- a/common/recipes-kernel/linux/linux-yocto_4.10.bbappend +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
2 | |||
3 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
4 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
5 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
6 | |||
7 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
8 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
9 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
10 | |||
11 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
12 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
13 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" | ||
14 | |||
15 | # For Crystalforest and Romley | ||
16 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" | ||
17 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" | ||
18 | |||
19 | # For FRI2, NUC | ||
20 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" | ||
21 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto_4.12.bbappend b/common/recipes-kernel/linux/linux-yocto_4.12.bbappend deleted file mode 100644 index 2050463..0000000 --- a/common/recipes-kernel/linux/linux-yocto_4.12.bbappend +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
2 | |||
3 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
4 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
5 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
6 | |||
7 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
8 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
9 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
10 | |||
11 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
12 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
13 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" | ||
14 | |||
15 | # For Crystalforest and Romley | ||
16 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" | ||
17 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" | ||
18 | |||
19 | # For FRI2, NUC | ||
20 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" | ||
21 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto_4.4.bbappend b/common/recipes-kernel/linux/linux-yocto_4.4.bbappend deleted file mode 100644 index 3b02a93..0000000 --- a/common/recipes-kernel/linux/linux-yocto_4.4.bbappend +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
2 | |||
3 | LINUX_VERSION_INTEL_COMMON = "4.4.87" | ||
4 | SRCREV_META_INTEL_COMMON = "804d2b3164ec25ed519fd695de9aa0908460c92e" | ||
5 | SRCREV_MACHINE_INTEL_COMMON = "57746baa7ae35660fe807c65b6809e6b16d4a448" | ||
6 | |||
7 | KBRANCH_INTEL_COMMON = "standard/intel/base" | ||
8 | |||
9 | KERNEL_FEATURES_INTEL_COMMON ?= "" | ||
10 | |||
11 | LINUX_VERSION_core2-32-intel-common = "${LINUX_VERSION_INTEL_COMMON}" | ||
12 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
13 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
14 | KBRANCH_core2-32-intel-common = "${KBRANCH_INTEL_COMMON}" | ||
15 | SRCREV_meta_core2-32-intel-common ?= "${SRCREV_META_INTEL_COMMON}" | ||
16 | SRCREV_machine_core2-32-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" | ||
17 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
18 | |||
19 | LINUX_VERSION_corei7-64-intel-common = "${LINUX_VERSION_INTEL_COMMON}" | ||
20 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
21 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
22 | SRCREV_meta_corei7-64-intel-common ?= "${SRCREV_META_INTEL_COMMON}" | ||
23 | SRCREV_machine_corei7-64-intel-common ?= "${@bb.utils.contains('INTEL_MACHINE_SUBTYPE', 'broxton-m', 'a249f6388ace2a4035220c2333649b42c300faa9', '${SRCREV_MACHINE_INTEL_COMMON}', d)}" | ||
24 | KBRANCH_corei7-64-intel-common = "${@bb.utils.contains('INTEL_MACHINE_SUBTYPE', 'broxton-m', 'standard/intel/bxt-rebase;rebaseable=1', '${KBRANCH_INTEL_COMMON}', d)}" | ||
25 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
26 | |||
27 | # Quark / X1000 BSP Info | ||
28 | LINUX_VERSION_i586-nlp-32-intel-common = "${LINUX_VERSION_INTEL_COMMON}" | ||
29 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
30 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
31 | KBRANCH_i586-nlp-32-intel-common = "${KBRANCH_INTEL_COMMON}" | ||
32 | SRCREV_meta_i586-nlp-32-intel-common ?= "${SRCREV_META_INTEL_COMMON}" | ||
33 | SRCREV_machine_i586-nlp-32-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" | ||
34 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" | ||
35 | |||
36 | |||
37 | # For Crystalforest and Romley | ||
38 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" | ||
39 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" | ||
40 | |||
41 | # For FRI2, NUC | ||
42 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" | ||
43 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" | ||
diff --git a/common/recipes-kernel/linux/linux-yocto_4.9.bbappend b/common/recipes-kernel/linux/linux-yocto_4.9.bbappend deleted file mode 100644 index a09fe1a..0000000 --- a/common/recipes-kernel/linux/linux-yocto_4.9.bbappend +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | KERNEL_FEATURES_INTEL_COMMON = "" | ||
2 | |||
3 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | ||
4 | KMACHINE_core2-32-intel-common = "intel-core2-32" | ||
5 | KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
6 | |||
7 | COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" | ||
8 | KMACHINE_corei7-64-intel-common = "intel-corei7-64" | ||
9 | KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" | ||
10 | |||
11 | COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" | ||
12 | KMACHINE_i586-nlp-32-intel-common = "intel-quark" | ||
13 | KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" | ||
14 | |||
15 | # For Crystalforest and Romley | ||
16 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" | ||
17 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" | ||
18 | |||
19 | # For FRI2, NUC | ||
20 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" | ||
21 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" | ||
diff --git a/common/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch b/common/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch deleted file mode 100644 index 32b49b8..0000000 --- a/common/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From ebfdc8b8af17f9cf23c6878eb52476fde7b48e5c Mon Sep 17 00:00:00 2001 | ||
2 | From: Priyalee Kushwaha <priyalee.kushwaha@intel.com> | ||
3 | Date: Fri, 22 Sep 2017 14:40:57 -0700 | ||
4 | Subject: [PATCH] lttng-modules: PKT 4.9 yocto build failed | ||
5 | |||
6 | PKT 4.9 yocto kernel backports a patch from upstream and that | ||
7 | changes header include/linux/ktimer.h. Since this backported | ||
8 | patch is only relevant for PKT kernel, we need to carry this | ||
9 | patch. | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | Signed-off-by: Kushwaha, Priyalee <priyalee.kushwaha@intel.com> | ||
13 | --- | ||
14 | instrumentation/events/lttng-module/timer.h | 6 +++--- | ||
15 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h | ||
18 | index d62fd25..59da988 100644 | ||
19 | --- a/instrumentation/events/lttng-module/timer.h | ||
20 | +++ b/instrumentation/events/lttng-module/timer.h | ||
21 | @@ -16,11 +16,11 @@ struct timer_list; | ||
22 | |||
23 | #endif /* _TRACE_TIMER_DEF_ */ | ||
24 | |||
25 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) | ||
26 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) | ||
27 | #define lttng_ktime_get_tv64(kt) (kt) | ||
28 | -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ | ||
29 | +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */ | ||
30 | #define lttng_ktime_get_tv64(kt) ((kt).tv64) | ||
31 | -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ | ||
32 | +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */ | ||
33 | |||
34 | LTTNG_TRACEPOINT_EVENT_CLASS(timer_class, | ||
35 | |||
36 | -- | ||
37 | 2.7.4 | ||
38 | |||
diff --git a/common/recipes-kernel/lttng/lttng-modules_%.bbappend b/common/recipes-kernel/lttng/lttng-modules_%.bbappend deleted file mode 100644 index ee8b8c1..0000000 --- a/common/recipes-kernel/lttng/lttng-modules_%.bbappend +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | ||
2 | |||
3 | |||
4 | LTTNG_PATCH = "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel','linux-intel','file://0002-lttng-modules-PKT-4.9-yocto-build-failed.patch','',d)}" | ||
5 | |||
6 | SRC_URI += "${LTTNG_PATCH}" | ||
7 | |||
diff --git a/common/recipes-multimedia/libva/libva-intel-driver_1.8.3.bb b/common/recipes-multimedia/libva/libva-intel-driver_1.8.3.bb deleted file mode 100644 index 72451c0..0000000 --- a/common/recipes-multimedia/libva/libva-intel-driver_1.8.3.bb +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | SUMMARY = "VA driver for Intel G45 & HD Graphics family" | ||
2 | DESCRIPTION = "libva-driver-intel is the VA-API implementation \ | ||
3 | for Intel G45 chipsets and Intel HD Graphics for Intel Core \ | ||
4 | processor family." | ||
5 | |||
6 | HOMEPAGE = "http://www.freedesktop.org/wiki/Software/vaapi" | ||
7 | BUGTRACKER = "https://bugs.freedesktop.org" | ||
8 | |||
9 | LICENSE = "MIT" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f" | ||
11 | |||
12 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
13 | |||
14 | DEPENDS = "libva libdrm" | ||
15 | |||
16 | SRC_URI = "git://github.com/01org/intel-vaapi-driver.git;branch=v1.8-branch" | ||
17 | # 1.8.3 release tag | ||
18 | SRCREV = "f1d9ceddc0e84ed8d44dd59017b0e19b75dd5dcd" | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | inherit autotools pkgconfig distro_features_check | ||
23 | |||
24 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
25 | |||
26 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ | ||
27 | ${@bb.utils.contains("DISTRO_FEATURES", "opengl wayland", "wayland", "", d)}" | ||
28 | PACKAGECONFIG[x11] = "--enable-x11,--disable-x11" | ||
29 | PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native virtual/egl" | ||
30 | |||
31 | FILES_${PN} += "${libdir}/dri/*.so" | ||
32 | FILES_${PN}-dev += "${libdir}/dri/*.la" | ||
33 | FILES_${PN}-dbg += "${libdir}/dri/.debug" | ||
34 | |||
35 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)" | ||
diff --git a/common/recipes-multimedia/libva/va-intel.bb b/common/recipes-multimedia/libva/va-intel.bb deleted file mode 100644 index 88539e2..0000000 --- a/common/recipes-multimedia/libva/va-intel.bb +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | DESCRIPTION = "Video Acceleration Add-ons for Intel BSPs" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
4 | |||
5 | S = "${WORKDIR}" | ||
6 | |||
7 | PR = "r1" | ||
8 | |||
9 | def map_valibs(d): | ||
10 | # The intel implementation requires the libva-intel-driver package | ||
11 | if bb.utils.contains('MACHINE_FEATURES', 'va-impl-intel', "1", "0", d) == "1": | ||
12 | return "libva libva-intel-driver" | ||
13 | # All meta-intel video acceleration requires libva | ||
14 | return "libva" | ||
15 | |||
16 | VA_IMPL = "${@map_valibs(d)}" | ||
17 | |||
18 | PACKAGES = "\ | ||
19 | va-intel \ | ||
20 | " | ||
21 | |||
22 | ALLOW_EMPTY_va-intel = "1" | ||
23 | |||
24 | RDEPENDS_va-intel = " \ | ||
25 | ${VA_IMPL} \ | ||
26 | " | ||
27 | |||
28 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux*' | ||
29 | |||
30 | inherit distro_features_check | ||
31 | |||
32 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
diff --git a/common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch b/common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch deleted file mode 100644 index a4a4029..0000000 --- a/common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | From b7e66182788cd925570bb4c310e21fbcd3185040 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Aug 2017 08:49:20 -0700 | ||
4 | Subject: [PATCH] Fix build with clang | ||
5 | |||
6 | Fix errors e.g. | ||
7 | error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare] | ||
8 | |||
9 | and | ||
10 | |||
11 | psnr.cpp:225:17: error: bool literal returned from 'main' [-Werror,-Wmain] | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | Upstream-Status: Pending | ||
16 | |||
17 | tests/decodehelp.cpp | 2 +- | ||
18 | tests/encodehelp.h | 2 +- | ||
19 | tests/vpp.cpp | 2 +- | ||
20 | tests/yamitranscode.cpp | 2 +- | ||
21 | testscripts/psnr.cpp | 4 ++-- | ||
22 | 5 files changed, 6 insertions(+), 6 deletions(-) | ||
23 | |||
24 | diff --git a/tests/decodehelp.cpp b/tests/decodehelp.cpp | ||
25 | index a69eab6..2d96598 100644 | ||
26 | --- a/tests/decodehelp.cpp | ||
27 | +++ b/tests/decodehelp.cpp | ||
28 | @@ -70,7 +70,7 @@ bool processCmdLine(int argc, char** argv, DecodeParameter* parameters) | ||
29 | {"capi", no_argument, NULL, 0}, | ||
30 | {NULL, no_argument, NULL, 0}}; | ||
31 | |||
32 | - char opt; | ||
33 | + int opt; | ||
34 | while ((opt = getopt_long_only(argc, argv, "h:m:n:i:f:o:w:?", long_opts,&option_index)) != -1){ | ||
35 | switch (opt) { | ||
36 | case 'h': | ||
37 | diff --git a/tests/encodehelp.h b/tests/encodehelp.h | ||
38 | index 57ccd77..76df801 100644 | ||
39 | --- a/tests/encodehelp.h | ||
40 | +++ b/tests/encodehelp.h | ||
41 | @@ -107,7 +107,7 @@ static VideoRateControl string_to_rc_mode(char *str) | ||
42 | |||
43 | static bool process_cmdline(int argc, char *argv[]) | ||
44 | { | ||
45 | - char opt; | ||
46 | + int opt; | ||
47 | const struct option long_opts[] = { | ||
48 | { "help", no_argument, NULL, 'h' }, | ||
49 | { "qp", required_argument, NULL, 0 }, | ||
50 | diff --git a/tests/vpp.cpp b/tests/vpp.cpp | ||
51 | index 5a60c0a..52da43b 100644 | ||
52 | --- a/tests/vpp.cpp | ||
53 | +++ b/tests/vpp.cpp | ||
54 | @@ -151,7 +151,7 @@ public: | ||
55 | private: | ||
56 | bool processCmdLine(int argc, char* argv[]) | ||
57 | { | ||
58 | - char opt; | ||
59 | + int opt; | ||
60 | const struct option long_opts[] = { | ||
61 | { "help", no_argument, NULL, 'h' }, | ||
62 | { "sharpening", required_argument, NULL, 's' }, | ||
63 | diff --git a/tests/yamitranscode.cpp b/tests/yamitranscode.cpp | ||
64 | index 4cb72aa..2fc6725 100755 | ||
65 | --- a/tests/yamitranscode.cpp | ||
66 | +++ b/tests/yamitranscode.cpp | ||
67 | @@ -95,7 +95,7 @@ static VideoRateControl string_to_rc_mode(char *str) | ||
68 | |||
69 | static bool processCmdLine(int argc, char *argv[], TranscodeParams& para) | ||
70 | { | ||
71 | - char opt; | ||
72 | + int opt; | ||
73 | const struct option long_opts[] = { | ||
74 | { "help", no_argument, NULL, 'h' }, | ||
75 | { "qp", required_argument, NULL, 0 }, | ||
76 | diff --git a/testscripts/psnr.cpp b/testscripts/psnr.cpp | ||
77 | index 5cc24c9..68bd668 100644 | ||
78 | --- a/testscripts/psnr.cpp | ||
79 | +++ b/testscripts/psnr.cpp | ||
80 | @@ -215,14 +215,14 @@ int main(int argc, char *argv[]) | ||
81 | const char* psnrresult = "average_psnr.txt"; | ||
82 | int width=0,height=0; | ||
83 | int standardpsnr = NORMAL_PSNR; | ||
84 | - char opt; | ||
85 | + int opt; | ||
86 | while ((opt = getopt(argc, argv, "h:W:H:i:o:s:?")) != -1) | ||
87 | { | ||
88 | switch (opt) { | ||
89 | case 'h': | ||
90 | case '?': | ||
91 | print_help(argv[0]); | ||
92 | - return false; | ||
93 | + return -1; | ||
94 | case 'i': | ||
95 | filename1 = optarg; | ||
96 | break; | ||
97 | -- | ||
98 | 2.14.1 | ||
99 | |||
diff --git a/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb b/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb deleted file mode 100644 index 62d62d5..0000000 --- a/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | SUMMARY = "Applications and Scripts for libyami." | ||
2 | DESCRIPTION = "Applications and Scripts for libyami." | ||
3 | |||
4 | HOMEPAGE = "https://github.com/01org/libyami-utils" | ||
5 | BUGTRACKER = "https://github.com/01org/libyami-utils/issues/new" | ||
6 | |||
7 | LICENSE = "Apache-2.0" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" | ||
9 | |||
10 | SRC_URI = "git://github.com/01org/libyami-utils.git \ | ||
11 | file://0001-Fix-build-with-clang.patch \ | ||
12 | " | ||
13 | SRCREV = "b480c0594a7e761a8ccfe6b19b3f9bd0c3d871a1" | ||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | DEPENDS = "libva libyami" | ||
17 | |||
18 | EXTRA_OECONF = "--enable-tests-gles --disable-md5" | ||
19 | |||
20 | inherit autotools pkgconfig distro_features_check | ||
21 | |||
22 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
23 | |||
24 | PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | ||
25 | |||
26 | # --enable-x11 needs libva-x11 | ||
27 | # gles-tests fail to build without x11: see https://github.com/01org/libyami-utils/issues/91 | ||
28 | PACKAGECONFIG[x11] = "--enable-x11 --enable-tests-gles,--disable-x11 --disable-tests-gles, virtual/libx11" | ||
29 | |||
30 | UPSTREAM_CHECK_URI = "http://github.com/01org/libyami-utils/releases" | ||
31 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" | ||
diff --git a/common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch b/common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch deleted file mode 100644 index a96c9b8..0000000 --- a/common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From 294874b610a5b8af9b736b3afc938010af58785e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 17:15:45 -0700 | ||
4 | Subject: [PATCH 1/9] bitWriter.cpp: Delete unused CACHEBYTES | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | codecparsers/bitWriter.cpp | 1 - | ||
11 | 1 file changed, 1 deletion(-) | ||
12 | |||
13 | diff --git a/codecparsers/bitWriter.cpp b/codecparsers/bitWriter.cpp | ||
14 | index 9bcb14d..08469bf 100644 | ||
15 | --- a/codecparsers/bitWriter.cpp | ||
16 | +++ b/codecparsers/bitWriter.cpp | ||
17 | @@ -24,7 +24,6 @@ | ||
18 | |||
19 | namespace YamiParser { | ||
20 | |||
21 | -const uint32_t CACHEBYTES = sizeof(unsigned long int); | ||
22 | const uint32_t CACHEBITS = sizeof(unsigned long int) * 8; | ||
23 | |||
24 | // clip to keep lowest n bits | ||
25 | -- | ||
26 | 2.14.1 | ||
27 | |||
diff --git a/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch b/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch deleted file mode 100644 index a216566..0000000 --- a/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 88fa048e22ad00b04054b8a64df53bd440e01537 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 17:29:02 -0700 | ||
4 | Subject: [PATCH 2/9] typecast index from size_t to int | ||
5 | |||
6 | size_t is not consistent across architectures e.g. on arm its unsigned int | ||
7 | |||
8 | Fixes | ||
9 | error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | Upstream-Status: Pending | ||
14 | |||
15 | codecparsers/jpegParser.cpp | 4 ++-- | ||
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/codecparsers/jpegParser.cpp b/codecparsers/jpegParser.cpp | ||
19 | index 2217028..6da5c36 100644 | ||
20 | --- a/codecparsers/jpegParser.cpp | ||
21 | +++ b/codecparsers/jpegParser.cpp | ||
22 | @@ -639,7 +639,7 @@ bool Parser::parseDAC() | ||
23 | |||
24 | length -= 2; | ||
25 | |||
26 | - if (index < 0 || index >= (2 * NUM_ARITH_TBLS)) { | ||
27 | + if ((int)index < 0 || index >= (2 * NUM_ARITH_TBLS)) { | ||
28 | ERROR("Invalid DAC Index"); | ||
29 | return false; | ||
30 | } | ||
31 | @@ -747,7 +747,7 @@ bool Parser::parseDHT() | ||
32 | huffTables = &m_dcHuffTables; | ||
33 | } | ||
34 | |||
35 | - if (index < 0 || index >= NUM_HUFF_TBLS) { | ||
36 | + if ((int)index < 0 || index >= NUM_HUFF_TBLS) { | ||
37 | ERROR("Bad Huff Table Index"); | ||
38 | return false; | ||
39 | } | ||
40 | -- | ||
41 | 2.14.1 | ||
42 | |||
diff --git a/common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch b/common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch deleted file mode 100644 index 1728960..0000000 --- a/common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 533d63287e9dd8f269b137c18fbe6c19206c8668 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 17:49:43 -0700 | ||
4 | Subject: [PATCH 3/9] Add -Wno-invalid-offsetof to compiler commandline | ||
5 | |||
6 | clang++ is fussy about offsetof on non-POD types | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | Upstream-Status: Pending | ||
11 | |||
12 | codecparsers/Makefile.am | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/codecparsers/Makefile.am b/codecparsers/Makefile.am | ||
16 | index 720bf81..d9226b3 100644 | ||
17 | --- a/codecparsers/Makefile.am | ||
18 | +++ b/codecparsers/Makefile.am | ||
19 | @@ -118,6 +118,7 @@ libyami_codecparser_cppflags = \ | ||
20 | -Dvp8dx_start_decode=libyami_vp8dx_start_decode \ | ||
21 | -Dvp8dx_bool_decoder_fill=libyami_vp8dx_bool_decoder_fill \ | ||
22 | -I$(top_srcdir)/interface \ | ||
23 | + -Wno-invalid-offsetof \ | ||
24 | $(extra_includes) \ | ||
25 | $(NULL) | ||
26 | |||
27 | -- | ||
28 | 2.14.1 | ||
29 | |||
diff --git a/common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch b/common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch deleted file mode 100644 index 27eca39..0000000 --- a/common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From d9c831ee38da4551396fad5cd53c3dfc0e5e0cf8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 17:57:34 -0700 | ||
4 | Subject: [PATCH 4/9] Typecast POWER32SUB2 to uint8_t | ||
5 | |||
6 | Fixes | ||
7 | |||
8 | h265Parser.cpp:1064:5: error: comparison of constant 4294967294 with expression | ||
9 | of type 'uint8_t' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | Upstream-Status: Pending | ||
14 | |||
15 | codecparsers/h265Parser.cpp | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/codecparsers/h265Parser.cpp b/codecparsers/h265Parser.cpp | ||
19 | index 0dea3a6..c6cded2 100644 | ||
20 | --- a/codecparsers/h265Parser.cpp | ||
21 | +++ b/codecparsers/h265Parser.cpp | ||
22 | @@ -125,7 +125,7 @@ namespace H265 { | ||
23 | \ | ||
24 | CHECK_READ_UE(var->var##_max_num_reorder_pics[i], 0, var->var##_max_dec_pic_buffering_minus1[i]); \ | ||
25 | \ | ||
26 | - CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, POWER32SUB2); \ | ||
27 | + CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, (uint8_t)POWER32SUB2); \ | ||
28 | } \ | ||
29 | } | ||
30 | |||
31 | -- | ||
32 | 2.14.1 | ||
33 | |||
diff --git a/common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch b/common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch deleted file mode 100644 index e77e85f..0000000 --- a/common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | From 3748cf904089878971cfcf66abf14c4d74f8241a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 18:03:07 -0700 | ||
4 | Subject: [PATCH 5/9] move c++ definitions out of extern "C" block | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | decoder/vaapidecoder_host.cpp | 2 +- | ||
11 | encoder/vaapiencoder_host.cpp | 3 ++- | ||
12 | interface/VideoDecoderHost.h | 8 ++++---- | ||
13 | interface/VideoEncoderHost.h | 8 ++++---- | ||
14 | interface/VideoPostProcessHost.h | 8 ++++---- | ||
15 | vpp/vaapipostprocess_host.cpp | 3 +-- | ||
16 | 6 files changed, 16 insertions(+), 16 deletions(-) | ||
17 | |||
18 | diff --git a/decoder/vaapidecoder_host.cpp b/decoder/vaapidecoder_host.cpp | ||
19 | index bcc9165..d9129f3 100644 | ||
20 | --- a/decoder/vaapidecoder_host.cpp | ||
21 | +++ b/decoder/vaapidecoder_host.cpp | ||
22 | @@ -100,9 +100,9 @@ void releaseVideoDecoder(IVideoDecoder * p) | ||
23 | { | ||
24 | delete p; | ||
25 | } | ||
26 | +} // extern "C" | ||
27 | |||
28 | std::vector<std::string> getVideoDecoderMimeTypes() | ||
29 | { | ||
30 | return VaapiDecoderFactory::keys(); | ||
31 | } | ||
32 | -} // extern "C" | ||
33 | diff --git a/encoder/vaapiencoder_host.cpp b/encoder/vaapiencoder_host.cpp | ||
34 | index 49e903a..3ee9354 100644 | ||
35 | --- a/encoder/vaapiencoder_host.cpp | ||
36 | +++ b/encoder/vaapiencoder_host.cpp | ||
37 | @@ -78,9 +78,10 @@ void releaseVideoEncoder(IVideoEncoder* p) { | ||
38 | delete p; | ||
39 | } | ||
40 | |||
41 | +} // extern "C" | ||
42 | + | ||
43 | std::vector<std::string> getVideoEncoderMimeTypes() | ||
44 | { | ||
45 | return VaapiEncoderFactory::keys(); | ||
46 | } | ||
47 | |||
48 | -} // extern "C" | ||
49 | diff --git a/interface/VideoDecoderHost.h b/interface/VideoDecoderHost.h | ||
50 | index 86210fe..fd2ba7b 100644 | ||
51 | --- a/interface/VideoDecoderHost.h | ||
52 | +++ b/interface/VideoDecoderHost.h | ||
53 | @@ -32,12 +32,12 @@ extern "C" { // for dlsym usage | ||
54 | YamiMediaCodec::IVideoDecoder *createVideoDecoder(const char *mimeType); | ||
55 | /// \brief destroy the decoder | ||
56 | void releaseVideoDecoder(YamiMediaCodec::IVideoDecoder * p); | ||
57 | -/** \fn void getVideoDecoderMimeTypes() | ||
58 | - * \brief return the MimeTypes enabled in the current build | ||
59 | -*/ | ||
60 | -std::vector<std::string> getVideoDecoderMimeTypes(); | ||
61 | |||
62 | typedef YamiMediaCodec::IVideoDecoder *(*YamiCreateVideoDecoderFuncPtr) (const char *mimeType); | ||
63 | typedef void (*YamiReleaseVideoDecoderFuncPtr)(YamiMediaCodec::IVideoDecoder * p); | ||
64 | } | ||
65 | +// \fn void getVideoDecoderMimeTypes() | ||
66 | +// \brief return the MimeTypes enabled in the current build | ||
67 | +// | ||
68 | +std::vector<std::string> getVideoDecoderMimeTypes(); | ||
69 | #endif /* VIDEO_DECODER_HOST_H_ */ | ||
70 | diff --git a/interface/VideoEncoderHost.h b/interface/VideoEncoderHost.h | ||
71 | index fb80335..5fb5ab3 100644 | ||
72 | --- a/interface/VideoEncoderHost.h | ||
73 | +++ b/interface/VideoEncoderHost.h | ||
74 | @@ -32,12 +32,12 @@ extern "C" { // for dlsym usage | ||
75 | YamiMediaCodec::IVideoEncoder *createVideoEncoder(const char *mimeType); | ||
76 | ///brief destroy encoder | ||
77 | void releaseVideoEncoder(YamiMediaCodec::IVideoEncoder * p); | ||
78 | -/** \fn void getVideoEncoderMimeTypes() | ||
79 | - * \brief return the MimeTypes enabled in the current build | ||
80 | -*/ | ||
81 | -std::vector<std::string> getVideoEncoderMimeTypes(); | ||
82 | |||
83 | typedef YamiMediaCodec::IVideoEncoder *(*YamiCreateVideoEncoderFuncPtr) (const char *mimeType); | ||
84 | typedef void (*YamiReleaseVideoEncoderFuncPtr)(YamiMediaCodec::IVideoEncoder * p); | ||
85 | } | ||
86 | #endif /* VIDEO_ENCODER_HOST_H_ */ | ||
87 | +// \fn void getVideoEncoderMimeTypes() | ||
88 | +// \brief return the MimeTypes enabled in the current build | ||
89 | +// | ||
90 | +std::vector<std::string> getVideoEncoderMimeTypes(); | ||
91 | diff --git a/interface/VideoPostProcessHost.h b/interface/VideoPostProcessHost.h | ||
92 | index de046cd..f1c5ce5 100644 | ||
93 | --- a/interface/VideoPostProcessHost.h | ||
94 | +++ b/interface/VideoPostProcessHost.h | ||
95 | @@ -34,12 +34,12 @@ YamiMediaCodec::IVideoPostProcess *createVideoPostProcess(const char *mimeType); | ||
96 | * \brief destroy encoder | ||
97 | */ | ||
98 | void releaseVideoPostProcess(YamiMediaCodec::IVideoPostProcess * p); | ||
99 | -/** \fn void getVideoPostProcessMimeTypes() | ||
100 | - * \brief return the MimeTypes enabled in the current build | ||
101 | -*/ | ||
102 | -std::vector<std::string> getVideoPostProcessMimeTypes(); | ||
103 | |||
104 | typedef YamiMediaCodec::IVideoPostProcess *(*YamiCreateVideoPostProcessFuncPtr) (const char *mimeType); | ||
105 | typedef void (*YamiReleaseVideoPostProcessFuncPtr)(YamiMediaCodec::IVideoPostProcess * p); | ||
106 | } | ||
107 | #endif /* VIDEO_POST_PROCESS_HOST_H_ */ | ||
108 | +// \fn void getVideoPostProcessMimeTypes() | ||
109 | +// \brief return the MimeTypes enabled in the current build | ||
110 | +// | ||
111 | +std::vector<std::string> getVideoPostProcessMimeTypes(); | ||
112 | diff --git a/vpp/vaapipostprocess_host.cpp b/vpp/vaapipostprocess_host.cpp | ||
113 | index cd40dea..bc06b38 100644 | ||
114 | --- a/vpp/vaapipostprocess_host.cpp | ||
115 | +++ b/vpp/vaapipostprocess_host.cpp | ||
116 | @@ -75,10 +75,9 @@ void releaseVideoPostProcess(IVideoPostProcess * p) | ||
117 | { | ||
118 | delete p; | ||
119 | } | ||
120 | +} // extern "C" | ||
121 | |||
122 | std::vector<std::string> getVideoPostProcessMimeTypes() | ||
123 | { | ||
124 | return VaapiPostProcessFactory::keys(); | ||
125 | } | ||
126 | - | ||
127 | -} // extern "C" | ||
128 | -- | ||
129 | 2.14.1 | ||
130 | |||
diff --git a/common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch b/common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch deleted file mode 100644 index c9c7452..0000000 --- a/common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From 27b61f5ab1b1643436f56517e4980734b4b9acca Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 18:38:05 -0700 | ||
4 | Subject: [PATCH 6/9] Avoid namespace conflicts by adding explicit using | ||
5 | <namespace> | ||
6 | |||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | Upstream-Status: Pending | ||
10 | |||
11 | decoder/vaapidecoder_h264.h | 1 + | ||
12 | decoder/vaapidecoder_h265.h | 1 + | ||
13 | 2 files changed, 2 insertions(+) | ||
14 | |||
15 | diff --git a/decoder/vaapidecoder_h264.h b/decoder/vaapidecoder_h264.h | ||
16 | index 57e2c27..ea5c2f2 100644 | ||
17 | --- a/decoder/vaapidecoder_h264.h | ||
18 | +++ b/decoder/vaapidecoder_h264.h | ||
19 | @@ -30,6 +30,7 @@ namespace YamiMediaCodec { | ||
20 | |||
21 | class VaapiDecPictureH264; | ||
22 | class VaapiDecoderH264 : public VaapiDecoderBase { | ||
23 | +using YamiMediaCodec::VaapiDecoderBase::createPicture; | ||
24 | public: | ||
25 | typedef SharedPtr<VaapiDecPictureH264> PicturePtr; | ||
26 | typedef std::vector<PicturePtr> RefSet; | ||
27 | diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h | ||
28 | index f7e2303..159e25f 100644 | ||
29 | --- a/decoder/vaapidecoder_h265.h | ||
30 | +++ b/decoder/vaapidecoder_h265.h | ||
31 | @@ -38,6 +38,7 @@ namespace YamiMediaCodec { | ||
32 | |||
33 | class VaapiDecPictureH265; | ||
34 | class VaapiDecoderH265:public VaapiDecoderBase { | ||
35 | + using YamiMediaCodec::VaapiDecoderBase::createPicture; | ||
36 | typedef YamiParser::H265::SPS SPS; | ||
37 | typedef YamiParser::H265::SliceHeader SliceHeader; | ||
38 | typedef YamiParser::H265::NalUnit NalUnit; | ||
39 | -- | ||
40 | 2.14.1 | ||
41 | |||
diff --git a/common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch b/common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch deleted file mode 100644 index b80774c..0000000 --- a/common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From b982997c96e11b9c0b3cd58a31af2d0a219713a3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 18:39:58 -0700 | ||
4 | Subject: [PATCH 7/9] Delete unused variables | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | decoder/vaapidecoder_vp8.cpp | 8 ++++---- | ||
11 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/decoder/vaapidecoder_vp8.cpp b/decoder/vaapidecoder_vp8.cpp | ||
14 | index 5fc89ec..ff5b896 100644 | ||
15 | --- a/decoder/vaapidecoder_vp8.cpp | ||
16 | +++ b/decoder/vaapidecoder_vp8.cpp | ||
17 | @@ -32,12 +32,12 @@ typedef VaapiDecoderVP8::PicturePtr PicturePtr; | ||
18 | |||
19 | // the following parameter apply to Intra-Predicted Macroblocks, | ||
20 | // $11.2 $11.4: key frame default probs | ||
21 | -static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 }; | ||
22 | -static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 }; | ||
23 | +//static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 }; | ||
24 | +//static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 }; | ||
25 | |||
26 | // $16.1: non-key frame default probs | ||
27 | -static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 }; | ||
28 | -static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 }; | ||
29 | +//static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 }; | ||
30 | +//static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 }; | ||
31 | |||
32 | static const uint32_t surfaceNumVP8 = 3; | ||
33 | |||
34 | -- | ||
35 | 2.14.1 | ||
36 | |||
diff --git a/common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch b/common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch deleted file mode 100644 index 18b98be..0000000 --- a/common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From c54130511c91e457f1c5bb47729f5e3a0fc0cb91 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 18:42:28 -0700 | ||
4 | Subject: [PATCH 8/9] NalUnit is declared in different namespace | ||
5 | |||
6 | Fixes | ||
7 | vaapidecoder_h265.h:32:5: error: struct 'NalUnit' was previously declared as a class [-Werror,-Wmismatched-tags] struct NalUnit; | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Pending | ||
12 | |||
13 | decoder/vaapidecoder_h265.h | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h | ||
17 | index 159e25f..674638f 100644 | ||
18 | --- a/decoder/vaapidecoder_h265.h | ||
19 | +++ b/decoder/vaapidecoder_h265.h | ||
20 | @@ -29,7 +29,7 @@ namespace YamiParser { | ||
21 | namespace H265 { | ||
22 | struct SPS; | ||
23 | struct SliceHeader; | ||
24 | - struct NalUnit; | ||
25 | + class NalUnit; | ||
26 | class Parser; | ||
27 | }; | ||
28 | }; | ||
29 | -- | ||
30 | 2.14.1 | ||
31 | |||
diff --git a/common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch b/common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch deleted file mode 100644 index 08ef455..0000000 --- a/common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From a54dc7b6a777882f55a3f31bd97748a261db03d2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 18:53:06 -0700 | ||
4 | Subject: [PATCH 9/9] Fix clang warnings | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | encoder/vaapiencoder_h264.cpp | 4 ++-- | ||
11 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/encoder/vaapiencoder_h264.cpp b/encoder/vaapiencoder_h264.cpp | ||
14 | index 98bc2ed..94015cb 100644 | ||
15 | --- a/encoder/vaapiencoder_h264.cpp | ||
16 | +++ b/encoder/vaapiencoder_h264.cpp | ||
17 | @@ -509,7 +509,7 @@ bit_writer_write_sps(BitWriter* bitwriter, | ||
18 | } | ||
19 | /* vcl_hrd_parameters_present_flag */ | ||
20 | bitwriter->writeBits(0, 1); | ||
21 | - if (nal_hrd_parameters_present_flag || 0/*vcl_hrd_parameters_present_flag*/) { | ||
22 | + if (nal_hrd_parameters_present_flag || !!(0)/*vcl_hrd_parameters_present_flag*/) { | ||
23 | /* low_delay_hrd_flag */ | ||
24 | bitwriter->writeBits(0, 1); | ||
25 | } | ||
26 | @@ -1889,7 +1889,7 @@ bool VaapiEncoderH264::addSliceHeaders (const PicturePtr& picture) const | ||
27 | sliceParam->num_macroblocks = curSliceMbs; | ||
28 | sliceParam->macroblock_info = VA_INVALID_ID; | ||
29 | sliceParam->slice_type = h264_get_slice_type (picture->m_type); | ||
30 | - assert (sliceParam->slice_type != -1); | ||
31 | + assert ((int)sliceParam->slice_type != -1); | ||
32 | sliceParam->idr_pic_id = m_idrNum; | ||
33 | sliceParam->pic_order_cnt_lsb = picture->m_poc % m_maxPicOrderCnt; | ||
34 | |||
35 | -- | ||
36 | 2.14.1 | ||
37 | |||
diff --git a/common/recipes-multimedia/libyami/libyami_1.2.0.bb b/common/recipes-multimedia/libyami/libyami_1.2.0.bb deleted file mode 100644 index 1d1d02f..0000000 --- a/common/recipes-multimedia/libyami/libyami_1.2.0.bb +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | SUMMARY = "Yami is media infrastructure base on libva" | ||
2 | DESCRIPTION = "Yet Another Media Infrastructure \ | ||
3 | light weight hardware codec library base on VA-API " | ||
4 | |||
5 | HOMEPAGE = "https://github.com/01org/libyami" | ||
6 | BUGTRACKER = "https://github.com/01org/libyami/issues/new" | ||
7 | |||
8 | LICENSE = "Apache-2.0" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
10 | |||
11 | SRC_URI = "git://github.com/01org/libyami.git;branch=apache \ | ||
12 | file://0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch \ | ||
13 | file://0002-typecast-index-from-size_t-to-int.patch \ | ||
14 | file://0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch \ | ||
15 | file://0004-Typecast-POWER32SUB2-to-uint8_t.patch \ | ||
16 | file://0005-move-c-definitions-out-of-extern-C-block.patch \ | ||
17 | file://0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch \ | ||
18 | file://0007-Delete-unused-variables.patch \ | ||
19 | file://0008-NalUnit-is-declared-in-different-namespace.patch \ | ||
20 | file://0009-Fix-clang-warnings.patch \ | ||
21 | " | ||
22 | SRCREV = "c884fc3facbf1a0adf2082a1cf95cb146300a5ca" | ||
23 | S = "${WORKDIR}/git" | ||
24 | |||
25 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)}" | ||
26 | PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender" | ||
27 | |||
28 | DEPENDS = "libva" | ||
29 | inherit autotools pkgconfig distro_features_check | ||
30 | |||
31 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
32 | |||
33 | UPSTREAM_CHECK_URI = "https://github.com/01org/libyami/releases" | ||
34 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" | ||
diff --git a/common/recipes-rt/images/core-image-rt-sdk.bb b/common/recipes-rt/images/core-image-rt-sdk.bb deleted file mode 100644 index 6b43a87..0000000 --- a/common/recipes-rt/images/core-image-rt-sdk.bb +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | require recipes-core/images/core-image-minimal.bb | ||
2 | |||
3 | # Skip processing of this recipe if linux-intel-rt is not explicitly specified as the | ||
4 | # PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying | ||
5 | # to build multiple virtual/kernel providers. | ||
6 | python () { | ||
7 | if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": | ||
8 | raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") | ||
9 | } | ||
10 | |||
11 | DESCRIPTION = "Small image capable of booting a device with a test suite and \ | ||
12 | tools for real-time use. It includes the full meta-toolchain, development \ | ||
13 | headers and libraries to form a standalone SDK." | ||
14 | DEPENDS = "linux-intel-rt" | ||
15 | |||
16 | IMAGE_FEATURES += "dev-pkgs tools-sdk tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks" | ||
17 | |||
18 | IMAGE_INSTALL += "rt-tests hwlatdetect kernel-dev" | ||
19 | |||
20 | LICENSE = "MIT" | ||
diff --git a/common/recipes-rt/images/core-image-rt.bb b/common/recipes-rt/images/core-image-rt.bb deleted file mode 100644 index 4db0a57..0000000 --- a/common/recipes-rt/images/core-image-rt.bb +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | require recipes-core/images/core-image-minimal.bb | ||
2 | |||
3 | # Skip processing of this recipe if linux-intel-rt is not explicitly specified as the | ||
4 | # PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying | ||
5 | # to build multiple virtual/kernel providers. | ||
6 | python () { | ||
7 | if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": | ||
8 | raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") | ||
9 | } | ||
10 | |||
11 | DESCRIPTION = "A small image just capable of allowing a device to boot plus a \ | ||
12 | real-time test suite and tools appropriate for real-time use." | ||
13 | DEPENDS = "linux-intel-rt" | ||
14 | |||
15 | IMAGE_INSTALL += "rt-tests hwlatdetect" | ||
16 | |||
17 | LICENSE = "MIT" | ||
diff --git a/common/recipes-selftest/images/files/incorrect.crt b/common/recipes-selftest/images/files/incorrect.crt deleted file mode 100644 index 3a2411a..0000000 --- a/common/recipes-selftest/images/files/incorrect.crt +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIDCTCCAfGgAwIBAgIJAIYXAHv3cQNjMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV | ||
3 | BAMMEFRlc3QgWW9jdG8gdGhpbmcwHhcNMTcwMTI1MjI1MjI3WhcNMTgwMTI1MjI1 | ||
4 | MjI3WjAbMRkwFwYDVQQDDBBUZXN0IFlvY3RvIHRoaW5nMIIBIjANBgkqhkiG9w0B | ||
5 | AQEFAAOCAQ8AMIIBCgKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXD | ||
6 | SwDVXNWfiKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoeh | ||
7 | T51gkuTfv7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE | ||
8 | 31hLOkCFb+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk | ||
9 | /6q5kqNhyrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4 | ||
10 | GqpqeFOPqxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABo1AwTjAdBgNV | ||
11 | HQ4EFgQURA8KbgpiGfS2+7MT0H5AvpxeYLowHwYDVR0jBBgwFoAURA8KbgpiGfS2 | ||
12 | +7MT0H5AvpxeYLowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAK9n+ | ||
13 | 9T+hlM2kEpsUgtyihEJbGHzbw+Pj11b0ICntCVuPKewtBMveYp8lejrQwMFNGRMt | ||
14 | ZQe1LFb9HcLeM3MLUz9Lm4BJIjkey3Jfq1AskROYk/bJnFIJIx6P3U9gBa20P46X | ||
15 | LH3g6yub1HR7KZC9nfBsak3FPoJR/SYTJs0HsMeL4878+2IbETA4BL0kbKW48FFW | ||
16 | jF4f6don0eiaF8b4KkfbWKrCaEm+LMxbyBEQ6fIb1cmGY8A9A5houjmgi6YWSkoi | ||
17 | SLpOC9TZ2R51fO9rRsv7XwLK0V9o9YaEYPBg6V/TeJl5nxAZBeVTKVTQbBGZY+l2 | ||
18 | nzN0pKsl7RXLf3SRYA== | ||
19 | -----END CERTIFICATE----- | ||
diff --git a/common/recipes-selftest/images/files/incorrect.key b/common/recipes-selftest/images/files/incorrect.key deleted file mode 100644 index d05475b..0000000 --- a/common/recipes-selftest/images/files/incorrect.key +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | -----BEGIN RSA PRIVATE KEY----- | ||
2 | MIIEowIBAAKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXDSwDVXNWf | ||
3 | iKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoehT51gkuTf | ||
4 | v7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE31hLOkCF | ||
5 | b+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk/6q5kqNh | ||
6 | yrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4GqpqeFOP | ||
7 | qxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABAoIBAQCEtAox86s9N6d2 | ||
8 | 164z3998Zmj3UyL+7K9x6JI2YvMabBSYGOeaLOLRj6fjQxdC63H8brBM958p4di7 | ||
9 | Z82XMco4Dok6yoOeJ+hMLYv+gfGvTJxy7DhyVXsSwok99axg9vUsV3TYw3wSdpNF | ||
10 | EKLkcUldpu0W2ADBHUr4sLI85xctHH3Kt0sNDzhgADFa5rDYACXTKHtFOhEqBIwN | ||
11 | FmbuRQirnErUkI3Pczgl2Xy1MlaozH9CB+bLAb5q2FYu4DKgjl4UorC+w2HV41KH | ||
12 | XoL7L36XXqLRHBfEAwOWb8yro+TK8T7gW7aagTI1wgsbbQkjQmOHxclmJACdMOiJ | ||
13 | DjPeR0GBAoGBAO7i2eaEoKa9QlKokN+93uOJD/F6DBi6jF0vGOqWlF8AVTj3kGL3 | ||
14 | X8fY/avrSlg7hKZWdei+Q5PyZViKxqmHjq781ZisKck52Tqz4s7ylqRXSgStinZr | ||
15 | UqrkShCqZ3g1W91gIeVPQz0/b+gBskoHzQ5WQHfV5v9S1PaxjzcYtCrRAoGBAMea | ||
16 | LcA2jjuEjqxa5v5fh8ygcHasJMRKJxW1OCKiQ94DjjzPsdVqZ1sJZChLW/N3nxe7 | ||
17 | wHlNJmsGbJ2w1zD5+qkkPjLq5Q4B5KAd62NNrWaEHFdEc/PPkn4xP7Zkfuu5K+m2 | ||
18 | 7z/MF4ibvVh9PvD3HY8FWKEtkqB4rfD8AoUOVd4ZAoGAXxXAsfa8k2Hl0kzyTXyg | ||
19 | CWV3CSERS46FbFngyw9gw2e4hFJWEG5ym3ONlS60iuY16JelmxyQfYUQPewPI0+n | ||
20 | xZMx2fE9OLFj+++6KbF5sLRl6/K/mF8jqo3vxS5uvPRQOo+XLlUcaHalrm1ub/Um | ||
21 | 87v1MT3dEmgACKmoXb/hhuECgYAZluiapePiOYJZEmZe4jx0vXTtofAswhz0qYEC | ||
22 | 3663vdj0buQrqjKJ91BB4jdtpT5eOpHYe02blv1B0jQkcUfze1QGDxtCineXF37g | ||
23 | Aktiwzkm7v22mjv7tbCnX4buDZVVp0BQ+4dg2iaSO6xgFC5T8amFMGSF8jLKnGRu | ||
24 | ToIvsQKBgADBTse2vnI85NRsYq48ztQuIU2zlGXIAcoPSvGb8Vhty/joc0jWcI5P | ||
25 | raGXBARbuVlcEapK3mDRfO0CQjDaTPK4EYYJwGp8k33Hkkcbgs4kfm308jRsclMr | ||
26 | YeMwQsYyOv45x4iPCwrqZEhpPDvACBi7DB6QvZ0++vJbobTt1jyi | ||
27 | -----END RSA PRIVATE KEY----- | ||
diff --git a/common/recipes-selftest/images/files/refkit-db.crt b/common/recipes-selftest/images/files/refkit-db.crt deleted file mode 100644 index 22ad6a8..0000000 --- a/common/recipes-selftest/images/files/refkit-db.crt +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIC+zCCAeOgAwIBAgIJANT2SMJoGZGsMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV | ||
3 | BAMMCXJlZmtpdC1kYjAeFw0xNzA0MjAxMjA2MzJaFw0xODA0MjAxMjA2MzJaMBQx | ||
4 | EjAQBgNVBAMMCXJlZmtpdC1kYjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC | ||
5 | ggEBALQcIqYiAVfN8U+vcuPZAYBQVe8CXuuZNct/Knn/tT7sXZIGMCDnla2khC4/ | ||
6 | +tdG3Umo6ON5SfaPCx3+Y6jRY6PWDU5sZlzWZibRJpjUT3bJZUhYEwgxvOVHJWWV | ||
7 | OYlfAvHFBhdYygn99h7Fl9qjThpIvs+WJwRLt21ntlAYBHNR0mot3zur8i2V16i4 | ||
8 | qDChq4uSK2A+OuWGQHHBPy0ukOfW7MzCC3mDcW32o6lMzUaB3O/sUb6BKvF4c0Hb | ||
9 | VM58zqLjkE9FGvk9iPwO7dNpIkz6CmnRSMCqqTqzjxA6dqgMej3Yec4clmL0Bu5H | ||
10 | 6OBpka7qNM/aqLQ5XvN60IhIR2kCAwEAAaNQME4wHQYDVR0OBBYEFGhgESWFFHgb | ||
11 | Gp9GEuYh5O/7O6rdMB8GA1UdIwQYMBaAFGhgESWFFHgbGp9GEuYh5O/7O6rdMAwG | ||
12 | A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAI/ShHxDR8pr/YeD0O910yBS | ||
13 | cxiqMnH7pfTJEaNoTbed5tlGJNzHwjv5sJj87jRuEJs9RG4zCRG4KdYtBs9nj5aF | ||
14 | nWNyv2RfDePJYxlx1H1MnHdG2iCXbbzdwh/zQDge58xVBXK6JE+zipMMMGDan281 | ||
15 | 9vuwH7MA3cSmvOI3waPv2aGG+eukpUU4/06HSkHPbml+l74tIryNoBohj0tykAFc | ||
16 | uqWcLdclJPz/XFgURjAJfFVkgwu5388l7uz3y9vRW5OTyIoQRriwNRxsDY8Dao8b | ||
17 | NmjzU4k2WyGA3uOSUpSXnUmJfT7eKVG6Efe6Afer6sGnLqNNZf1AcfHiP2woy9M= | ||
18 | -----END CERTIFICATE----- | ||
diff --git a/common/recipes-selftest/images/files/refkit-db.key b/common/recipes-selftest/images/files/refkit-db.key deleted file mode 100644 index 4b54587..0000000 --- a/common/recipes-selftest/images/files/refkit-db.key +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | -----BEGIN PRIVATE KEY----- | ||
2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC0HCKmIgFXzfFP | ||
3 | r3Lj2QGAUFXvAl7rmTXLfyp5/7U+7F2SBjAg55WtpIQuP/rXRt1JqOjjeUn2jwsd | ||
4 | /mOo0WOj1g1ObGZc1mYm0SaY1E92yWVIWBMIMbzlRyVllTmJXwLxxQYXWMoJ/fYe | ||
5 | xZfao04aSL7PlicES7dtZ7ZQGARzUdJqLd87q/ItldeouKgwoauLkitgPjrlhkBx | ||
6 | wT8tLpDn1uzMwgt5g3Ft9qOpTM1Ggdzv7FG+gSrxeHNB21TOfM6i45BPRRr5PYj8 | ||
7 | Du3TaSJM+gpp0UjAqqk6s48QOnaoDHo92HnOHJZi9AbuR+jgaZGu6jTP2qi0OV7z | ||
8 | etCISEdpAgMBAAECggEAbtXplKbUgL4hQ9JKN2Cxhc7qMv0YgI92BVaqQw1S8ffu | ||
9 | 1Q+tynH5MDRPi06gBJ59SvkA6AsZsvrv8nM7zQWd9ZKh+aLHk1X04upOgDoW9JiX | ||
10 | FV/txlslTUrs/ohIMfsgCrweNXvUSTXZobIi8s8QHyipE4HpXMFjjZYHIV7GTlgA | ||
11 | PRgGu3NygbWfR8hcx5JtzVz/jka7FFFSbk/pMr0TeJHXP55VfqWLeeSBQmWwooj2 | ||
12 | QcRfqMXgLKgu6uEggaP5HMcfTuWgWNhbke/596CgsUtQ5Gg64Q6v7cKcPy0/lgn1 | ||
13 | PnvfT9uhgEFDLNFkSBxV3ImrNYo73Nqmbp3w5tK9SQKBgQDs/HW7pNnB0LD51qok | ||
14 | pkX0SBvyKxDT1QuU4z0FY9GT7OKOg8Xa0ZGyErt+ZbyFiyUGF5Axc3rJ3DyGslgu | ||
15 | 5O+AqcpCQOlOyovGQ6ST9x/gEeVcRnZn1MV4vMxwaOSXtY7u0IGyaDlFn1QWHWCN | ||
16 | imv8OR6YuhivwBIXGzJ16oEqDwKBgQDCj3ls7tlPrLvUQIh8gfjCoInU8fRAqtAe | ||
17 | Ab/OximLsKQPKLDma6xd+X2Fk8Dowdb88GNT99x3VZjHqVJM9URDkiOGKAXA/rBp | ||
18 | jAXhnQwahT8YCzOUHqDYNMMQrXHvbiHqLodGrrO2WjYNmH69prQAk8WYAIwl+hdx | ||
19 | BS70LGLPBwKBgQDU9RinAkBcFjiyieBjBreeCJ50Q5bfhHbf2EOhcE2IbDo6bteB | ||
20 | Bwmxx3uM3cdHCf6/NrVweqFAfBQ3xlPP8BH4wJrsZoBBOWnZRDfEbzHJnMtK3FbS | ||
21 | fzTkhmQAL4Ibgh9rIxspQtcUZVSees+k4VqgUIPaIoDEjgizktEJfS2MqQKBgQDA | ||
22 | rOFtVaRz2PYyHq6LzxMRe3bEIdDn8cEk1kqjdW9TXV07feqiZmNOtXLvRAG4/63u | ||
23 | 1Akp8L6ul2Az6qUMfaBa4nC3vQ7lr9P40qhIZATGhsqS/xTXTPWw55999qZsnL6N | ||
24 | cgKZpw1mOzRohmqNWnfMUotOGsywF1n7nUyAlyxLJQKBgElTaNTFYF3MbGfhl1He | ||
25 | fnDXlf8OCOK1i5oIzMLqverb2UN/qp6p0b3SAtcw5cUXcaPlajHrfYgacF/0Qyua | ||
26 | Cerey9GLEdJ7saDWhz0GyJ8yyEXy8CVs0svVaLPWI0s2B7/obzP9+gTb/WE9qZqu | ||
27 | bNoVEpJ/wZhk+IL4+KPmqphu | ||
28 | -----END PRIVATE KEY----- | ||
diff --git a/common/recipes-selftest/images/secureboot-selftest-image-signed.bb b/common/recipes-selftest/images/secureboot-selftest-image-signed.bb deleted file mode 100644 index 3ce11f3..0000000 --- a/common/recipes-selftest/images/secureboot-selftest-image-signed.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | require secureboot-selftest-image-unsigned.bb | ||
2 | |||
3 | IMAGE_FEATURES += "secureboot" | ||
4 | |||
5 | SECURE_BOOT_SIGNING_KEY ?= "${THISDIR}/files/refkit-db.key" | ||
6 | SECURE_BOOT_SIGNING_CERT ?= "${THISDIR}/files/refkit-db.crt" | ||
diff --git a/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb b/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb deleted file mode 100644 index e03e7b4..0000000 --- a/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | require recipes-core/images/core-image-minimal.bb | ||
2 | |||
3 | DEPENDS_remove = "grub-efi" | ||
4 | |||
5 | inherit uefi-comboapp | ||
6 | |||
7 | WKS_FILE = "generic-bootdisk.wks.in" | ||
8 | |||
9 | do_uefiapp_deploy_append() { | ||
10 | for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do | ||
11 | target=`basename $i` | ||
12 | target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` | ||
13 | |||
14 | cat > ${IMAGE_ROOTFS}/boot/startup.nsh << EOF | ||
15 | $target | ||
16 | reset | ||
17 | EOF | ||
18 | break | ||
19 | done | ||
20 | } | ||
diff --git a/common/recipes-support/sbsigntool/sbsigntool-native_git.bb b/common/recipes-support/sbsigntool/sbsigntool-native_git.bb deleted file mode 100644 index 430a6a7..0000000 --- a/common/recipes-support/sbsigntool/sbsigntool-native_git.bb +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | DESCRIPTION = "Utility for signing and verifying files for UEFI Secure Boot" | ||
2 | LICENSE = "GPLv3 & LGPL-2.1 & LGPL-3.0 & MIT" | ||
3 | |||
4 | # sbsigntool statically links to libccan.a which is built with modules | ||
5 | # passed to "create-ccan-tree" (and their dependencies). Therefore, | ||
6 | # we also keep track of all the ccan module licenses. | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746 \ | ||
8 | file://COPYING;md5=a7710ac18adec371b84a9594ed04fd20 \ | ||
9 | file://lib/ccan.git/ccan/endian/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
10 | file://lib/ccan.git/ccan/htable/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
11 | file://lib/ccan.git/ccan/list/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
12 | file://lib/ccan.git/ccan/read_write_all/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
13 | file://lib/ccan.git/ccan/talloc/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
14 | file://lib/ccan.git/ccan/typesafe_cb/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
15 | file://lib/ccan.git/ccan/failtest/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
16 | file://lib/ccan.git/ccan/tlist/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
17 | file://lib/ccan.git/ccan/time/LICENSE;md5=838c366f69b72c5df05c96dff79b35f2 \ | ||
18 | " | ||
19 | |||
20 | # The original upstream is git://kernel.ubuntu.com/jk/sbsigntool but it has | ||
21 | # not been maintained and many patches have been backported in this repo. | ||
22 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git;protocol=https;name=sbsigntools \ | ||
23 | git://github.com/rustyrussell/ccan.git;protocol=https;destsuffix=git/lib/ccan.git;name=ccan \ | ||
24 | " | ||
25 | |||
26 | SRCREV_sbsigntools ?= "efbb550858e7bd3f43e64228d22aea440ef6a14d" | ||
27 | SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5" | ||
28 | SRCREV_FORMAT = "sbsigntools_ccan" | ||
29 | |||
30 | DEPENDS = "binutils-native gnu-efi-native help2man-native openssl10-native util-linux-native" | ||
31 | |||
32 | PV = "0.8-git${SRCPV}" | ||
33 | |||
34 | S = "${WORKDIR}/git" | ||
35 | |||
36 | inherit native autotools pkgconfig | ||
37 | |||
38 | do_configure_prepend() { | ||
39 | cd ${S} | ||
40 | |||
41 | if [ ! -e lib/ccan ]; then | ||
42 | |||
43 | # Use empty SCOREDIR because 'make scores' is not run. | ||
44 | # The default setting depends on (non-whitelisted) host tools. | ||
45 | sed -i -e 's#^\(SCOREDIR=\).*#\1#' lib/ccan.git/Makefile | ||
46 | |||
47 | lib/ccan.git/tools/create-ccan-tree \ | ||
48 | --build-type=automake lib/ccan \ | ||
49 | talloc read_write_all build_assert array_size endian | ||
50 | fi | ||
51 | |||
52 | # Create generatable docs from git | ||
53 | ( | ||
54 | echo "Authors of sbsigntool:" | ||
55 | echo | ||
56 | git log --format='%an' | sort -u | sed 's,^,\t,' | ||
57 | ) > AUTHORS | ||
58 | |||
59 | # Generate simple ChangeLog | ||
60 | git log --date=short --format='%ad %t %an <%ae>%n%n * %s%n' > ChangeLog | ||
61 | |||
62 | cd ${B} | ||
63 | } | ||
64 | |||
65 | def efi_arch(d): | ||
66 | import re | ||
67 | harch = d.getVar("HOST_ARCH") | ||
68 | if re.match("i[3456789]86", harch): | ||
69 | return "ia32" | ||
70 | return harch | ||
71 | |||
72 | EXTRA_OEMAKE = "\ | ||
73 | INCLUDES+='-I${S}/lib/ccan.git/ \ | ||
74 | -I${STAGING_INCDIR_NATIVE}/efi \ | ||
75 | -I${STAGING_INCDIR_NATIVE} \ | ||
76 | -I${STAGING_INCDIR_NATIVE}/efi/${@efi_arch(d)}' \ | ||
77 | " | ||
diff --git a/conf/include/maintainers.inc b/conf/include/maintainers.inc index 995ff33..9f4c2e3 100644 --- a/conf/include/maintainers.inc +++ b/conf/include/maintainers.inc | |||
@@ -1,23 +1,5 @@ | |||
1 | # This file contains a list of recipe maintainers for meta-intel | 1 | # This file contains a list of recipe maintainers for meta-intel |
2 | 2 | ||
3 | RECIPE_MAINTAINER_pn-core-image-rt = "Swee Aun Khor <swee.aun.khor@intel.com>" | 3 | RECIPE_MAINTAINER_pn-openssl-qat = "TBD DPDK Flex Team" |
4 | RECIPE_MAINTAINER_pn-core-image-rt-sdk = "Swee Aun Khor <swee.aun.khor@intel.com>" | 4 | RECIPE_MAINTAINER_pn-qat16 = "TBD DPDK Flex Team" |
5 | RECIPE_MAINTAINER_pn-efilinux = "Swee Aun Khor <swee.aun.khor@intel.com>" | 5 | RECIPE_MAINTAINER_pn-zlib-qat = "TBD DPDK Flex Team" |
6 | RECIPE_MAINTAINER_pn-gma500-gfx-check = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
7 | RECIPE_MAINTAINER_pn-intel-gpu-tools = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
8 | RECIPE_MAINTAINER_pn-intel-microcode = "Swee Aun Khor <swee.aun.khor@intel.com>" | ||
9 | RECIPE_MAINTAINER_pn-intel-minimal-initramfs = "Swee Aun Khor <swee.aun.khor@intel.com>" | ||
10 | RECIPE_MAINTAINER_pn-iucode-tool = "Swee Aun Khor <swee.aun.khor@intel.com>" | ||
11 | RECIPE_MAINTAINER_pn-libva-intel-driver = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
12 | RECIPE_MAINTAINER_pn-libyami = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
13 | RECIPE_MAINTAINER_pn-libyami-utils = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
14 | RECIPE_MAINTAINER_pn-linux-intel = "Swee Aun Khor <swee.aun.khor@intel.com>" | ||
15 | RECIPE_MAINTAINER_pn-linux-intel-rt = "Swee Aun Khor <swee.aun.khor@intel.com>" | ||
16 | RECIPE_MAINTAINER_pn-lms7 = "TBD" | ||
17 | RECIPE_MAINTAINER_pn-lms8 = "TBD" | ||
18 | RECIPE_MAINTAINER_pn-rmc = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
19 | RECIPE_MAINTAINER_pn-rmc-db = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
20 | RECIPE_MAINTAINER_pn-thermald = "Swee Aun Khor <swee.aun.khor@intel.com>" | ||
21 | RECIPE_MAINTAINER_pn-va-intel = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
22 | RECIPE_MAINTAINER_pn-xf86-video-ast = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
23 | RECIPE_MAINTAINER_pn-xf86-video-mga = "Wei Tee Ng <wei.tee.ng@intel.com>" | ||
diff --git a/conf/layer.conf b/conf/layer.conf index 53f831e..2e3aa84 100644 --- a/conf/layer.conf +++ b/conf/layer.conf | |||
@@ -1,24 +1,20 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | 1 | # We have a conf and classes directory, add to BBPATH |
2 | BBPATH .= ":${LAYERDIR}:${LAYERDIR}/common" | 2 | BBPATH .= ":${LAYERDIR}" |
3 | 3 | ||
4 | # We have recipes-* directories, add to BBFILES | 4 | # We have recipes-* directories, add to BBFILES |
5 | BBFILES += "${LAYERDIR}/common/recipes-*/*/*.bb \ | 5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ |
6 | ${LAYERDIR}/common/recipes-*/*/*.bbappend" | 6 | ${LAYERDIR}/recipes-*/*/*.bbappend" |
7 | 7 | ||
8 | BBFILE_COLLECTIONS += "intel" | 8 | BBFILE_COLLECTIONS += "intel-qat" |
9 | BBFILE_PATTERN_intel := "^${LAYERDIR}/common/" | 9 | BBFILE_PATTERN_intel-qat := "^${LAYERDIR}/" |
10 | BBFILE_PRIORITY_intel = "5" | 10 | BBFILE_PRIORITY_intel-qat = "5" |
11 | 11 | ||
12 | # Additional license directories. | 12 | LAYERDEPENDS_intel-qat = "core intel" |
13 | LICENSE_PATH += "${LAYERDIR}/common/custom-licenses" | ||
14 | |||
15 | LAYERDEPENDS_intel = "core" | ||
16 | LAYERRECOMMENDS_intel = "dpdk intel-qat" | ||
17 | 13 | ||
18 | # This should only be incremented on significant changes that will | 14 | # This should only be incremented on significant changes that will |
19 | # cause compatibility issues with other layers | 15 | # cause compatibility issues with other layers |
20 | LAYERVERSION_intel = "4" | 16 | LAYERVERSION_intel-qat = "1" |
21 | LAYERSERIES_COMPAT_intel = "rocko" | 17 | LAYERSERIES_COMPAT_intel-qat = "rocko" |
22 | 18 | ||
23 | 19 | ||
24 | require ${LAYERDIR}/conf/include/maintainers.inc | 20 | require ${LAYERDIR}/conf/include/maintainers.inc |
diff --git a/conf/machine/include/intel-common-pkgarch.inc b/conf/machine/include/intel-common-pkgarch.inc deleted file mode 100644 index d0f208b..0000000 --- a/conf/machine/include/intel-common-pkgarch.inc +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | INTEL_COMMON_PACKAGE_ARCH ?= "${TUNE_PKGARCH}-intel-common" | ||
2 | PACKAGE_ARCH_pn-linux-intel = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
3 | PACKAGE_ARCH_pn-linux-intel-rt = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
4 | PACKAGE_ARCH_pn-linux-intel-tiny = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
5 | PACKAGE_ARCH_pn-linux-intel-dev = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
6 | PACKAGE_ARCH_pn-linux-yocto = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
7 | PACKAGE_ARCH_pn-linux-yocto-rt = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
8 | PACKAGE_ARCH_pn-linux-yocto-tiny = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
9 | PACKAGE_ARCH_pn-linux-yocto-dev = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
10 | PACKAGE_ARCH_pn-intel-microcode = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
11 | PACKAGE_ARCH_pn-backport-iwlwifi = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
12 | PACKAGE_ARCH_pn-ixgbe = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
13 | PACKAGE_ARCH_pn-ixgbevf = "${INTEL_COMMON_PACKAGE_ARCH}" | ||
14 | PACKAGE_EXTRA_ARCHS_append += "${INTEL_COMMON_PACKAGE_ARCH}" | ||
15 | MACHINEOVERRIDES =. "${INTEL_COMMON_PACKAGE_ARCH}:" | ||
diff --git a/conf/machine/include/intel-core2-32-common.inc b/conf/machine/include/intel-core2-32-common.inc deleted file mode 100644 index 8c46949..0000000 --- a/conf/machine/include/intel-core2-32-common.inc +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # | ||
2 | # Common configuration for all MACHINEs of the intel-core2 type | ||
3 | # | ||
4 | |||
5 | DEFAULTTUNE ?= "core2-32" | ||
6 | require conf/machine/include/tune-core2.inc | ||
7 | require conf/machine/include/x86-base.inc | ||
diff --git a/conf/machine/include/intel-corei7-64-common.inc b/conf/machine/include/intel-corei7-64-common.inc deleted file mode 100644 index 0028256..0000000 --- a/conf/machine/include/intel-corei7-64-common.inc +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # | ||
2 | # Common configuration for all MACHINES of the intel-corei7-64 type | ||
3 | # | ||
4 | |||
5 | DEFAULTTUNE ?= "corei7-64" | ||
6 | require conf/machine/include/tune-corei7.inc | ||
7 | require conf/machine/include/x86-base.inc | ||
diff --git a/conf/machine/include/intel-quark-common.inc b/conf/machine/include/intel-quark-common.inc deleted file mode 100644 index f7cfe14..0000000 --- a/conf/machine/include/intel-quark-common.inc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | # | ||
2 | # Common configuration for all MACHINES of the intel-quark type | ||
3 | # | ||
4 | |||
5 | DEFAULTTUNE ?= "i586-nlp-32" | ||
6 | require conf/machine/include/tune-i586-nlp.inc | ||
7 | require conf/machine/include/x86-base.inc | ||
8 | |||
9 | # gnutls padlock code uses CMOV instruction in assembly which | ||
10 | # is not valid for Quark. | ||
11 | EXTRA_OECONF_append_pn-gnutls_intel-quark = " --disable-padlock" | ||
12 | EXTRA_OECONF_append_pn-openssl_intel-quark = " no-asm" | ||
diff --git a/conf/machine/include/meta-intel.inc b/conf/machine/include/meta-intel.inc deleted file mode 100644 index 34a672c..0000000 --- a/conf/machine/include/meta-intel.inc +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | # | ||
2 | # BSP variables and settings specific to the meta-intel layer. | ||
3 | # You must include the meta-intel layer in your bblayers.conf | ||
4 | # to use them. | ||
5 | # | ||
6 | |||
7 | # | ||
8 | # XSERVER subcomponents, used to build the XSERVER variable | ||
9 | # | ||
10 | |||
11 | # Soft set linux-yocto as preferred kernel like x86-base.inc | ||
12 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-intel" | ||
13 | PREFERRED_PROVIDER_virtual/kernel_poky-tiny ?= "linux-intel" | ||
14 | PREFERRED_PROVIDER_virtual/kernel_linuxstdbase ?= "linux-yocto" | ||
15 | PREFERRED_VERSION_linux-intel ?= "4.9%" | ||
16 | |||
17 | # for Xserver older than 1.13.0 | ||
18 | OLD_XSERVER_X86_EXT = "xserver-xorg-extension-dri \ | ||
19 | xserver-xorg-extension-dri2 \ | ||
20 | xserver-xorg-extension-extmod \ | ||
21 | xserver-xorg-extension-dbe \ | ||
22 | " | ||
23 | |||
24 | XSERVER_X86_MATROX_MGA = "xf86-video-mga \ | ||
25 | " | ||
26 | |||
27 | XSERVER_X86_ASPEED_AST = "xf86-video-ast \ | ||
28 | " | ||
29 | |||
30 | # include the user space intel microcode loading support in the generated images. | ||
31 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', ' intel-microcode', '', d)} thermald" | ||
32 | |||
33 | # recommended extra packages common to all intel machines | ||
34 | MACHINE_EXTRA_RRECOMMENDS_append = " kernel-modules linux-firmware" | ||
35 | |||
36 | # for the early boot time kernel microcode loading support, | ||
37 | # merge the microcode data in the final initrd image. | ||
38 | INITRD_LIVE_prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}" | ||
39 | |||
40 | DISK_SIGNATURE_UUID ??= "deadbeef-dead-beef-dead-beefdeadbeef" | ||
41 | |||
42 | EFI_PROVIDER ?= "rmc-boot" | ||
43 | |||
44 | # Add general MACHINEOVERRIDE for meta-intel | ||
45 | MACHINEOVERRIDES =. "intel-x86-common:" | ||
46 | |||
47 | # Definition of (more or less) suitable virtual machines. | ||
48 | require conf/machine/include/qemuboot-intel.inc | ||
49 | |||
50 | # Ensure that the extra tools needed by qemu are built when building images | ||
51 | # and tweak machine definition to make the result more usable under qemu. | ||
52 | require conf/machine/include/qemu-intel.inc | ||
diff --git a/conf/machine/include/qemu-intel.inc b/conf/machine/include/qemu-intel.inc deleted file mode 100644 index 8151040..0000000 --- a/conf/machine/include/qemu-intel.inc +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | # Similar to meta/conf/machine/include/qemu.inc but influences the | ||
2 | # distro content (in particular the kernel) less than qemu.inc. | ||
3 | |||
4 | # Ensure that qemu gets built when building images. | ||
5 | EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" | ||
6 | |||
7 | # Build ovmf firmware for uefi support in qemu. | ||
8 | EXTRA_IMAGEDEPENDS += "ovmf" | ||
9 | |||
10 | # runqemu uses virtio, so we have to enable the corresponding | ||
11 | # kernel drivers. | ||
12 | KERNEL_FEATURES_INTEL_COMMON += "cfg/virtio.scc" | ||
13 | |||
14 | # Other useful extensions which are not enabled by default: | ||
15 | # rng-tools to take advantage of qemu's virtio-rng-pci device. | ||
16 | # MACHINE_EXTRA_RRECOMMENDS += "rng-tools" | ||
17 | |||
18 | # Creates the necessary .qemuboot.conf file for each image. | ||
19 | IMAGE_CLASSES += "qemuboot" | ||
diff --git a/conf/machine/include/qemuboot-intel.inc b/conf/machine/include/qemuboot-intel.inc deleted file mode 100644 index cb52330..0000000 --- a/conf/machine/include/qemuboot-intel.inc +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | # For runqemu | ||
2 | IMAGE_CLASSES += "qemuboot" | ||
3 | QB_SYSTEM_NAME_intel-core2-32 = "qemu-system-i386" | ||
4 | QB_CPU_intel-core2-32 = "-cpu coreduo" | ||
5 | QB_CPU_KVM_intel-core2-32 = "-cpu kvm32" | ||
6 | |||
7 | QB_SYSTEM_NAME_intel-corei7-64 = "qemu-system-x86_64" | ||
8 | QB_CPU_intel-corei7-64 = "-cpu Nehalem" | ||
9 | QB_CPU_KVM_intel-corei7-64 = "-cpu kvm64" | ||
10 | |||
11 | QB_SYSTEM_NAME_intel-quark = "qemu-system-i386" | ||
12 | QB_CPU_intel-quark = "-cpu coreduo" | ||
13 | QB_CPU_KVM_intel-quark = "-cpu kvm32" | ||
14 | |||
15 | QB_AUDIO_DRV = "alsa" | ||
16 | QB_AUDIO_OPT = "-soundhw ac97,es1370" | ||
17 | QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1" | ||
18 | # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy | ||
19 | QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci" | ||
diff --git a/conf/machine/intel-core2-32.conf b/conf/machine/intel-core2-32.conf deleted file mode 100644 index abe6f90..0000000 --- a/conf/machine/intel-core2-32.conf +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: intel-core2-32 | ||
3 | |||
4 | #@DESCRIPTION: Machine configuration for 32 bit Intel Core 2 CPU (and later) with MMX, SSE, SSE2, SSE3, and SSSE3 instruction set support. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware. | ||
5 | |||
6 | require conf/machine/include/meta-intel.inc | ||
7 | require conf/machine/include/intel-core2-32-common.inc | ||
8 | require conf/machine/include/intel-common-pkgarch.inc | ||
9 | |||
10 | MACHINE_FEATURES += "pcbios efi" | ||
11 | MACHINE_FEATURES += "va-impl-intel" | ||
12 | MACHINE_FEATURES += "wifi 3g nfc" | ||
13 | MACHINE_FEATURES += "intel-ucode" | ||
14 | |||
15 | MACHINE_HWCODECS ?= "va-intel gstreamer1.0-vaapi" | ||
16 | |||
17 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gma500-gfx-check" | ||
18 | |||
19 | XSERVER ?= "${XSERVER_X86_BASE} \ | ||
20 | ${XSERVER_X86_EXT} \ | ||
21 | ${XSERVER_X86_FBDEV} \ | ||
22 | ${XSERVER_X86_I915} \ | ||
23 | ${XSERVER_X86_I965} \ | ||
24 | ${XSERVER_X86_MODESETTING} \ | ||
25 | ${XSERVER_X86_VESA} \ | ||
26 | ${XSERVER_X86_ASPEED_AST} \ | ||
27 | " | ||
28 | |||
29 | SYSLINUX_OPTS = "serial 0 115200" | ||
30 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyPCH0" | ||
31 | APPEND += "rootwait console=ttyS0,115200 console=ttyPCH0,115200 console=tty0" | ||
32 | |||
33 | IMAGE_FSTYPES += "wic" | ||
34 | WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk.wks", "mkefidisk.wks", d)}" | ||
35 | do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" | ||
diff --git a/conf/machine/intel-corei7-64.conf b/conf/machine/intel-corei7-64.conf deleted file mode 100644 index 78a1f6e..0000000 --- a/conf/machine/intel-corei7-64.conf +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: intel-corei7-64 | ||
3 | |||
4 | #@DESCRIPTION: Machine configuration for 64 bit Intel Core i7 CPU (and later) with MMX, SSE, SSE2, SSE3, and SSSE3 instruction set support. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware. | ||
5 | |||
6 | require conf/machine/include/meta-intel.inc | ||
7 | require conf/machine/include/intel-corei7-64-common.inc | ||
8 | require conf/machine/include/intel-common-pkgarch.inc | ||
9 | |||
10 | MACHINE_FEATURES += "pcbios efi" | ||
11 | MACHINE_FEATURES += "va-impl-intel" | ||
12 | MACHINE_FEATURES += "wifi 3g nfc" | ||
13 | MACHINE_FEATURES += "intel-ucode" | ||
14 | |||
15 | MACHINE_HWCODECS ?= "va-intel gstreamer1.0-vaapi" | ||
16 | |||
17 | MACHINE_EXTRA_RRECOMMENDS += "lms8" | ||
18 | |||
19 | # Enable optional dpdk: | ||
20 | COMPATIBLE_MACHINE_pn-dpdk = "intel-corei7-64" | ||
21 | COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "intel-corei7-64" | ||
22 | DPDK_TARGET_MACHINE ?= "atm" | ||
23 | |||
24 | # Enable optional QAT items: | ||
25 | COMPATIBLE_MACHINE_pn-openssl-qat = "intel-corei7-64" | ||
26 | COMPATIBLE_MACHINE_pn-qat16 = "intel-corei7-64" | ||
27 | COMPATIBLE_MACHINE_pn-zlib-qat = "intel-corei7-64" | ||
28 | |||
29 | XSERVER ?= "${XSERVER_X86_BASE} \ | ||
30 | ${XSERVER_X86_EXT} \ | ||
31 | ${XSERVER_X86_FBDEV} \ | ||
32 | ${XSERVER_X86_I915} \ | ||
33 | ${XSERVER_X86_I965} \ | ||
34 | ${XSERVER_X86_MATROX_MGA} \ | ||
35 | ${XSERVER_X86_MODESETTING} \ | ||
36 | ${XSERVER_X86_VESA} \ | ||
37 | ${XSERVER_X86_ASPEED_AST} \ | ||
38 | " | ||
39 | |||
40 | SYSLINUX_OPTS = "serial 0 115200" | ||
41 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyS2" | ||
42 | APPEND += "rootwait console=ttyS0,115200 console=tty0" | ||
43 | |||
44 | IMAGE_FSTYPES += "wic" | ||
45 | WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk.wks", "mkefidisk.wks", d)}" | ||
46 | do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" | ||
diff --git a/conf/machine/intel-quark.conf b/conf/machine/intel-quark.conf deleted file mode 100644 index 17e8c52..0000000 --- a/conf/machine/intel-quark.conf +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: quark | ||
3 | |||
4 | #@DESCRIPTION: Machine configuration for Quark systems | ||
5 | |||
6 | require conf/machine/include/meta-intel.inc | ||
7 | require conf/machine/include/intel-quark-common.inc | ||
8 | require conf/machine/include/intel-common-pkgarch.inc | ||
9 | |||
10 | #Avoid pulling in GRUB | ||
11 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "" | ||
12 | |||
13 | MACHINE_FEATURES = "efi usb" | ||
14 | MACHINE_FEATURES += "intel-ucode" | ||
15 | |||
16 | SERIAL_CONSOLE = "115200 ttyS1" | ||
17 | APPEND += "rootwait console=ttyS1,115200 console=tty0" | ||
18 | |||
19 | # Bypass the default labels which also has "install" option in OE. | ||
20 | # | ||
21 | # We don't need to do this when constructing direct-boot image with | ||
22 | # wic. But EFI installer in hddimg image doesn't work on quark now, | ||
23 | # so we only provide a live-boot entry in boot menu for images in | ||
24 | # hddimg format. | ||
25 | |||
26 | LABELS_LIVE = "boot" | ||
27 | |||
28 | # Ensure that the Lock prefix is omitted for the kernel" | ||
29 | KERNEL_EXTRA_ARGS = "EXTRA_CFLAGS=-Wa,-momit-lock-prefix=yes" | ||
30 | |||
31 | IMAGE_FSTYPES += "wic" | ||
32 | WKS_FILE ?= "galileodisk-sd.wks" | ||
33 | do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" | ||
diff --git a/documentation/rmc/README b/documentation/rmc/README deleted file mode 100644 index eaa763e..0000000 --- a/documentation/rmc/README +++ /dev/null | |||
@@ -1,382 +0,0 @@ | |||
1 | Runtime Machine Configuration (RMC) | ||
2 | -------------------------------------------------------------------------------- | ||
3 | Table of Contents | ||
4 | |||
5 | Introduction | ||
6 | Usage | ||
7 | Enable RMC Feature | ||
8 | Examples | ||
9 | Troubleshooting | ||
10 | When you (don't) need RMC feature | ||
11 | |||
12 | |||
13 | Introduction: | ||
14 | -------------------------------------------------------------------------------- | ||
15 | RMC Project - a light-weight project provide developers a mechanism to keep | ||
16 | their software implementation board-type agnostic, yet still able to customize | ||
17 | software behavior according to the type of a running board at runtime. Recipes | ||
18 | and bbclasses are available for other components to reuse to construct their own | ||
19 | RMC database. | ||
20 | |||
21 | RMC Feature - An end-to-end solution based on RMC project to have a generic | ||
22 | image capable to apply board-type-specific quirks and configurations for a board | ||
23 | at runtime. It consists of a modified bootloader (systemd-boot), an updated EFI | ||
24 | installer, recipes, bbclass and RMC project. | ||
25 | |||
26 | RMC feature supports special customizations cannot be covered by conventional | ||
27 | auto-detection features based on probing a hardware module because they happen | ||
28 | at a board or a product level. For example: | ||
29 | - tty console for kernel log output in kernel cmdline | ||
30 | - default audio route configuration | ||
31 | - network configuration | ||
32 | - UI layout | ||
33 | - requirement to software driven by a mechanical design | ||
34 | - or static configuration bits for a physical bus that doesn't support to | ||
35 | identify devices or their presence at runtime | ||
36 | |||
37 | An image with the feature has ability to configure supported boards with data | ||
38 | associated only to a type of board to get full functionality of the target at | ||
39 | runtime, yet still with a single image. | ||
40 | |||
41 | Effect after installation is identical to what a conventional image specially | ||
42 | customized for a type of board (depending on the way to deploy image). | ||
43 | |||
44 | Main functions of RMC Feature: | ||
45 | |||
46 | Show board-specific boot entries in boot menu and boot system with configuration | ||
47 | (boot title, boot options, etc) in a selected boot entry. | ||
48 | |||
49 | Support a "global" kernel boot command line fragment which is effective for all | ||
50 | boot entries. | ||
51 | |||
52 | Deploy file blobs and create directories specific to the type of running board. | ||
53 | |||
54 | Beside from this document, you can also find several built-in examples in | ||
55 | common/recipes-bsp/rmc/boards/. Refer to "Examples" section. | ||
56 | |||
57 | You can also add new board types in your layer via a simple variable. | ||
58 | |||
59 | |||
60 | |||
61 | Usage | ||
62 | -------------------------------------------------------------------------------- | ||
63 | Developers are suggested to organize all board-specific files in their own layer | ||
64 | following this example, so that RMC recipes can pick up them correctly in build. | ||
65 | |||
66 | - my_top_dir/ Top directory of your board (Note 0) | ||
67 | |- rmc-db.bbappend bbappend file to rmc-db recipe at a lower level | ||
68 | |- rmc/ | ||
69 | |- target_board_1/ subdirectory of a board. | ||
70 | | |- board1.fp fingerprint file must be provided (NOTE 1) | ||
71 | | |- BOOTENTRY.CONFIG optional config file for boot entries. (NOTE 2) | ||
72 | | |- INSTALLER.CONFIG optional config file for installer. (NOTE 3) | ||
73 | | |- POSTINSTALL.sh optional script hook for installer (NOTE 4) | ||
74 | | |- board_file_1 A file blob specific to the type of board | ||
75 | | |- board_file_2 An another file specific to the type of board | ||
76 | | |- ...more files | ||
77 | |- target_board_2/ subdirectory of another board. | ||
78 | |- board_2_v2.fp fingerprint file for board 2. | ||
79 | |- BOOTENTRY.CONFIG | ||
80 | |- INSTALLER.CONFIG | ||
81 | |- board_file_1 | ||
82 | |- ...more files | ||
83 | |||
84 | Note 0: | ||
85 | Developers are expected to use variable RMC_BOARD_DATA_DIRS to specify data of | ||
86 | boards packed into RMC database file generated in a build. The default value of | ||
87 | the variable in meta-intel specifies a group of boards. They work as examples | ||
88 | and necessary quirks for these boards to function properly. Developers can | ||
89 | override, append to the default boards with data of their own boards in the | ||
90 | database file, or even disable the generation of the database file. | ||
91 | |||
92 | For example, in your local.conf file: | ||
93 | |||
94 | This line adds your boards along with the default boards into RMC database file, | ||
95 | assuming you have a directory named "rmc" which has a subdirectory for each | ||
96 | board: | ||
97 | |||
98 | RMC_BOARD_DATA_DIRS_append = " /path_of/rmc" | ||
99 | |||
100 | This line directs RMC to pack data of your boards only, without data of the | ||
101 | default boards in meta-intel: | ||
102 | |||
103 | RMC_BOARD_DATA_DIRS = "/path_of/rmc" | ||
104 | |||
105 | And this line disables database generation: | ||
106 | |||
107 | RMC_BOARD_DATA_DIRS = "" | ||
108 | |||
109 | Please also refer to the "Example 1" in this document. | ||
110 | |||
111 | Subdirectory is not supported in a board's directory. | ||
112 | |||
113 | Note 1: | ||
114 | Fingerprint files must be provided and with ".fp" at the end of their names. | ||
115 | Fingerprint can be obtained by running RMC tool on your board. An easy way is to | ||
116 | live-boot USB stick flashed with any image enabled this feature on your board, | ||
117 | then run this command: | ||
118 | |||
119 | # rmc -F -o my_board.fp | ||
120 | |||
121 | Or you will need to build RMC tool for the architecture of your board, 32 or | ||
122 | 64 bit x86, from RMC project. | ||
123 | |||
124 | You can run RMC tool without any argument to get usage and examples. | ||
125 | |||
126 | DO NOT NAME ANY FILE ENDING WITH '.fp' IF IT IS NOT A RMC FINGERPRINT FILE. | ||
127 | |||
128 | If you do need a .fp file deployed onto target, please rename it in source and | ||
129 | specify the real name of file on target in INSTALLER.CONFIG. | ||
130 | |||
131 | Note 2: | ||
132 | At runtime, RMC bootloader tries to fetch this file specific to the board at run | ||
133 | time, then tries to fetch each boot entry file specified in BOOTENTRY.CONFIG and | ||
134 | show them in boot menu options. The format of this file is very simple. Each | ||
135 | line is the name of a boot entry file: | ||
136 | |||
137 | boot.conf | ||
138 | Install.conf | ||
139 | myrmcboot.conf | ||
140 | |||
141 | Name of a boot entry file is defined by developer so it can be anything. But the | ||
142 | name of config file is what RMC bootloader looks up in RMC database, so it must | ||
143 | be named BOOTENTRY.CONFIG. | ||
144 | |||
145 | Bootloader skips loading entry conf files from disk once any entry is loaded | ||
146 | from RMC database. | ||
147 | |||
148 | Note 3: | ||
149 | At runtime, RMC installer tries to fetch INSTALLER.CONFIG file specific to the | ||
150 | board, then tries to fetch each file specified in this config file, and then | ||
151 | deploy the file onto target with its permissions, UID, GID and other attributes | ||
152 | also specified in this config file if file for the board can be retrieved from | ||
153 | RMC database. The format of this file is (# is for comment line) | ||
154 | |||
155 | # name:uid:gid:mode:path_on_target | ||
156 | # to create a directory, add a “/†at the end of path_on_target: | ||
157 | audio_policy:0:0:600:/etc/audio/ | ||
158 | audio_def_policy:0:0:600:/etc/audio/audio_policy | ||
159 | |||
160 | The above example creates /etc/audio directory first, then fetch a file named | ||
161 | “audio_def_policy†from RMC database for the board, then copy it to /etc/audio/ | ||
162 | with a new name “audio_policyâ€. | ||
163 | |||
164 | If this config file is not provided, No data in RMC database is deployed to the | ||
165 | target. | ||
166 | |||
167 | Some steps defined by developers could not be supported on a filesystem. | ||
168 | Installer simply ignores any errors in RMC deployment stage. | ||
169 | |||
170 | The name of this config file is what installer looks up first, so it must be | ||
171 | INSTALLER.CONFIG. | ||
172 | |||
173 | Note 4: | ||
174 | At the end of RMC deployment during installation, RMC installer queries a script | ||
175 | file POSTINSTALL.sh from RMC database file, and execute it when query is | ||
176 | successful on the running board. This hook provides developers almost ultimate | ||
177 | flexibility to retouch what have been deployed on the target. There are some | ||
178 | steps still can override results from this hook for boot entries and KBOOTPARAM. | ||
179 | |||
180 | |||
181 | |||
182 | Enable RMC Feature | ||
183 | -------------------------------------------------------------------------------- | ||
184 | To enable the RMC feature please add the following variables to your local.conf. | ||
185 | |||
186 | DISTRO_FEATURES_append = " rmc" | ||
187 | EFI_PROVIDER = "rmc-boot" | ||
188 | |||
189 | The default EFI bootloader used with RMC is systemd-boot. To change the default | ||
190 | bootloader please overwrite the RMC_BOOTLOADER variable in your local.conf | ||
191 | |||
192 | Note: | ||
193 | Image could be still bootable if you only have either of two lines, but RMC | ||
194 | feature could not be fully functional, depending on the availability of the | ||
195 | database file, installer and the rmc tool. | ||
196 | |||
197 | Examples | ||
198 | -------------------------------------------------------------------------------- | ||
199 | We checked in configuration data in common/recipes-bsp/rmc/boards/ for several | ||
200 | boards, to help users to understand the RMC feature. These examples are also for | ||
201 | validation. For any example you find not working as what this section depicts, | ||
202 | it should be treated as a bug to be fixed. | ||
203 | |||
204 | To test this feature with examples, enable it and build an image first, then | ||
205 | boot the built image on supported boards. Examples are always built in when the | ||
206 | feature is enabled, except for the EXAMPLE 1. | ||
207 | |||
208 | EXAMPLE 1: Support a new board type: | ||
209 | (1) enable the feature and do a build to get a live-boot image by adding these | ||
210 | lines in conf/local.conf: | ||
211 | DISTRO_FEATURES_append = " rmc" | ||
212 | EFI_PROVIDER = "rmc-boot" | ||
213 | |||
214 | (2) flash the image to a USB stick and boot it on your board | ||
215 | |||
216 | (3) in super user mode, run "rmc -F -o my_board.fp" | ||
217 | |||
218 | (4) create directories in your host "mkdir -p my_top_dir/my_rmc/my_board" | ||
219 | |||
220 | (5) copy my_board.fp from target to my_top_dir/my_rmc/my_board/ on host | ||
221 | |||
222 | (6) create a file my_top_dir/my_rmc/my_board/KBOOTPARAM, put some fake | ||
223 | and harmless options in a single line, say, "loglevel=7" | ||
224 | |||
225 | (7) create a file my_top_dir/rmc-db.bbappend, put this single line in it: | ||
226 | RMC_BOARD_DATA_DIRS_append := " ${THISDIR}/my_rmc" | ||
227 | From parent directory of my_top_dir, the tree should look like: | ||
228 | my_top_dir/ | ||
229 | my_rmc/ | ||
230 | my_board/ | ||
231 | KBOOTPARAM | ||
232 | my_board.fp | ||
233 | rmc-db.bbappend | ||
234 | Later, you can add more board directories in my_rmc directory. | ||
235 | |||
236 | (8) modify build configuration to add my_top_dir into build, for example, put | ||
237 | this line in a bblayers.conf: | ||
238 | BBFILES += "/full/path/of/my_top_dir/rmc-db.bbappend" | ||
239 | |||
240 | (9) build image again then boot it on your board | ||
241 | |||
242 | (10) Once you login to shell, new options should be effective, run this command | ||
243 | "cat /proc/cmdline" to verify the result. | ||
244 | |||
245 | EXAMPLE 2: Board-specific boot entry | ||
246 | MinnowBoard MAX and B3 version: | ||
247 | common/recipes-bsp/rmc/boards/minnowmax | ||
248 | common/recipes-bsp/rmc/boards/minnowmaxB3 | ||
249 | |||
250 | We have found two identities (type of board) exist for the "same" Minnow Max | ||
251 | hardware, so they have to be treated as two different types of hardware. The two | ||
252 | examples show you a boot entry specific to a type of board. Titles shown in boot | ||
253 | menu have different names according to the type of running board, "Minnow Max | ||
254 | boot" or "Minnow Max B3 boot". in /proc/cmdline, "console=ttyS0,115200n8" shall | ||
255 | be there. Kernel prints logs from 6-pin FTDI serial port on Minnow Max(s). This | ||
256 | console setting is in board-specific entries, so you won't see it effective if | ||
257 | you select default "boot" entry to boot the device. | ||
258 | |||
259 | EXAMPLE 3: Board-specific boot entry, global kernel cmdline and installer | ||
260 | NUC Gen 6: | ||
261 | common/recipes-bsp/rmc/boards/nucgen6 | ||
262 | This is a combo example with all supported configuration data for NUC Gen 6 | ||
263 | product. It shows two boot entries in bootloader menu when you boot image on NUC | ||
264 | Gen 6 product, with "NUC Gen6" in entry titles. There shall no any "console=" in | ||
265 | /proc/cmdline when you boot with either of two "NUC Gen6"entries. We designed it | ||
266 | this way because there is no accessible tty port on NUC Gen 6 with housing. The | ||
267 | post-install hook is also provided in this example. | ||
268 | |||
269 | This example also includes a global kernel cmdline fragment KBOOTPARAM. Content | ||
270 | of KBOOTPARAM shall be at the end of /proc/cmdline no matter which boot entry | ||
271 | you selected to boot NUC Gen6. | ||
272 | |||
273 | INSTALLER.CONFIG directs installer to create a directory and deploy a file in it | ||
274 | when install the image on NUC Gen6. | ||
275 | |||
276 | Choose "NUC Gen6 install" boot entry to boot shall start installation. Once | ||
277 | the device reboots after installation, we can verify the configurations. | ||
278 | |||
279 | The boot entry "NUC Gen6 boot" shall be shown in boot menu. | ||
280 | |||
281 | The content of KBOOTPARAM shall be in /proc/cmdline too. | ||
282 | |||
283 | A directory /etc/mylib/ is created and a file "mylib.conf" is there. The content | ||
284 | of that file shall be what we put in mylib.conf in | ||
285 | common/recipes-bsp/rmc/boards/nucgen6 | ||
286 | |||
287 | POSTINSTALL.sh shows how we get rid of an error message caused by no serial | ||
288 | console available on NUC Gen 6, without creating another static board | ||
289 | configuration. | ||
290 | |||
291 | EXAMPLE 4: For validation only | ||
292 | T100 (32bit): | ||
293 | common/recipes-bsp/rmc/boards/T100-32bit | ||
294 | This example is provided for validation on 32 bit X86 architecture. It doesn't | ||
295 | provide any new function not mentioned in above examples. | ||
296 | |||
297 | EXAMPLE 5: RMC for quark | ||
298 | Galileo Gen 2 | ||
299 | common/recipes-bsp/rmc/boards/Galileo2 | ||
300 | This example doesn't show any feature not covered in the above examples. Note | ||
301 | RMC only supports hddimg image format so far. Please refer to the section II.c | ||
302 | in README in meta-intel for how to boot Galileo with images in hddimg format. | ||
303 | Bootloader should show a board-specific boot option "Galileo Gen 2 boot" when | ||
304 | the board boots off. | ||
305 | |||
306 | Troubleshooting | ||
307 | -------------------------------------------------------------------------------- | ||
308 | Issue: Cannot obtain RMC fingerprint for a board | ||
309 | |||
310 | RMC tool requires UEFI BIOS and SMBIOS support in firmware. It doesn't support | ||
311 | other type of firmware, e.g. legacy BIOS. It also requires EFI driver enabled | ||
312 | in Linux kernel. | ||
313 | |||
314 | Issue: Configuration for a board seems not effective at runtime. | ||
315 | |||
316 | Check if board is booted from the storage where the image or installation lives | ||
317 | when you have multiple boot options in BIOS. On some old hardwares it is not | ||
318 | that obvious as you assume. A build image can support boot from both of legacy | ||
319 | and UEFI mode, but RMC only works with UEFI boot so far. | ||
320 | |||
321 | Make sure configuration files (BOOTENTRY.CONFIG, INSTALLER.CONFIG and, | ||
322 | KBOOTPARAM ...) are properly named in the board directory. | ||
323 | |||
324 | Make sure configuration files have correct contents. | ||
325 | |||
326 | Some file attributes could not be supported by targeted file system. Installer | ||
327 | cannot setup file blobs as you wish. It simply move to the next step if a step | ||
328 | fails. | ||
329 | |||
330 | Kernel command line can be customized globally with KBOOTPARAM or just in a boot | ||
331 | entry for the type of board. They have different effective scopes. | ||
332 | |||
333 | If no any board-specific configuration becomes effective on your board but it | ||
334 | works on other boards of same product, you can run rmc tool to obtain | ||
335 | fingerprint file on your board and compare it with fingerprint of a working | ||
336 | board. It is possible they have different firmware versions and unluckily, some | ||
337 | information for fingerprint changes between two versions. You can update BIOS | ||
338 | on every board to the same BIOS version if it is feasible. Otherwise you have | ||
339 | to treat them as two different type of boards. We could extend rmc design to | ||
340 | allow multiple fingerprints in a board directory as a workaround. | ||
341 | |||
342 | Issue: RMC reports error because it cannot find fingerprint when building image. | ||
343 | |||
344 | Make sure you have a fingerprint file. Its name must be ended with '.fp'. You | ||
345 | can put a fingerprint file in a board directory and provide data later. | ||
346 | |||
347 | Issue: Any problems the above troubleshooting cannot help | ||
348 | |||
349 | Please report it to us. Extra information like the type of your board or a dump | ||
350 | file from dmidecode tool is helpful. We will investigate the problem and keep | ||
351 | improving this feature. | ||
352 | |||
353 | |||
354 | |||
355 | |||
356 | When you (don't) need RMC feature | ||
357 | -------------------------------------------------------------------------------- | ||
358 | RMC feature is designed to as generic as possible, in order to support a large | ||
359 | number of types of boards. And it shall be designed not to break things when it | ||
360 | is disabled. These considerations help users to decide if they really need or | ||
361 | enable it. | ||
362 | |||
363 | If you are satisfied with a dedicated build target and image for each board in | ||
364 | your development cycle (source, build, validation, release, etc), you don't need | ||
365 | this feature. | ||
366 | |||
367 | If you have a generic build for multiple type of boards and features supported | ||
368 | by that build meet your needs to functionality on all of boards, you don't need | ||
369 | to have this feature or you can disable it until you need to check in the first | ||
370 | board's data, in order to apply a quirk or customization only for that board. | ||
371 | |||
372 | If you want this feature but have concerns to see more and more boards' finger- | ||
373 | prints and data in a generic project, you can have another layer to hold all of | ||
374 | board-specific data to split them from a generic layer at source level. Another | ||
375 | suggestion is always seeking chances not to clone or copy a common configuration | ||
376 | to each board's directory. | ||
377 | |||
378 | |||
379 | |||
380 | Thanks | ||
381 | |||
382 | Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
diff --git a/lib/oeqa/selftest/cases/secureboot.py b/lib/oeqa/selftest/cases/secureboot.py deleted file mode 100644 index 4c059e2..0000000 --- a/lib/oeqa/selftest/cases/secureboot.py +++ /dev/null | |||
@@ -1,176 +0,0 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | # | ||
5 | # Copyright (c) 2017, Intel Corporation. | ||
6 | # All rights reserved. | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License version 2 as | ||
10 | # published by the Free Software Foundation. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License along | ||
18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | # | ||
21 | # AUTHORS | ||
22 | # Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
23 | # | ||
24 | # Based on meta/lib/oeqa/selftest/* and meta-refkit/lib/oeqa/selftest/* | ||
25 | |||
26 | """Test cases for secure boot with QEMU running OVMF.""" | ||
27 | |||
28 | import os | ||
29 | import unittest | ||
30 | import re | ||
31 | import glob | ||
32 | from shutil import rmtree, copy | ||
33 | |||
34 | from oeqa.core.decorator.depends import OETestDepends | ||
35 | from oeqa.selftest.case import OESelftestTestCase | ||
36 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu | ||
37 | |||
38 | class SecureBootTests(OESelftestTestCase): | ||
39 | """Secure Boot test class.""" | ||
40 | |||
41 | ovmf_keys_enrolled = False | ||
42 | ovmf_qemuparams = '' | ||
43 | ovmf_dir = '' | ||
44 | test_image_unsigned = 'secureboot-selftest-image-unsigned' | ||
45 | test_image_signed = 'secureboot-selftest-image-signed' | ||
46 | correct_key = 'refkit-db' | ||
47 | incorrect_key = 'incorrect' | ||
48 | |||
49 | @classmethod | ||
50 | def setUpLocal(self): | ||
51 | |||
52 | if not SecureBootTests.ovmf_keys_enrolled: | ||
53 | bitbake('ovmf ovmf-shell-image-enrollkeys', output_log=self.logger) | ||
54 | |||
55 | bb_vars = get_bb_vars(['TMPDIR', 'DEPLOY_DIR_IMAGE']) | ||
56 | |||
57 | SecureBootTests.ovmf_dir = os.path.join(bb_vars['TMPDIR'], 'oeselftest', 'secureboot', 'ovmf') | ||
58 | bb.utils.mkdirhier(SecureBootTests.ovmf_dir) | ||
59 | |||
60 | # Copy (all) OVMF in a temporary location | ||
61 | for src in glob.glob('%s/ovmf.*' % bb_vars['DEPLOY_DIR_IMAGE']): | ||
62 | copy(src, SecureBootTests.ovmf_dir) | ||
63 | |||
64 | SecureBootTests.ovmf_qemuparams = '-drive if=pflash,format=qcow2,file=%s/ovmf.secboot.qcow2' % SecureBootTests.ovmf_dir | ||
65 | |||
66 | cmd = ("runqemu " | ||
67 | "qemuparams='%s' " | ||
68 | "ovmf-shell-image-enrollkeys wic intel-corei7-64 " | ||
69 | "nographic slirp") % SecureBootTests.ovmf_qemuparams | ||
70 | print('Running "%s"' % cmd) | ||
71 | status = runCmd(cmd) | ||
72 | |||
73 | if not re.search('info: success', status.output, re.M): | ||
74 | self.fail('Failed to enroll keys. EFI shell log:\n%s' % status.output) | ||
75 | else: | ||
76 | # keys enrolled in ovmf.secboot.vars | ||
77 | SecureBootTests.ovmf_keys_enrolled = True | ||
78 | |||
79 | @classmethod | ||
80 | def tearDownLocal(self): | ||
81 | # Seems this is mandatory between the tests (a signed image is booted | ||
82 | # when running test_boot_unsigned_image after test_boot_signed_image). | ||
83 | # bitbake('-c clean %s' % test_image, output_log=self.logger) | ||
84 | # | ||
85 | # Whatever the problem was, it no longer seems to be necessary, so | ||
86 | # we can skip the time-consuming clean + full rebuild (5:04 min instead | ||
87 | # of 6:55min here). | ||
88 | pass | ||
89 | |||
90 | @classmethod | ||
91 | def tearDownClass(self): | ||
92 | bitbake('ovmf-shell-image-enrollkeys:do_cleanall', output_log=self.logger) | ||
93 | rmtree(self.ovmf_dir, ignore_errors=True) | ||
94 | |||
95 | def secureboot_with_image(self, boot_timeout=300, signing_key=None): | ||
96 | """Boot the image with UEFI SecureBoot enabled and see the result. """ | ||
97 | |||
98 | config = "" | ||
99 | |||
100 | if signing_key: | ||
101 | test_image = self.test_image_signed | ||
102 | config += 'SECURE_BOOT_SIGNING_KEY = "${THISDIR}/files/%s.key"\n' % signing_key | ||
103 | config += 'SECURE_BOOT_SIGNING_CERT = "${THISDIR}/files/%s.crt"\n' % signing_key | ||
104 | else: | ||
105 | test_image = self.test_image_unsigned | ||
106 | |||
107 | self.write_config(config) | ||
108 | bitbake(test_image, output_log=self.logger) | ||
109 | self.remove_config(config) | ||
110 | |||
111 | # Some of the cases depend on the timeout to expire. Allow overrides | ||
112 | # so that we don't have to wait 1000s which is the default. | ||
113 | overrides = { | ||
114 | 'TEST_QEMUBOOT_TIMEOUT': boot_timeout, | ||
115 | } | ||
116 | |||
117 | print('Booting %s' % test_image) | ||
118 | |||
119 | try: | ||
120 | with runqemu(test_image, ssh=False, | ||
121 | runqemuparams='nographic slirp', | ||
122 | qemuparams=self.ovmf_qemuparams, | ||
123 | overrides=overrides, | ||
124 | image_fstype='wic') as qemu: | ||
125 | |||
126 | cmd = 'uname -a' | ||
127 | |||
128 | status, output = qemu.run_serial(cmd) | ||
129 | |||
130 | self.assertTrue(status, 'Could not run \'uname -a\' (status=%s):\n%s' % (status, output)) | ||
131 | |||
132 | # if we got this far without a correctly signed image, something went wrong | ||
133 | if signing_key != self.correct_key: | ||
134 | self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) | ||
135 | |||
136 | |||
137 | except Exception: | ||
138 | |||
139 | # Currently runqemu() fails if 'login:' prompt is not seen and it's | ||
140 | # not possible to login as 'root'. Those conditions aren't met when | ||
141 | # booting to EFI shell (See [YOCTO #11438]). We catch the failure | ||
142 | # and parse the boot log to determine the success. Note: the | ||
143 | # timeout triggers verbose bb.error() but that's normal with some | ||
144 | # of the test cases. | ||
145 | |||
146 | workdir = get_bb_var('WORKDIR', test_image) | ||
147 | bootlog = "%s/testimage/qemu_boot_log" % workdir | ||
148 | |||
149 | with open(bootlog, "r") as log: | ||
150 | |||
151 | # This isn't right but all we can do at this point. The right | ||
152 | # approach would run commands in the EFI shell to determine | ||
153 | # the BIOS rejects unsigned and/or images signed with keys in | ||
154 | # dbx key store but that needs changes in oeqa framework. | ||
155 | |||
156 | output = log.read() | ||
157 | |||
158 | # PASS if we see a security violation on unsigned or incorrectly signed images, otherwise fail | ||
159 | if signing_key == self.correct_key: | ||
160 | self.fail('Correctly signed image failed to boot. Boot log:\n%s' % output) | ||
161 | elif not re.search('Security Violation', output): | ||
162 | self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) | ||
163 | |||
164 | def test_boot_unsigned_image(self): | ||
165 | """ Boot unsigned image with secureboot enabled in UEFI.""" | ||
166 | self.secureboot_with_image(boot_timeout=120, signing_key=None) | ||
167 | |||
168 | @OETestDepends(['secureboot.SecureBootTests.test_boot_unsigned_image']) | ||
169 | def test_boot_incorrectly_signed_image(self): | ||
170 | """ Boot (correctly) signed image with secureboot enabled in UEFI.""" | ||
171 | self.secureboot_with_image(boot_timeout=120, signing_key=self.incorrect_key) | ||
172 | |||
173 | @OETestDepends(['secureboot.SecureBootTests.test_boot_incorrectly_signed_image']) | ||
174 | def test_boot_correctly_signed_image(self): | ||
175 | """ Boot (correctly) signed image with secureboot enabled in UEFI.""" | ||
176 | self.secureboot_with_image(boot_timeout=150, signing_key=self.correct_key) | ||
diff --git a/meta-dpdk/COPYING.MIT b/meta-dpdk/COPYING.MIT deleted file mode 100644 index fb950dc..0000000 --- a/meta-dpdk/COPYING.MIT +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
2 | of this software and associated documentation files (the "Software"), to deal | ||
3 | in the Software without restriction, including without limitation the rights | ||
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
5 | copies of the Software, and to permit persons to whom the Software is | ||
6 | furnished to do so, subject to the following conditions: | ||
7 | |||
8 | The above copyright notice and this permission notice shall be included in | ||
9 | all copies or substantial portions of the Software. | ||
10 | |||
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
17 | THE SOFTWARE. | ||
diff --git a/meta-dpdk/LICENSE b/meta-dpdk/LICENSE deleted file mode 100644 index e57d3b9..0000000 --- a/meta-dpdk/LICENSE +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | All metadata files (including, but not limited to bb, bbappend, | ||
2 | bbclass, inc and conf files) are MIT licensed unless otherwise stated. | ||
3 | Source code included in tree for individual recipes is under the | ||
4 | LICENSE stated in the associated recipe (.bb file) unless otherwise | ||
5 | stated. | ||
diff --git a/meta-dpdk/README b/meta-dpdk/README deleted file mode 100644 index 6563ff9..0000000 --- a/meta-dpdk/README +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | meta-dpdk | ||
2 | ========= | ||
3 | |||
4 | This README file contains information on building and booting | ||
5 | meta-intel BSP layers. Please see the corresponding sections below | ||
6 | for details. | ||
7 | |||
8 | |||
9 | Yocto Project Compatible | ||
10 | ======================== | ||
11 | |||
12 | The BSPs contained in this layer are compatible with the Yocto Project | ||
13 | as per the requirements listed here: | ||
14 | |||
15 | https://www.yoctoproject.org/webform/yocto-project-compatible-registration | ||
16 | |||
17 | |||
18 | Dependencies | ||
19 | ============ | ||
20 | |||
21 | This layer depends on: | ||
22 | |||
23 | URI: git://git.openembedded.org/bitbake | ||
24 | branch: 1.34 | ||
25 | |||
26 | URI: git://git.openembedded.org/openembedded-core | ||
27 | layers: meta | ||
28 | branch: rocko | ||
29 | |||
30 | |||
31 | Guidelines for submitting patches | ||
32 | ==================================== | ||
33 | |||
34 | Please submit any patches against meta-dpdk to the meta-intel | ||
35 | mailing list (meta-intel@yoctoproject.org). Also, if your patches are | ||
36 | available via a public git repository, please also include a URL to | ||
37 | the repo and branch containing your patches as that makes it easier | ||
38 | for maintainers to grab and test your patches. | ||
39 | |||
40 | There are patch submission scripts available that will, among other | ||
41 | things, automatically include the repo URL and branch as mentioned. | ||
42 | Please see the Yocto Project Development Manual sections entitled | ||
43 | 'Using Scripts to Push a Change Upstream and Request a Pull' and | ||
44 | 'Using Email to Submit a Patch' for details. | ||
45 | |||
46 | Regardless of how you submit a patch or patchset, the patches should | ||
47 | at minimum follow the suggestions outlined in the 'Submitting a Change | ||
48 | to the Yocto Project' section in the Yocto Project Development Manual. | ||
49 | Specifically, they should: | ||
50 | |||
51 | - Include a 'Signed-off-by:' line. A commit can't legally be pulled | ||
52 | in without this. | ||
53 | |||
54 | - Provide a single-line, short summary of the change. This short | ||
55 | description should be prefixed by the BSP or recipe name, as | ||
56 | appropriate, followed by a colon. Capitalize the first character | ||
57 | of the summary (following the colon). | ||
58 | |||
59 | - For the body of the commit message, provide detailed information | ||
60 | that describes what you changed, why you made the change, and the | ||
61 | approach you used. | ||
62 | |||
63 | - If the change addresses a specific bug or issue that is associated | ||
64 | with a bug-tracking ID, include a reference to that ID in your | ||
65 | detailed description in the following format: [YOCTO #<bug-id>]. | ||
66 | |||
67 | - Pay attention to line length - please don't allow any particular | ||
68 | line in the commit message to stretch past 72 characters. | ||
69 | |||
70 | - For any non-trivial patch, provide information about how you | ||
71 | tested the patch, and for any non-trivial or non-obvious testing | ||
72 | setup, provide details of that setup. | ||
73 | |||
74 | Doing a quick 'git log' in meta-intel will provide you with many | ||
75 | examples of good example commits if you have questions about any | ||
76 | aspect of the preferred format. | ||
77 | |||
78 | The meta-intel maintainers will do their best to review and/or pull in | ||
79 | a patch or patchset within 24 hours of the time it was posted. For | ||
80 | larger and/or more involved patches and patchsets, the review process | ||
81 | may take longer. | ||
82 | |||
83 | Please see the meta-intel/MAINTAINERS file for the list of maintainers | ||
84 | and their specific areas; it's also a good idea to cc: the specific | ||
85 | maintainer, if applicable. | ||
diff --git a/meta-dpdk/conf/include/maintainers.inc b/meta-dpdk/conf/include/maintainers.inc deleted file mode 100644 index b1499f6..0000000 --- a/meta-dpdk/conf/include/maintainers.inc +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | # This file contains a list of recipe maintainers for meta-intel | ||
2 | |||
3 | RECIPE_MAINTAINER_pn-dpdk = "TBD DPDK Flex Team" | ||
4 | RECIPE_MAINTAINER_pn-dpdk-dev-libibverbs = "TBD DPDK Flex Team" | ||
diff --git a/meta-dpdk/conf/layer.conf b/meta-dpdk/conf/layer.conf deleted file mode 100644 index 61331ed..0000000 --- a/meta-dpdk/conf/layer.conf +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # We have recipes-* directories, add to BBFILES | ||
5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
7 | |||
8 | BBFILE_COLLECTIONS += "dpdk" | ||
9 | BBFILE_PATTERN_dpdk := "^${LAYERDIR}/" | ||
10 | BBFILE_PRIORITY_dpdk = "5" | ||
11 | |||
12 | LAYERDEPENDS_dpdk = "core" | ||
13 | |||
14 | # This should only be incremented on significant changes that will | ||
15 | # cause compatibility issues with other layers | ||
16 | LAYERVERSION_dpdk = "1" | ||
17 | LAYERSERIES_COMPAT_dpdk = "rocko" | ||
18 | |||
19 | require ${LAYERDIR}/conf/include/maintainers.inc | ||
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb deleted file mode 100644 index e40c63b..0000000 --- a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | DESCRIPTION = "libibverbs library to support Mellanox config" | ||
2 | HOMEPAGE = "https://github.com/Mellanox/dpdk-dev-libibverbs" | ||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=7c557f27dd795ba77cc419dddc656b51" | ||
5 | |||
6 | SRC_URI = "https://github.com/Mellanox/dpdk-dev-libibverbs/archive/libibverbs-${PV}.tar.gz;name=${PN} \ | ||
7 | file://init_c.patch \ | ||
8 | file://0001-Fix-build-with-clang.patch \ | ||
9 | file://0002-typecast-enum-to-int-before-comparison.patch \ | ||
10 | file://0003-initialize-use_config_mr.patch \ | ||
11 | file://0004-Fix-clang-warnings.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[dpdk-dev-libibverbs.md5sum] = "65234ee278eb437a7069326f37cd4d86" | ||
15 | SRC_URI[dpdk-dev-libibverbs.sha256sum] = "a6471515556cb8d10ad471bb7efb8cf760b248a28aceb57d4534d50d572f56cd" | ||
16 | |||
17 | # A machine needs to enable this using: | ||
18 | # COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "<machine name>" | ||
19 | |||
20 | COMPATIBLE_MACHINE = "null" | ||
21 | COMPATIBLE_HOST_libc-musl_class-target = "null" | ||
22 | |||
23 | S = "${WORKDIR}/${PN}-libibverbs-${PV}" | ||
24 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
25 | DEPENDS = "libnl" | ||
26 | |||
27 | inherit pkgconfig autotools | ||
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch deleted file mode 100644 index 93d8aba..0000000 --- a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From b705caef6c717adc80585843b7fcc68700ced4b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Aug 2017 09:25:24 -0700 | ||
4 | Subject: [PATCH 1/4] Fix build with clang | ||
5 | |||
6 | Fix | ||
7 | error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] | ||
8 | if ((!port_attr->comp_mask & IBV_EXP_QUERY_PORT_ATTR_MASK1) || | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | Upstream-Status: Pending | ||
13 | |||
14 | include/infiniband/verbs_exp.h | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/include/infiniband/verbs_exp.h b/include/infiniband/verbs_exp.h | ||
18 | index ae94deb..42ed83d 100644 | ||
19 | --- a/include/infiniband/verbs_exp.h | ||
20 | +++ b/include/infiniband/verbs_exp.h | ||
21 | @@ -2955,7 +2955,7 @@ static inline int ibv_exp_query_port(struct ibv_context *context, | ||
22 | &port_attr->port_attr); | ||
23 | |||
24 | /* Check that only valid flags were given */ | ||
25 | - if ((!port_attr->comp_mask & IBV_EXP_QUERY_PORT_ATTR_MASK1) || | ||
26 | + if (!(port_attr->comp_mask & IBV_EXP_QUERY_PORT_ATTR_MASK1) || | ||
27 | (port_attr->comp_mask & ~IBV_EXP_QUERY_PORT_ATTR_MASKS) || | ||
28 | (port_attr->mask1 & ~IBV_EXP_QUERY_PORT_MASK)) { | ||
29 | errno = EINVAL; | ||
30 | -- | ||
31 | 2.14.1 | ||
32 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch deleted file mode 100644 index 00516eb..0000000 --- a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | From 7edab012f2d28de7e6d3657ec698e1090d0112de Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Aug 2017 09:25:49 -0700 | ||
4 | Subject: [PATCH 2/4] typecast enum to int before comparison | ||
5 | |||
6 | Fix | ||
7 | error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Pending | ||
12 | |||
13 | examples/cc_pingpong.c | 2 +- | ||
14 | examples/rc_pingpong.c | 2 +- | ||
15 | examples/srq_pingpong.c | 2 +- | ||
16 | examples/task_pingpong.c | 2 +- | ||
17 | examples/uc_pingpong.c | 2 +- | ||
18 | examples/umr_rc.c | 2 +- | ||
19 | examples/xsrq_pingpong.c | 2 +- | ||
20 | 7 files changed, 7 insertions(+), 7 deletions(-) | ||
21 | |||
22 | diff --git a/examples/cc_pingpong.c b/examples/cc_pingpong.c | ||
23 | index 7b3e397..567c503 100644 | ||
24 | --- a/examples/cc_pingpong.c | ||
25 | +++ b/examples/cc_pingpong.c | ||
26 | @@ -1408,7 +1408,7 @@ int main(int argc, char *argv[]) | ||
27 | |||
28 | case 'm': | ||
29 | mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); | ||
30 | - if (mtu < 0) { | ||
31 | + if ((int)mtu < 0) { | ||
32 | usage(argv[0]); | ||
33 | return 1; | ||
34 | } | ||
35 | diff --git a/examples/rc_pingpong.c b/examples/rc_pingpong.c | ||
36 | index 786577e..e661368 100644 | ||
37 | --- a/examples/rc_pingpong.c | ||
38 | +++ b/examples/rc_pingpong.c | ||
39 | @@ -759,7 +759,7 @@ int main(int argc, char *argv[]) | ||
40 | |||
41 | case 'm': | ||
42 | mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); | ||
43 | - if (mtu < 0) { | ||
44 | + if ((int)mtu < 0) { | ||
45 | usage(argv[0]); | ||
46 | return 1; | ||
47 | } | ||
48 | diff --git a/examples/srq_pingpong.c b/examples/srq_pingpong.c | ||
49 | index 9762866..f85a7cd 100644 | ||
50 | --- a/examples/srq_pingpong.c | ||
51 | +++ b/examples/srq_pingpong.c | ||
52 | @@ -697,7 +697,7 @@ int main(int argc, char *argv[]) | ||
53 | |||
54 | case 'm': | ||
55 | mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); | ||
56 | - if (mtu < 0) { | ||
57 | + if ((int)mtu < 0) { | ||
58 | usage(argv[0]); | ||
59 | return 1; | ||
60 | } | ||
61 | diff --git a/examples/task_pingpong.c b/examples/task_pingpong.c | ||
62 | index 748f8bb..d03a8b2 100644 | ||
63 | --- a/examples/task_pingpong.c | ||
64 | +++ b/examples/task_pingpong.c | ||
65 | @@ -1005,7 +1005,7 @@ int main(int argc, char *argv[]) | ||
66 | |||
67 | case 'm': | ||
68 | mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); | ||
69 | - if (mtu < 0) { | ||
70 | + if ((int)mtu < 0) { | ||
71 | usage(argv[0]); | ||
72 | return 1; | ||
73 | } | ||
74 | diff --git a/examples/uc_pingpong.c b/examples/uc_pingpong.c | ||
75 | index 879bd77..a38a054 100644 | ||
76 | --- a/examples/uc_pingpong.c | ||
77 | +++ b/examples/uc_pingpong.c | ||
78 | @@ -606,7 +606,7 @@ int main(int argc, char *argv[]) | ||
79 | |||
80 | case 'm': | ||
81 | mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); | ||
82 | - if (mtu < 0) { | ||
83 | + if ((int)mtu < 0) { | ||
84 | usage(argv[0]); | ||
85 | return 1; | ||
86 | } | ||
87 | diff --git a/examples/umr_rc.c b/examples/umr_rc.c | ||
88 | index ab76d3c..0ec636a 100644 | ||
89 | --- a/examples/umr_rc.c | ||
90 | +++ b/examples/umr_rc.c | ||
91 | @@ -950,7 +950,7 @@ int main(int argc, char *argv[]) | ||
92 | |||
93 | case 'm': | ||
94 | mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); | ||
95 | - if (mtu < 0) { | ||
96 | + if ((int)mtu < 0) { | ||
97 | usage(argv[0]); | ||
98 | return 1; | ||
99 | } | ||
100 | diff --git a/examples/xsrq_pingpong.c b/examples/xsrq_pingpong.c | ||
101 | index c4ae51d..cebae5d 100644 | ||
102 | --- a/examples/xsrq_pingpong.c | ||
103 | +++ b/examples/xsrq_pingpong.c | ||
104 | @@ -910,7 +910,7 @@ int main(int argc, char *argv[]) | ||
105 | break; | ||
106 | case 'm': | ||
107 | ctx.mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); | ||
108 | - if (ctx.mtu < 0) { | ||
109 | + if ((int)ctx.mtu < 0) { | ||
110 | usage(argv[0]); | ||
111 | return 1; | ||
112 | } | ||
113 | -- | ||
114 | 2.14.1 | ||
115 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch deleted file mode 100644 index da4ef15..0000000 --- a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 936da7fcab06ff3bc7c1c1e1ab108a36797da039 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Aug 2017 09:28:00 -0700 | ||
4 | Subject: [PATCH 3/4] initialize use_config_mr | ||
5 | |||
6 | Fixes | ||
7 | error: variable 'use_contig_mr' is uninitialized when used here [-Werror,-Wuninitialized] | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Pending | ||
12 | |||
13 | examples/dcini.c | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/examples/dcini.c b/examples/dcini.c | ||
17 | index 001e905..08d75ec 100644 | ||
18 | --- a/examples/dcini.c | ||
19 | +++ b/examples/dcini.c | ||
20 | @@ -269,7 +269,7 @@ int main(int argc, char *argv[]) | ||
21 | int size = 4096; | ||
22 | int iters = 1000; | ||
23 | int use_event = 0; | ||
24 | - int use_contig_mr; | ||
25 | + int use_contig_mr = 0; | ||
26 | int err; | ||
27 | struct ibv_ah_attr ah_attr; | ||
28 | struct dc_ctx ctx = { | ||
29 | -- | ||
30 | 2.14.1 | ||
31 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch deleted file mode 100644 index 26f09e5..0000000 --- a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From 08944074f9d9525a57e88a4990dd833d0999b8df Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Aug 2017 09:36:55 -0700 | ||
4 | Subject: [PATCH 4/4] Fix clang warnings | ||
5 | |||
6 | ../../../../../../../workspace/sources/dpdk-dev-libibverbs/examples/intf.c:1221:11: error: comparison of array 'ctx->dev_name' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare] | ||
7 | if (ctx->dev_name != NULL) { | ||
8 | ~~~~~^~~~~~~~ ~~~~ | ||
9 | ../../../../../../../workspace/sources/dpdk-dev-libibverbs/examples/intf.c:1893:13: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] | ||
10 | if (size < 0 || size > MAX_MSG_SIZE) | ||
11 | ~~~~ ^ ~ | ||
12 | ../../../../../../../workspace/sources/dpdk-dev-libibverbs/examples/intf.c:1901:12: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] | ||
13 | if (mtu < 0) | ||
14 | ~~~ ^ ~ | ||
15 | |||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | Upstream-Status: Pending | ||
19 | |||
20 | examples/intf.c | 6 +++--- | ||
21 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/examples/intf.c b/examples/intf.c | ||
24 | index 8d158ee..1f1af50 100644 | ||
25 | --- a/examples/intf.c | ||
26 | +++ b/examples/intf.c | ||
27 | @@ -1218,7 +1218,7 @@ int create_resources(struct intf_context *ctx) | ||
28 | return 1; | ||
29 | } | ||
30 | |||
31 | - if (!ctx->dev_name) { | ||
32 | + if (!ctx->dev_name[0]) { | ||
33 | ctx->ib_dev = *dev_list; | ||
34 | if (!ctx->ib_dev) { | ||
35 | fprintf(stderr, "No IB devices found\n"); | ||
36 | @@ -1828,7 +1828,7 @@ int parse_input(struct intf_input *input, struct intf_input *default_input, int | ||
37 | char *ib_devname = NULL; | ||
38 | char *vrbs_intf = NULL; | ||
39 | char *cpus_str = NULL; | ||
40 | - unsigned long long size; | ||
41 | + long long size; | ||
42 | |||
43 | memcpy(input, default_input, sizeof(*input)); | ||
44 | |||
45 | @@ -1898,7 +1898,7 @@ int parse_input(struct intf_input *input, struct intf_input *default_input, int | ||
46 | |||
47 | case 'm': | ||
48 | mtu = mtu_to_enum(strtol(optarg, NULL, 0)); | ||
49 | - if (mtu < 0) | ||
50 | + if ((int)mtu < 0) | ||
51 | goto print_usage; | ||
52 | input->ib_data.mtu = mtu; | ||
53 | break; | ||
54 | -- | ||
55 | 2.14.1 | ||
56 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch deleted file mode 100644 index a7708d7..0000000 --- a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | dpdk-dev-libibverbs: suppress gcc7 warnings | ||
2 | |||
3 | We know that format-truncation in init.c is okay. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
8 | |||
9 | |||
10 | --- a/src/init.c | ||
11 | +++ b/src/init.c | ||
12 | @@ -31,6 +31,11 @@ | ||
13 | * SOFTWARE. | ||
14 | */ | ||
15 | |||
16 | +/* For this file we know we can ignore this warning. */ | ||
17 | +#if __GNUC__ > 6 | ||
18 | +#pragma GCC diagnostic ignored "-Wformat-truncation" | ||
19 | +#endif | ||
20 | + | ||
21 | #if HAVE_CONFIG_H | ||
22 | # include <config.h> | ||
23 | #endif /* HAVE_CONFIG_H */ | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk.inc b/meta-dpdk/recipes-extended/dpdk/dpdk.inc deleted file mode 100644 index c1d0149..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk.inc +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | DESCRIPTION = "Intel(r) Data Plane Development Kit" | ||
2 | HOMEPAGE = "http://dpdk.org" | ||
3 | LICENSE = "BSD & LGPLv2 & GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe" | ||
5 | |||
6 | SRC_URI = "http://fast.dpdk.org/rel/${BP}.tar.gz;name=dpdk \ | ||
7 | file://dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ | ||
8 | file://dpdk-16.07-add-sysroot-option-within-app-makefile.patch \ | ||
9 | file://dpdk-16.04-Fix-for-misleading-indentation-error.patch \ | ||
10 | file://dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch \ | ||
11 | file://dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch \ | ||
12 | file://dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch \ | ||
13 | " | ||
14 | |||
15 | # A machine needs to enable this using: | ||
16 | # COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "<machine name>" | ||
17 | |||
18 | COMPATIBLE_MACHINE = "null" | ||
19 | COMPATIBLE_HOST_libc-musl_class-target = "null" | ||
20 | |||
21 | |||
22 | # dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat. | ||
23 | # fuse is in meta-filesystems and qat is not yet upstreamed. | ||
24 | # So adding mechanism to explicitly disable the use of fuse and qat. | ||
25 | # To enable, uncomment the below line or include in .bbappend. | ||
26 | # PACKAGECONFIG ?= " dpdk_qat vhost libvirt" | ||
27 | |||
28 | PACKAGECONFIG[dpdk_qat] = ",,virtual/qat" | ||
29 | PACKAGECONFIG[vhost] = ",,fuse" | ||
30 | PACKAGECONFIG[libvirt] = ",,libvirt" | ||
31 | |||
32 | export CONFIG_EXAMPLE_DPDK_QAT = "${@bb.utils.contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}" | ||
33 | export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@bb.utils.contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}" | ||
34 | export CONFIG_VHOST_ENABLED = "${@bb.utils.contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}" | ||
35 | |||
36 | RDEPENDS_${PN} += "python-subprocess dpdk-dev-libibverbs" | ||
37 | DEPENDS = "virtual/kernel dpdk-dev-libibverbs" | ||
38 | do_configure[depends] += "virtual/kernel:do_shared_workdir" | ||
39 | |||
40 | inherit module | ||
41 | |||
42 | export MODULE_DIR="/lib/modules/${KERNEL_VERSION}/kernel/drivers/net" | ||
43 | export RTE_SDK = "${S}" | ||
44 | export RTE_TARGET="${@bb.utils.contains("TUNE_FEATURES", "m64", "x86_64-native-linuxapp-gcc", "i686-native-linuxapp-gcc", d)}" | ||
45 | |||
46 | export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include" | ||
47 | export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib" | ||
48 | export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}" | ||
49 | export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}" | ||
50 | export INSTALL_PATH = "${prefix}/share" | ||
51 | export RTE_OUTPUT = "${S}/${RTE_TARGET}" | ||
52 | export ETHTOOL_LIB_PATH = "${S}/examples/ethtool/lib/${RTE_TARGET}/" | ||
53 | export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}" | ||
54 | export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}" | ||
55 | export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac" | ||
56 | |||
57 | # The list of intel Comms platforms and their target machine | ||
58 | # process mapping. The supported target machine is listed under | ||
59 | # dpdk/mk/machine | ||
60 | def get_dpdk_target_mach(bb, d): | ||
61 | target_arch = d.getVar('DPDK_TARGET_MACHINE', True) | ||
62 | if target_arch: | ||
63 | target_arch | ||
64 | return "default" | ||
65 | |||
66 | do_configure () { | ||
67 | ############################################################# | ||
68 | ### default value for prefix is "usr", unsetting it, so it | ||
69 | ### will not be concatenated in ${RTE_TARGET}/Makefile | ||
70 | ### which will cause compilation failure | ||
71 | ############################################################# | ||
72 | unset prefix | ||
73 | |||
74 | # Fix-up CONFIG_RTE_MACHINE based on target machine | ||
75 | sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_x86_64-native-linuxapp-gcc | ||
76 | sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_i686-native-linuxapp-gcc | ||
77 | |||
78 | # Fix-up vhost configs based on package config | ||
79 | sed -e "s#CONFIG_RTE_KNI_VHOST=n#CONFIG_RTE_KNI_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp | ||
80 | sed -e "s#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=n#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp | ||
81 | sed -e "s#CONFIG_RTE_LIBRTE_VHOST=n#CONFIG_RTE_LIBRTE_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp | ||
82 | |||
83 | make O=$RTE_TARGET T=$RTE_TARGET config | ||
84 | } | ||
85 | |||
86 | do_compile () { | ||
87 | unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS | ||
88 | |||
89 | cd ${S}/${RTE_TARGET} | ||
90 | oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \ | ||
91 | EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \ | ||
92 | CROSS="${TARGET_PREFIX}" \ | ||
93 | prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1 | ||
94 | |||
95 | cd ${S}/examples/ | ||
96 | oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ | ||
97 | EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \ | ||
98 | CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/" | ||
99 | } | ||
100 | |||
101 | do_install () { | ||
102 | oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D} | ||
103 | oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR} | ||
104 | oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D} | ||
105 | |||
106 | # Install examples | ||
107 | for dirname in ${S}/examples/* | ||
108 | do | ||
109 | install -m 0755 -d ${D}/${INSTALL_PATH}/examples/`basename ${dirname}` | ||
110 | |||
111 | for appname in `find ${dirname} -regex ".*${EXAMPLES_BUILD_DIR}\/app\/[-0-9a-zA-Z0-9/_]*$"` | ||
112 | do | ||
113 | install -m 755 ${appname} ${D}/${INSTALL_PATH}/examples/`basename ${dirname}`/ | ||
114 | done | ||
115 | done | ||
116 | } | ||
117 | |||
118 | PACKAGES += "${PN}-examples" | ||
119 | |||
120 | FILES_${PN}-dbg += " \ | ||
121 | ${INSTALL_PATH}/.debug \ | ||
122 | ${INSTALL_PATH}/examples/*/.debug \ | ||
123 | " | ||
124 | |||
125 | FILES_${PN}-doc += "\ | ||
126 | ${INSTALL_PATH}/doc \ | ||
127 | " | ||
128 | |||
129 | FILES_${PN}-dev += " \ | ||
130 | ${INSTALL_PATH}/${RTE_TARGET}/.config \ | ||
131 | ${includedir} \ | ||
132 | ${includedir}/${ARCHDIR} \ | ||
133 | ${includedir}/exec-env \ | ||
134 | ${INSTALL_PATH}/buildtools/ \ | ||
135 | ${INSTALL_PATH}/${RTE_TARGET}/include \ | ||
136 | ${INSTALL_PATH}/${RTE_TARGET}/lib \ | ||
137 | " | ||
138 | |||
139 | FILES_${PN} += " ${INSTALL_PATH}/usertools/ \ | ||
140 | ${prefix}/sbin/ \ | ||
141 | ${prefix}/bin/ \ | ||
142 | ${libdir}/ \ | ||
143 | " | ||
144 | FILES_${PN}-examples += " \ | ||
145 | ${INSTALL_PATH}/examples/* \ | ||
146 | " | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch deleted file mode 100644 index cc8041e..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 3924f5df5aca5ba23abbe9a84173280ede8be2dd Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 1 Aug 2017 20:18:46 -0700 | ||
4 | Subject: [PATCH] examples: Fix maybe-uninitialized warning | ||
5 | |||
6 | Initialize arrays to 0, makes compiler happy about | ||
7 | |||
8 | error: 'vals[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | examples/qos_sched/args.c | 2 +- | ||
13 | examples/vhost/virtio_net.c | 2 +- | ||
14 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c | ||
17 | index 476a0ee..fd601c3 100644 | ||
18 | --- a/examples/qos_sched/args.c | ||
19 | +++ b/examples/qos_sched/args.c | ||
20 | @@ -241,7 +241,7 @@ static int | ||
21 | app_parse_flow_conf(const char *conf_str) | ||
22 | { | ||
23 | int ret; | ||
24 | - uint32_t vals[5]; | ||
25 | + uint32_t vals[5] = {0}; | ||
26 | struct flow_conf *pconf; | ||
27 | uint64_t mask; | ||
28 | |||
29 | diff --git a/examples/vhost/virtio_net.c b/examples/vhost/virtio_net.c | ||
30 | index cc2c3d8..16b5392 100644 | ||
31 | --- a/examples/vhost/virtio_net.c | ||
32 | +++ b/examples/vhost/virtio_net.c | ||
33 | @@ -327,7 +327,7 @@ vs_dequeue_pkts(struct vhost_dev *dev, uint16_t queue_id, | ||
34 | { | ||
35 | struct vhost_queue *queue; | ||
36 | struct rte_vhost_vring *vr; | ||
37 | - uint32_t desc_indexes[MAX_PKT_BURST]; | ||
38 | + uint32_t desc_indexes[MAX_PKT_BURST] = {0}; | ||
39 | uint32_t used_idx; | ||
40 | uint32_t i = 0; | ||
41 | uint16_t free_entries; | ||
42 | -- | ||
43 | 2.13.3 | ||
44 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-Fix-for-misleading-indentation-error.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-Fix-for-misleading-indentation-error.patch deleted file mode 100644 index 8786af7..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-Fix-for-misleading-indentation-error.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From 8cd0a16af531cca0af6b4f9b729c252b8bdbf8e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
3 | Date: Tue, 5 Jul 2016 00:05:25 +0800 | ||
4 | Subject: [PATCH] Fix for misleading indentation error | ||
5 | |||
6 | fix the indentation of the code to match the block structure. This may cause | ||
7 | build errors if you have -Wall -Werror in your project. | ||
8 | |||
9 | Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
10 | --- | ||
11 | lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c | 8 ++++---- | ||
12 | lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 2 +- | ||
13 | 2 files changed, 5 insertions(+), 5 deletions(-) | ||
14 | |||
15 | diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c | ||
16 | index df22470..ba28eba 100644 | ||
17 | --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c | ||
18 | +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c | ||
19 | @@ -3302,8 +3302,8 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 *data) | ||
20 | /* Disable access to mPHY if it was originally disabled */ | ||
21 | if (locked) | ||
22 | ready = e1000_is_mphy_ready(hw); | ||
23 | - if (!ready) | ||
24 | - return -E1000_ERR_PHY; | ||
25 | + if (!ready) | ||
26 | + return -E1000_ERR_PHY; | ||
27 | E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, | ||
28 | E1000_MPHY_DIS_ACCESS); | ||
29 | |||
30 | @@ -3367,8 +3367,8 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 data, | ||
31 | /* Disable access to mPHY if it was originally disabled */ | ||
32 | if (locked) | ||
33 | ready = e1000_is_mphy_ready(hw); | ||
34 | - if (!ready) | ||
35 | - return -E1000_ERR_PHY; | ||
36 | + if (!ready) | ||
37 | + return -E1000_ERR_PHY; | ||
38 | E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, | ||
39 | E1000_MPHY_DIS_ACCESS); | ||
40 | |||
41 | diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | ||
42 | index 017dfe1..7248a7e 100644 | ||
43 | --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | ||
44 | +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | ||
45 | @@ -870,7 +870,7 @@ s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw, | ||
46 | if (speed & IXGBE_LINK_SPEED_10GB_FULL) | ||
47 | if (orig_autoc & IXGBE_AUTOC_KX4_SUPP) | ||
48 | autoc |= IXGBE_AUTOC_KX4_SUPP; | ||
49 | - if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) && | ||
50 | + if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) && | ||
51 | (hw->phy.smart_speed_active == false)) | ||
52 | autoc |= IXGBE_AUTOC_KR_SUPP; | ||
53 | if (speed & IXGBE_LINK_SPEED_1GB_FULL) | ||
54 | -- | ||
55 | 1.9.1 | ||
56 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch deleted file mode 100644 index e446ce4..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 6c8d348190a8cf6c35111913cbf117ca98137e84 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
3 | Date: Fri, 18 Dec 2015 18:30:47 +0800 | ||
4 | Subject: [PATCH] dpdk v2.2.0: add RTE_KERNELDIR_OUT to split kernel build | ||
5 | artifact | ||
6 | |||
7 | Introduce RTE_KERNELDIR_OUT to be the path to which kernel build | ||
8 | artifacts are located. This is for matching the workflow change | ||
9 | since Yocto Project v1.8 onwards whereby tmp/work-shared contains | ||
10 | separate directories for kernel source and kernel artifacts. | ||
11 | |||
12 | Upstream-Status: Inappropriate [configuration] | ||
13 | |||
14 | Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
15 | --- | ||
16 | mk/rte.module.mk | 6 +++--- | ||
17 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/mk/rte.module.mk b/mk/rte.module.mk | ||
20 | index 53ed4fe..b7a014b 100644 | ||
21 | --- a/mk/rte.module.mk | ||
22 | +++ b/mk/rte.module.mk | ||
23 | @@ -77,7 +77,7 @@ build: _postbuild | ||
24 | # build module | ||
25 | $(MODULE).ko: $(SRCS_LINKS) | ||
26 | @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi | ||
27 | - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ | ||
28 | + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ | ||
29 | CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) | ||
30 | |||
31 | # install module in $(RTE_OUTPUT)/kmod | ||
32 | @@ -88,7 +88,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko | ||
33 | |||
34 | # install module | ||
35 | modules_install: | ||
36 | - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ | ||
37 | + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ | ||
38 | modules_install | ||
39 | |||
40 | .PHONY: clean | ||
41 | @@ -98,7 +98,7 @@ clean: _postclean | ||
42 | .PHONY: doclean | ||
43 | doclean: | ||
44 | @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi | ||
45 | - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean | ||
46 | + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean | ||
47 | @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ | ||
48 | if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) | ||
49 | @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi | ||
50 | -- | ||
51 | 1.9.1 | ||
52 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch deleted file mode 100644 index 3719aa7..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From f7be643cc62860a986c9e0aec990c90bfc58a941 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
3 | Date: Fri, 1 Apr 2016 17:31:55 +0800 | ||
4 | Subject: [PATCH] dpdk: enable ip_fragmentation in common_base config | ||
5 | |||
6 | Upstream-Status: Inappropriate [Configuration] | ||
7 | |||
8 | This configuration need to set for ip_fragmentation application. | ||
9 | |||
10 | Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
11 | --- | ||
12 | config/common_base | 5 +++++ | ||
13 | 1 file changed, 5 insertions(+) | ||
14 | |||
15 | diff --git a/config/common_base b/config/common_base | ||
16 | index abd6a64..90259f0 100644 | ||
17 | --- a/config/common_base | ||
18 | +++ b/config/common_base | ||
19 | @@ -442,6 +442,11 @@ CONFIG_RTE_LIBRTE_POWER_DEBUG=n | ||
20 | CONFIG_RTE_MAX_LCORE_FREQS=64 | ||
21 | |||
22 | # | ||
23 | +# Compile ip_fragmentation | ||
24 | +# | ||
25 | +CONFIG_RTE_IP_FRAG=y | ||
26 | + | ||
27 | +# | ||
28 | # Compile librte_net | ||
29 | # | ||
30 | CONFIG_RTE_LIBRTE_NET=y | ||
31 | -- | ||
32 | 1.9.1 | ||
33 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch deleted file mode 100644 index 4254d07..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 8ce0e3249942a90f733bb2113e70e5a90ae67b00 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
3 | Date: Thu, 21 Jul 2016 05:53:52 +0800 | ||
4 | Subject: [PATCH 1/2] dpdk: fix compilation with dynamic libs | ||
5 | |||
6 | Upstream-Status: Inappropriate [Configuration] | ||
7 | |||
8 | Ensure that the correct cflags are being used. | ||
9 | |||
10 | Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
11 | --- | ||
12 | mk/rte.lib.mk | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk | ||
16 | index 8f7e021..42610c9 100644 | ||
17 | --- a/mk/rte.lib.mk | ||
18 | +++ b/mk/rte.lib.mk | ||
19 | @@ -70,7 +70,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) | ||
20 | |||
21 | ifeq ($(LINK_USING_CC),1) | ||
22 | # Override the definition of LD here, since we're linking with CC | ||
23 | -LD := $(CC) $(CPU_CFLAGS) | ||
24 | +LD := $(CC) $(CPU_CFLAGS) $(EXTRA_CFLAGS) | ||
25 | _CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS)) | ||
26 | override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS)) | ||
27 | else | ||
28 | -- | ||
29 | 1.9.1 | ||
30 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch deleted file mode 100644 index a4c4711..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From a33a9e7559b59bc5fb0988af85062436ec4389a4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
3 | Date: Fri, 19 Aug 2016 11:57:49 +0800 | ||
4 | Subject: [PATCH] dpdk: add --sysroot option within app makefile | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | rte.app.mk has been changed to add -Wl, to all items listed | ||
9 | under EXTRA_LDFLAGS. It causes --sysroot=<path> to not setup | ||
10 | correctly when we depends on gcc to setup for GNU ld. | ||
11 | |||
12 | Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
13 | --- | ||
14 | mk/rte.app.mk | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/mk/rte.app.mk b/mk/rte.app.mk | ||
18 | index eb28e11..296c8c7 100644 | ||
19 | --- a/mk/rte.app.mk | ||
20 | +++ b/mk/rte.app.mk | ||
21 | @@ -195,7 +195,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) | ||
22 | ifeq ($(LINK_USING_CC),1) | ||
23 | O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(OBJS-y) $(call linkerprefix, \ | ||
24 | $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ | ||
25 | - $(MAPFLAGS)) | ||
26 | + $(MAPFLAGS)) $(SYSROOTPATH) | ||
27 | else | ||
28 | O_TO_EXE = $(LD) -o $@ $(OBJS-y) \ | ||
29 | $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ | ||
30 | -- | ||
31 | 1.9.1 | ||
32 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch deleted file mode 100644 index fc965fa..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 4cdcb5ea4af9677677a007c4f9b286948123be87 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
3 | Date: Fri, 2 Sep 2016 15:48:52 +0800 | ||
4 | Subject: [PATCH] dpdk: fix for parellel make issue | ||
5 | |||
6 | To make sure that the path of libraries should be correct and | ||
7 | libraries will be build before, And available at the time of | ||
8 | linking example apps. | ||
9 | |||
10 | Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
11 | --- | ||
12 | examples/Makefile | 1 + | ||
13 | examples/ethtool/ethtool-app/Makefile | 1 + | ||
14 | 2 files changed, 2 insertions(+) | ||
15 | |||
16 | diff --git a/examples/Makefile b/examples/Makefile | ||
17 | index 18b41b9..c7c2beb 100644 | ||
18 | --- a/examples/Makefile | ||
19 | +++ b/examples/Makefile | ||
20 | @@ -43,6 +43,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += distributor | ||
21 | DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bond | ||
22 | DIRS-y += cmdline | ||
23 | DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += distributor | ||
24 | +DEPDIRS-y += examples/ethtool/lib | ||
25 | DIRS-y += ethtool | ||
26 | DIRS-y += exception_path | ||
27 | DIRS-y += helloworld | ||
28 | diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile | ||
29 | index 09c66ad..ec068e6 100644 | ||
30 | --- a/examples/ethtool/ethtool-app/Makefile | ||
31 | +++ b/examples/ethtool/ethtool-app/Makefile | ||
32 | @@ -47,6 +47,7 @@ SRCS-y := main.c ethapp.c | ||
33 | CFLAGS += -O3 -D_GNU_SOURCE -pthread -I$(SRCDIR)/../lib | ||
34 | CFLAGS += $(WERROR_FLAGS) | ||
35 | |||
36 | +LDLIBS += -L$(ETHTOOL_LIB_PATH)/ | ||
37 | LDLIBS += -L$(subst ethtool-app,lib,$(RTE_OUTPUT))/lib | ||
38 | LDLIBS += -lrte_ethtool | ||
39 | |||
40 | -- | ||
41 | 1.9.1 | ||
42 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch deleted file mode 100644 index f517167..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | From 363817bf84286fc167e0c3c255a7fd522bf87d8c Mon Sep 17 00:00:00 2001 | ||
2 | From: Shashwat Pandey <shashwatx.p@intel.com> | ||
3 | Date: Mon, 20 Feb 2017 15:46:22 +0800 | ||
4 | Subject: [PATCH] dpdk: fix installation warning and issue | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | Ensure that all compiled libs should be installed to correct location. | ||
9 | For cross compiling cp -r and extra tar flags used to avoid QA warning | ||
10 | [host-user-contaminated]. | ||
11 | Added excluded files from bin and removing mk and app/dpdk-pmdinfogen files | ||
12 | installation since it is not needed as a part of image. | ||
13 | |||
14 | Signed-off-by: Shashwat Pandey <shashwatx.p@intel.com> | ||
15 | --- | ||
16 | mk/rte.sdkinstall.mk | 29 ++++++++++++++--------------- | ||
17 | 1 file changed, 14 insertions(+), 15 deletions(-) | ||
18 | |||
19 | diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk | ||
20 | index dbac2a2..563954e 100644 | ||
21 | --- a/mk/rte.sdkinstall.mk | ||
22 | +++ b/mk/rte.sdkinstall.mk | ||
23 | @@ -115,16 +115,17 @@ endif | ||
24 | |||
25 | install-runtime: | ||
26 | $(Q)$(call rte_mkdir, $(DESTDIR)$(libdir)) | ||
27 | - $(Q)cp -a $O/lib/* $(DESTDIR)$(libdir) | ||
28 | + $(Q)cp -r $O/lib/* $(DESTDIR)$(libdir) | ||
29 | $(Q)$(call rte_mkdir, $(DESTDIR)$(bindir)) | ||
30 | - $(Q)tar -cf - -C $O --exclude 'app/*.map' \ | ||
31 | - --exclude app/dpdk-pmdinfogen \ | ||
32 | - --exclude 'app/cmdline*' --exclude app/test \ | ||
33 | - --exclude app/testacl --exclude app/testpipeline app | \ | ||
34 | - tar -xf - -C $(DESTDIR)$(bindir) --strip-components=1 \ | ||
35 | - --keep-newer-files | ||
36 | + $(Q)tar -cf - -C $O --exclude app/dpdk-pmdinfogen app | \ | ||
37 | + tar -xf - -C $(DESTDIR)$(bindir) --no-same-owner --no-same-permissions \ | ||
38 | + --strip-components=1 --keep-newer-files --warning=no-ignore-newer | ||
39 | $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) | ||
40 | - $(Q)cp -a $(RTE_SDK)/usertools $(DESTDIR)$(datadir) | ||
41 | + $(Q)cp -r $(RTE_SDK)/usertools $(DESTDIR)$(datadir) | ||
42 | + $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-setup.sh, \ | ||
43 | + $(DESTDIR)$(datadir)/usertools/setup.sh) | ||
44 | + $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-devbind.py, \ | ||
45 | + $(DESTDIR)$(datadir)/usertools/dpdk_nic_bind.py) | ||
46 | $(Q)$(call rte_mkdir, $(DESTDIR)$(sbindir)) | ||
47 | $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-devbind.py, \ | ||
48 | $(DESTDIR)$(sbindir)/dpdk-devbind) | ||
49 | @@ -142,7 +143,7 @@ endif | ||
50 | install-kmod: | ||
51 | ifneq ($(wildcard $O/kmod/*),) | ||
52 | $(Q)$(call rte_mkdir, $(DESTDIR)$(kerneldir)) | ||
53 | - $(Q)cp -a $O/kmod/* $(DESTDIR)$(kerneldir) | ||
54 | + $(Q)cp -r $O/kmod/* $(DESTDIR)$(kerneldir) | ||
55 | endif | ||
56 | |||
57 | install-sdk: | ||
58 | @@ -151,11 +152,9 @@ install-sdk: | ||
59 | tar -xf - -C $(DESTDIR)$(includedir) --strip-components=1 \ | ||
60 | --keep-newer-files | ||
61 | $(Q)$(call rte_mkdir, $(DESTDIR)$(sdkdir)) | ||
62 | - $(Q)cp -a $(RTE_SDK)/mk $(DESTDIR)$(sdkdir) | ||
63 | - $(Q)cp -a $(RTE_SDK)/buildtools $(DESTDIR)$(sdkdir) | ||
64 | - $(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir)/app) | ||
65 | - $(Q)cp -a $O/.config $(DESTDIR)$(targetdir) | ||
66 | - $(Q)cp -a $O/app/dpdk-pmdinfogen $(DESTDIR)$(targetdir)/app | ||
67 | + $(Q)cp -r $(RTE_SDK)/buildtools $(DESTDIR)$(sdkdir) | ||
68 | + $(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir)) | ||
69 | + $(Q)cp -r $O/.config $(DESTDIR)$(targetdir) | ||
70 | $(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include) | ||
71 | $(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib) | ||
72 | |||
73 | @@ -171,4 +170,4 @@ ifneq ($(wildcard $O/doc/*/*/*pdf),) | ||
74 | $(Q)cp -a $O/doc/*/*/*pdf $(DESTDIR)$(docdir)/guides | ||
75 | endif | ||
76 | $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) | ||
77 | - $(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(datadir) | ||
78 | + $(Q)cp -r $(RTE_SDK)/examples $(DESTDIR)$(datadir) | ||
79 | -- | ||
80 | 1.9.1 | ||
81 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk_17.05.bb b/meta-dpdk/recipes-extended/dpdk/dpdk_17.05.bb deleted file mode 100644 index 1a696ed..0000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk_17.05.bb +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | include dpdk.inc | ||
2 | |||
3 | SRC_URI += "\ | ||
4 | file://dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch \ | ||
5 | file://0001-examples-Fix-maybe-uninitialized-warning.patch \ | ||
6 | " | ||
7 | |||
8 | SRC_URI[dpdk.md5sum] = "39c4e1110dd1ef9dab33edbae820f939" | ||
9 | SRC_URI[dpdk.sha256sum] = "763bfb7e1765efcc949e79d645dc9f1ebd16591431ba0db5ce22becd928dcd0a" | ||
10 | |||
11 | export EXAMPLES_BUILD_DIR = "${RTE_TARGET}" | ||
12 | export ARCHDIR = "generic" | ||
13 | |||
14 | do_configure_prepend () { | ||
15 | sed -e "s#CONFIG_RTE_LIBRTE_POWER=y#CONFIG_RTE_LIBRTE_POWER=${CONFIG_EXAMPLE_VM_POWER_MANAGER}#" -i ${S}/config/common_linuxapp | ||
16 | } | ||
17 | |||
18 | COMPATIBLE_HOST_linux-gnux32 = "null" | ||
19 | COMPATIBLE_HOST_libc-musl_class-target = "null" | ||
diff --git a/meta-qat/COPYING.MIT b/meta-qat/COPYING.MIT deleted file mode 100644 index fb950dc..0000000 --- a/meta-qat/COPYING.MIT +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
2 | of this software and associated documentation files (the "Software"), to deal | ||
3 | in the Software without restriction, including without limitation the rights | ||
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
5 | copies of the Software, and to permit persons to whom the Software is | ||
6 | furnished to do so, subject to the following conditions: | ||
7 | |||
8 | The above copyright notice and this permission notice shall be included in | ||
9 | all copies or substantial portions of the Software. | ||
10 | |||
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
17 | THE SOFTWARE. | ||
diff --git a/meta-qat/LICENSE b/meta-qat/LICENSE deleted file mode 100644 index e57d3b9..0000000 --- a/meta-qat/LICENSE +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | All metadata files (including, but not limited to bb, bbappend, | ||
2 | bbclass, inc and conf files) are MIT licensed unless otherwise stated. | ||
3 | Source code included in tree for individual recipes is under the | ||
4 | LICENSE stated in the associated recipe (.bb file) unless otherwise | ||
5 | stated. | ||
diff --git a/meta-qat/README b/meta-qat/README deleted file mode 100644 index 2c10346..0000000 --- a/meta-qat/README +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | meta-qat | ||
2 | ======== | ||
3 | |||
4 | This README file contains information on building and booting | ||
5 | meta-intel BSP layers. Please see the corresponding sections below | ||
6 | for details. | ||
7 | |||
8 | |||
9 | Yocto Project Compatible | ||
10 | ======================== | ||
11 | |||
12 | The BSPs contained in this layer are compatible with the Yocto Project | ||
13 | as per the requirements listed here: | ||
14 | |||
15 | https://www.yoctoproject.org/webform/yocto-project-compatible-registration | ||
16 | |||
17 | |||
18 | Dependencies | ||
19 | ============ | ||
20 | |||
21 | This layer depends on: | ||
22 | |||
23 | URI: git://git.openembedded.org/bitbake | ||
24 | branch: 1.34 | ||
25 | |||
26 | URI: git://git.openembedded.org/openembedded-core | ||
27 | layers: meta | ||
28 | branch: rocko | ||
29 | |||
30 | |||
31 | Guidelines for submitting patches | ||
32 | ==================================== | ||
33 | |||
34 | Please submit any patches against meta-dpdk to the meta-intel | ||
35 | mailing list (meta-intel@yoctoproject.org). Also, if your patches are | ||
36 | available via a public git repository, please also include a URL to | ||
37 | the repo and branch containing your patches as that makes it easier | ||
38 | for maintainers to grab and test your patches. | ||
39 | |||
40 | There are patch submission scripts available that will, among other | ||
41 | things, automatically include the repo URL and branch as mentioned. | ||
42 | Please see the Yocto Project Development Manual sections entitled | ||
43 | 'Using Scripts to Push a Change Upstream and Request a Pull' and | ||
44 | 'Using Email to Submit a Patch' for details. | ||
45 | |||
46 | Regardless of how you submit a patch or patchset, the patches should | ||
47 | at minimum follow the suggestions outlined in the 'Submitting a Change | ||
48 | to the Yocto Project' section in the Yocto Project Development Manual. | ||
49 | Specifically, they should: | ||
50 | |||
51 | - Include a 'Signed-off-by:' line. A commit can't legally be pulled | ||
52 | in without this. | ||
53 | |||
54 | - Provide a single-line, short summary of the change. This short | ||
55 | description should be prefixed by the BSP or recipe name, as | ||
56 | appropriate, followed by a colon. Capitalize the first character | ||
57 | of the summary (following the colon). | ||
58 | |||
59 | - For the body of the commit message, provide detailed information | ||
60 | that describes what you changed, why you made the change, and the | ||
61 | approach you used. | ||
62 | |||
63 | - If the change addresses a specific bug or issue that is associated | ||
64 | with a bug-tracking ID, include a reference to that ID in your | ||
65 | detailed description in the following format: [YOCTO #<bug-id>]. | ||
66 | |||
67 | - Pay attention to line length - please don't allow any particular | ||
68 | line in the commit message to stretch past 72 characters. | ||
69 | |||
70 | - For any non-trivial patch, provide information about how you | ||
71 | tested the patch, and for any non-trivial or non-obvious testing | ||
72 | setup, provide details of that setup. | ||
73 | |||
74 | Doing a quick 'git log' in meta-intel will provide you with many | ||
75 | examples of good example commits if you have questions about any | ||
76 | aspect of the preferred format. | ||
77 | |||
78 | The meta-intel maintainers will do their best to review and/or pull in | ||
79 | a patch or patchset within 24 hours of the time it was posted. For | ||
80 | larger and/or more involved patches and patchsets, the review process | ||
81 | may take longer. | ||
82 | |||
83 | Please see the meta-intel/MAINTAINERS file for the list of maintainers | ||
84 | and their specific areas; it's also a good idea to cc: the specific | ||
85 | maintainer, if applicable. | ||
diff --git a/meta-qat/conf/include/maintainers.inc b/meta-qat/conf/include/maintainers.inc deleted file mode 100644 index 9f4c2e3..0000000 --- a/meta-qat/conf/include/maintainers.inc +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # This file contains a list of recipe maintainers for meta-intel | ||
2 | |||
3 | RECIPE_MAINTAINER_pn-openssl-qat = "TBD DPDK Flex Team" | ||
4 | RECIPE_MAINTAINER_pn-qat16 = "TBD DPDK Flex Team" | ||
5 | RECIPE_MAINTAINER_pn-zlib-qat = "TBD DPDK Flex Team" | ||
diff --git a/meta-qat/conf/layer.conf b/meta-qat/conf/layer.conf deleted file mode 100644 index 2e3aa84..0000000 --- a/meta-qat/conf/layer.conf +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # We have recipes-* directories, add to BBFILES | ||
5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
7 | |||
8 | BBFILE_COLLECTIONS += "intel-qat" | ||
9 | BBFILE_PATTERN_intel-qat := "^${LAYERDIR}/" | ||
10 | BBFILE_PRIORITY_intel-qat = "5" | ||
11 | |||
12 | LAYERDEPENDS_intel-qat = "core intel" | ||
13 | |||
14 | # This should only be incremented on significant changes that will | ||
15 | # cause compatibility issues with other layers | ||
16 | LAYERVERSION_intel-qat = "1" | ||
17 | LAYERSERIES_COMPAT_intel-qat = "rocko" | ||
18 | |||
19 | |||
20 | require ${LAYERDIR}/conf/include/maintainers.inc | ||
diff --git a/meta-tlk/COPYING.MIT b/meta-tlk/COPYING.MIT deleted file mode 100644 index fb950dc..0000000 --- a/meta-tlk/COPYING.MIT +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
2 | of this software and associated documentation files (the "Software"), to deal | ||
3 | in the Software without restriction, including without limitation the rights | ||
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
5 | copies of the Software, and to permit persons to whom the Software is | ||
6 | furnished to do so, subject to the following conditions: | ||
7 | |||
8 | The above copyright notice and this permission notice shall be included in | ||
9 | all copies or substantial portions of the Software. | ||
10 | |||
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
17 | THE SOFTWARE. | ||
diff --git a/meta-tlk/README b/meta-tlk/README deleted file mode 100644 index 07cbd76..0000000 --- a/meta-tlk/README +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | meta-tlk | ||
2 | ======== | ||
3 | |||
4 | This layer makes the appropriate kernel modifications to enable a 10 day | ||
5 | time limit in the official BSP images produced using the Yocto Project | ||
6 | autobuilder, in order to encourage people to produce their own images | ||
7 | for production whilst still allowing the images to be useful for testing | ||
8 | and debugging. | ||
9 | |||
diff --git a/meta-tlk/conf/layer.conf b/meta-tlk/conf/layer.conf deleted file mode 100644 index dea544f..0000000 --- a/meta-tlk/conf/layer.conf +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # We have recipes-* directories, add to BBFILES | ||
5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
7 | |||
8 | BBFILE_COLLECTIONS += "tlk" | ||
9 | BBFILE_PATTERN_tlk := "^${LAYERDIR}/" | ||
10 | BBFILE_PRIORITY_tlk = "5" | ||
11 | |||
12 | LAYERDEPENDS_tlk = "core intel" | ||
13 | |||
diff --git a/meta-tlk/recipes-core/base-files/base-files_3.0.14.bbappend b/meta-tlk/recipes-core/base-files/base-files_3.0.14.bbappend deleted file mode 100644 index 81fe7b7..0000000 --- a/meta-tlk/recipes-core/base-files/base-files_3.0.14.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
diff --git a/meta-tlk/recipes-core/base-files/files/motd b/meta-tlk/recipes-core/base-files/files/motd deleted file mode 100644 index 13cd74c..0000000 --- a/meta-tlk/recipes-core/base-files/files/motd +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | This image contains a time limited kernel and will reboot the machine | ||
2 | automatically in 10 days. Do not include this image in a product. | ||
3 | |||
4 | Use the image for evaluation purposes only. | ||
5 | |||
6 | Please see http://www.yoctoproject.org/tlk for instructions on how to | ||
7 | eliminate the timeout. | ||
diff --git a/meta-tlk/recipes-core/psplash/files/psplash-tlk.png b/meta-tlk/recipes-core/psplash/files/psplash-tlk.png deleted file mode 100644 index 54b8fae..0000000 --- a/meta-tlk/recipes-core/psplash/files/psplash-tlk.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/meta-tlk/recipes-core/psplash/psplash_git.bbappend b/meta-tlk/recipes-core/psplash/psplash_git.bbappend deleted file mode 100644 index 176a299..0000000 --- a/meta-tlk/recipes-core/psplash/psplash_git.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
2 | |||
3 | # NB: this is only for the main logo image; if you add multiple images here, | ||
4 | # poky will build multiple psplash packages with 'outsuffix' in name for | ||
5 | # each of these ... | ||
6 | SPLASH_IMAGES = "file://psplash-tlk.png;outsuffix=default" | ||
diff --git a/meta-tlk/recipes-kernel/linux/files/time-limited-kernel.cfg b/meta-tlk/recipes-kernel/linux/files/time-limited-kernel.cfg deleted file mode 100644 index 44f4bea..0000000 --- a/meta-tlk/recipes-kernel/linux/files/time-limited-kernel.cfg +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | CONFIG_UPTIME_LIMITED_KERNEL=y | ||
2 | CONFIG_UPTIME_LIMIT_DURATION=14400 | ||
3 | CONFIG_UPTIME_LIMIT_KERNEL_REBOOT=y | ||
diff --git a/meta-tlk/recipes-kernel/linux/files/uptime-allow-the-optional-limiting-of-kernel-runtime.patch b/meta-tlk/recipes-kernel/linux/files/uptime-allow-the-optional-limiting-of-kernel-runtime.patch deleted file mode 100644 index aa14305..0000000 --- a/meta-tlk/recipes-kernel/linux/files/uptime-allow-the-optional-limiting-of-kernel-runtime.patch +++ /dev/null | |||
@@ -1,251 +0,0 @@ | |||
1 | From a21e483b57c8c31beaa5063268ec35da375daf04 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | Date: Tue, 12 Jul 2011 10:26:50 -0400 | ||
4 | Subject: [PATCH] uptime: allow the optional limiting of kernel runtime | ||
5 | |||
6 | Introduce the ability to limit the limit the uptime of a kernel. | ||
7 | When enabled, these options set a maximum uptime on the kernel, and | ||
8 | (optionally) trigger a clean reboot at expiration. | ||
9 | |||
10 | This functionality may appear to be very close to the softdog watchdog | ||
11 | implementation. It is. But can't be the softdog for several reasons: | ||
12 | |||
13 | - The soft watchdog should be available while this functionality is active | ||
14 | - The duration range is different between this and the softdog. The | ||
15 | timeout available here is potentially quite a bit longer. | ||
16 | - At expiration, there are different expiration requirements and actions. | ||
17 | - This functionality is specific to a particular use case and should | ||
18 | not impact mainline functionality | ||
19 | |||
20 | To cleanly restart the kernel after one minute of uptime, the following | ||
21 | config items would be required: | ||
22 | |||
23 | CONFIG_UPTIME_LIMITED_KERNEL=y | ||
24 | CONFIG_UPTIME_LIMIT_DURATION=1 | ||
25 | CONFIG_UPTIME_LIMIT_KERNEL_REBOOT=y | ||
26 | |||
27 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
28 | |||
29 | diff --git a/init/Kconfig b/init/Kconfig | ||
30 | index cac3f096050d..77d6d5fa1b1d 100644 | ||
31 | --- a/init/Kconfig | ||
32 | +++ b/init/Kconfig | ||
33 | @@ -1376,6 +1376,31 @@ menuconfig EXPERT | ||
34 | environments which can tolerate a "non-standard" kernel. | ||
35 | Only use this if you really know what you are doing. | ||
36 | |||
37 | +config UPTIME_LIMITED_KERNEL | ||
38 | + bool "Create a kernel with uptime limitations" | ||
39 | + default n | ||
40 | + help | ||
41 | + Limit the amount of time a kernel can run. The associated UPTIME_LIMIT* | ||
42 | + kernel config options should be used to tune the behaviour. | ||
43 | + | ||
44 | +config UPTIME_LIMIT_DURATION | ||
45 | + int "Kernel uptime limit in minutes" | ||
46 | + depends on UPTIME_LIMITED_KERNEL | ||
47 | + range 0 14400 | ||
48 | + default 0 | ||
49 | + help | ||
50 | + Define the uptime limitation on a kernel in minutes. Once | ||
51 | + the defined time expires the kernel will emit a warning, cease | ||
52 | + to be usable and eventually restart. The valid range is 0 (disable) | ||
53 | + to 14400 (10 days) | ||
54 | + | ||
55 | +config UPTIME_LIMIT_KERNEL_REBOOT | ||
56 | + bool "Reboot a time limited kernel at expiration" | ||
57 | + depends on UPTIME_LIMITED_KERNEL | ||
58 | + default y | ||
59 | + help | ||
60 | + Reboot an uptime limited kernel at expiration. | ||
61 | + | ||
62 | config UID16 | ||
63 | bool "Enable 16-bit UID system calls" if EXPERT | ||
64 | depends on HAVE_UID16 && MULTIUSER | ||
65 | diff --git a/kernel/Makefile b/kernel/Makefile | ||
66 | index e2ec54e2b952..6b7bdddd624b 100644 | ||
67 | --- a/kernel/Makefile | ||
68 | +++ b/kernel/Makefile | ||
69 | @@ -45,6 +45,7 @@ obj-$(CONFIG_FREEZER) += freezer.o | ||
70 | obj-$(CONFIG_PROFILING) += profile.o | ||
71 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | ||
72 | obj-y += time/ | ||
73 | +obj-$(CONFIG_UPTIME_LIMITED_KERNEL) += uptime_limit.o | ||
74 | obj-$(CONFIG_FUTEX) += futex.o | ||
75 | ifeq ($(CONFIG_COMPAT),y) | ||
76 | obj-$(CONFIG_FUTEX) += futex_compat.o | ||
77 | diff --git a/kernel/uptime_limit.c b/kernel/uptime_limit.c | ||
78 | new file mode 100644 | ||
79 | index 000000000000..b6a1a5e4f9d9 | ||
80 | --- /dev/null | ||
81 | +++ b/kernel/uptime_limit.c | ||
82 | @@ -0,0 +1,166 @@ | ||
83 | +/* | ||
84 | + * uptime_limit.c | ||
85 | + * | ||
86 | + * This file contains the functions which can limit kernel uptime | ||
87 | + * | ||
88 | + * Copyright (C) 2011 Bruce Ashfield (bruce.ashfield@windriver.com) | ||
89 | + * | ||
90 | + * This program is free software; you can redistribute it and/or modify | ||
91 | + * it under the terms of the GNU General Public License as published by | ||
92 | + * the Free Software Foundation; either version 2 of the License, or | ||
93 | + * (at your option) any later version. | ||
94 | + * | ||
95 | + * This program is distributed in the hope that it will be useful, | ||
96 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
97 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
98 | + * GNU General Public License for more details. | ||
99 | + * | ||
100 | + * You should have received a copy of the GNU General Public License | ||
101 | + * along with this program; if not, write to the Free Software | ||
102 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
103 | + * | ||
104 | + * | ||
105 | + * This functionality is somewhat close to the softdog watchdog | ||
106 | + * implementation, but it cannot be used directly for several reasons: | ||
107 | + * | ||
108 | + * - The soft watchdog should be available while this functionality is active | ||
109 | + * - The duration range is different between this and the softdog. The | ||
110 | + * timeout available here is potentially quite a bit longer. | ||
111 | + * - At expiration, there are different expiration requirements and actions. | ||
112 | + * - This functionality is specific to a particular use case and should | ||
113 | + * not impact mainline functionality | ||
114 | + * | ||
115 | + */ | ||
116 | +#include <linux/kernel.h> | ||
117 | +#include <linux/reboot.h> | ||
118 | +#include <linux/timer.h> | ||
119 | +#include <linux/delay.h> | ||
120 | +#include <linux/kthread.h> | ||
121 | + | ||
122 | +#define UPTIME_LIMIT_IN_SECONDS (CONFIG_UPTIME_LIMIT_DURATION * 60) | ||
123 | +#define MIN(X, Y) ((X) <= (Y) ? (X) : (Y)) | ||
124 | +#define TEN_MINUTES_IN_SECONDS 600 | ||
125 | + | ||
126 | +enum uptime_expiration_type { | ||
127 | + uptime_no_action, | ||
128 | + uptime_reboot | ||
129 | +}; | ||
130 | + | ||
131 | +static enum uptime_expiration_type uptime_expiration_action = uptime_no_action; | ||
132 | +static struct timer_list timelimit_timer; | ||
133 | +static struct task_struct *uptime_worker_task; | ||
134 | + | ||
135 | +static void timelimit_expire(unsigned long timeout_seconds) | ||
136 | +{ | ||
137 | + char msg[128]; | ||
138 | + int msglen = 127; | ||
139 | + | ||
140 | + if (timeout_seconds) { | ||
141 | + if (timeout_seconds >= 60) | ||
142 | + snprintf(msg, msglen, | ||
143 | + "Uptime: kernel validity duration has %d %s remaining\n", | ||
144 | + (int) timeout_seconds / 60, "minute(s)"); | ||
145 | + else | ||
146 | + snprintf(msg, msglen, | ||
147 | + "Uptime: kernel validity duration has %d %s remaining\n", | ||
148 | + (int) timeout_seconds, "seconds"); | ||
149 | + | ||
150 | + printk(KERN_CRIT "%s", msg); | ||
151 | + | ||
152 | + timelimit_timer.expires = jiffies + timeout_seconds * HZ; | ||
153 | + timelimit_timer.data = 0; | ||
154 | + add_timer_on(&timelimit_timer, cpumask_first(cpu_online_mask)); | ||
155 | + } else { | ||
156 | + printk(KERN_CRIT "Uptime: Kernel validity timeout has expired\n"); | ||
157 | +#ifdef CONFIG_UPTIME_LIMIT_KERNEL_REBOOT | ||
158 | + uptime_expiration_action = uptime_reboot; | ||
159 | + wake_up_process(uptime_worker_task); | ||
160 | + } | ||
161 | +#endif | ||
162 | +} | ||
163 | + | ||
164 | +/* | ||
165 | + * This thread starts and then immediately goes to sleep. When it is woken | ||
166 | + * up, it carries out the instructions left in uptime_expiration_action. If | ||
167 | + * no action was specified it simply goes back to sleep. | ||
168 | + */ | ||
169 | +static int uptime_worker(void *unused) | ||
170 | +{ | ||
171 | + set_current_state(TASK_INTERRUPTIBLE); | ||
172 | + | ||
173 | + while (!kthread_should_stop()) { | ||
174 | + schedule(); | ||
175 | + | ||
176 | + if (kthread_should_stop()) | ||
177 | + break; | ||
178 | + | ||
179 | + if (uptime_expiration_action == uptime_reboot) { | ||
180 | + printk(KERN_CRIT "Uptime: restarting machine\n"); | ||
181 | + kernel_restart(NULL); | ||
182 | + } | ||
183 | + | ||
184 | + set_current_state(TASK_INTERRUPTIBLE); | ||
185 | + } | ||
186 | + __set_current_state(TASK_RUNNING); | ||
187 | + | ||
188 | + return 0; | ||
189 | +} | ||
190 | + | ||
191 | +static int timeout_enable(int cpu) | ||
192 | +{ | ||
193 | + int err = 0; | ||
194 | + int warning_limit; | ||
195 | + | ||
196 | + /* | ||
197 | + * Create an uptime worker thread. This thread is required since the | ||
198 | + * safe version of kernel restart cannot be called from a | ||
199 | + * non-interruptible context. Which means we cannot call it directly | ||
200 | + * from a timer callback. So we arrange for the timer expiration to | ||
201 | + * wakeup a thread, which performs the action. | ||
202 | + */ | ||
203 | + uptime_worker_task = kthread_create(uptime_worker, | ||
204 | + (void *)(unsigned long)cpu, | ||
205 | + "uptime_worker/%d", cpu); | ||
206 | + if (IS_ERR(uptime_worker_task)) { | ||
207 | + printk(KERN_ERR "Uptime: task for cpu %i failed\n", cpu); | ||
208 | + err = PTR_ERR(uptime_worker_task); | ||
209 | + goto out; | ||
210 | + } | ||
211 | + /* bind to cpu0 to avoid migration and hot plug nastiness */ | ||
212 | + kthread_bind(uptime_worker_task, cpu); | ||
213 | + wake_up_process(uptime_worker_task); | ||
214 | + | ||
215 | + /* Create the timer that will wake the uptime thread at expiration */ | ||
216 | + init_timer(&timelimit_timer); | ||
217 | + timelimit_timer.function = timelimit_expire; | ||
218 | + /* | ||
219 | + * Fire two timers. One warning timeout and the final timer | ||
220 | + * which will carry out the expiration action. The warning timer will | ||
221 | + * expire at the minimum of half the original time or ten minutes. | ||
222 | + */ | ||
223 | + warning_limit = MIN(UPTIME_LIMIT_IN_SECONDS/2, TEN_MINUTES_IN_SECONDS); | ||
224 | + timelimit_timer.expires = jiffies + warning_limit * HZ; | ||
225 | + timelimit_timer.data = UPTIME_LIMIT_IN_SECONDS - warning_limit; | ||
226 | + | ||
227 | + add_timer_on(&timelimit_timer, cpumask_first(cpu_online_mask)); | ||
228 | +out: | ||
229 | + return err; | ||
230 | +} | ||
231 | + | ||
232 | +static int __init timelimit_init(void) | ||
233 | +{ | ||
234 | + int err = 0; | ||
235 | + | ||
236 | + printk(KERN_INFO "Uptime: system uptime restrictions enabled\n"); | ||
237 | + | ||
238 | + /* | ||
239 | + * Enable the timeout thread for cpu 0 only, assuming that the | ||
240 | + * uptime limit is non-zero, to protect against any cpu | ||
241 | + * migration issues. | ||
242 | + */ | ||
243 | + if (UPTIME_LIMIT_IN_SECONDS) | ||
244 | + err = timeout_enable(0); | ||
245 | + | ||
246 | + return err; | ||
247 | +} | ||
248 | +device_initcall(timelimit_init); | ||
249 | -- | ||
250 | 2.10.1 | ||
251 | |||
diff --git a/meta-tlk/recipes-kernel/linux/linux-intel_%.bbappend b/meta-tlk/recipes-kernel/linux/linux-intel_%.bbappend deleted file mode 100644 index 47c62ef..0000000 --- a/meta-tlk/recipes-kernel/linux/linux-intel_%.bbappend +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
2 | SRC_URI_append = " file://time-limited-kernel.cfg \ | ||
3 | file://uptime-allow-the-optional-limiting-of-kernel-runtime.patch" | ||
diff --git a/meta-tlk/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-tlk/recipes-kernel/linux/linux-yocto_%.bbappend deleted file mode 100644 index 3008512..0000000 --- a/meta-tlk/recipes-kernel/linux/linux-yocto_%.bbappend +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
2 | SRC_URI_append = " file://time-limited-kernel.cfg" | ||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat.inc b/recipes-extended/openssl-qat/openssl-qat.inc index ff22825..ff22825 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat.inc +++ b/recipes-extended/openssl-qat/openssl-qat.inc | |||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch b/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch index 1b7921f..1b7921f 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch +++ b/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch | |||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch b/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch index d3451ae..d3451ae 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch +++ b/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch | |||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-version-script.patch b/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-version-script.patch index 65ddefa..65ddefa 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-version-script.patch +++ b/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-version-script.patch | |||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch index 7c43b56..7c43b56 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch +++ b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch | |||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-environment-variables-to-have-precedence.patch b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-environment-variables-to-have-precedence.patch index 82c9965..82c9965 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-environment-variables-to-have-precedence.patch +++ b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-environment-variables-to-have-precedence.patch | |||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-install-engines-in-libdir-ssl.patch b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-install-engines-in-libdir-ssl.patch index a5eea33..a5eea33 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-install-engines-in-libdir-ssl.patch +++ b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-install-engines-in-libdir-ssl.patch | |||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-pass-oe_ldflags-to-linker.patch b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-pass-oe_ldflags-to-linker.patch index 59a54ce..59a54ce 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-pass-oe_ldflags-to-linker.patch +++ b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-pass-oe_ldflags-to-linker.patch | |||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-remove-redundant-rpaths.patch b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-remove-redundant-rpaths.patch index 06d706f..06d706f 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-remove-redundant-rpaths.patch +++ b/recipes-extended/openssl-qat/openssl-qat/openssl_qat-remove-redundant-rpaths.patch | |||
diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb b/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb index e3d8ccc..e3d8ccc 100644 --- a/meta-qat/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb +++ b/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb | |||
diff --git a/meta-qat/recipes-extended/qat/qat16.inc b/recipes-extended/qat/qat16.inc index ad117ba..ad117ba 100644 --- a/meta-qat/recipes-extended/qat/qat16.inc +++ b/recipes-extended/qat/qat16.inc | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch b/recipes-extended/qat/qat16/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch index d627353..d627353 100644 --- a/meta-qat/recipes-extended/qat/qat16/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch +++ b/recipes-extended/qat/qat16/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch b/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch index e1ed3fc..e1ed3fc 100644 --- a/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch +++ b/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch b/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch index b7b77d0..b7b77d0 100644 --- a/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch +++ b/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch b/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch index 0021c0d..0021c0d 100644 --- a/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch +++ b/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch b/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch index a538930..a538930 100644 --- a/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch +++ b/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-add-install-target-to-makefiles.patch b/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-add-install-target-to-makefiles.patch index 927389f..927389f 100644 --- a/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-add-install-target-to-makefiles.patch +++ b/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-add-install-target-to-makefiles.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch b/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch index b427799..b427799 100644 --- a/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch +++ b/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch b/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch index 3960022..3960022 100644 --- a/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch +++ b/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch b/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch index 21cdeae..21cdeae 100644 --- a/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch +++ b/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16/use-CC-for-LD.patch b/recipes-extended/qat/qat16/use-CC-for-LD.patch index 36ceedf..36ceedf 100644 --- a/meta-qat/recipes-extended/qat/qat16/use-CC-for-LD.patch +++ b/recipes-extended/qat/qat16/use-CC-for-LD.patch | |||
diff --git a/meta-qat/recipes-extended/qat/qat16_2.5.0-80.bb b/recipes-extended/qat/qat16_2.5.0-80.bb index 46d81fb..46d81fb 100644 --- a/meta-qat/recipes-extended/qat/qat16_2.5.0-80.bb +++ b/recipes-extended/qat/qat16_2.5.0-80.bb | |||
diff --git a/meta-qat/recipes-extended/qat/qat16_2.6.0-65.bb b/recipes-extended/qat/qat16_2.6.0-65.bb index 88cf66c..88cf66c 100644 --- a/meta-qat/recipes-extended/qat/qat16_2.6.0-65.bb +++ b/recipes-extended/qat/qat16_2.6.0-65.bb | |||
diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch b/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch index b45ae79..b45ae79 100644 --- a/meta-qat/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch +++ b/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch | |||
diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch index 9e774db..9e774db 100644 --- a/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch +++ b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch | |||
diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch index c360511..c360511 100644 --- a/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch +++ b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch | |||
diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch index c7aec55..c7aec55 100644 --- a/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch +++ b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch | |||
diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb index 90e036f..90e036f 100644 --- a/meta-qat/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb +++ b/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb | |||
diff --git a/wic/core-image-tiny.wks.in b/wic/core-image-tiny.wks.in deleted file mode 100644 index b0decae..0000000 --- a/wic/core-image-tiny.wks.in +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | # short-description: Create an EFI disk image with systemd-boot and corei7-64/core2-32 | ||
2 | # long-description: Creates a partitioned EFI disk image that the user | ||
3 | # can directly dd to boot media. The selected bootloader is systemd-boot. | ||
4 | # This disk image is meant to be used by corei7-64/core2-32 and core-image-tiny-initramfs | ||
5 | |||
6 | part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=core-image-tiny-initramfs-${MACHINE}.cpio.gz" --ondisk sda --label msdos --active --align 1024 | ||
7 | |||
8 | bootloader --ptable gpt --timeout=5 --append="init=/bin/busybox sh init console=ttyS0,115200 console=tty0 rw LABEL=boot debugshell=5" | ||
9 | |||
10 | # Some devices require different console parameters, the console parameter can be given repeatedly, input is taken | ||
11 | # only from the last listed console, for example on the Minnowboard MAX, the previously listed setting would show | ||
12 | # a login prompt on its video output and not on the serial terminal. | ||
13 | # | ||
14 | # See http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure-kernel.html | ||
diff --git a/wic/galileodisk-sd.wks b/wic/galileodisk-sd.wks deleted file mode 100644 index 225778d..0000000 --- a/wic/galileodisk-sd.wks +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | # short-description: Create a Galileo Gen 1/2 disk image (SD card) | ||
2 | # long-description: Creates a partitioned EFI disk image for Intel Galileo Gen 1/2 | ||
3 | # boards that the user can directly dd to an SD card and boot. | ||
4 | |||
5 | part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk mmcblk0 --label msdos --active --align 1024 | ||
6 | |||
7 | part / --source rootfs --ondisk mmcblk0 --fstype=ext3 --label platform --align 1024 --use-uuid | ||
8 | |||
9 | bootloader --timeout=1 --append="rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5" | ||
diff --git a/wic/galileodisk-usb.wks b/wic/galileodisk-usb.wks deleted file mode 100644 index b561fa0..0000000 --- a/wic/galileodisk-usb.wks +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | # short-description: Create a Galileo Gen 1/2 disk image (USB storage) | ||
2 | # long-description: Creates a partitioned EFI disk image for Intel Galileo Gen 1/2 | ||
3 | # that the user can directly dd to USB storage media and boot. | ||
4 | |||
5 | part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk sda --label msdos --active --align 1024 | ||
6 | |||
7 | part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024 --use-uuid | ||
8 | |||
9 | bootloader --timeout=1 --append="rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5" | ||
diff --git a/wic/generic-bootdisk.wks.in b/wic/generic-bootdisk.wks.in deleted file mode 100644 index 31c708b..0000000 --- a/wic/generic-bootdisk.wks.in +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # based off of refkit's refkit-directdisk.wks.in kickstart template | ||
2 | # uses the image's boot directory to populate a vfat boot partition, | ||
3 | # which works with EFI. | ||
4 | bootloader --ptable gpt | ||
5 | part /boot --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/boot --fstype=vfat --label msdos --active --align 1024 --use-uuid | ||
6 | part / --source rootfs --fstype=ext4 --label root --align 1024 --uuid ${DISK_SIGNATURE_UUID} | ||
diff --git a/wic/mktinygalileodisk.wks b/wic/mktinygalileodisk.wks deleted file mode 100644 index 52f1e12..0000000 --- a/wic/mktinygalileodisk.wks +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # short-description: Create an Galileo Gen 1/2 disk image | ||
2 | # long-description: Creates a partitioned EFI disk image for Intel Galileo Gen 1/2, | ||
3 | # that the user can directly dd to boot media. | ||
4 | |||
5 | part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=core-image-tiny-initramfs-intel-quark.cpio.gz" --ondisk mmcblk0 --label msdos --active --align 1024 | ||
6 | |||
7 | bootloader --timeout=0 --append="console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5" | ||