diff options
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/building_and_booting.md | 134 | ||||
-rw-r--r-- | documentation/dpcpp-compiler.md | 107 | ||||
-rw-r--r-- | documentation/reporting_bugs.md | 22 | ||||
-rw-r--r-- | documentation/secureboot/README | 38 | ||||
-rw-r--r-- | documentation/submitting_patches.md | 26 | ||||
-rw-r--r-- | documentation/tested_hardware.md | 24 |
6 files changed, 313 insertions, 38 deletions
diff --git a/documentation/building_and_booting.md b/documentation/building_and_booting.md new file mode 100644 index 00000000..478a4fb0 --- /dev/null +++ b/documentation/building_and_booting.md | |||
@@ -0,0 +1,134 @@ | |||
1 | ### Building the Intel BSP layers | ||
2 | |||
3 | The intel-common BSP provide a few carefully selected tune options and | ||
4 | generic hardware support to cover the majority of current Intel CPUs and | ||
5 | devices. The naming follows the convention of intel-<TUNE>-<BITS>, where | ||
6 | TUNE is the gcc cpu-type (used with mtune and march typically) and BITS | ||
7 | is either 32 bit or 64 bit. | ||
8 | |||
9 | In order to build an image with BSP support for a given release, you | ||
10 | need to clone the meta-intel layer from git repository: | ||
11 | ``` | ||
12 | git clone https://git.yoctoproject.org/meta-intel | ||
13 | ``` | ||
14 | |||
15 | Check out the appropriate branch or release tags. The branch name and tags | ||
16 | would align with Yocto Project | ||
17 | [Release Codenames](https://wiki.yoctoproject.org/wiki/Releases). | ||
18 | Assuming meta-intel repository is cloned at the top-level of | ||
19 | OE-Core build tree, you can build a BSP image by adding the location of | ||
20 | the meta-intel layer to bblayers.conf: | ||
21 | ``` | ||
22 | BBLAYERS = " \ | ||
23 | /openembedded-core/meta \ | ||
24 | /openembedded-core/meta-intel " | ||
25 | ``` | ||
26 | |||
27 | To enable a particular machine, add a MACHINE line naming the BSP | ||
28 | to the local.conf file: | ||
29 | ``` | ||
30 | MACHINE ?= "intel-corei7-64" | ||
31 | ``` | ||
32 | |||
33 | where this can be replaced by other MACHINE types available: | ||
34 | |||
35 | - intel-core2-32 | ||
36 | |||
37 | This BSP is optimized for the Core2 family of CPUs as well as all | ||
38 | Atom CPUs prior to the Silvermont core. | ||
39 | |||
40 | - intel-corei7-64 | ||
41 | |||
42 | This BSP is optimized for Nehalem and later Core and Xeon CPUs as | ||
43 | well as Silvermont and later Atom CPUs, such as the Baytrail SoCs. | ||
44 | |||
45 | - intel-skylake-64 | ||
46 | |||
47 | This BSP uses [x86-64-v3 tuning](https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html). | ||
48 | |||
49 | You should then be able to build an image as such: | ||
50 | ``` | ||
51 | $ source oe-init-build-env | ||
52 | $ bitbake core-image-sato | ||
53 | ``` | ||
54 | |||
55 | At the end of a successful build, you should have an image that | ||
56 | you can boot from a USB flash drive. | ||
57 | |||
58 | |||
59 | ## Booting the intel-common BSP images | ||
60 | |||
61 | If you've built your own image, you'll find the bootable | ||
62 | image in the build/tmp/deploy/images/{MACHINE} directory, where | ||
63 | 'MACHINE' refers to the machine name used in the build. | ||
64 | |||
65 | Under Linux, insert a USB flash drive. Assuming the USB flash drive | ||
66 | takes device /dev/sdf, use dd to copy the image to it. Before the image | ||
67 | can be burned onto a USB drive, it should be un-mounted. Some Linux distros | ||
68 | may automatically mount a USB drive when it is plugged in. Using USB device | ||
69 | /dev/sdf as an example, find all mounted partitions: | ||
70 | ``` | ||
71 | $ mount | grep sdf | ||
72 | ``` | ||
73 | |||
74 | and un-mount those that are mounted, for example: | ||
75 | ``` | ||
76 | $ umount /dev/sdf1 | ||
77 | $ umount /dev/sdf2 | ||
78 | ``` | ||
79 | |||
80 | Now burn the image onto the USB drive: | ||
81 | ``` | ||
82 | $ sudo dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf status=progress | ||
83 | $ sync | ||
84 | $ eject /dev/sdf | ||
85 | ``` | ||
86 | |||
87 | This should give you a bootable USB flash device. Insert the device | ||
88 | into a bootable USB socket on the target, and power on. This should | ||
89 | result in a system booted to the Sato graphical desktop. | ||
90 | |||
91 | If you want a terminal, use the arrows at the top of the UI to move to | ||
92 | different pages of available applications, one of which is named | ||
93 | 'Terminal'. Clicking that should give you a root terminal. | ||
94 | |||
95 | If you want to ssh into the system, you can use the root terminal to | ||
96 | ifconfig the IP address and use that to ssh in. The root password is | ||
97 | empty, so to log in type 'root' for the user name and hit 'Enter' at | ||
98 | the Password prompt: and you should be in. | ||
99 | |||
100 | If you find you're getting corrupt images on the USB (it doesn't show | ||
101 | the syslinux boot: prompt, or the boot: prompt contains strange | ||
102 | characters), try doing this first: | ||
103 | ``` | ||
104 | $ dd if=/dev/zero of=/dev/sdf bs=1M count=512 | ||
105 | ``` | ||
106 | |||
107 | ## Building the installer image | ||
108 | |||
109 | If you plan to install your image to your target machine, you can build a wic | ||
110 | based installer image instead of default wic image. To build it, you need to | ||
111 | add below configuration to local.conf : | ||
112 | |||
113 | ``` | ||
114 | WKS_FILE = "image-installer.wks.in" | ||
115 | IMAGE_FSTYPES:append = " ext4" | ||
116 | IMAGE_TYPEDEP:wic = "ext4" | ||
117 | INITRD_IMAGE_LIVE="core-image-minimal-initramfs" | ||
118 | do_image_wic[depends] += "${INITRD_IMAGE_LIVE}:do_image_complete" | ||
119 | do_rootfs[depends] += "virtual/kernel:do_deploy" | ||
120 | IMAGE_BOOT_FILES:append = "\ | ||
121 | ${KERNEL_IMAGETYPE} \ | ||
122 | microcode.cpio \ | ||
123 | ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.rootfs.ext4;rootfs.img \ | ||
124 | ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', 'grub-efi-bootx64.efi;EFI/BOOT/bootx64.efi', '', d)} \ | ||
125 | ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', '${IMAGE_ROOTFS}/boot/EFI/BOOT/grub.cfg;EFI/BOOT/grub.cfg', '', d)} \ | ||
126 | ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', 'systemd-bootx64.efi;EFI/BOOT/bootx64.efi', '', d)} \ | ||
127 | ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/loader.conf;loader/loader.conf ', '', d)} \ | ||
128 | ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/entries/boot.conf;loader/entries/boot.conf', '', d)} " | ||
129 | ``` | ||
130 | |||
131 | Burn the wic image onto USB flash device, insert the device to target machine | ||
132 | and power on. This should start the installation process. | ||
133 | |||
134 | |||
diff --git a/documentation/dpcpp-compiler.md b/documentation/dpcpp-compiler.md new file mode 100644 index 00000000..b709a685 --- /dev/null +++ b/documentation/dpcpp-compiler.md | |||
@@ -0,0 +1,107 @@ | |||
1 | Intel(R) oneAPI DPC++/C++ Compiler (ICX) toolchain | ||
2 | ========================================================================== | ||
3 | |||
4 | Get Started with the Intel oneAPI DPC++/C++ Compiler: | ||
5 | |||
6 | https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html# | ||
7 | |||
8 | |||
9 | Getting Started | ||
10 | =============== | ||
11 | |||
12 | Clone the required layers and include them in bblayers.conf: | ||
13 | |||
14 | ``` | ||
15 | git clone https://git.openembedded.org/openembedded-core | ||
16 | git clone https://git.openembedded.org/bitbake | ||
17 | git clone https://git.openembedded.org/meta-openembedded | ||
18 | git clone https://github.com/kraj/meta-clang.git | ||
19 | git clone https://git.yoctoproject.org/meta-intel | ||
20 | |||
21 | $ source openembedded-core/oe-init-build-env | ||
22 | |||
23 | $ bitbake-layers add-layer ../meta-openembedded/meta-oe/ | ||
24 | $ bitbake-layers add-layer ../meta-intel | ||
25 | $ bitbake-layers add-layer ../meta-clang | ||
26 | ``` | ||
27 | |||
28 | Distro | ||
29 | ====== | ||
30 | |||
31 | Note that oneAPI DPC++/C++ compiler currently only works when the vendor string is "oe". | ||
32 | |||
33 | ``` | ||
34 | DISTRO ?= "nodistro" | ||
35 | ``` | ||
36 | |||
37 | MACHINE configuration | ||
38 | ===================== | ||
39 | |||
40 | ``` | ||
41 | MACHINE ?= "intel-skylake-64" | ||
42 | ``` | ||
43 | |||
44 | Package installation | ||
45 | ==================== | ||
46 | |||
47 | ``` | ||
48 | # To include OpenCL driver that might be needed when compiling SYCL programs, include: | ||
49 | IMAGE_INSTALL:append = " intel-compute-runtime intel-graphics-compiler" | ||
50 | |||
51 | # To install only runtime libraries, include: | ||
52 | IMAGE_INSTALL:append = " intel-oneapi-dpcpp-cpp-runtime intel-oneapi-dpcpp-cpp-runtime-dev" | ||
53 | |||
54 | # To install the toolchain, include: | ||
55 | IMAGE_INSTALL:append = " intel-oneapi-dpcpp-cpp intel-oneapi-dpcpp-cpp-dev" | ||
56 | ``` | ||
57 | in local.conf. | ||
58 | |||
59 | Build an image | ||
60 | ============== | ||
61 | |||
62 | ``` | ||
63 | $ bitbake core-image-minimal | ||
64 | ``` | ||
65 | |||
66 | Including oneAPI C++/DPC++ compiler in generated SDK toolchain | ||
67 | ============================================================== | ||
68 | |||
69 | The compiler is not included in the generated SDK by default. If it is expected to be part of SDK, add ICXSDK = "1" in local.conf: | ||
70 | |||
71 | ``` | ||
72 | ICXSDK = "1" | ||
73 | ``` | ||
74 | |||
75 | Generate SDK: | ||
76 | ``` | ||
77 | bitbake core-image-minimal -c populate_sdk | ||
78 | ``` | ||
79 | |||
80 | |||
81 | To setup PATH variables on target | ||
82 | ================================= | ||
83 | |||
84 | Once image is booted successfully, some variables would need to be exported to make sure compiler can be used: | ||
85 | |||
86 | ``` | ||
87 | $ source /opt/intel/oneapi/compiler/2022.1.0/env/vars.sh | ||
88 | |||
89 | $ mkdir -p /lib64 | ||
90 | |||
91 | $ ln -sf /lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 | ||
92 | ``` | ||
93 | |||
94 | Build application and run | ||
95 | ========================= | ||
96 | |||
97 | To compile a sycl application, for example: | ||
98 | |||
99 | ``` | ||
100 | $ icpx --target=x86_64-oe-linux -fsycl simple-sycl-app.c -o simple-sycl-app | ||
101 | ``` | ||
102 | |||
103 | To run: | ||
104 | |||
105 | ``` | ||
106 | $ ./simple-sycl-app | ||
107 | ``` | ||
diff --git a/documentation/reporting_bugs.md b/documentation/reporting_bugs.md new file mode 100644 index 00000000..5fbc3d27 --- /dev/null +++ b/documentation/reporting_bugs.md | |||
@@ -0,0 +1,22 @@ | |||
1 | ## Reporting bugs | ||
2 | |||
3 | If you have problems with or questions about a particular BSP, please | ||
4 | contact the maintainer listed in the [Maintainer](../README.md#maintainers) section directly (cc:ing | ||
5 | the Yocto mailing list puts it in the archive and helps other people | ||
6 | who might have the same questions in the future), but please try to do | ||
7 | the following first: | ||
8 | |||
9 | - look in the [Yocto Project Bugzilla](http://bugzilla.yoctoproject.org/) to see if a | ||
10 | problem has already been reported | ||
11 | |||
12 | - look through recent entries of the [meta-intel](https://lists.yoctoproject.org/g/meta-intel/messages) | ||
13 | and [Yocto Archives](https://lists.yoctoproject.org/g/yocto/messages) mailing list archives to see | ||
14 | if other people have run into similar problems or had similar questions answered. | ||
15 | |||
16 | If you believe you have encountered a bug, you can open a new bug and | ||
17 | enter the details in the [Yocto Project Bugzilla](https://bugzilla.yoctoproject.org/). | ||
18 | If you're relatively certain that it's a bug against the BSP itself, please use the | ||
19 | 'BSPs | bsps-meta-intel' category for the bug; otherwise, please submit the bug against | ||
20 | the most likely category for the problem. if you're wrong, it's not a big deal and | ||
21 | the bug will be recategorized upon triage. | ||
22 | |||
diff --git a/documentation/secureboot/README b/documentation/secureboot/README deleted file mode 100644 index 3d5703bb..00000000 --- a/documentation/secureboot/README +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | Currently, only one implementation of Secure Boot is available out of the box, | ||
2 | which is using a single signed EFI application to directly boot the kernel with | ||
3 | an optional initramfs. | ||
4 | |||
5 | This can be added to your build either through local.conf, or via your own | ||
6 | custom image recipe. | ||
7 | |||
8 | If you are adding it via local.conf, set the following variables: | ||
9 | |||
10 | IMAGE_FEATURES += "secureboot" | ||
11 | WKS_FILE = "generic-bootdisk.wks.in" | ||
12 | SECURE_BOOT_SIGNING_KEY = "/path/to/your/signing/key" | ||
13 | SECURE_BOOT_SIGNING_CERT = "/path/to/your/signing/cert" | ||
14 | IMAGE_CLASSES += "uefi-comboapp" | ||
15 | |||
16 | If working with an image recipe, you can inherit uefi-comboapp directly instead | ||
17 | of using the IMAGE_CLASSES variable. | ||
18 | |||
19 | The signing keys and certs can be created via openssl commands. Here's an | ||
20 | example: | ||
21 | openssl req -new -x509 -newkey rsa:2048 -subj "/CN=your-subject/" -keyout \ | ||
22 | your-key.key -out your-key.crt -days 365 -nodes -sha256 | ||
23 | openssl x509 -in your-key.crt -out your-key.cer -outform DER | ||
24 | |||
25 | The .crt file is your SECURE_BOOT_SIGNING_CERT, and the .key file is your | ||
26 | SECURE_BOOT_SIGNING_KEY. | ||
27 | |||
28 | You should enroll the .crt key in your firmware under the PK, KEK, and DB | ||
29 | options (methods are different depending on your firmware). If a key should ever | ||
30 | become invalid, enroll it under DBX to blacklist it. | ||
31 | |||
32 | The comboapp can be further manipulated in a number of ways. You can modify the | ||
33 | kernel command line via the APPEND variable, you can change the default UUID via | ||
34 | the DISK_SIGNATURE_UUID variable, and you can modify the contents of the | ||
35 | initramfs via the INITRD_IMAGE or INITRD_LIVE variables. | ||
36 | |||
37 | A simple Secure Boot enabled image used for testing can be viewed at: | ||
38 | common/recipes-selftest/images/secureboot-selftest-image-signed.bb | ||
diff --git a/documentation/submitting_patches.md b/documentation/submitting_patches.md new file mode 100644 index 00000000..f36c4b08 --- /dev/null +++ b/documentation/submitting_patches.md | |||
@@ -0,0 +1,26 @@ | |||
1 | ## Guidelines for submitting patches | ||
2 | |||
3 | Please submit any patches against meta-intel BSPs to the | ||
4 | [meta-intel mailing list](https://lists.yoctoproject.org/g/meta-intel) | ||
5 | (email: meta-intel@lists.yoctoproject.org). Also, if your patches are | ||
6 | available via a public git repository, please also include a URL to | ||
7 | the repo and branch containing your patches as that makes it easier | ||
8 | for maintainers to grab and test your patches. | ||
9 | |||
10 | The patches should follow the suggestions outlined in the | ||
11 | [Yocto Project and OpenEmbedded Contributor Guide](https://docs.yoctoproject.org/dev/contributor-guide/index.html). | ||
12 | In addition, for any non-trivial patch, provide information about how you | ||
13 | tested the patch, and for any non-trivial or non-obvious testing | ||
14 | setup, provide details of that setup. | ||
15 | |||
16 | Doing a quick 'git log' in meta-intel will provide you with many | ||
17 | examples of good example commits if you have questions about any | ||
18 | aspect of the preferred format. | ||
19 | |||
20 | The meta-intel maintainers will do their best to review and/or pull in | ||
21 | a patch or patch sets within 24 hours of the time it was posted. For | ||
22 | larger and/or more involved patches and patch sets, the review process | ||
23 | may take longer. | ||
24 | |||
25 | Please see the [maintainers](../README.md#maintainers) section for the list of maintainers. It's also | ||
26 | a good idea to cc: the maintainer, if applicable. | ||
diff --git a/documentation/tested_hardware.md b/documentation/tested_hardware.md new file mode 100644 index 00000000..48a25ab4 --- /dev/null +++ b/documentation/tested_hardware.md | |||
@@ -0,0 +1,24 @@ | |||
1 | ## Tested Hardware | ||
2 | |||
3 | The following undergo regular basic testing with their respective MACHINE types. | ||
4 | |||
5 | - intel-corei7-64: | ||
6 | * Alder Lake-P | ||
7 | * Alder Lake-S | ||
8 | * Alder Lake-PS | ||
9 | * Elkhart Lake | ||
10 | * Metor Lake-P | ||
11 | * Raptor Lake-P | ||
12 | * Tiger Lake | ||
13 | |||
14 | - intel-skylake-64: | ||
15 | * Alder Lake-P | ||
16 | * Alder Lake-S | ||
17 | * Alder Lake-PS | ||
18 | * Elkhart Lake | ||
19 | * Metor Lake-P | ||
20 | * Raptor Lake-P | ||
21 | * Tiger Lake | ||
22 | |||
23 | - intel-core2-32: | ||
24 | * MinnowBoard Turbot | ||