LCDProc package update
-
Thanks for that. :)
I managed to get it to compile in the end. My biggest problem was a typo I made in the config files while adding the driver. :-[Actually I might take this opportunity to document the process if you don't mind me hi-jacking your thread.
Steve
-
Thanks Steve! I've done some reading also and not there yet to create my own.
@mdima Take a look here, looks like you need to open a ticket http://forum.pfsense.org/index.php/topic,25519.msg132491.html#msg132491
OK! Sorry for the delay but I just got back from my "summer break" and the urgent stuff was stucking me…
Also, it took a lot of time because I wanted to compile also the picolcd driver, but it's really hard, at least for me, since I should install also the libusb library that is needed but I don't know where to install them... btw, in the end I was using the drivers from your dropbox, and I used the x86 version...
At this address (http://staff.nt2.it/lcdproc.zip) you can download the files to install on the pfSense box. The files in the /bin directory should be copied on the box in the directory /usr/local/lib/lcdproc, the others in the directory /usr/local/pkg.
This files are the "merge" of the files I changed + your changes (serial ports, parameters of the picolcd, and so on) + the driver binary files for picolcd... on my system the package works, if it works on your system also I update my git branch and will ask again to update the main repository with the files from my branch in order to install the updated package directly from the webconfigurator... ok?
Thanks,
Michele -
Thanks for that. :)
I managed to get it to compile in the end. My biggest problem was a typo I made in the config files while adding the driver. :-[Actually I might take this opportunity to document the process if you don't mind me hi-jacking your thread.
Steve
[/quote]no, it's fine! I really thought that the LCDProc package was kind of dead, because it was not updated since a lot of time, and the mantainer's email is not reachable anymore… but as I see everyone is implementing his own changes by himself and this can lead to a mess...
Now I was "merging" the changes that Cino and I did to the package, if you want we can merge also yours, in order to update the package in the repository... what do you think about that?
-
Michele, I wont be able to see my display until later this evening but I'll let you know how it turns out… And thank you very much!!
-
Michele, I wont be able to see my display until later this evening but I'll let you know how it turns out… And thank you very much!!
Don't worry, it's fine! I look forward to hearing a feedback from you!
-
Also, it took a lot of time because I wanted to compile also the picolcd driver, but it's really hard, at least for me, since I should install also the libusb library that is needed but I don't know where to install them… btw, in the end I was using the drivers from your dropbox, and I used the x86 version...
the libusb library, a full install of FreeBSD includes this lib. Don't know if it makes a difference, but I've put libusb.so.5 in the /usr/local/lib directory. We don't need libkvm.so.5 lib anymore. This is included with the current snapshots of pfsense.
I had problems trying to compile all the drivers for lcdproc from source-code using ./configure –enable-drivers=all. I signed up for the lcdproc mailing list and was told instead of compiling from SC, use the Port from the package system and tell that to configure all the drivers... Doing this, I was able to get all the drivers for with no errors since the package knew where all the libs that were needed.
-
Mostly to remind myself how I did it here are the steps I took to compile a new driver for LCDproc for the package under 2.0.
I started with an install of FreeBSD 8.1_release.
First install the FreeBSD port of LCDproc. Goto /usr/ports/sysutils/lcdproc and type make. This will download all the sources and dependencies for LCDproc 0.5.3 and build them.
Then follow the instructions from the LCDproc site, here, to add your new driver. There are some parts of these that are unclear. ;)
The driver I'm adding is specific to the Watchguard Firebox, which causes problems later, named sdeclcd.
Editing acinclude.m4 is as per the instructions, as long as you don't make a typo! Editing Makefile.am was more involved.
For step 2 I needed:```
sdeclcd_LDADD = libLCD.a libbignum.aAnd for step 3 I needed:``` sdeclcd_SOURCES = lcd.h lcd_lib.h sdeclcd.c sdeclcd.h report.h
Next you need to run autogen.sh but that's not included in the FreeBSD port so download it from here to /usr/ports/sysutils/lcdproc/work/lcdproc-0.5.3.
Then you can run ./configure –enable-drivers=sdeclcd (or whatever your driver is or all to build every driver) and then make to build the driver. sdeclcd.ko in my case.You then need to edit the files from the lcdproc package to allow the new driver to be selected and loaded. This is still a work in progress for me as the driver is a special case.
Steve
-
i copied the package files over and it worked for me. I did leave the libusb in the /usr/local/lib directory tho.
reading steve's post, i believe that was the same thing i did when i trying to get the driver i needed.
-
i copied the package files over and it worked for me. I did leave the libusb in the /usr/local/lib directory tho.
ok, I updated the files in my git clone… today I will mail Jim and ask how to do that... I keep you updated!
Ciao,
Michele -
Thanks Michele!
-
Assides from having to add your driver are either of having problems with the lcdproc package?
Because I intended to modify the package I first setup my own local repo as detailed here.
I have had a lot of trouble getting the package up and running. A lot of my problems were caused by the fact that, despite putting the .htaccess file in every directory I could, the php files from the package are being executed by my server rather than served. >:(
However even having moved the php file manually I am getting errors. The lcdproc_client.php file will not run such that I just see the output of LCDd on the LCD. Running /tmp/lcdclient.sh manually gives:Fatal error: Cannot redeclare array_combine() in /usr/local/pkg/lcdproc_client.php on line 84
Commenting out the array_combine function and the CPU usage function which depends on it allows it to run.
I have no idea why this won't run for me yet other people aren't complaining. ???Steve
-
@stephenw10: this is a bug I fixed on my version of LCDProc… you can use my version of LCDProc (in this thread in a previous post there's the link) or wait that I try to merge the changes I made in the main repository...
-
Ok thanks, not just me then! ::)
Solved the php parsing problem. By default Apache ignores .htaccess files unless you allow it. I added the following to httpd.conf:
<directory "="" usr="" local="" www="" apache22="" data="" packages"="">AllowOverride All</directory>
Allowing 'all' is more than what is required but solves the problem.
Steve
Edit: I see you commented out the function but left it in CPU Usage. Do you have a list of changes?
Edit: If you're merging stuff then there should be a description line in the service section of lcdproc.xml like so:
<service><name>lcdproc</name> <description>LCD Driver</description> <rcfile>lcdproc.sh</rcfile> <executable>LCDd</executable></service>
This fills in the empty box on Status: Services:
-
Thanks Michele!
ok, I committed all the changed in the new repository… I hope that soon all this changed will be torned in production, in the real distributed package!
Ciao,
Michele -
@stephenw10: well, I made so many changes from may that I lost the track… the most important I remember are: added mbuf screen, added support for panels 4x20 and 4x16, also now the screen size is considered by the application (before was anyway fixed 16x2), added some comports, added a parameter for the refresh frequency, added the states screen (think I did, not sure about that), added the cpu frequency screen. After 1 month I made also some optimizations to all the above code.
I committed my changed with my clone on rcs.pfsense.org only a couple of times, but I think that if you need to make some changes it worths to start from my files...
I just added the description to the LCDProc service and I committed it... ;)
-
Com 1 seems to have vanished from lcdproc.xml ;)
Steve
Edit: Ah so com1 is default if you don't select anything?
-
Com 1 seems to have vanished from lcdproc.xml ;)
Steve
Edit: Ah so com1 is default if you don't select anything?
mmmhhhh… I didn't change that, but it's not so nice if "none" means com1... :S
btw, if you reinstall the package now you download the last version!! :) Thanks to Jim and Luiz!!
-
looks like the merge request when thru, https://github.com/bsdperimeter/pfsense-packages/commit/c587fd97b5baaec9358b50f303326350d1c23088.
A couple of things tho:
1: Please remove libkvm.so.5 from the package, pfsense has it built-in already
2: libusb.so.2 should be located at /usr/local/lib
3: This maybe your next step, are your going to update to 0.5.4?I removed everything including manual files… installed the package and it started after clicking start under services. I have to verify that the screen is working but that will be later tonight... Swamp at work to prepare for the Hurricane and I'm on stand-by with the army national guard. Should be a fun weekend in NYC... Glad I live an hour+ away from the city.
If the screen is displaying correctly, then issue 2 wouldn't be an issue :-)
On another note, have either of you messed around with using lcdproc client that comes with LCDproc? I've enabled it on my build because I like the load graphical screen. Works pretty good. You have to copy lcdproc.conf.sample to lcdproc.conf and edit some of the settings. then you can run lcdproc from the command line or within a start-up script.
-
Hi Cino,
about your points:1: Please remove libkvm.so.5 from the package, pfsense has it built-in already
I did it. For this:
2: libusb.so.2 should be located at /usr/local/lib
I am a bit afraid to mess up some other package or part that use that file… it should be better to leave the file in his own directory, so if someone uninstalls LCDProc does not remove a lib from a "common directory" that maybe is needed by some other package or similar, what do you think about that? Tell me when you're back home, if it works I would leave this file where it is, if it does not work I move it, ok? Just let me know...
About the update of LCDProc to 5.4, the changelog reports only a couple of drivers more and a small bugfix, I am not sure it worths it... anyway, now I am trying to manage a x64 virtual machine, + I have your files for both versions, let me think about it...
As for the graphical screens, no I didn't try anything... but consider that this package is done for a lot of different devices and panels, I am a bit scared about introducing features that could not be compatible with this devices...
It is very honorable of you being ready to serve your Country in case of need... I wish you the best for the Hurricane in NY...
-
About the update of LCDProc to 5.4, the changelog reports only a couple of drivers more and a small bugfix, I am not sure it worths it… anyway, now I am trying to manage a x64 virtual machine, + I have your files for both versions, let me think about it...
Actually, for this, I was investigating a bit and I found out that LCDProc 0.5.4 is already present in http://files.pfsense.org/packages/8/All/ and http://files.pfsense.org/packages/amd64/8/All/ and in both files "lcdproc-0.5.4.tbz" there is both the Surelect then the picolcd driver… the only missing file would be libusb.so.2 that I can't find in the package...
So the update to 0.5.4 looks less painful than I thought...