View previous topic :: View next topic |
Author |
Message |
axl Veteran
Joined: 11 Oct 2002 Posts: 1146 Location: Romania
|
Posted: Sun May 03, 2020 11:11 pm Post subject: qemu-static... a failure story |
|
|
hi.
it's not exactly a failure story, it's more like your task was failed with the message success.
Some of your might be familiar with qemu static. some of you might use it for raspberry pi & stuff. qemu is a wonderful thing, and qemu static is even more wonderful.
So this is the setup. A friend of mine bought a raspberry pi based on my recommendation. And asked me to setup the printer. Which was a samsung laser printer m something. Not sure the model matters. It's sold as a network printer. It never worked as a network printer because it's ip was starting with 169.254... smth. Even thought the entire network was 192.168.1.smth. So clearly the problem was that the printer was setup badly.
It took me 6 hours to try and test various solutions. I ended up using a default driver, and just adding a route. route add 169.254.x.y dev wlan0. that. just that. that was the fix.
But all in between I tried to make the x86_64 unified samsung drivers to work on the pi. using qemu static and binfmt. And it worked. Little did I know that even if I did my part in terms of libraries and stuff, it will still not work, because of the ip stuff. Yet none the less, qemu is so freaking versatile. There's a binary in the unified samsung drivers that's i386 and x64 only called rastertospl. I got that thing to work in arm, seamlessly with qemu static... and the thing still didn't work.. because IP.
After the fact, I am just impressed by qemu. it did what it supposed to. and it worked. had to transfer with scp some 20-30 libraries (.so) from a pihole VM to the raspberry pi, but happy thing about debian, they all reside in /usr/lib/${arch}. so no conflicts in having a multi arch system.
Maybe some of you understand things as I stated them. Let me try to go even further.
binfmt is a way to point to an interpreter for certain kinds of binaries. let's say... for things that start with these characters... run qemu-arm or qemu-x86_64 or whatever. linux can do that.
next... things are going to look for certain libraries. the fact that debian puts them in /usr/lib/${arch} is very useful, because things in x86_64 and things in arm dont collide and conflict.
now, my friend is asking is he could use zoom and dropbox client on the pi. I told him, there are no arm clients. but armed with knowledge... I feel compelled at least to try. And I will have my work cut out for me for the next few days.
Linux is fun.
PS not a bad idea to have lib/${arch}/libs.so. in fact it's a wonderful idea. and why I found a new respect for debian. |
|
Back to top |
|
|
axl Veteran
Joined: 11 Oct 2002 Posts: 1146 Location: Romania
|
Posted: Sun May 03, 2020 11:19 pm Post subject: |
|
|
also, if people play with this technology, they should know that the binfmt conf files should include headers from 3 types of files. static bins, shared objects and shared pie objects (position independent objects). just so it's written down somewhere. it's not written down anywhere as far as i know. I worked my butt off to find that out the hard way. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23071
|
Posted: Mon May 04, 2020 12:34 am Post subject: |
|
|
169.254.* is the APIPA range, which suggests the printer failed to acquire a DHCP lease. Does the network have a functioning DHCP server that the printer would see? Does that DHCP server report receiving DHCP client requests from the MAC address of the printer? |
|
Back to top |
|
|
axl Veteran
Joined: 11 Oct 2002 Posts: 1146 Location: Romania
|
Posted: Mon May 04, 2020 7:55 am Post subject: |
|
|
Hu wrote: | 169.254.* is the APIPA range, which suggests the printer failed to acquire a DHCP lease. Does the network have a functioning DHCP server that the printer would see? Does that DHCP server report receiving DHCP client requests from the MAC address of the printer? |
There is a dhcp server, but I didn't get into that. Asked my friend to reboot the printer once, because I thought it will get a new ip, but it didn't. never the less. static route works just as well. I didn't dig deeper because there's others things I could be doing. But I was particularly proud about the qemu thing. Looks like i'm the only one. Ohh well. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54810 Location: 56N 3W
|
Posted: Mon May 04, 2020 9:00 am Post subject: |
|
|
axl,
As its a network printer, you should be able to send it PostScript and have it just work.
It should not need any external rasteriser at all, never mind one running with help from qemu-static. :)
CUPS will need the printer PPD file, if it does not already have it.
All the out of band stuff, like checking supplies may need an evil binary blob though. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
axl Veteran
Joined: 11 Oct 2002 Posts: 1146 Location: Romania
|
Posted: Mon May 04, 2020 9:25 am Post subject: |
|
|
NeddySeagoon wrote: | axl,
As its a network printer, you should be able to send it PostScript and have it just work.
It should not need any external rasteriser at all, never mind one running with help from qemu-static.
CUPS will need the printer PPD file, if it does not already have it.
All the out of band stuff, like checking supplies may need an evil binary blob though. |
I ended up setting it up as a generic postscript printer. I tried something called splix, both from raspbian & sources from git. It wouldn't have worked either way because of the IP. I didn't think at the time to check that. Imagine my desperation if I resorted to qemu-static, but none the less it ended up opening more doors.
My friend asked me to prepare for him dropbox and zoom, which as you might know, don't have clients for arm. I am thinking, between wine or qemu I'll be able to set it up one way or another.
I ♥ linux & rpi4 is quite speedy and a joy to work with. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|