Hi,
I've done some work to get cups working on a Pi B+ with 7.0alpha6 (4.1.7-piCore+). It should work on other Pi h/w and earlier versions of piCore. I've made some assumptions, namely that the cups extension to be used is v2.0.4 and that both the cups and cups-doc extensions are available for the version of piCore you are intending to run.
I have tested this on the h/w & s/w mentioned above and I am able to access the Web Interface successfully. I haven't tried to add any printers etc so don't know if there is anything else required, but at least it's a start
#!/bin/sh
# get x86 version of cups
cd $HOME
wget -c http://repo.tinycorelinux.net/6.x/x86/tcz/cups.tcz
# mount it for access
sudo mkdir -p /tmp/tcloop/cups_x86
sudo mount cups.tcz /tmp/tcloop/cups_x86 -t squashfs -o loop,ro,bs=4096
# copy config files
sudo mkdir -p /usr/local/etc/cups
sudo cp /tmp/tcloop/cups_x86/usr/local/etc/cups/cups-files.conf /usr/local/etc/cups/cups-files.conf
sudo cp /tmp/tcloop/cups_x86/usr/local/etc/cups/cupsd.conf.default /usr/local/etc/cups/cupsd.conf
# edit the cups-files.conf to correct directory names and uncomment variables
sudo sed -i "s#/var/#/usr/local&#g; s/#CacheDir/CacheDir/; s/#RequestRoot/RequestRoot/; s/#StateDir/StateDir/; s/#TempDir/TempDir/" /usr/local/etc/cups/cups-files.conf
# copy startup script
sudo cp /tmp/tcloop/cups_x86/usr/local/etc/init.d/cups /usr/local/etc/init.d/cups
# add startup script to /opt/bootlocal.sh
echo -e "\n/usr/local/etc/init.d/cups start\n" >> /opt/bootlocal.sh
# unmount x86 version and remove file
sudo umount -d /tmp/tcloop/cups_x86
rm -f cups.tcz
# install missing doc files
tce-load -wi cups-doc
# since v1.7.4 of cups symlinks aren't allowed
# so replace them with the actual files
for f in apple-touch-icon.png cups-printable.css cups.css index.html; do
[ -h /usr/local/share/doc/cups/$f ] && sudo rm -f /usr/local/share/doc/cups/$f
sudo cp /tmp/tcloop/cups-doc/usr/local/share/doc/cups/$f /usr/local/share/doc/cups/$f
done
# make sure these files are backed up
echo usr/local/etc/cups >> /opt/.filetool.lst
echo usr/local/etc/init.d/cups >> /opt/.filetool.lst
echo usr/local/share/doc/cups >> /opt/.filetool.lst
# backup all the changes
filetool.sh -b
Then follow these steps:
1. Copy the code into a file,
/home/tc/cups_fix.sh, on the Raspberry Pi and ensure it's executable.
chmod +x /home/tc/cups_fix.shcups_fix.sh
2. Run
/home/tc/cups_fix.shcups_fix.sh and Reboot the Pi when it completes.
3. For headless access from another computer
ssh tc@<ip_address_of_pi_with_cups> -T -L 3631:localhost:631
4. Point your Browser to localhost:631, or localhost:3631 if headless, and the Web Interface will appear.
If you have any issues with the code, or these instructions, I'll try to help.
Jon