i can't use the function in kernel??
hi!
I write a sample network device driver based on MPC860T but no experience any device driver.
I reference '/kernel/arch/ppc/8xx_io/enet.c' file and I wirte a program.
when I compile (ppc_8xx-gcc -o network network.c ) , occur error with following message
============== -error ============================================ ~~/network.c : undefined reference to 'printk'
~~/network.c : relocation truncation to fit : R_PPC_REL24 printk
~/network.c : undefined reference to 'kmalloc'
~~/network.c : relocation truncation to fit : R_PPC_REL24 kmalloc
.........
collect2: ld returned 1 exit status
make: ***[all] Error 1
==============================================================
I can't use 'printk()' , kmalloc() etc... function .
I include linux/kernel.h . linux/fs.h , linux/slab.h ...etc ( header files of need by function)
(reference the book 'linux device driver ' by ALESSANDRO RUBIN )
why i don't use those function?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
PCMCIA Nokia Cardphone 2.0 for MPC823
Hi all,
Pls help me, I'm stuck with this card.
Now I used kernel Powerpc Hardhat 2.2.14,
and pcmcia-cs-3.1.21 in a custom board using
MPC823.
I could dial up with this card, but it is not stable, and I could not transfer data such as ftp....
Furthermore, I must set the maximum value for
psst = 4, psht = 4, and psl = 20.
and add some delay between each time I read from serial port ( in function receive_chars from file serial.c).
Have anyone done it, before? Or you have any information about thi card phone, pls give me.
Does this card use 16550A, and follow the standard of this chip? Is there any special thing about it spec, timing?
Thanks very much,
Jari
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
If you're compiling a module, your output file should be 'network.o':
ppc_8xx-gcc -o network.o network.c
James
Quoted 23 lines · hychon
hi!
I write a sample network device driver based on MPC860T but no experience any device driver.
I reference '/kernel/arch/ppc/8xx_io/enet.c' file and I wirte a program.when I compile (ppc_8xx-gcc -o network
network.c) , occur error with following message============== -error ============================================
~~/network.c: undefined reference to 'printk'
~~/network.c: relocation truncation to fit :R_PPC_REL24printk
~/network.c: undefined reference to 'kmalloc'
~~/network.c: relocation truncation to fit :R_PPC_REL24kmalloc
.........collect2: ld returned 1 exit status
make: ***[all] Error 1==============================================================
Quoted 9 lines
I can't use '
printk()' ,kmalloc()etc... function .I include
linux/kernel.h.linux/fs.h,linux/slab.h...etc ( header files of need by function)
(reference the book 'linux device driver ' by ALESSANDRO RUBIN )why i don't use those function?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 3 lines · James Petterson
If you're compiling a module, your output file should be 'network.o':
ppc_8xx-gcc -o network.o
network.c
Along with specifying lots of includes and -D__KERNEL__. And the kernel you'll be using this on needs modules enabled as well. Run a 'make modules' in your kernel tree and see what it uses to compile modules.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Re: PCMCIA Nokia Cardphone 2.0 for MPC823
In reply to Nguyen Trung ThanhQuoted 6 lines · Nguyen Trung Thanh
Hi all,
Pls help me, I'm stuck with this card.
Now I used kernel Powerpc Hardhat 2.2.14,
and pcmcia-cs-3.1.21 in a custom board using
MPC823.
You should consider moving to 3.1.26, many bugs have been fixed.
Quoted 8 lines
I could dial up with this card, but it is not stable, and I could not transfer data such as ftp....
Furthermore, I must set the maximum value for
psst = 4, psht = 4, and psl = 20.
and add some delay between each time I read from serial port ( in functionreceive_charsfrom fileserial.c).
In general, there are conflicts between 8xx serial driver (uart.c) and serial.c. They may be stepping on each other.
Quoted 14 lines
Have anyone done it, before? Or you have any information about thi card phone, pls give me.
Does this card use 16550A, and follow the standard of this chip? Is there any special thing about it spec, timing?
Thanks very much,
Jari
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Re: PCMCIA Nokia Cardphone 2.0 for MPC823
Hi Matthew Locke,
Thank you very much for your reply.
As you said, I moved to the newest version of Pcmcia Card Service which I could find from ftp.mvista.com
Its version is 3.1.24.. I don't know it is good enough or not.
Of course, I changed something to avoid conflicts between 8xx serial driver (uart.c) and serial.c.
I mapped the _IO_BASE 0x80000000, hardcode irq = 9.
Then it worked well with PCMCIA modem such as Xircom.
Now I could use this version with Nokia Cardphone2.0, but the result is the same.
I just wonder why this PCMCIA cardphone can run smoothly in a Sony VAIO laptop using this version of linux kernel 2.2.14 and pcmcia-3.1.24, but when I run it with my board, I must add some delay in function receive_chars in
file: serial.c.
Otherwise, I'd receive a lot of gabage charaters. For example:
I wrote a string "ATZ" , and then received:
"aATZOKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
instead of "ATZOK"???
Would you pls tell me what is the problem here?
I think that it is due to the timing of 16550A chip, is it right? Or it is due to the serial speed?
If you have any idea about my problem, pls tell me...
Thanks for you kindness,
Jari
Quoted 5 lines
Quoted 2 lines · Nguyen Trung Thanh
Hi all,
Quoted 15 lines
Quoted 4 lines
Pls help me, I'm stuck with this card.
Now I used kernel Powerpc Hardhat 2.2.14,
and pcmcia-cs-3.1.21 in a custom board using
MPC823.You should consider moving to 3.1.26, many bugs have been fixed.
Quoted 7 lines
I could dial up with this card, but it is not stable, and I could not transfer data such as ftp....
Furthermore, I must set the maximum value for
psst = 4, psht = 4, and psl = 20.
and add some delay between each time I read from serial port ( in
function
Quoted 15 lines
Quoted 1 line
receive_charsfrom fileserial.c).In general, there are conflicts between 8xx serial driver (
uart.c) andserial.c. They may be stepping on each other.Quoted 9 lines
Have anyone done it, before? Or you have any information about thi card phone, pls give me.
Does this card use 16550A, and follow the standard of this chip? Is there any special thing about it spec, timing?
Thanks very much,
Jari
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Re: PCMCIA Nokia Cardphone 2.0 for MPC823
Quoted 23 lines · Nguyen Trung Thanh
Hi Matthew Locke,
Thank you very much for your reply.As you said, I moved to the newest version of Pcmcia Card Service which I could find from ftp.mvista.com
Its version is 3.1.24.. I don't know it is good enough or not.Of course, I changed something to avoid conflicts between 8xx serial driver (
uart.c) andserial.c.
I mapped the_IO_BASE0x80000000, hardcode irq = 9.
Then it worked well with PCMCIA modem such as Xircom.Now I could use this version with Nokia Cardphone2.0, but the result is the same.
I just wonder why this PCMCIA cardphone can run smoothly in a Sony VAIO laptop using this version of linux kernel 2.2.14 and pcmcia-3.1.24, but when I run it with my board, I must add some delay in functionreceive_charsin
file:serial.c.
Otherwise, I'd receive a lot of gabage charaters. For example:
I wrote a string "ATZ" , and then received:
"aATZOKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
instead of "ATZOK"???
Quoted 3 lines
Would you pls tell me what is the problem here?
I think that it is due to the timing of 16550A chip, is it right? Or it is due to the serial speed?
yeah, it could be some sort of timing issue, but I am not looking at the specs for any of those parts.
Quoted 20 lines
If you have any idea about my problem, pls tell me...
Thanks for you kindness,
JariQuoted 14 lines
Quoted 7 lines · Nguyen Trung Thanh
Hi all,
Pls help me, I'm stuck with this card.
Now I used kernel Powerpc Hardhat 2.2.14,
and pcmcia-cs-3.1.21 in a custom board using
MPC823.You should consider moving to 3.1.26, many bugs have been fixed.
Quoted 28 lines
Quoted 7 lines
Quoted 7 lines
I could dial up with this card, but it is not stable, and I could not transfer data such as ftp....
Furthermore, I must set the maximum value for
psst = 4, psht = 4, and psl = 20.
and add some delay between each time I read from serial port ( infunction
Quoted 16 lines
Quoted 2 lines
receive_charsfrom fileserial.c).In general, there are conflicts between 8xx serial driver (
uart.c) andserial.c. They may be stepping on each other.Quoted 9 lines
Have anyone done it, before? Or you have any information about thi card phone, pls give me.
Does this card use 16550A, and follow the standard of this chip? Is there any special thing about it spec, timing?
Thanks very much,
Jari
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/