I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods

Click Here!
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / WebPal
Printing / parallel port under Linux

New MessagePrinting / parallel port under Linux (modified 0 times) oninesm
Profile
Does anyone runing linux on thier webpal have printing up and running? This linux newbie is running into problems and I had some questions...

Does the "Webpal standard" 2.4.18-rmk4 kernel have the parport drivers compiled into it? What is it that the "parport = 0x278,13" entry in the params/command line does? What else must be done to make the parallel port available to printer software like lpr?

If the kernel doesn't have the parport drivers compiled into it, does anyone have binaries of parport.o and parport_pc.o for 2.4.18? (I don't need parport_arm.o do I?) My puny websearching skills have left me short on getting these.

I am trying to use lpr. Assuming I have the parport up right (which I doubt) can someone give me an example of their raw mode printcap entry?

What is the best way to test if the parport is up and running, short of being able to print perfectly :) ?

Thanks in advance,

Mike

12-25-2003 23:29:48

New MessageRE:Printing / parallel port under Linux (modified 0 times) justdavesj
Profile | Email
Here is an excerpt from my dmesg:

Starting kswapd
parport0: PC-style at 0x3bc [PCSPP(,...)]
parport1: PC-style at 0x378 [PCSPP(,...)]
parport2: PC-style at 0x278 [PCSPP(,...)]
Acornfb: 2048kB DRAM, VIDC20, using 640x480, 31.468kHz, 59Hz

I am able to print to the parallel port using /dev/lp2.

If you need a kernel that works with this, I have it on my ftp site:

ftp://justdave.mine.nu/webpal/zImage-1230

dave

12-30-2003 17:43:40

New MessageRE:Printing / parallel port under Linux (modified 0 times) oninesm
Profile
Thanks for the kernel, Dave.

Turns out your flash simm is divvied up slightly different than mine, so the zImage you sent won't fit on the part of the simm I have set up to hold it. I'm WAYY too scared to start dinking around and adjusting the sizes, so I'll have to go without the print-server goodness for now.

Thanks again.

01-14-2004 08:41:17

New MessageRE:Printing / parallel port under Linux (modified 0 times) justdavesj
Profile | Email
My flash simms are set up exactly the same as shown on Bill's page. Maybe you are seeing the size in bytes instead of kb. My zImage is 642,048 bytes but only 627K so it will fit in the simm space of 640K. You should be able to use Vit's erase program and then just copy the zImage to the mtd device.

dave

01-14-2004 09:41:20

New MessageRE:Printing / parallel port under Linux (modified 0 times) oninesm
Profile
Interesting. My WPFLASH program yelled that the zImage I downloaded was 104% of the available zImage partition, I will have to take a closer look and see if the updated WPFLASH and bootloader Bigbrd set up on the SIMM for me (ver 3.0) have different sizes for the areas.
01-14-2004 10:18:10

New MessageRE:Printing / parallel port under Linux (modified 0 times) justdavesj
Profile | Email
I've posted a different zImage on my site. This one does not have the nfs code in the kernel. Since you are booting from hard disk you will not need it. This is the zImage that I am now using and it seems to work fine.

dave

01-14-2004 16:08:07

New MessageRE:Printing / parallel port under Linux (modified 0 times) oninesm
Profile
I read yesterday that using a web browser to ftp something like zImage might do it in ASCII mode instead of binary. I wonder if that was my problem. I'll definitely check out the new zImage you posted
01-15-2004 08:13:32

New MessageRE:Printing / parallel port under Linux (modified 0 times) whatever
Profile
>What is it that the "parport = 0x278,13"?

= address,irq (same questions as dos bios on wintel boxes ask)

01-16-2004 14:17:59

New MessageRE:Printing / parallel port under Linux (modified 0 times) oninesm
Profile
Where to start...

Turns out the flash layout bigbrd created for me is slightly different from the previous standard. I have a 608K zImage (instead of 640K) which gives extra room for the root partition. The boot and params are the same size as before. Seems like the order they are on the chip is different too (boot, params, zImage, root).

This means that a kernel with parport built into it is unlikely to fit, without removing other equally important pieces. I am loathe to go in and start rearranging things though, for fear that if I break it I won't be able to get it back together again without a month's delay.

In the meantime, I happened across a tgz package on Vit's site which contains parport.o and parport_pc.o ( http://www.luban.org/Webpal/modules-bin-2.4.18-rmk-4.tgz ). I've unpackaged it, and insmod parport and insmod parport_pc io=0x278 irq=13. Unfortunately, parport_pc.o gives me an error that it cannot resolve the symbols "outsl" and "insl", so it won't load. A bit of searching around says these may be related to the non-existant PCI of the webpal, so those functions were probably not compiled into the diminutive zImage kernel bigbrd has provided for me.

I wonder if there is a workaround. One incomplete message I read suggested:

> How is that supposed to work on systems without PCI? For now I have
> defined
>
> #define insl(port,buf,len) isa_insb(port,buf,(len)<<2)
> #define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2)

Apparently taking the parport_pc calls and moving them to an equivalent call for the ISA bus. Could this sort of remapping be put into its own small LKM, say PCI.o, and allow parport_pc.o to load? probably an entirely rhetorical question as I wouldn't even know where to begin to try it.

I wonder if the source code to the parport_pc.o file could have these two #defines added to it and recompiled, although I don't see the source on Vit's site. Maybe this is the source code to the module? http://www.iglu.org.il/lxr/source/drivers/parport/parport_pc.c?v=linux-2.4.18

Perhaps someone as clueless as I about the ways of the Linux was never meant to have printing nirvana, and I should be entirely content with my now QUIET (after a pointer to noflushd) Samba based file server.

01-19-2004 01:07:32

New MessageRE:Printing / parallel port under Linux (modified 0 times) oninesm
Profile
Dave,

can you post up a full flash image, and the kernel paramaters passed to Linux as shown in dmesg? I'm giving more thought to redoing the layout of the flash simm to see if I can get that to work.

Thanks,

Mike

01-19-2004 10:00:52

New MessageRE:Printing / parallel port under Linux (modified 0 times) justdavesj
Profile | Email
Mike-

I have posted the full flash image on my ftp site. It includes the parameters so you should be able to get them from that file.

The kernels that I am working with do NOT include loadable module support. I'm not sure if that is why you can't insmod, but it may be.

I would suggest getting the .config file for the kernel from Bill because I can't seem to get my kernels smaller than 620kb with parallel support.

If you can do with a smaller root partition you should be able to just flash my full image into your simm and then flash your root image over it to get a working system with parallel support. Be sure to backup the original in case it doesn't work.

By the way, here is the relevant portion of my dmesg. I'm not sure why it seems to see three ports.

Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
parport0: PC-style at 0x3bc [PCSPP(,...)]
parport1: PC-style at 0x378 [PCSPP(,...)]
parport2: PC-style at 0x278 [PCSPP(,...)]
Acornfb: 2048kB DRAM, VIDC20, using 640x480, 31.468kHz, 59Hz
Acornfb: Monitor: 30.000-70.000kHz, 56-75Hz
Just an extra message


Good luck

dave

01-19-2004 16:40:10

New MessageRE:Printing / parallel port under Linux (modified 0 times) oninesm
Profile
OK, Dave,

I've flashed your image onto my simm, and it boots up just fine. My dmesg lines exactly reflect the ones you have posted (except I have allocated 348kB to video memory instead of 2MB). When I try "cat /netshare/params >/dev/lp2" I get "bash: /dev/lp2: No such device" (also true for lp0 and lp1) Any guesses? Maybe my MAKEDEV file has failed me again (as it did with the mtd devices).

ls -l /dev/lp*
crw-rw---- 1 root lp 6, 0 Sep 5 2000 /dev/lp0
crw-rw---- 1 root lp 6, 1 Sep 5 2000 /dev/lp1
crw-rw---- 1 root lp 6, 2 Sep 5 2000 /dev/lp2

If I "cat /netshare/params >/dev/parport2" I get nothing. Can I see the printcap entry you are using to print with the webpal?

clueless linux newbie strikes again :)

Mike

01-21-2004 00:35:25

New MessageRE:Printing / parallel port under Linux (modified 0 times) oninesm
Profile
Oh, and adding the parameter "parport=0x278,13" will make the "extra" 2 ports go away, and it will only assign parport0. For now I am trying to reproduce your printing success before I go messing with that though.
01-21-2004 00:38:53

New MessageRE:Printing / parallel port under Linux (modified 0 times) justdavesj
Profile | Email
Mike-

Very, very sorry. The kernel image that I posted did not have the line printer enabled in the kernel. Linux has a very nice kernel but it is a tad confusing when you have enabled the parallel ports in one place and then have to enable the line printers in another.

This is entirely my fault for having multiple kernels running around here. I have posted the correct kernel image and the correct full flash image. Here is a snip from my dmesg:

Starting kswapd
parport0: PC-style at 0x278, irq 13 [PCSPP,EPP]
parport0: Printer, HEWLETT-PACKARD DESKJET 610C
Acornfb: 2048kB DRAM, VIDC20, using 640x480, 31.468kHz, 59Hz
Acornfb: Monitor: 30.000-70.000kHz, 56-75Hz
Just an extra message
Console: switching to colour frame buffer device 80x30
pty: 256 Unix98 ptys configured
Keyboard error 21
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0x02f8 (irq = 12) is a 16550A
lp0: using parport0 (interrupt-driven).
block: 64 slots per queue, batch=16
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize


Of course you will now use lp0 for the printer. I have also put the parport parameter in the params section of the flash chip.

I hope this all helps and I do apologize for the confusion.

dave

01-21-2004 18:44:00

New MessageRE:Printing / parallel port under Linux (modified 0 times) oninesm
Profile
No worries on posting up a different zImage/Flash image than you planned to. You probably wouldn't have so many floating around if I wasn't such a pest (give me this, can you do that, wouldn't it be nice if...). I grabbed the new kernel you loaded and flashed it over to my SIMM...

Crash & Burn! I'm not sure what I did wrong, but I don't seem to be able to recover. The bootp on the SIMM won't respond to wpflash over a parallel port and all the box will do when I turn it on is light up the green and red led's.

In another thread you mentioned you would be willing to flash a SIMM; would you be willing to flash mine with the image you posted? My e-mail address is mike.onines@juno.com. If you're willing to flash it for me, you can send me your address and I will mail the SIMM with a return mailer.

Thanks for all the effort you're going through for me.

Mike

01-21-2004 22:11:22

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3