General :: Write Kernel Module That Will DMA Custom Card?
Aug 31, 2010
I am trying to write a kernel module that will DMA my custom card. Right now when i plug the card into linux no valid PCI device shows up (meaning I probably have a error on my end, i know) however, If I halt the system at startup in the bootloader (uboot) I am able to directly access the card as I know in uboot the physical memory address that is mapped to my device. Is there a way I can access the card in a simliar fashion in linux?
I have a problem with my custom kernel when I want to create the Nvidia kernel module.After this finished I installed the image and headers and created the Nvidia kernel module. Everything worked fine.However, if I remove the linux-source from my home directory then I can't create the kernel module.Even though I have the headers for the kernel installed.
In playback application i guess "snd_pcm_lib_write1" is the function call used to write the audio data to sound card at kernel level.If that is true. how can i send the same audio data at kernel level to other system connected over LAN.
I have read that when using xfs with lvm2, prior to kernel 2.6.29 write barriers are by deffault disabled.As i want to migrate /home to xfs (and create a external partition to hold some data in xfs too) i was thinking in compile a custom kernel 2.6.30 or higher from [URL].I have read the wiki, all the warnings , and that for compile a kernel.org kernel you should use the Linux Kernel in a Nutshel guide/book. But i don't really know if would worth do that only to have write barrier support , more when in one month i will buy a ups to be sure i can shutdown the pc well if the power goes out.Should i enable write barriers on xfs with lvm2 ,although going to have a ups ?
I am trying to get my Debian system running. I have an older Dell Precision 490 with two dual core CPUs. It has 16G Ram, an 150G Intel solid state drive, a 230G data drive, and a 600G backup drive. I have two Samsung monitors attached to the NVIDIA Geforce FX 5xx card. I have been using this machine for several years with Etch, then Lenny, running KDE 3.5. I recently needed to upgrade to Squeeze and KDE4 and have had nothing but problems since. I keep having issues with the video drivers, every time I touch anything the drivers seem to upgrade from the legacy 173 to the current 195.
There have been other library compatibility issues as well (gclib) and the machine has not been stable. This morning the system was running very slowly with X running at 100% (from top) and then the entire system froze. After a hard reboot, X did restart. The Xorg.0.log has the following message: "Failed to initialize the NVIDIA kernel module! Please ensure that there is a supported NVIDIA GPU in this system, and that the NVIDIA device files have been created properly..."
Had a custom kernel (188.8.131.52) running under Slackware 12.1 and also the same kernel on an Ubuntu 10.04 machine just fine, however after a clean install of Slackware 13.1 this kernel no longer works (This kernel was re-compiled with the same .config file under Slack 13.1) as I keep getting the the following: -Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,3) The strange thing is it keeps looking for the root file system in hda1, however the stock 13.1 kernel finds it in /dev/sda1 so the root partition is /dev/sda1 in lilo and the harddisk is known as /dev/sda.
I am using uuntu 8.04 and I am trying to make live cd with running kernel. I know that there is documentation in ubuntu website in "how to make live cd" but the thing is this is my custom kernel. I have my own configuration. So I want this kernel to be work in live cd.
I have a Samsung phone GT-B3210. For some time I was unable to find working Windows drivers for it. I eventually gave up looking. Then one time I was charging phone over its USB port and booted Ubuntu and was pleasantly surprised when I saw phone's μSD card reader on my desktop. I now need to switch to Gento and would like to be able to work with phone there too. Lsusb tells me it's detected as Bus 007 Device 006: ID 04e8:663f Samsung Electronics Co., Ltd SGH-E720/SGH-E840but lsmod wasn't very helpful. On the list of loaded modules, I wasn't able to find one which looks like it's related to the phone.
I'd like openSUSE to automatically load a kernel module (e.g. libsas) at boot time even no device requires it. In Ubuntu, you would add the module name to the file /etc/modules. Is this the correct place for openSUSE as well?
I wish to recompile serial_core module to make a change in the way ioctl works. I don't wish to rebuild the whole kernel package. Can someone point me to the proper method?? I know I will need to download the kernel headers etc. But I would like to avoid the unneeded compiles of things I don't need to recompile.
I update my last kernl to 2.6.38-rc7 but when I launch VirtualBox, on stdout.The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (2.6.38-rc7) or it failed to load. Please recompile the kernel module and install it by sudo /etc/init.d/vboxdrv setup.
Recently I was trying to look into vmware pvscsi modules for newly announced linux kernel 2.6.35-rc2. I compiled the kernel with option: make oldconfig where it asked me for various interactive options and all I did is Kept pressing the Enter ENTER key(Donno if that is the correct way to slect default ).The Kernel Compilation anyway went fine and I can see new kernel at grub screen, booted and it went fine.Now when I explored I found that nor the vmware_balloon and vmw_pvscsi modules are present which means I need to install these modules.I came to know that recently a new version of the vmware memory drivers being included through this page:
where you can see an entry like:
MODULE_AUTHOR("VMware, Inc."); MODULE_DESCRIPTION("VMware Memory Control (Balloon) Driver"); -MODULE_VERSION("184.108.40.206-K"); +MODULE_VERSION("220.127.116.11-k");
Doesn't it mean that the new kernel has new driver version inboxed?Also, I tried to install modules through modprobe and insmod(seems that this doesnt work) but couldnt do that.
I was able to copy 227 images to a brand new 2GB memory card and I am only using 8% of the card and now I can't write to it anymore?
Code: Filesystem Size Used Avail Use% Mounted on df -h returns this : /dev/sdd1 1.9G 136M 1.8G 8% /media/disk-2
This isn't the first time this has happened either. Just the last couple times I didn't really care enough to pursue it. But now I am trying to load a card for my daughters digital photo frame and I can't because now all of a sudden I can no longer write to the drive? The exact error message I get is: "Could not write to /media/disk/image.jpg" and when I try to create a new folder, I get a disk full error message? How in the heck is this possible when I am only using 136MB of 2GB of capacity?
Code: mount /dev/sdd1 on /media/E0FD-1813 type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush) cp 'Aankhon Aankhon Mein hum tum ho gaye deewane.mp3' /media/E0FD-1813/Music/sumeet/a cp: cannot create regular file '/media/E0FD-1813/Music/sumeet/a/Aankhon Aankhon Mein hum tum ho gaye deewane.mp3': Read-only file system The micro sd card mounts & works as fat32 in windows xp just fine.
I have a loadable module, simple enough I believe it should run on any 2.6 kernel. I want to force the load and test that assumption. How can I do it?
ismod does not seem to notice the -f in 2.7 modprobe has -f but cannot locate the module.No go. So I read the manpage for modprobe which says: modprobe looks in the module directory /lib/modules/'uname -r'.So I copied MYMODULE.ko to /lib/modules/2.6.(the only directory in here) and type: modprobe -f MYMODULE.ko.Still can't locate MYMODULE.ko.I notice there are no other .ko modules in that directory; so I go in deeper to kernel/drivers/char, guessing about the char directory, and copy MYMODULE.ko there.
I am using FC9, I want to write a module that will always show current time after booting.But for that I need not only to load module using insmod/modprobe, but also to compile that module during boot time.How can I perform this 2 steps correctly.
i have written some really basic loadable kernel modules. There are a couple of concepts that i'll like to get cleared.
In a tutorial, the Makefile was given as follows- obj-m += try.o all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
I understand that -C option of 'make' changes the current directory to /lib/modules/$(shell uname -r)/build (which depends on my kernel).
Now, my question is why to change to that particular directory? Also M=$(PWD) will hold the dir where i have written the module. Why is it required? What does 'modules' at the end of that line indicate?
Q2> We need to include <linux/module.h> and <linux/kernel.h> in a module. If i am right, the module uses kernel headers for these definitions. But how does 'make' find these definitions.
Q3> We are planning to write a custom scheduler for linux kernel. cat /sys/block/sda/queue/scheduler gives us the currently loaded schedulers. How do we expose our scheduler to linux kernel so that we can use it by switching to it.
I have installed perl5.12.3 in a custom location, ( a NFS share). I have all the libraries created in the same location. This was an attempt not to disturb existing version of perl. I have succeeded doing this.Now, I need to install around 200 perl modules. I tried Bundle option in CPAN shell, it somehow did not work. Does anyone here know off any other better method of installing multiple perl modules. How do I use CPANPLUS to install all the modules. What changes do I make to Config.pm considering custom location of perl installation I have done.
I plugged in a SDCard (SanDisk 4GB) with the write protect On in my Ubuntu system. Ideally this shouldn't have allowed me to write to this card. But it did. And that's when I found that it was getting mounted as a rw filesystem instead of ro. But the same card when I inserted it in another Ubuntu system with write protect On, this problem was not there. So nothing wrong with the Card.
I am using Sandisk 2GB micro SD card on ARM processor EP9307A. The card is detected, mounted. I can read data from the SD card. But cannot write to it. There is no error when I attempt to write to the Card. It appears as if its working fine. But after umount and re-mount, the data written is gone.
Here is the log when the SD card is detected: # insmod drv card size = 1977614336, sector size = 31, wp_grp_size = 127, wp_grp_enable = y S:00001000 M:fffff000
What is the significance of Write Group Protect Enable (wp_grp_enable=y). Is it the case that the SD card is write protected.
Using CMD9 : SEND_CSD , I can read the Card Specific Data (CSD). I have tried CMD27 : PROGRAM_CSD , to CLEAR wr_grp_enable : No effect seen. I have tried CMD29 : CLEAR_WRITE_PROT ,: No effect seen.
Where is the issue, 1. I could not send commands properly. 2. Card cannot be set free from WRITE_PROTECT. 3. Something else.
I'm currently switching from Mac OS X to Linux (Fedora 15). I've now moved my music library (about 40 GB), mostly in AAC (*.m4a) format. Since I didn't find a way to adjust the volume of these files using MP3Gain (although I read that it should work with AACs, it didn't), I've decided to just convert all files to MP3 using faad and lame. So far so good. (BTW: I've already converted them, so I don't need any help with AAC/MP3Gain...)
The problem: Lame ereases all the tags. I found a way to preserve at least the most important tags (title, artist, album, track number and year) using exiftool to extract them from the AAC files and id3tag to write them to the new MP3 files.. I'm loosing the album artist, but I have not many compilations, so that's not a real problem.
The real problem are the genre tags. My songs are all carefully tagged with custom genres, and I didn't find any way to write custom genres to MP3 files, only the predefined ones. So I just copied the genres into the comment tag to at least preserve them because I wanted to start the conversion process (which takes really, really long on my 3 years old MacBook).
Does anyone know a way to copy the custom genre from the comment tag (it's the only entry) to the genre tag? A way to write it to the MP3 is enogh, I already know how to copy it from the comment tag. The writing is my problem.