hi, sorry i cant help you with this. the rules of the challenge says "you really should be doing your own work" . i can only say you that I have taken almost one month for this one . I am currently at task 18 and i still think this one was the toughest of all the tasks til now. but after finishing it you will surely say "s**** its this easy .. " .. well .. atleast i said .. :) thanks sudip On Tue, Sep 9, 2014 at 5:45 PM, lx <lxlenovostar@gmail.com> wrote:
hi : I'm confused about Eudyptula Challenge Task 05. Actually, I try two ways. 1. I register a usb driver, but Eudyptula Challange don't think so. ##############################################
#include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/usb.h> #include <linux/usb/input.h> #include <linux/hid.h>
MODULE_AUTHOR("author"); MODULE_DESCRIPTION("lx module\n"); MODULE_LICENSE("GPL");
static struct usb_device_id lx_id_table[] = { { USB_INTERFACE_INFO(USB_INTERFACE_CLASS_HID, USB_INTERFACE_SUBCLASS_BOOT, USB_INTERFACE_PROTOCOL_KEYBOARD) }, { } /* Terminating entry */ };
MODULE_DEVICE_TABLE(usb, lx_id_table);
static int lx_probe(struct usb_interface *interface, const struct usb_device_id *id) { pr_debug("LxModule: USB keyboard probe function called\n"); return 0; }
static void lx_disconnect(struct usb_interface *interface) { pr_debug("LxModule: USB keyboard disconnect function called\n"); }
static struct usb_driver lx_driver = { .name = "lx_driver", .probe = lx_probe, .disconnect = lx_disconnect, .id_table = lx_id_table };
################################################
But the Eudyptula Challenge receiving message is: ############################################### * This structure is not needed.*
##############################################
2. I use the udev rule, I create a hello.sh in /lib/udev with: ########################################################## sudo -H gedit /lib/udev/hello.sh ##########################################################
And the contents is: ########################################################## #!/bin/bash
sudo -H insmod /opt/task_01.ko ########################################################## This command let module of task_01 run.
Save the file,close it and make it executable with: ########################################################## chmod +x /lib/udev/hello.sh ##########################################################
Add a new rule in my /etc/udev/rules.d/01-my-first-udev.rules file like this: ######################################################### ACTION=="add", RUN+="/lib/udev/hello.sh" ##########################################################
But the Eudyptula Challenge receiving message is: ################################
No new udev rule is needed. #########################################
So, which basics I should read and understand ? Thank you.