Repository 32bit  Forum
Repository 64bit  Wiki

chip.c

Forum dedicato alla programmazione.

Moderatore: Staff

Regole del forum
1) Citare in modo preciso il linguaggio di programmazione usato.
2) Se possibile portare un esempio del risultato atteso.
3) Leggere attentamente le risposte ricevute.
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.

chip.c

Messaggioda inux » mer giu 25, 2008 17:44

ciao ho provato a compilare con gcc questo file mi da tutti questi errori sapete cosa significa? grazie ciao.
Codice: Seleziona tutto
root@darkstar:/home/inux# gcc chip.c
In file included from /usr/include/linux/preempt.h:9,
                 from /usr/include/linux/spinlock.h:49,
                 from /usr/include/linux/irq.h:18,
                 from chip.c:13:
/usr/include/linux/thread_info.h:23: error: expected specifier-qualifier-list before 'u32'
In file included from /usr/include/asm/bitops.h:4,
                 from /usr/include/linux/bitops.h:17,
                 from /usr/include/linux/thread_info.h:33,
                 from /usr/include/linux/preempt.h:9,
                 from /usr/include/linux/spinlock.h:49,
                 from /usr/include/linux/irq.h:18,
                 from chip.c:13:
/usr/include/asm/bitops_64.h: In function 'set_bit':
/usr/include/asm/bitops_64.h:34: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/bitops_64.h: In function 'clear_bit':
/usr/include/asm/bitops_64.h:69: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/bitops_64.h: In function 'change_bit':
/usr/include/asm/bitops_64.h:146: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/bitops_64.h: In function 'test_and_set_bit':
/usr/include/asm/bitops_64.h:164: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/bitops_64.h: In function 'test_and_clear_bit':
/usr/include/asm/bitops_64.h:215: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/bitops_64.h: In function 'test_and_change_bit':
/usr/include/asm/bitops_64.h:266: error: expected string literal before 'LOCK_PREFIX'
In file included from /usr/include/linux/preempt.h:11,
                 from /usr/include/linux/spinlock.h:49,
                 from /usr/include/linux/irq.h:18,
                 from chip.c:13:
/usr/include/linux/list.h:995:2: warning: #warning "don't include kernel headers in userspace"
In file included from /usr/include/asm/cmpxchg.h:4,
                 from /usr/include/asm/system_64.h:6,
                 from /usr/include/asm/system.h:4,
                 from /usr/include/linux/spinlock.h:57,
                 from /usr/include/linux/irq.h:18,
                 from chip.c:13:
/usr/include/asm/cmpxchg_64.h: In function '__cmpxchg':
/usr/include/asm/cmpxchg_64.h:67: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/cmpxchg_64.h:73: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/cmpxchg_64.h:79: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/cmpxchg_64.h:85: error: expected string literal before 'LOCK_PREFIX'
In file included from /usr/include/linux/irq.h:18,
                 from chip.c:13:
/usr/include/linux/spinlock.h: At top level:
/usr/include/linux/spinlock.h:297: error: expected declaration specifiers or '...' before 'bool'
/usr/include/linux/spinlock.h: In function 'double_spin_lock':
/usr/include/linux/spinlock.h:301: error: 'l1_first' undeclared (first use in this function)
/usr/include/linux/spinlock.h:301: error: (Each undeclared identifier is reported only once
/usr/include/linux/spinlock.h:301: error: for each function it appears in.)
/usr/include/linux/spinlock.h: At top level:
/usr/include/linux/spinlock.h:316: error: expected declaration specifiers or '...' before 'bool'
/usr/include/linux/spinlock.h: In function 'double_spin_unlock':
/usr/include/linux/spinlock.h:320: error: 'l1_taken_first' undeclared (first use in this function)
In file included from /usr/include/asm/atomic.h:4,
                 from /usr/include/linux/spinlock.h:333,
                 from /usr/include/linux/irq.h:18,
                 from chip.c:13:
/usr/include/asm/atomic_64.h: In function 'atomic_add':
/usr/include/asm/atomic_64.h:56: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic_sub':
/usr/include/asm/atomic_64.h:71: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic_sub_and_test':
/usr/include/asm/atomic_64.h:90: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic_inc':
/usr/include/asm/atomic_64.h:105: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic_dec':
/usr/include/asm/atomic_64.h:119: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic_dec_and_test':
/usr/include/asm/atomic_64.h:137: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic_inc_and_test':
/usr/include/asm/atomic_64.h:156: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic_add_negative':
/usr/include/asm/atomic_64.h:176: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic_add_return':
/usr/include/asm/atomic_64.h:193: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic64_add':
/usr/include/asm/atomic_64.h:241: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic64_sub':
/usr/include/asm/atomic_64.h:256: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic64_sub_and_test':
/usr/include/asm/atomic_64.h:275: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic64_inc':
/usr/include/asm/atomic_64.h:290: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic64_dec':
/usr/include/asm/atomic_64.h:304: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic64_dec_and_test':
/usr/include/asm/atomic_64.h:322: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic64_inc_and_test':
/usr/include/asm/atomic_64.h:341: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic64_add_negative':
/usr/include/asm/atomic_64.h:361: error: expected string literal before 'LOCK_PREFIX'
/usr/include/asm/atomic_64.h: In function 'atomic64_add_return':
/usr/include/asm/atomic_64.h:378: error: expected string literal before 'LOCK_PREFIX'
In file included from /usr/include/linux/cpumask.h:86,
                 from /usr/include/linux/irq.h:19,
                 from chip.c:13:
/usr/include/linux/bitmap.h: In function 'bitmap_zero':
/usr/include/linux/bitmap.h:135: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_fill':
/usr/include/linux/bitmap.h:150: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_copy':
/usr/include/linux/bitmap.h:156: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_and':
/usr/include/linux/bitmap.h:167: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_or':
/usr/include/linux/bitmap.h:176: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_xor':
/usr/include/linux/bitmap.h:185: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_andnot':
/usr/include/linux/bitmap.h:194: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_complement':
/usr/include/linux/bitmap.h:203: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_equal':
/usr/include/linux/bitmap.h:212: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_intersects':
/usr/include/linux/bitmap.h:221: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_subset':
/usr/include/linux/bitmap.h:230: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_empty':
/usr/include/linux/bitmap.h:238: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_full':
/usr/include/linux/bitmap.h:246: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_weight':
/usr/include/linux/bitmap.h:254: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_shift_right':
/usr/include/linux/bitmap.h:262: error: 'BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function 'bitmap_shift_left':
/usr/include/linux/bitmap.h:271: error: 'BITS_PER_LONG' undeclared (first use in this function)
In file included from /usr/include/linux/irq.h:19,
                 from chip.c:13:
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:88: error: expected specifier-qualifier-list before 'DECLARE_BITMAP'
/usr/include/linux/cpumask.h: In function '__cpu_set':
/usr/include/linux/cpumask.h:94: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpu_clear':
/usr/include/linux/cpumask.h:100: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_setall':
/usr/include/linux/cpumask.h:106: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_clear':
/usr/include/linux/cpumask.h:112: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpu_test_and_set':
/usr/include/linux/cpumask.h:121: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_and':
/usr/include/linux/cpumask.h:128: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:128: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:128: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_or':
/usr/include/linux/cpumask.h:135: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:135: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:135: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_xor':
/usr/include/linux/cpumask.h:142: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:142: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:142: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_andnot':
/usr/include/linux/cpumask.h:150: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:150: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:150: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_complement':
/usr/include/linux/cpumask.h:157: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:157: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_equal':
/usr/include/linux/cpumask.h:164: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:164: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_intersects':
/usr/include/linux/cpumask.h:171: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:171: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_subset':
/usr/include/linux/cpumask.h:178: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:178: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_empty':
/usr/include/linux/cpumask.h:184: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_full':
/usr/include/linux/cpumask.h:190: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_weight':
/usr/include/linux/cpumask.h:196: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_shift_right':
/usr/include/linux/cpumask.h:204: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:204: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_shift_left':
/usr/include/linux/cpumask.h:212: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:212: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpumask_scnprintf':
/usr/include/linux/cpumask.h:273: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpumask_parse_user':
/usr/include/linux/cpumask.h:281: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpulist_scnprintf':
/usr/include/linux/cpumask.h:289: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpulist_parse':
/usr/include/linux/cpumask.h:295: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpu_remap':
/usr/include/linux/cpumask.h:303: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:303: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h: In function '__cpus_remap':
/usr/include/linux/cpumask.h:311: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:311: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:311: error: 'cpumask_t' has no member named 'bits'
/usr/include/linux/cpumask.h:311: error: 'cpumask_t' has no member named 'bits'
In file included from /usr/include/asm-generic/irq_regs.h:15,
                 from /usr/include/asm/irq_regs_64.h:1,
                 from /usr/include/asm/irq_regs.h:4,
                 from /usr/include/linux/irq.h:25,
                 from chip.c:13:
/usr/include/linux/percpu.h: At top level:
/usr/include/linux/percpu.h:72: error: expected declaration specifiers or '...' before 'gfp_t'
/usr/include/linux/percpu.h:78: error: expected declaration specifiers or '...' before 'gfp_t'
/usr/include/linux/percpu.h:84: error: expected declaration specifiers or '...' before 'gfp_t'
/usr/include/linux/percpu.h: In function '__percpu_alloc_mask':
/usr/include/linux/percpu.h:86: error: 'gfp' undeclared (first use in this function)
In file included from chip.c:14:
/usr/include/linux/msi.h: At top level:
/usr/include/linux/msi.h:7: error: expected specifier-qualifier-list before 'u32'
/usr/include/linux/msi.h:30: error: field 'list' has incomplete type
In file included from /usr/include/linux/module.h:18,
                 from chip.c:15:
/usr/include/linux/marker.h:103: error: expected declaration specifiers or '...' before numeric constant
/usr/include/linux/marker.h:103: error: expected declaration specifiers or '...' before numeric constant
/usr/include/linux/marker.h: In function '__printf':
/usr/include/linux/marker.h:103: error: expected declaration specifiers before '__mark_check_format'
/usr/include/linux/marker.h:107: error: storage class specified for parameter '__mark_empty_function'
/usr/include/linux/marker.h:114: error: storage class specified for parameter 'marker_probe_register'
/usr/include/linux/marker.h:119: error: storage class specified for parameter 'marker_probe_unregister'
/usr/include/linux/marker.h:123: error: storage class specified for parameter 'marker_probe_unregister_private_data'
/usr/include/linux/marker.h:125: error: storage class specified for parameter 'marker_arm'
/usr/include/linux/marker.h:126: error: storage class specified for parameter 'marker_disarm'
/usr/include/linux/marker.h:127: error: storage class specified for parameter 'marker_get_private_data'
In file included from /usr/include/asm/local.h:4,
                 from /usr/include/linux/module.h:19,
                 from chip.c:15:
/usr/include/asm/local_64.h:10: error: storage class specified for parameter 'local_t'
/usr/include/asm/local_64.h:17: error: expected ')' before '*' token
/usr/include/asm/local_64.h:25: error: expected ')' before '*' token
/usr/include/asm/local_64.h:33: error: expected declaration specifiers or '...' before 'local_t'
/usr/include/asm/local_64.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/asm/local_64.h:41: error: expected declaration specifiers or '...' before 'local_t'
/usr/include/asm/local_64.h:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/asm/local_64.h:58: error: expected declaration specifiers or '...' before 'local_t'
/usr/include/asm/local_64.h:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/asm/local_64.h:77: error: expected ')' before '*' token
/usr/include/asm/local_64.h:96: error: expected ')' before '*' token
/usr/include/asm/local_64.h:116: error: expected declaration specifiers or '...' before 'local_t'
/usr/include/asm/local_64.h:117: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/asm/local_64.h:134: error: expected declaration specifiers or '...' before 'local_t'
/usr/include/asm/local_64.h:135: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/asm/local_64.h:144: error: expected declaration specifiers or '...' before 'local_t'
/usr/include/asm/local_64.h:145: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from chip.c:15:
/usr/include/linux/module.h:48: error: field 'attr' has incomplete type
/usr/include/linux/module.h:59: error: field 'kobj' has incomplete type
/usr/include/linux/module.h:65: error: storage class specified for parameter 'init_module'
/usr/include/linux/module.h:66: error: storage class specified for parameter 'cleanup_module'
/usr/include/linux/module.h:477: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:483: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:489: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:494: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:504: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:508: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:513: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:523: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:528: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:533: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:540: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:545: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:550: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:556: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:563: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:568: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:589: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:596: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:601: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:606: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:618: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/linux/module.h:621: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from /usr/include/asm/hardirq_64.h:6,
                 from /usr/include/asm/hardirq.h:4,
                 from /usr/include/linux/hardirq.h:7,
                 from /usr/include/linux/interrupt.h:11,
                 from chip.c:16:
/usr/include/asm/pda.h:41: error: storage class specified for parameter '_cpu_pda'
/usr/include/asm/pda.h:42: error: storage class specified for parameter 'boot_cpu_pda'
/usr/include/asm/pda.h:50: error: storage class specified for parameter '__bad_pda_field'
/usr/include/asm/pda.h:56: error: storage class specified for parameter '_proxy_pda'
In file included from /usr/include/asm/apic_64.h:5,
                 from /usr/include/asm/apic.h:4,
                 from /usr/include/asm/hardirq_64.h:7,
                 from /usr/include/asm/hardirq.h:4,
                 from /usr/include/linux/hardirq.h:7,
                 from /usr/include/linux/interrupt.h:11,
                 from chip.c:16:
/usr/include/linux/delay.h:10: error: storage class specified for parameter 'loops_per_jiffy'
In file included from /usr/include/linux/delay.h:12,
                 from /usr/include/asm/apic_64.h:5,
                 from /usr/include/asm/apic.h:4,
                 from /usr/include/asm/hardirq_64.h:7,
                 from /usr/include/asm/hardirq.h:4,
                 from /usr/include/linux/hardirq.h:7,
                 from /usr/include/linux/interrupt.h:11,
                 from chip.c:16:
/usr/include/asm/delay.h:11: error: storage class specified for parameter '__bad_udelay'
/usr/include/asm/delay.h:12: error: storage class specified for parameter '__bad_ndelay'
/usr/include/asm/delay.h:14: error: storage class specified for parameter '__udelay'
/usr/include/asm/delay.h:15: error: storage class specified for parameter '__ndelay'
/usr/include/asm/delay.h:16: error: storage class specified for parameter '__const_udelay'
/usr/include/asm/delay.h:17: error: storage class specified for parameter '__delay'
In file included from /usr/include/asm/apic_64.h:5,
                 from /usr/include/asm/apic.h:4,
                 from /usr/include/asm/hardirq_64.h:7,
                 from /usr/include/asm/hardirq.h:4,
                 from /usr/include/linux/hardirq.h:7,
                 from /usr/include/linux/interrupt.h:11,
                 from chip.c:16:
/usr/include/linux/delay.h:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from /usr/include/asm/fixmap.h:4,
                 from /usr/include/asm/apic_64.h:6,
                 from /usr/include/asm/apic.h:4,
                 from /usr/include/asm/hardirq_64.h:7,
                 from /usr/include/asm/hardirq.h:4,
                 from /usr/include/linux/hardirq.h:7,
                 from /usr/include/linux/interrupt.h:11,
                 from chip.c:16:
/usr/include/asm/fixmap_64.h:48: error: expected declaration specifiers or '...' before 'pgprot_t'
/usr/include/asm/fixmap_64.h:48: error: storage class specified for parameter '__set_fixmap'
/usr/include/asm/fixmap_64.h:68: error: storage class specified for parameter '__this_fixmap_does_not_exist'
/usr/include/asm/fixmap_64.h:76: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from /usr/include/asm/apic.h:4,
                 from /usr/include/asm/hardirq_64.h:7,
                 from /usr/include/asm/hardirq.h:4,
                 from /usr/include/linux/hardirq.h:7,
                 from /usr/include/linux/interrupt.h:11,
                 from chip.c:16:
/usr/include/asm/apic_64.h:19: error: storage class specified for parameter 'apic_verbosity'
/usr/include/asm/apic_64.h:20: error: storage class specified for parameter 'apic_runs_main_timer'
/usr/include/asm/apic_64.h:21: error: storage class specified for parameter 'ioapic_force'
/usr/include/asm/apic_64.h:22: error: storage class specified for parameter 'disable_apic_timer'
/usr/include/asm/apic_64.h:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/asm/apic_64.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/include/asm/apic_64.h:51: error: storage class specified for parameter 'apic_wait_icr_idle'
/usr/include/asm/apic_64.h:52: error: storage class specified for parameter 'safe_apic_wait_icr_idle'
/usr/include/asm/apic_64.h:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
non è tutto una parte è lunghissimo l'elenco.
Avatar utente
inux
Packager
Packager
 
Messaggi: 529
Iscritto il: sab nov 03, 2007 11:36
Località: busto arsizio (VA)
Nome Cognome: Christian Reguzzoni
Slackware: 64 13.1
Desktop: kde

Re: chip.c

Messaggioda Mario Vanoni » mer giu 25, 2008 18:20

Codice NDA di M$?

Anche loro dimenticano qualche parentesi
e/o qualche punto e virgola.
Mario Vanoni
Iper Master
Iper Master
 
Messaggi: 3174
Iscritto il: lun set 03, 2007 20:20
Località: Cuasso al Monte (VA)
Nome Cognome: Mario Vanoni
Slackware: 12.2
Kernel: 3.0.4 statico
Desktop: fluxbox/seamonkey

Re: chip.c

Messaggioda inux » mer giu 25, 2008 18:30

no questo è un file che ho estratto dal kernel linux-2.6.26-rc7 volevo vedere cosa succedeva se lo compilavo non capisco se sono errori veri ( cosa impossibile sono troppi) o sono io che ho sbagliato procedimento tu sai dirmi cosa vuol dire?grazie ciao.
posto anche il file :
Codice: Seleziona tutto
*
 * linux/kernel/irq/chip.c
 *
 * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar
 * Copyright (C) 2005-2006, Thomas Gleixner, Russell King
 *
 * This file contains the core interrupt handling code, for irq-chip
 * based architectures.
 *
 * Detailed information is available in Documentation/DocBook/genericirq
 */

#include <linux/irq.h>
#include <linux/msi.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/kernel_stat.h>

#include "internals.h"

/**
 *   dynamic_irq_init - initialize a dynamically allocated irq
 *   @irq:   irq number to initialize
 */
void dynamic_irq_init(unsigned int irq)
{
   struct irq_desc *desc;
   unsigned long flags;

   if (irq >= NR_IRQS) {
      printk(KERN_ERR "Trying to initialize invalid IRQ%d\n", irq);
      WARN_ON(1);
      return;
   }

   /* Ensure we don't have left over values from a previous use of this irq */
   desc = irq_desc + irq;
   spin_lock_irqsave(&desc->lock, flags);
   desc->status = IRQ_DISABLED;
   desc->chip = &no_irq_chip;
   desc->handle_irq = handle_bad_irq;
   desc->depth = 1;
   desc->msi_desc = NULL;
   desc->handler_data = NULL;
   desc->chip_data = NULL;
   desc->action = NULL;
   desc->irq_count = 0;
   desc->irqs_unhandled = 0;
#ifdef CONFIG_SMP
   cpus_setall(desc->affinity);
#endif
   spin_unlock_irqrestore(&desc->lock, flags);
}

/**
 *   dynamic_irq_cleanup - cleanup a dynamically allocated irq
 *   @irq:   irq number to initialize
 */
void dynamic_irq_cleanup(unsigned int irq)
{
   struct irq_desc *desc;
   unsigned long flags;

   if (irq >= NR_IRQS) {
      printk(KERN_ERR "Trying to cleanup invalid IRQ%d\n", irq);
      WARN_ON(1);
      return;
   }

   desc = irq_desc + irq;
   spin_lock_irqsave(&desc->lock, flags);
   if (desc->action) {
      spin_unlock_irqrestore(&desc->lock, flags);
      printk(KERN_ERR "Destroying IRQ%d without calling free_irq\n",
         irq);
      WARN_ON(1);
      return;
   }
   desc->msi_desc = NULL;
   desc->handler_data = NULL;
   desc->chip_data = NULL;
   desc->handle_irq = handle_bad_irq;
   desc->chip = &no_irq_chip;
   spin_unlock_irqrestore(&desc->lock, flags);
}


/**
 *   set_irq_chip - set the irq chip for an irq
 *   @irq:   irq number
 *   @chip:   pointer to irq chip description structure
 */
int set_irq_chip(unsigned int irq, struct irq_chip *chip)
{
   struct irq_desc *desc;
   unsigned long flags;

   if (irq >= NR_IRQS) {
      printk(KERN_ERR "Trying to install chip for IRQ%d\n", irq);
      WARN_ON(1);
      return -EINVAL;
   }

   if (!chip)
      chip = &no_irq_chip;

   desc = irq_desc + irq;
   spin_lock_irqsave(&desc->lock, flags);
   irq_chip_set_defaults(chip);
   desc->chip = chip;
   spin_unlock_irqrestore(&desc->lock, flags);

   return 0;
}
EXPORT_SYMBOL(set_irq_chip);

/**
 *   set_irq_type - set the irq type for an irq
 *   @irq:   irq number
 *   @type:   interrupt type - see include/linux/interrupt.h
 */
int set_irq_type(unsigned int irq, unsigned int type)
{
   struct irq_desc *desc;
   unsigned long flags;
   int ret = -ENXIO;

   if (irq >= NR_IRQS) {
      printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq);
      return -ENODEV;
   }

   desc = irq_desc + irq;
   if (desc->chip->set_type) {
      spin_lock_irqsave(&desc->lock, flags);
      ret = desc->chip->set_type(irq, type);
      spin_unlock_irqrestore(&desc->lock, flags);
   }
   return ret;
}
EXPORT_SYMBOL(set_irq_type);

/**
 *   set_irq_data - set irq type data for an irq
 *   @irq:   Interrupt number
 *   @data:   Pointer to interrupt specific data
 *
 *   Set the hardware irq controller data for an irq
 */
int set_irq_data(unsigned int irq, void *data)
{
   struct irq_desc *desc;
   unsigned long flags;

   if (irq >= NR_IRQS) {
      printk(KERN_ERR
             "Trying to install controller data for IRQ%d\n", irq);
      return -EINVAL;
   }

   desc = irq_desc + irq;
   spin_lock_irqsave(&desc->lock, flags);
   desc->handler_data = data;
   spin_unlock_irqrestore(&desc->lock, flags);
   return 0;
}
EXPORT_SYMBOL(set_irq_data);

/**
 *   set_irq_data - set irq type data for an irq
 *   @irq:   Interrupt number
 *   @entry:   Pointer to MSI descriptor data
 *
 *   Set the hardware irq controller data for an irq
 */
int set_irq_msi(unsigned int irq, struct msi_desc *entry)
{
   struct irq_desc *desc;
   unsigned long flags;

   if (irq >= NR_IRQS) {
      printk(KERN_ERR
             "Trying to install msi data for IRQ%d\n", irq);
      return -EINVAL;
   }
   desc = irq_desc + irq;
   spin_lock_irqsave(&desc->lock, flags);
   desc->msi_desc = entry;
   if (entry)
      entry->irq = irq;
   spin_unlock_irqrestore(&desc->lock, flags);
   return 0;
}

/**
 *   set_irq_chip_data - set irq chip data for an irq
 *   @irq:   Interrupt number
 *   @data:   Pointer to chip specific data
 *
 *   Set the hardware irq chip data for an irq
 */
int set_irq_chip_data(unsigned int irq, void *data)
{
   struct irq_desc *desc = irq_desc + irq;
   unsigned long flags;

   if (irq >= NR_IRQS || !desc->chip) {
      printk(KERN_ERR "BUG: bad set_irq_chip_data(IRQ#%d)\n", irq);
      return -EINVAL;
   }

   spin_lock_irqsave(&desc->lock, flags);
   desc->chip_data = data;
   spin_unlock_irqrestore(&desc->lock, flags);

   return 0;
}
EXPORT_SYMBOL(set_irq_chip_data);

/*
 * default enable function
 */
static void default_enable(unsigned int irq)
{
   struct irq_desc *desc = irq_desc + irq;

   desc->chip->unmask(irq);
   desc->status &= ~IRQ_MASKED;
}

/*
 * default disable function
 */
static void default_disable(unsigned int irq)
{
}

/*
 * default startup function
 */
static unsigned int default_startup(unsigned int irq)
{
   irq_desc[irq].chip->enable(irq);

   return 0;
}

/*
 * default shutdown function
 */
static void default_shutdown(unsigned int irq)
{
   struct irq_desc *desc = irq_desc + irq;

   desc->chip->mask(irq);
   desc->status |= IRQ_MASKED;
}

/*
 * Fixup enable/disable function pointers
 */
void irq_chip_set_defaults(struct irq_chip *chip)
{
   if (!chip->enable)
      chip->enable = default_enable;
   if (!chip->disable)
      chip->disable = default_disable;
   if (!chip->startup)
      chip->startup = default_startup;
   /*
    * We use chip->disable, when the user provided its own. When
    * we have default_disable set for chip->disable, then we need
    * to use default_shutdown, otherwise the irq line is not
    * disabled on free_irq():
    */
   if (!chip->shutdown)
      chip->shutdown = chip->disable != default_disable ?
         chip->disable : default_shutdown;
   if (!chip->name)
      chip->name = chip->typename;
   if (!chip->end)
      chip->end = dummy_irq_chip.end;
}

static inline void mask_ack_irq(struct irq_desc *desc, int irq)
{
   if (desc->chip->mask_ack)
      desc->chip->mask_ack(irq);
   else {
      desc->chip->mask(irq);
      desc->chip->ack(irq);
   }
}

/**
 *   handle_simple_irq - Simple and software-decoded IRQs.
 *   @irq:   the interrupt number
 *   @desc:   the interrupt description structure for this irq
 *
 *   Simple interrupts are either sent from a demultiplexing interrupt
 *   handler or come from hardware, where no interrupt hardware control
 *   is necessary.
 *
 *   Note: The caller is expected to handle the ack, clear, mask and
 *   unmask issues if necessary.
 */
void
handle_simple_irq(unsigned int irq, struct irq_desc *desc)
{
   struct irqaction *action;
   irqreturn_t action_ret;
   const unsigned int cpu = smp_processor_id();

   spin_lock(&desc->lock);

   if (unlikely(desc->status & IRQ_INPROGRESS))
      goto out_unlock;
   desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
   kstat_cpu(cpu).irqs[irq]++;

   action = desc->action;
   if (unlikely(!action || (desc->status & IRQ_DISABLED)))
      goto out_unlock;

   desc->status |= IRQ_INPROGRESS;
   spin_unlock(&desc->lock);

   action_ret = handle_IRQ_event(irq, action);
   if (!noirqdebug)
      note_interrupt(irq, desc, action_ret);

   spin_lock(&desc->lock);
   desc->status &= ~IRQ_INPROGRESS;
out_unlock:
   spin_unlock(&desc->lock);
}

/**
 *   handle_level_irq - Level type irq handler
 *   @irq:   the interrupt number
 *   @desc:   the interrupt description structure for this irq
 *
 *   Level type interrupts are active as long as the hardware line has
 *   the active level. This may require to mask the interrupt and unmask
 *   it after the associated handler has acknowledged the device, so the
 *   interrupt line is back to inactive.
 */
void
handle_level_irq(unsigned int irq, struct irq_desc *desc)
{
   unsigned int cpu = smp_processor_id();
   struct irqaction *action;
   irqreturn_t action_ret;

   spin_lock(&desc->lock);
   mask_ack_irq(desc, irq);

   if (unlikely(desc->status & IRQ_INPROGRESS))
      goto out_unlock;
   desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
   kstat_cpu(cpu).irqs[irq]++;

   /*
    * If its disabled or no action available
    * keep it masked and get out of here
    */
   action = desc->action;
   if (unlikely(!action || (desc->status & IRQ_DISABLED)))
      goto out_unlock;

   desc->status |= IRQ_INPROGRESS;
   spin_unlock(&desc->lock);

   action_ret = handle_IRQ_event(irq, action);
   if (!noirqdebug)
      note_interrupt(irq, desc, action_ret);

   spin_lock(&desc->lock);
   desc->status &= ~IRQ_INPROGRESS;
   if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
      desc->chip->unmask(irq);
out_unlock:
   spin_unlock(&desc->lock);
}

/**
 *   handle_fasteoi_irq - irq handler for transparent controllers
 *   @irq:   the interrupt number
 *   @desc:   the interrupt description structure for this irq
 *
 *   Only a single callback will be issued to the chip: an ->eoi()
 *   call when the interrupt has been serviced. This enables support
 *   for modern forms of interrupt handlers, which handle the flow
 *   details in hardware, transparently.
 */
void
handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
{
   unsigned int cpu = smp_processor_id();
   struct irqaction *action;
   irqreturn_t action_ret;

   spin_lock(&desc->lock);

   if (unlikely(desc->status & IRQ_INPROGRESS))
      goto out;

   desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
   kstat_cpu(cpu).irqs[irq]++;

   /*
    * If its disabled or no action available
    * then mask it and get out of here:
    */
   action = desc->action;
   if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
      desc->status |= IRQ_PENDING;
      if (desc->chip->mask)
         desc->chip->mask(irq);
      goto out;
   }

   desc->status |= IRQ_INPROGRESS;
   desc->status &= ~IRQ_PENDING;
   spin_unlock(&desc->lock);

   action_ret = handle_IRQ_event(irq, action);
   if (!noirqdebug)
      note_interrupt(irq, desc, action_ret);

   spin_lock(&desc->lock);
   desc->status &= ~IRQ_INPROGRESS;
out:
   desc->chip->eoi(irq);

   spin_unlock(&desc->lock);
}

/**
 *   handle_edge_irq - edge type IRQ handler
 *   @irq:   the interrupt number
 *   @desc:   the interrupt description structure for this irq
 *
 *   Interrupt occures on the falling and/or rising edge of a hardware
 *   signal. The occurence is latched into the irq controller hardware
 *   and must be acked in order to be reenabled. After the ack another
 *   interrupt can happen on the same source even before the first one
 *   is handled by the assosiacted event handler. If this happens it
 *   might be necessary to disable (mask) the interrupt depending on the
 *   controller hardware. This requires to reenable the interrupt inside
 *   of the loop which handles the interrupts which have arrived while
 *   the handler was running. If all pending interrupts are handled, the
 *   loop is left.
 */
void
handle_edge_irq(unsigned int irq, struct irq_desc *desc)
{
   const unsigned int cpu = smp_processor_id();

   spin_lock(&desc->lock);

   desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);

   /*
    * If we're currently running this IRQ, or its disabled,
    * we shouldn't process the IRQ. Mark it pending, handle
    * the necessary masking and go out
    */
   if (unlikely((desc->status & (IRQ_INPROGRESS | IRQ_DISABLED)) ||
          !desc->action)) {
      desc->status |= (IRQ_PENDING | IRQ_MASKED);
      mask_ack_irq(desc, irq);
      goto out_unlock;
   }

   kstat_cpu(cpu).irqs[irq]++;

   /* Start handling the irq */
   desc->chip->ack(irq);

   /* Mark the IRQ currently in progress.*/
   desc->status |= IRQ_INPROGRESS;

   do {
      struct irqaction *action = desc->action;
      irqreturn_t action_ret;

      if (unlikely(!action)) {
         desc->chip->mask(irq);
         goto out_unlock;
      }

      /*
       * When another irq arrived while we were handling
       * one, we could have masked the irq.
       * Renable it, if it was not disabled in meantime.
       */
      if (unlikely((desc->status &
                (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) ==
               (IRQ_PENDING | IRQ_MASKED))) {
         desc->chip->unmask(irq);
         desc->status &= ~IRQ_MASKED;
      }

      desc->status &= ~IRQ_PENDING;
      spin_unlock(&desc->lock);
      action_ret = handle_IRQ_event(irq, action);
      if (!noirqdebug)
         note_interrupt(irq, desc, action_ret);
      spin_lock(&desc->lock);

   } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);

   desc->status &= ~IRQ_INPROGRESS;
out_unlock:
   spin_unlock(&desc->lock);
}

/**
 *   handle_percpu_IRQ - Per CPU local irq handler
 *   @irq:   the interrupt number
 *   @desc:   the interrupt description structure for this irq
 *
 *   Per CPU interrupts on SMP machines without locking requirements
 */
void
handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
{
   irqreturn_t action_ret;

   kstat_this_cpu.irqs[irq]++;

   if (desc->chip->ack)
      desc->chip->ack(irq);

   action_ret = handle_IRQ_event(irq, desc->action);
   if (!noirqdebug)
      note_interrupt(irq, desc, action_ret);

   if (desc->chip->eoi)
      desc->chip->eoi(irq);
}

void
__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
        const char *name)
{
   struct irq_desc *desc;
   unsigned long flags;

   if (irq >= NR_IRQS) {
      printk(KERN_ERR
             "Trying to install type control for IRQ%d\n", irq);
      return;
   }

   desc = irq_desc + irq;

   if (!handle)
      handle = handle_bad_irq;
   else if (desc->chip == &no_irq_chip) {
      printk(KERN_WARNING "Trying to install %sinterrupt handler "
             "for IRQ%d\n", is_chained ? "chained " : "", irq);
      /*
       * Some ARM implementations install a handler for really dumb
       * interrupt hardware without setting an irq_chip. This worked
       * with the ARM no_irq_chip but the check in setup_irq would
       * prevent us to setup the interrupt at all. Switch it to
       * dummy_irq_chip for easy transition.
       */
      desc->chip = &dummy_irq_chip;
   }

   spin_lock_irqsave(&desc->lock, flags);

   /* Uninstall? */
   if (handle == handle_bad_irq) {
      if (desc->chip != &no_irq_chip)
         mask_ack_irq(desc, irq);
      desc->status |= IRQ_DISABLED;
      desc->depth = 1;
   }
   desc->handle_irq = handle;
   desc->name = name;

   if (handle != handle_bad_irq && is_chained) {
      desc->status &= ~IRQ_DISABLED;
      desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE;
      desc->depth = 0;
      desc->chip->unmask(irq);
   }
   spin_unlock_irqrestore(&desc->lock, flags);
}

void
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
          irq_flow_handler_t handle)
{
   set_irq_chip(irq, chip);
   __set_irq_handler(irq, handle, 0, NULL);
}

void
set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
               irq_flow_handler_t handle, const char *name)
{
   set_irq_chip(irq, chip);
   __set_irq_handler(irq, handle, 0, name);
}

void __init set_irq_noprobe(unsigned int irq)
{
   struct irq_desc *desc;
   unsigned long flags;

   if (irq >= NR_IRQS) {
      printk(KERN_ERR "Trying to mark IRQ%d non-probeable\n", irq);

      return;
   }

   desc = irq_desc + irq;

   spin_lock_irqsave(&desc->lock, flags);
   desc->status |= IRQ_NOPROBE;
   spin_unlock_irqrestore(&desc->lock, flags);
}

void __init set_irq_probe(unsigned int irq)
{
   struct irq_desc *desc;
   unsigned long flags;

   if (irq >= NR_IRQS) {
      printk(KERN_ERR "Trying to mark IRQ%d probeable\n", irq);

      return;
   }

   desc = irq_desc + irq;

   spin_lock_irqsave(&desc->lock, flags);
   desc->status &= ~IRQ_NOPROBE;
   spin_unlock_irqrestore(&desc->lock, flags);
}
Avatar utente
inux
Packager
Packager
 
Messaggi: 529
Iscritto il: sab nov 03, 2007 11:36
Località: busto arsizio (VA)
Nome Cognome: Christian Reguzzoni
Slackware: 64 13.1
Desktop: kde

Re: chip.c

Messaggioda kasher » mer giu 25, 2008 18:45

hai installato il pacchetto kernel-headers? Nota pure che nel sorce viene inclusa una libreria esterna (#include "internals.h"), quindi al momento della compilazione questo header file deve essere sulla stessa dir del file da compilare.
Avatar utente
kasher
Linux 2.0
Linux 2.0
 
Messaggi: 174
Iscritto il: gio gen 20, 2005 0:00
Slackware: 12.2
Kernel: 2.6.27.7
Desktop: kde 3.5.10

Re: chip.c

Messaggioda Calzo » sab lug 05, 2008 20:17

inux ha scritto:no questo è un file che ho estratto dal kernel linux-2.6.26-rc7 volevo vedere cosa succedeva se lo compilavo non capisco se sono errori veri

Bhè se è un file del kernel è giusto che tu non lo riesca a compilare (secondo me). Questo file richiede un bel po' di roba tra header e oggetti quindi secondo me se lo vuoi compilare da una directory diversa da quella del kernel secondo me devi scrivere un Makefile... qualcosa del genere:
Codice: Seleziona tutto
ifneq ($(KERNELRELEASE),)
        obj-m := chip.o
else
    KERNELDIR ?= /lib/modules/$(shell uname -r)/build
    PWD := $(shell pwd)
   
default:
        $(MAKE) -C $(KERNELDIR) -I $(KERNELDIR)/include M=$(PWD) modules
       
clean:
        rm *.ko
        rm *.o
        rm -r .tmp_versions
       
endif

...l'ho copiato da un vecchio modulo che avevo scritto quindi non so se funzionerà... che a sua volta avevo copiato/adattato da LDD3 (di Makefile non ci ho mai capito molto :banghead:). Se lo provi facci sapere.

bye
Avatar utente
Calzo
Linux 2.0
Linux 2.0
 
Messaggi: 112
Iscritto il: sab ott 06, 2007 21:21
Località: MN
Slackware: 10.2 | 13
Desktop: Fluxbox | KDE


Torna a Programmazione

Chi c’è in linea

Visitano il forum: Majestic-12 [Bot] e 1 ospite