You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FAQ/README.md: Update kernel indexing instructions and cleanup (#1219)
- Update the instructions to reflect current menu and dialog options.
- Update the example project name from 5.1 to 6.12
- Re-arrange the ordering of the instructions so the user isn't bouncing
around the dialog tree unnecessarily.
Copy file name to clipboardExpand all lines: FAQ/README.md
+23-18Lines changed: 23 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2776,35 +2776,27 @@ Because of way the Linux kernel source code is architected and
2776
2776
configured, it's a bit subtler than you might think.
2777
2777
2778
2778
2779
-
**Disclaimer: These steps were last updated for Eclipse 2019‑03, CDT 9.7.0, and Linux v5.1-rc4**
2779
+
**Disclaimer: These steps were last updated for Eclipse 2025-06 R, CDT 12.1.0, and Linux v6.12.34**
2780
2780
2781
2781
Tip: Increase heap size before starting the index for Linux Kernel. See [How do I increase Heap Size](https://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F)
2782
2782
2783
2783
- Download and install Eclipse plus the CDT.
2784
2784
- Configure and build your kernel to define CONFIG_* and generate autoconf.h.
2785
2785
- Start up Eclipse.
2786
2786
- Click **File** -> **New** -> **Project**
2787
-
- In the pop-up window, choose **C/C++**-> **C Project**. Click **Next**
2788
-
- Fill in a project name like *Linux v5.1*
2787
+
- In the pop-up window, choose **C/C++**-> **C/C++ Project**. Click **Next**
2788
+
- In the next window, choose **C Managed Build**
2789
+
- Fill in a project name like *Linux v6.12*
2789
2790
- Uncheck the **Use default location** box and type in the root directory of your kernel into the **Location** box.
2790
2791
- In the **Project type:** pane, click the **Makefile project** and select **Empty Project**
2791
2792
- On the right side, select **Linux GCC**. Click **Next**
2792
2793
- Click **Advanced settings...** and a Properties dialog will pop up.
2793
-
- Note: At this point, and starting from Eclipse Oxygen, Eclipse will aggressively start indexing your project, which can make Eclipse painfully slow for the rest of the configuration steps below. To mitigate that, temporarily disable indexing now by opening **C/C++ General** section, click on **Indexer**, click on **Enable project-specific settings**, then unmark the **Enable indexer** option.
2794
-
- Open the **C/C++ General** selection on the left.
2795
-
- Click on **Preprocessor Include Paths**
2796
-
- Select **GNU C** in the **Languages** list
2797
-
- Select **CDT User Setting Entries** in the **Setting Entries** list
2798
-
- Click on **Add...**. Choose **Preprocessor Macros File** from the top left dropdown, **Project Path** from the top right dropdown, and enter "`include/linux/kconfig.h`" into the **File** text box.
2799
-
- Also add any other macros files you are using.
2800
-
- Click on **Indexer**
2801
-
- Checkmark the **Enable project specific settings** box.
2802
-
- Uncheck **Index source files not included in the build**
2794
+
- Note: At this point, and starting from Eclipse Oxygen, Eclipse will aggressively start indexing your project, which can make Eclipse painfully slow for the rest of the configuration steps below. To mitigate that, temporarily disable indexing now by opening **C/C++ General** section, click on **Indexer**, click on **Enable project-specific settings**, then unmark the **Enable indexer** option and click on **Apply**.
2803
2795
- Click on **Paths and Symbols** on the left.
2804
2796
- Select the **Includes** tab and then select **GNU C**
2805
2797
- Click **Add...**
2806
2798
- Click **Workspace...** then select your kernel's `include`, and `include/uapi` directories
2807
-
- Do another Add, Workspace and add both `arch/`*architecture*`/include`, and `arch/`**architecture*`/include/uapi` directories. e.g., `arch/powerpc/include` and `arch/powerpc/include/uapi` (The UAPI directories are due to the kernel's user/kernel header split covered [here](http://lwn.net/Articles/507794/) in-detail)
2799
+
- Do another Add, Workspace and add both `arch/`*architecture*`/include`, and `arch/`**architecture*`/include/uapi` directories. e.g., `arch/arm64/include` and `arch/arm64/include/uapi` (The UAPI directories are due to the kernel's user/kernel header split covered [here](http://lwn.net/Articles/507794/) in-detail)
2808
2800
- Click the **# Symbols** tab
2809
2801
- Click **Add...**
2810
2802
- Set the name to `__KERNEL__`
@@ -2814,17 +2806,30 @@ Tip: Increase heap size before starting the index for Linux Kernel. See [How do
2814
2806
- Select the **Filter** item and click **Edit Filter...**
2815
2807
- Click **Add Multiple...** and then select all of the `arch/*` directories in your kernel source that will not be used (i.e. all the ones that are not for the architecture you are using)
2816
2808
- Click **OK** and **OK** again to dismiss that dialog.
2809
+
- Click **Apply**
2817
2810
- Under **C/C++ General**, select **Preprocessor Include Paths, Macros etc.**
2811
+
- Click on the **Entries** tab and select **GNU C** in the **Languages** list
2812
+
- Select **CDT User Setting Entries** in the **Setting Entries** list
2813
+
- Click on **Add...**. Choose **Preprocessor Macros File** from the top left dropdown, **Project Path** from the top right dropdown, and enter "`include/linux/kconfig.h`" into the **File** text box.
2814
+
- Also add any other macros files you are using.
2818
2815
- Click the **Providers** tab and select **CDT GCC Built-in Compiler Settings**
2819
-
- Uncheck **Use global provider shared between projects
2816
+
- Uncheck **Use global provider shared between projects** if it is checked.
2820
2817
- Append `-nostdinc` to the curretly-existing **Command to get compiler specs**. The kernel is a *free-standing* environment by ISO C99 definition. That is, it does not want to be polluted, and obviously cannot work with, the "host" header files and libraries.
2821
2818
- Open a terminal, and type "echo -isystem $(gcc -print-file-name=include/)". Append *the resulting output* to the **Command to get compiler specs** mentioned above. If you're using a cross-toolchain to compile the kernel, use the full path of *that* cross GCC compiler, instead of just typing `gcc`in the command mentioned. Rationale for this step: `-nostdinc` already asked gcc to *not* search the standard system directories for header files. But the Linux Kernel depends on GCC-provided "freestanding environment" headers like *stdarg.h*, *stdbool.h* and so on, which are typically hosted by GCC under */usr/lib/gcc/<arch>/<version>/include*. Thus this step.
2819
+
- Click **Apply**
2820
+
- Click on **Indexer** under **C/C++ General** on the left
2821
+
- Uncheck **Index source files not included in the build**
2822
2822
- Click **OK** on the Properties dialog.
2823
-
- Note: If you temporarily disabled indexing as earlier recommended. This is the right time to re-enable it. Under **C/C++ General**, click on **Indexer**, and mark the **Enable indexer** option.
2824
-
- Click **Finish** on the C Project dialog.
2823
+
- Check the **Enable indexer** option.
2824
+
- Click **Apply and Close** on the bottom right of the C Project dialog.
2825
+
- Click on **Finish**
2825
2826
- The Project will index automatically.
2826
-
- On a platter drive indexing will take upwards of 20 minutes to complete, on a SSD indexing will take about 5 minutes to complete.
2827
+
- On a platter drive indexing will take upwards of 20 minutes to complete, on a SSD/NVME indexing will take between 2 to 5 minutes to complete.
0 commit comments