worlickwerx / pi-parport

retro parallel port for raspberry pi
GNU General Public License v2.0
64 stars 11 forks source link

Improve kernel portability and add ID EEPROM DT overlay support #39

Closed quorten closed 3 years ago

quorten commented 3 years ago

Summary of changes:

quorten commented 3 years ago

The driver changes were tested to successfully compile on two different versions of Raspbian. I haven't yet tested the driver changes recently made for the newer versions of Raspbian with actual hardware, but I'll probably get around to doing that soon.

vonj commented 3 years ago

Legacy parallel port scanners could work now on the Raspberry Pi with the original Windows drivers - there are versions of DOSBox and/or Qemu floating around with true parallel port support.

quorten commented 3 years ago

Cool, I should try running my Windows 98 QEMU virtual machine on a Raspberry Pi (via emulation) to test my scanner from Windows. It's probably going to be super slow on PiZero, unfortunately, but I could borrow my Pi4 for a test (currently being used for a different purpose).

quorten commented 3 years ago

I saw issue #38, so I also updated .travis.yml.

vonj commented 3 years ago

You may have better luck with https://dosbox-x.com/wiki/DOSBox%E2%80%90X’s-Feature-Highlights for running Windows 98

quorten commented 3 years ago

Yeah, sure thing, I've rebased and squashed my commits. Those extra commits for the EEPROM changes were just around from me fumbling around trying to figure out what would be the best way to implement the EEPROM changes!

garlick commented 3 years ago

Actually let's see how the travis builds do.

They seem to be running over here:

https://travis-ci.org/github/worlickwerx/pi-parport/builds/738151661

but I'll have to figure out why we don't see the links inline in the PR...

garlick commented 3 years ago

Ah so there are a few checkpatch errors in there that should be addressed. You should be able to run make check to do the check outside of travis.

Looks like maybe travis is slow today and some of the builders are taking a long time.

Weirdly, I could swear I saw the new kernel in the output earlier but it's not there now.

quorten commented 3 years ago

Cool, if Travis CI is working, I'll include the .travis.yml change to add a newer version of Ubuntu/Linux in my pull request to see how that goes.

quorten commented 3 years ago

Okay, so the current problem is that the Travis CI step for checkpatch.pl is still failing because of warnings on the inevitable LINUX_VERSION_CODE usage. we'd have to ignore that warning when reporting the exit status. The build on Linux 5.4.0 does work correctly, however.

In regard to the new kernel in the output: I did add a commit to update the Travis CI, then I removed it, now I added it back again.

quorten commented 3 years ago

The recent pushes ^ that rewrote all commits, just two changes really.

garlick commented 3 years ago

This should suppress checkpatch warnings on LINUX_VERSION_CODE, if you'd like to tack this on.

diff --git a/driver/Makefile b/driver/Makefile
index 9501f15..ba1d753 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -16,7 +16,7 @@ modules clean:
        $(MAKE) -C $(KERNEL_PATH) M=$(shell pwd) $@

 check:
-       scripts/checkpatch.pl --no-tree -f parport_gpio.c
+       scripts/checkpatch.pl --ignore=LINUX_VERSION_CODE --no-tree -f parport_gpio.c

 install:
        mkdir -p $(MODDIR)/pi-parport

Perhaps let's change the PR title to something more descriptive like "improve kernel portability and ID EEPROM support"?

quorten commented 3 years ago

Alright, good to know we're okay with ignoring the LINUX_VERSION_CODE warnings, I've added the update to the Makefile. I've also changed the pull request title, so this should be all good to go.

garlick commented 3 years ago

Thanks! I'll hit the button once travis passes.

https://travis-ci.org/github/worlickwerx/pi-parport/builds/738348992

garlick commented 3 years ago

Travis is super slow today, and we've already gotten past the checkpatch test so I'll just go ahead and merge. Thanks again!

By the way, I would encourage you to update the wiki to document any attempts at reviving old gear, bootstrapping weird environments, or if you like, your board baking process. Pics would be neat. I know that sort of thing is time consuming though.

quorten commented 3 years ago

Those are really great ideas, I haven't yet assembled the second pi-parport board I've got but I'll be sure to take photos of the "before reflow" steps when I do! Then I can copy the other info I've put together when doing the first board and put up a nice wiki page for that.