--- Log opened Sun Mar 31 00:00:54 2013 | ||
stekern | now I am | 05:09 |
---|---|---|
andresjk | good | 07:32 |
andresjk | I tried to compile the module code of a lkmpg> http://tldp.org/LDP/lkmpg/2.6/html/x569.html#AEN687 and I get http://pastebin.com/SM1naBTY | 07:34 |
andresjk | I don't know which statements or32-linux cannot compile | 07:35 |
andresjk | but I just got a working char driver with this (http://appusajeev.files.wordpress.com/2011/06/code.gif) code | 07:36 |
andresjk | anyway, I want to avoid the things that make the or32-linux-gcc break when compiling modules | 07:38 |
stekern | unregister_chrdev doesn't return anything anymore, so it's not or32-linux-gcc that breaks, it's the example that is old | 07:41 |
jeremybennett | andresjk: I would guess the compiler is correct (if strict). Use the GCC flag to turn off warnings about void values not being ignored or fix the code. | 07:41 |
jeremybennett | This is a common problem with modern GCC. It has become *much* more strict about following the C/C++ standards. | 07:41 |
jeremybennett | Sloppy code that passed in older versions of GCC will trigger warnings and errors now. | 07:41 |
stekern | i.e. it's now 'void unregister_chrdev' | 07:42 |
andresjk | if the warnings are ignored does the code will still be stable? | 07:44 |
andresjk | I don't know where to learn about modules and devices drivers. The books I'm reading were Linux Kernel Module Programming Guide and Linux Device Drivers ver 3 | 07:45 |
andresjk | but they are based on kernel version 2.6 | 07:45 |
jeremybennett | andresjk: For the Linux Device Drivers book, I presume you mean http://lwn.net/Kernel/LDD3/. This is the definitive work, and is based on Linux 2.6.10. | 08:03 |
jeremybennett | Stuff has moved on since 2005, but the core ideas are mostly the sames AFAIK. I'm not really a kernel/driver expert. | 08:05 |
jeremybennett | The concepts all remain valid. It's about as up to date as you get in a dead tree. Looking at the O'Reilly website there doesn't seem to be evidence of a 4th edition. | 08:06 |
stekern | andresjk: if you change the cleanup_module to this it will compile: http://pastie.org/7190470 | 08:10 |
andresjk | jeremybennett, Yes, I meant that book, Im still reading it as the main guide because the topics are very well cover, but I complement it with examples I find in the internet so I could learn from doing.Still there is plenty tutorials in the internet but most of them are not so recent and spotting those changes its really a pain when learning. | 08:17 |
andresjk | my final goal is to do a DMA driver but Im still learning the basics | 08:17 |
andresjk | stekern, yes I did that when you spot it out. Thank you. Actually it will never crossed my mind though | 08:19 |
andresjk | part of my thesis is to document the sw/hw design flow in OR | 08:22 |
andresjk | jeremybennett, the -w flag goes after the "make -C", right? | 08:24 |
andresjk | btw, thank you very much guys | 08:25 |
jeremybennett | andresjk: If you want to change the C flags, I think you'll need something like 'make CLFAGS+="-w..." ...' | 08:39 |
jeremybennett | More likely you'll have a configure option to change things. | 08:39 |
andresjk | jeremybennett, what the order of the GCC parameters? My Makefile doesn't have a flag option. http://pastie.org/7190671 | 08:59 |
jeremybennett | You can put them in any order, but if they clash the last one will take precedence. In particular if you use the approach I suggested, your CFLAGS will be overridden by the -w in the makefile (since it is added by += after any existing CFLAGS). | 09:03 |
jeremybennett | What is slightly confusing me is that -w is there anyway, which disables warning messages. Looking at your earlier post, I see it is actually an error, not a warning. | 09:04 |
jeremybennett | So you can't disable it. An error means if you ignore it things will break. | 09:04 |
jeremybennett | I don't have your source code, so I can't see what is happening on line 72 of chardev.c to advise on how to fix it. | 09:05 |
jeremybennett | Although from stekern's earlier comments it sounds like you should be using a different function. | 09:06 |
andresjk | yes, the new function doesn't return any value thats why the compiler was complaining. The example was old. I never thought of that. | 09:07 |
andresjk | Well I guess its better to use the right programming techniques and the newest functions to avoid any error/warring and comply the *strict* rules of the modern compilers | 09:10 |
andresjk | as you said before | 09:10 |
andresjk | thanks a lot | 09:15 |
andresjk | brb | 09:15 |
jeremybennett | yw | 09:26 |
mor1kx | [mor1kx] skristiansson pushed 2 new commits to master: https://github.com/openrisc/mor1kx/compare/0cb2ef89dcb1...31b298e235e8 | 13:38 |
mor1kx | mor1kx/master 2b755b9 Stefan Kristiansson: cappuccino/fetch: avoid ic request when waiting for ibus exception... | 13:38 |
mor1kx | mor1kx/master 31b298e Stefan Kristiansson: icache, dcache: allow accesses during refill... | 13:38 |
stekern | I'm actually pretty proud over how that "allow accesses during refill" turned out, *much* better than the old refill ack approach | 13:42 |
hjy | http://opencores.org/or1k/Ubuntu_VirtualBox_image_updates | 16:31 |
hjy | This virtual image when it will update? | 16:31 |
--- Log closed Mon Apr 01 00:00:55 2013 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!