Re: Kernel module compilation errors
Thank you On Thu, Aug 11, 2016 at 7:40 PM Greg KH wrote: > On Thu, Aug 11, 2016 at 07:25:45PM +, Matt M wrote: > > I am just getting started with kernel module development, and I can't get > > anything to compile. > > > > I get the following errors: > > > > In file included from main.c:1:0: > > /usr/src/linux/include/linux/init.h:142:13: error: expected ‘=’, ‘,’, > ‘;’, > > ‘asm’ or ‘__attribute__’ before ‘load_default_modules’ > > void __init load_default_modules(void); > > ^~~~ > > /usr/src/linux/include/linux/init.h:143:12: error: expected ‘=’, ‘,’, > ‘;’, > > ‘asm’ or ‘__attribute__’ before ‘init_rootfs’ > > int __init init_rootfs(void); > > ^~~ > > /usr/src/linux/include/linux/init.h:285:13: error: expected ‘=’, ‘,’, > ‘;’, > > ‘asm’ or ‘__attribute__’ before ‘parse_early_param’ > > void __init parse_early_param(void); > > ^ > > /usr/src/linux/include/linux/init.h:286:13: error: expected ‘=’, ‘,’, > ‘;’, > > ‘asm’ or ‘__attribute__’ before ‘parse_early_options’ > > void __init parse_early_options(char *cmdline); > > > > > > The errors go on and on, but the majority look like that. > > > > My code: > > > > #include > > #include > > > > int main() { > > return 0; > > } > > > > > > The compile command: > > gcc -I /usr/src/linux/include/ main.c > > That's not how you compile a Linux kernel module, sorry. > > Please read the very good documentation for how to set up a Makefile for > building a kernel module. It's in the kernel's Documentation/ > directory. > > best of luck, > > greg k-h > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Kernel module compilation errors
On Thu, Aug 11, 2016 at 07:25:45PM +, Matt M wrote: > I am just getting started with kernel module development, and I can't get > anything to compile. > > I get the following errors: > > In file included from main.c:1:0: > /usr/src/linux/include/linux/init.h:142:13: error: expected ‘=’, ‘,’, ‘;’, > ‘asm’ or ‘__attribute__’ before ‘load_default_modules’ > void __init load_default_modules(void); > ^~~~ > /usr/src/linux/include/linux/init.h:143:12: error: expected ‘=’, ‘,’, ‘;’, > ‘asm’ or ‘__attribute__’ before ‘init_rootfs’ > int __init init_rootfs(void); > ^~~ > /usr/src/linux/include/linux/init.h:285:13: error: expected ‘=’, ‘,’, ‘;’, > ‘asm’ or ‘__attribute__’ before ‘parse_early_param’ > void __init parse_early_param(void); > ^ > /usr/src/linux/include/linux/init.h:286:13: error: expected ‘=’, ‘,’, ‘;’, > ‘asm’ or ‘__attribute__’ before ‘parse_early_options’ > void __init parse_early_options(char *cmdline); > > > The errors go on and on, but the majority look like that. > > My code: > > #include > #include > > int main() { > return 0; > } > > > The compile command: > gcc -I /usr/src/linux/include/ main.c That's not how you compile a Linux kernel module, sorry. Please read the very good documentation for how to set up a Makefile for building a kernel module. It's in the kernel's Documentation/ directory. best of luck, greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Kernel module compilation errors
I am just getting started with kernel module development, and I can't get anything to compile. I get the following errors: In file included from main.c:1:0: /usr/src/linux/include/linux/init.h:142:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘load_default_modules’ void __init load_default_modules(void); ^~~~ /usr/src/linux/include/linux/init.h:143:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_rootfs’ int __init init_rootfs(void); ^~~ /usr/src/linux/include/linux/init.h:285:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parse_early_param’ void __init parse_early_param(void); ^ /usr/src/linux/include/linux/init.h:286:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘parse_early_options’ void __init parse_early_options(char *cmdline); The errors go on and on, but the majority look like that. My code: #include #include int main() { return 0; } The compile command: gcc -I /usr/src/linux/include/ main.c Thanks in advance for any help ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Possible Sysfs for led class drivers
Hi, I have scanned through some of the led sysfs interfaces of my hardware boards inside the /sys/class/leds and found these brightness, max_brightness trigger uevent invert sata I want to know can we add our own custom sysfs interface ? Does there exists a default list of interfaces provided by the led class subsystem? like brightness, max_brightness,trigger,uevent ,etc?? Thanks in advance ! Rgds Rp ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Are these books outdated?
Sadly most of the links requires permission ! On Thu, Aug 11, 2016 at 1:41 PM, Raul Piper wrote: > Awwsome , thanks for the link.Looks good ,.I solely depends on the > google translator now ! > > On Thu, Aug 11, 2016 at 1:36 PM, Aleksander Alekseev > wrote: >>> Am 11.08.2016 um 05:52 schrieb Raul Piper: >>> > Pdfdocs !! >>> > Hmm that would be a nice Idea to collate all the Documentation of >>> > the kernel into the pdfs and make a book out of it for any kernel >>> > version we want ! >>> > Thanks ! >> >> I tried `make htmldocs`. I would say it's more like Doxygen/Javadoc >> documentation than a book. Fore the record - I didn't manage to build >> PDF on Ubuntu Linux. >> >>> There is a german book [1] which handles Kernel 4.x and device trees. >>> But i don't know if any translation is planned. >>> >>> [1] - https://ezs.kr.hsnr.de/TreiberBuch/ >>> >> >> Wow, thanks a lot for this link! Fortunately I have some basic >> knowledge of German language. I think I could read this book with a >> dictionary. BTW in my opinion German is a pretty simple language >> (comparing to English for instance) so it should not be a real problem >> to anyone to learn its basics in a month or two. >> >> -- >> Best regards, >> Aleksander Alekseev ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Documentation/DocBook build error.
Hi All, I was trying to build Documentation/DocBook, but build is failing with below error. what could be the reason for below error?. I am using Ubntu 14.04 LTS, and my kernel version is 4.5.0-rc7 dsp@BLR-PCUB-01141:/usr/src/linux-stable$ sudo make pdfdocs PDF Documentation/DocBook/device-drivers.pdf Using catalogs: /etc/sgml/catalog Using stylesheet: /usr/share/docbook-utils/docbook-utils.dsl#print Working on: /usr/src/linux-stable/Documentation/DocBook/device-drivers.xml openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:55538:7:E: document type does not allow element "sect1" here openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:56585:7:E: document type does not allow element "sect1" here openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:58367:7:E: document type does not allow element "sect1" here openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:58410:7:E: document type does not allow element "sect1" here openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:58834:4:E: non SGML character number 128 openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:58834:5:E: non SGML character number 157 openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:58834:14:E: non SGML character number 128 openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:58834:15:E: non SGML character number 157 openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:59406:7:E: document type does not allow element "sect1" here openjade:/usr/src/linux-stable/Documentation/DocBook/device-drivers.xml:59778:12:E: end tag for "sect1" which is not finished make[1]: *** [Documentation/DocBook/device-drivers.pdf] Error 8 make: *** [pdfdocs] Error 2 dsp@BLR-PCUB-01141:/usr/src/linux-stable$ Regards, Madhu ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Are these books outdated?
Awwsome , thanks for the link.Looks good ,.I solely depends on the google translator now ! On Thu, Aug 11, 2016 at 1:36 PM, Aleksander Alekseev wrote: >> Am 11.08.2016 um 05:52 schrieb Raul Piper: >> > Pdfdocs !! >> > Hmm that would be a nice Idea to collate all the Documentation of >> > the kernel into the pdfs and make a book out of it for any kernel >> > version we want ! >> > Thanks ! > > I tried `make htmldocs`. I would say it's more like Doxygen/Javadoc > documentation than a book. Fore the record - I didn't manage to build > PDF on Ubuntu Linux. > >> There is a german book [1] which handles Kernel 4.x and device trees. >> But i don't know if any translation is planned. >> >> [1] - https://ezs.kr.hsnr.de/TreiberBuch/ >> > > Wow, thanks a lot for this link! Fortunately I have some basic > knowledge of German language. I think I could read this book with a > dictionary. BTW in my opinion German is a pretty simple language > (comparing to English for instance) so it should not be a real problem > to anyone to learn its basics in a month or two. > > -- > Best regards, > Aleksander Alekseev ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Are these books outdated?
> Am 11.08.2016 um 05:52 schrieb Raul Piper: > > Pdfdocs !! > > Hmm that would be a nice Idea to collate all the Documentation of > > the kernel into the pdfs and make a book out of it for any kernel > > version we want ! > > Thanks ! I tried `make htmldocs`. I would say it's more like Doxygen/Javadoc documentation than a book. Fore the record - I didn't manage to build PDF on Ubuntu Linux. > There is a german book [1] which handles Kernel 4.x and device trees. > But i don't know if any translation is planned. > > [1] - https://ezs.kr.hsnr.de/TreiberBuch/ > Wow, thanks a lot for this link! Fortunately I have some basic knowledge of German language. I think I could read this book with a dictionary. BTW in my opinion German is a pretty simple language (comparing to English for instance) so it should not be a real problem to anyone to learn its basics in a month or two. -- Best regards, Aleksander Alekseev ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies