Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have Linux running on an embedded board that uses a processor running inside an FPGA. I have developed a custom SATA controller and a device driver in Linux. I have managed to load my device driver using "ismod" and I can confirm it is live using "lsmod". I have also created a device node in /dev using "mknod". My problem is that I cant figure out how to get the Kernel to read or write the drive. I have tried "mkfs" but it says the image is too small. I have also tried fdisk but it says it cant read from the drive. I have a lot of printk statements in my driver but the only ones I see is when it initially creates the module. I don't see the Kernel trying to use the driver in normal operation. Also if I look in /sys/block I don't see any mention of my device which I would of thought I should. So if anyone has any thoughts I would love to hear them.
I think some of my problem is that I didn't have some filesystems like ext2 compiled into the Kernel. My problem now is that when I insmod my driver I get the following. As I am not an expert I am not quite sure what it is saying. If anyone has an idea then I would appreciate it.
Looks like the driver is being added ok. It calls your probe routine which finds a drive and tries to register it. That fails because the name is not unique. Normally disks would we named sda, sdb, etc. It looks like you are naming the disk xsa but there is already a /sys/block/xsa directory.
Thanks for the help. How would you normally setup the name? The xsa is assigned to a compact flash card. Is it something that needs to be done in Kernel config or some script that is run?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.