Hello again!
I wanted to share with you that I have been able to cross compile HPIJS
with Buildroot.
First of all I followed the Buildroot usage documentation located here:
http://buildroot.uclibc.org/buildroot.html
After having obtained Buildroot I added the HPLIP package by following the tutorial "Makefile for autotools-based packages" in the Buildroot documentation. (It's located under "Adding new packages to Buildroot")
These are the steps I took:
First cd to the package directory in your buildroot directory
.../buildroot-2010.02/package/
Make directory hplip with "mkdir hplip" and enter it with "cd hplip"
Create a file named Config.in with "touch Config.in"
Edit the file with "gedit Config.in"
Don't have to be much, these are my contents of the file:
Code:
config BR2_PACKAGE_HPLIP
bool "hplip"
help
HP Linux imaging and printing. Print, scan and fax drivers for Linux.
http://hplipopensource.com/
Next go back to the package directory ("cd ..") and edit the Config.in in that directory.
Simply add this line: source "package/hplip/Config.in"
This is where I placed it:
Code:
...
66. source "package/gamin/Config.in"
67. source "package/hplip/Config.in"
68. source "package/icu/Config.in"
...
Now go back to the hplip directory ("cd hplip")
Do "touch hplip.mk" and "gedit hplip.mk"
These are my contents of the file hplip.mk: (I configured it for hpijs only. --build, --host, --target and --prefix all are unneeded because they are being taken care off by Buildroot)
Code:
################################################################################
#
# hplip
#
################################################################################
HPLIP_VERSION:=3.10.2
HPLIP_SOURCE:=hplip-$(HPLIP_VERSION).tar.gz
HPLIP_SITE:=http://prdownloads.sourceforge.net/hplip/
HPLIP_INSTALL_STAGING = YES
HPLIP_INSTALL_TARGET = YES
HPLIP_CONF_OPT = --enable-shared --disable-network-build
--enable-hpijs-only-build --enable-hpijs-install
--enable-foomatic-ppd-install
HPLIP_DEPENDENCIES =
$(eval $(call AUTOTARGETS,package,hplip))
After making these files go back to the buildroot directory with "cd ../..". (You should be in .../buildroot-2010.02/ again now)
Run "make menuconfig"
As you can see the HPLIP package should be available now.
Choose the target architecture (in my case arm920t) and other options.
Choose the packages you want in your root file system (probably going to be at least cups and perhaps jpeg and png libraries.. I'm not sure what precisely is needed for hplip)
Don't choose hplip just yet!! Else make will fail! because Buildroot wants to make some of hplip's dependencies after hplip. (I suppose this could be fixed by assigning the right dependencies in the hplip.mk file after this line: "HPLIP_DEPENDENCIES = ")
After you're done with "make menuconfig" simply run "make".
You'll see the toolchain and the libraries for your root file system will compile... For my project this takes about 2 hours, so best is to take a coffee or something while you let your build system run.
When your system is done with make run "make menuconfig" again, this time choose the hplip package, exit the menuconfig.
Run "make" again, this will only take a few minutes now.
I managed to get no errors on this. So this should do the trick to cross compile HPLIP with Buildroot.
I'm still struggling with actually getting my cross compiled root file system on my embedded computer. I will notify you when I've done that successfully and when I managed to print from the embedded system.
Thanks,
PJvG