Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Missing Header Files

Hi All!

I am using the nios2-linux-20090825 package and am trying to roll in and compile a custom driver developed by us that compiles and works under uclinux 2.6.11. when compiling, gcc complains that it can't find linux/config.h and asm/semaphore.h. before getting into trial-and-error mode, what are my best bets for solving this issue?

thanks!

nick

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The linux/config.h is deprecated. You can safely remove the line.

    The asm/semaphore.h should exist but simply include include linux/semaphore.h.

    - Hippo
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks, Hippo!

    I removed linux/config.h and am now using linux/semaphore.h. Not getting any more errors about missing header files but still am getting many errors the first few of which are pasted below. Looks like GCC is still looking for things it can't find. "sign_nios_uart" is the custom driver file we wrote.

    CC drivers/char/sign_nios_uart.o

    drivers/char/sign_nios_uart.c:249: error: 'platform_bus_type' undeclared here (not in a function)

    drivers/char/sign_nios_uart.c: In function 'sign_nios_uart_init':

    drivers/char/sign_nios_uart.c:268: error: implicit declaration of function 'class_simple_create'

    drivers/char/sign_nios_uart.c:268: warning: assignment makes pointer from integer without a cast
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Yeah, I didn't realize that the "class_simple" interface is no longer available.

    Looks like we have some changes to make!

    Thanks

    Nick