In my case I've wanted to use the current git version of the kernel to develop so I've downloaded linux-git from AUR:
$ git clone https://aur.archlinux.org/linux-git.gitand then build the kernel
$ nice -n19 makepkg
Now start Eclipse and create your project.
Go to Project -> Properties -> C/C++ General -> Preprocessor Include -> GNU C and delete all entries in CDT Managed Build Setting entries.
Select CDT User Settings Entries and then click Add...
Select Include Directory and File System Path
Select Contains system headers and select the <path to abs package>/pkg/linux-git-headers/usr/lib/modules/<linux version>/build/include/
Repeat the above steps for the <path to abs package>/pkg/linux-git-headers/usr/lib/modules/<linux version>/build/arch/x86/include/ directory
And one more time for <path to abs package>//pkg/linux-git-headers/usr/lib/modules/<linux version>/build/arch/x86/include/.
Now click Add... again and select Preprocessor Macro File and File System Path and add <path to abs package>/pkg/linux-git-headers/usr/lib/modules/<linux version>/build/include/linux/kconfig.h
Now go to Paths and Symbols, select #Symbols and add a symbol named __KERNEL__ and give it a value of 1.
Keine Kommentare:
Kommentar veröffentlichen