Re: what does it use two !!
Ben Wu writes: Dear All: 1 I found some placeuse two !!, what's means if(button-gpio != INVALID_GPIO) state = !!((gpio_get_value(button-gpio) ? 1 : 0) ^ button-active_low); else state = !!button-adc_state; if a = 1010011 then !a = 0 and !!a = 1 if a = 00 then !a = 1 !! = 0 basically it means if a is non-zero then make a = exactly 1, else leave it at zero. 2 is there some MSN group to study linux kernel or discuss it ? don't know, but it would be ironic. Thanks and Best Regards Ben Wu MSN:cray...@yahoo.cn ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
having trouble getting device from kobject
I added an entry to a sysfs device (drivers/mtd/nand/omap2.c) like this: static int __devinit omap_nand_probe(struct platform_device *pdev) { ... ... ret = sysfs_create_group(pdev-dev.kobj, ef_group); if (ret) { err = -ENOMEM; goto out_free_info; } ... ... } that works, I get the following files: /sys/devices/platform/omap2-nand.0/0xEF/set /sys/devices/platform/omap2-nand.0/0xEF/unset (I added the 0xEF directory and the set and unset files) then in the store function of one of the attributes I do this, in an attempt to get the original pdev back: static ssize_t EF_set_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count) { struct kobject *nand_kobj = kobj-parent; struct device *dev = container_of(nand_kobj, struct device, kobj); struct platform_device *pdev = container_of(dev, struct platform_device, dev); printk(KERN_ALERT pdev is 0x%x\n, (unsigned int)pdev); return count; } but I'm not getting the same address back. Not sure why. thanks, Chris ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Need pointers for Bootloader
On 2012-07-06 03:56, siddharth saxena wrote: Hi I am going to start work on bootloader for ARM based OMAP SoCs. Have been reading about it. I have gathered the basics and now want to have a working understanding. Can anybody provide some pointers about some good sources or examples to study and practice? Regards Siddharth I don't know if you're just doing this for fun, but in case you're not: http://www.arm.linux.org.uk/mailinglists/faq.php#f7 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
freelance kernel work
I'm not looking for work, nor do I have any work for others. I'm just curious if there is a central location where freelance kernel developers hang out. I've never seen any email on mailing lists like I have some hardware and want somebody to write a kernel module for it. I thought that sort of request would have been common. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: IRQs and memory consistency
On 10.04.2012 19:58, Wink Saville wrote: Sounds to me like there needs to be a flush of the processor cache by using memory barriers. I used a wmb(); right after I set the value I wanted. I'm guessing that the IRQ is taken on a different thread and possibly a different processor and the value needs to be flushed. You might try having devid be an atomic_t and then use atomic_set and atomic_read so that the proper memory barriers are used. should I use atomic ops instead of a wmb? The interrupt can't happen until the value is assigned completely in one thread. I'm sure. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: IRQs and memory consistency
On 11.04.2012 10:35, Wink Saville wrote: Do you have a read barrier in the IRQ? Ah, no I don't. See SMP BARRIER PAIRING in: http://www.kernel.org/doc/Documentation/memory-barriers.txt [3] I saw that but only skimmed it. I'll let the mailing list know if it worked when I get a chance to try it. thanks, -Chris ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
IRQs and memory consistency
This is a high level question about how IRQs work in the kernel. I have a struct that was kmalloc'd into ram. Within this struct there is an int, called devid. When I set this devid to a number that isn't 0, I print the following: checking devid value327683 in 0xcb6953d4 where 327683 is the value of the int and 0xcb6953d4 is the address of the struct that the devid value is in. Then an interrupt happens and when I print this value again at the beginning of the interrupt handler I get the following printed text: checking devid value0 in 0xcb6953d4 notice that the devid has been set to 0. I can't find any code on my end that would do this. Is there something, maybe related to memory address spaces in IRQ handlers that I don't know about? The IRQ and the setting of the devid value happen fairly close to each other in time. (like less than a second, or closer) Any ideas or guesses are appreciated. -Chris ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
resubmitting patches
If I have patches sent to a kernel mailing list that are still under review and want to add more, should I resend the whole series with the new ones or should I only send the new patches as a new thread? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the + sigh in the modules folder name?
On 23.01.2012 15:53, Robert P. J. Day wrote: On Tue, 24 Jan 2012, Graeme Russ wrote: It would be worth testing if a checkout of a tag (say 3.2.0) plus a local commit causes '+' and 'dirty' i think dirty only shows up if you have local, uncommitted changes. but i should probably verify that. I had a local commits when I compiled the kernel. I should have mentioned that in my original email. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
what is the + sigh in the modules folder name?
I have a path on system called: '/lib/modules/2.6.37+/' It used to be called: '/lib/modules/2.6.37/' where did the plus come from? I'm asking because I have a /lib directory and the kernel sources for it. the problem is there is a closed source driver in the /lib directory and I want to compile a new kernel image, but can't re-compile the closed source modules. I'm guessing my new kernel isn't working because it's looking in the path with the + after being recompiled. thanks, Chris ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
adding preprocessor defines in module makefiles
Hi, I'm trying to build a kernel module for fun, and I can't figure out a clean way to add preprocessor defines that correspond to Kconfig values. I'm trying to set CONFIG_SND_DEBUG specifically. My module has only one file, and I've tried adding #define CONFIG_SND_DEBUG as the first line in the .c file, but now I'm getting the following warning: WARNING: __snd_printk [/home/chris/snd/snd-foo.ko] undefined! I haven't compiled the kernel running on my system with the CONFIG_SND_DEBUG option but I haven't been able to see a reason why that should change anything for my module. thanks, Chris ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Paging of Kernel Memory
On Tue, 6 Sep 2011 17:48:12 +0530, Vijay Chauhan wrote: Hi, i was going through the Linux Kernel Development book. It mention the following: Additionally, kernel memory is not pageable.Therefore, every byte of memory you consume is one less byte of available physical memory. What is the meaning of 'Kernel memory is not pageable'? Anyone can give details would help me in understanding. Thanks, Vijay It means that it can't be swapped to your swap partition, even if you're not using it. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: how to apply patches from git ?
On Wed, 13 Jul 2011 02:16:09 -0700, Jeff Kirsher wrote: On Wed, Jul 13, 2011 at 00:22, RKK kulkarni.ra...@gmail.com wrote: Hi all, Sorry if this is a basic question. How do i take patches from e-mail? for example git send mail sends patches as e-mail if someone wants to apply that patch to his branch then how do i get that in . patch format and then use patch -p1 *.patch or is there something im missing here? thanks. -- Warm Regards, Ravi . Save the email message in mbox format and then you can use git am /path/to/mbox/file to apply the email patch to your tree. well, actually you don't need to do the whole mbox thing with git. You only need to get the patches into .patch files in a directory. I believe you can then use git am /path/to/patches and it will apply the patches in the order the ls command displays them. I'm assuming that would be helpful since most people who don't know how to apply patches from mail also don't have an mbox. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Debugging a custom kernel
On Wed, 29 Jun 2011 23:27:41 +0200, Apelete Seketeli wrote: On 29-Jun-11, Christopher Harvey wrote: On 06/29/11 16:14, Apelete Seketeli wrote: I still can't figure where the boot process is getting stuck with step-by-step execution, but it seems that the last function called is delay_loop from arch/x86/lib/delay.c. Have you run the backtrace (bt) command from the gdb shell? That should tell you what function is calling the __delay. I didn't, will try that and see if it helps. That command is your bread and butter. If you type up into gdb it will take you to the line that called __delay. Keep typing up to see exactly what series of functions were called to get to the __delay. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
finding kernel jump address after decompressing linux
I'm trying to figure out what physical address the kernel jumps to after Uncompressing Linux... done, booting the kernel.. IIRC, there are two parts to a kernel image, one compressed part and one uncompressed. The uncompressed code decompresses the compressed part and puts it into memory then jumps to it. I'm using an ARM kernel, version 2.6.38. thanks, Chris ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Debugging a custom kernel
On 06/29/11 16:14, Apelete Seketeli wrote: Hello, I am working on a custom kernel, and I would like to add the necessary support to enable it to boot with qemu. When you say debug inside qemu, do you run gdb qemu or gdb vmlinux In order to achieve that I am trying to debug it inside qemu by attaching a gdb to it. you do this by adding -S -s to the qemu boot parameters. the from the gdb shell, target remote :1234. I still can't figure where the boot process is getting stuck with step-by-step execution, but it seems that the last function called is delay_loop from arch/x86/lib/delay.c. Have you run the backtrace (bt) command from the gdb shell? That should tell you what function is calling the __delay. That function contains some assembly code, does someone know what it is supposed to do ? Probably wait a specific amount of time. Since a compiler optimizes C you can't write an accurate delay in C. The compiler wont optimize the inline assembly. Beside, do you have any advice on the way I should proceed to get the necessary information to port the kernel ? You should find an existing board and tweak it to get started, or post the backtrace output. Thanks. Have you had any luck with a google search along the lines of qemu gdb kernel? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
checking atags for boot parameters
I'm suspicious that the bootloader I'm using isn't passing atags to the kernel properly. I'm getting a prefetch exception right after the uncompressing linuxdone message, does it make sense that this could happen because mem=128M isn't getting passed properly? Basically what I want to do is have the kernel print out the boot parameters along with the uncompressing linux message. thanks, Christopher ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: picking an ARM board with jtag for debugging
On Wed, 01 Jun 2011 09:04:12 +0200, luca ellero lro...@gmail.com wrote: On 31/05/2011 16.39, Christopher Harvey wrote: I'm looking for an ARM board with a cortex a9 mpcore with a good solution for jtag debugging under linux. I have a beagle and a pandaboard sitting in front of me, but the beagle only has cortex a8 and the pandboard jtag situation looks pretty dismal. (You need to buy and download a lot of software). Cost really isn't an issue, (under 1000$) but good gdb support is critical. I need jtag specifically because kgdb doesn't start up soon enough for me. Anybody here doing ARM linux development with jtag? thanks, -Chris Hi Christopher, why not give a look at OpenOCD? Some guys (me included) have sent some patches to support Cortex A9 and Panda. Development version has now (basic) support for Pandaboard. Anyway you have to use development version (git clone git://repo.or.cz/openocd.git) since 0.4.0 stable release hasn't good support for Cortex A8/A9. Furthermore, if you use git version you can also contribute to improve cortex-A* support, which is always very welcome ;-) I'm just about to write an HowTo to explain how to use OpenOCD on Panda. I will publish it on my site soon. regards Luca Ellero Thanks Luca, I find it funny that of all the expensive jtag solutions out there, OpenOCD seems to be the most convenient. I will probably try that direction out. Hopefully I will find the time to learn and help out with OpenOCD if I happen to need features that it doesn't already support. -C ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Init error NFS booting a Fedora 13 file system
On Mon, 16 May 2011 16:18:23 -0300, Erlon Cruz sombra...@gmail.com wrote: you mean the LD_LIBRARY_PATH? Yes, I thing that what might be happening is that when the system is in initramfs, LD_LIBRARY_PATH is not set so the system cant execute the dynamically linked init. I this config you said you did do you had to set any configuration (so set something) after or before chrooting? If you have a properly setup file system (eg, libraries in /usr/lib and /lib) then you shouldn't need to set and LD_LIBRARY_PATHS during boot or after a chroot. If the chroot gives you errors with regards to libraries, then you've found your problem, otherwise the problem is elsewhere (and the error messages given from trying to run init from a chrooted environment will probably help you). I hope that was the original question, you erased the text form the beginning of the email. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Init error NFS booting a Fedora 13 file system
On Fri, 13 May 2011 14:58:31 -0300, Erlon Cruz sombra...@gmail.com wrote: By the way this ( mount the system and then chrooting) is what I happen with initramfs ins't? It must be some way to change the root from the ramfs to the new root fs without setting the paths to 'init' s required libraries. Makes sense? I can't understand this part: without setting the paths to 'init's required libraries you mean the LD_LIBRARY_PATH? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies