The HyperNews Linux KHG Discussion Pages

## Kernel not getting compiled!!!

  Forum: Character Device Drivers
  Re: Help in writing a CCD device driver (kabhi)
  Keywords: CCD character device driver, novice, compiler error
  Date: Fri, 24 Apr 1998 23:20:14 GMT
  From: <kabhi@iiap.ernet.in>

Dear reader After writing a small DD, just to test, I tried to compile the kernel but futile!!!It was giving "Internal compiler error". Suspecting that something might be wrong with my code I reinstalled Linux 1.3.20 and tried to compile the raw source code but again the error was same. Could you please guide me?I'm using Pentium processor. Thanking you in anticipation. Sincerely kabhi ************************************** CCD.h unsigned long ccd_init(unsigned long); CCD.c
    #include <linux/fs.h>
    #include <linux/errno.h>
    #include <linux/major.h>
    #include <linux/kernel.h>
    #include <linux/signal.h>
    #include <linux/sched.h>
    #include <linux/malloc.h>
    #include <linux/ioport.h>
    #include <linux/fcntl.h>
    #include <asm/system.h>
    #include <asm/io.h>
    #include <asm/segment.h>
    #include <linux/ccd.h>
#define CCD_DEBUG
    #ifdef CCD_DEBUG
    #define PRINTK(x) printk(x)
    #else
    #define PRINTK(x) /* nothing */
    #endif
    static int ccd_open(struct inode *inode, struct file *filp)
    {
            PRINTK("ccd: ccd_open called\n");
            return 0;
    }
    static void ccd_close(struct inode *inode, struct file *filp)
    {
            PRINTK("ccd: ccd_close called\n");
    }
    static int ccd_read(struct inode *node, struct file *file, char *buf, int count)
    {
            PRINTK("ccd: ccd_read called\n");
            return 0;
    }
    static struct file_operations ccd_fops = {
                                                    NULL,   /* lseek */
                                                    ccd_read,
                                                    NULL,   /* write */
                                                    NULL,   /* readdir */
                                                    NULL,   /* select */
                                                    NULL,
                                                    NULL,   /* mmap */
                                                    ccd_open,
                                                    ccd_close
                                              };
    unsigned long ccd_init(unsigned long kmem_start)
    {
            if (register_chrdev(CCD_MAJOR,"ccd",&ccd_fops))
            {
                    printk("ccd: register_chrdev failed.\n");
                    return -EIO;
            }
            PRINTK("\n******* CCD DRIVER INSTALLED *******\n");
return kmem_start; }