Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: matteo on September 04, 2020, 06:04:17 PM

Title: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 04, 2020, 06:04:17 PM
Hello,
I tried to install piCore 9.0.3 on my RPI Zero W (I would like to set up a print server) but I did not get the wifi connection working. I did revert back to piCore 9.0.1 as already reported in the forum, but from wifi.sh, after the wifi password, I get only the message "Failed to connect".
From previous tests with piCore 11.0, the wifi connection was working fine. Do you any clue? I could I solve the problem?
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Paul_123 on September 04, 2020, 06:55:38 PM
Did you follow the same steps.  The procedure and required extensions would be the same.  Make sure you have the correct kernel module extension for wifi and the rpi firmware as well.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 07, 2020, 02:34:29 PM
I followed the very same steps.
I started from the beginning and again. Etched the 9.0.1 image. Expanded partition etc. From wifi.sh I got only "Failed to connect".
Then, from: http://forum.tinycorelinux.net/index.php/topic,21134.15.html (http://forum.tinycorelinux.net/index.php/topic,21134.15.html), I changed onboot.lst from:

mc.tcz
openssh.tcz
firmware-rpi3-wireless.tcz
wifi.tcz

to:

mc.tcz
openssh.tcz
firmware-rpi3-wireless.tcz
readline.tcz
wifi.tcz

But readline.tcz was already copied to the directory mmcblk0p2/tce/optional together with libiw, libnl and so on. Anyway, only the latest file onboot.lst allows me to connect to wifi network. Then I added sudo wifi.sh -a to the file bootlocal.lst and did the usual backup, but at the reboot nothing happens. RPI Zero W does not connect to wifi. Simply, the command sudo wifi.sh -a is not executed at boot. If I do sudo wifi.sh -a again, from the prompt, it "seems" to connect to wifi.
Note: the time from the command sudo wifi.sh -a to connection is sligthly longer than with piCore 11.x.

Wget does not reach the TC repository and says:
wget: bad address 'repo.tinycorelinux.net'

The command:
wget http://tinycorelinux.net/9.x/armv6/tcz/hplip.tcz

gives:
wget: bad address 'tinycorelinux.net'

From the Android app Raspcontroller, SSH takes a very long time and then fails to connect. From the Android app ConnectBot,again SSH and I get prompted to change the expired (?) RPI Zero W password. Weird. Or else, it says "Host unreachable".
I did not have any of such issues with piCore 11.0, wget and the apps worked as a breeeze with piCore 11.0. Is it a known behavour of piCore 9.0.1? Do you have any advice? I fail to understand the logic behind. Thanks.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 08, 2020, 02:46:31 AM
I'm not sure it will make a difference, but the latest piCore-9.x release is 9.0.3, not 9.0.1.

The above being said, the supported releases are piCore-11.x and the upcoming 12.x.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 08, 2020, 05:00:09 AM
Ok Juanito, I understand that. At this point I was just curious to understand what could be the underlying problem.
For the print server with an old USB printer HP P1005, I tried RPI Zero W with piCore 11.0 but being without a hplip package I reverted back to 9.0.3 (the hplip package from piCore 9.x seems not compatible with openssl 1.1 of piCore 11.0). Having problems with the wifi configuration, I followed previous posts on the forum that suggested that wifi on RPI Zero W should be working with piCore 9.0.1. And here I am.

I also tried hplip in the HP .run version, but its installation stops somewhere right after uncompression of the package: TinyCore Linux is not currently supported by the HP  installer.

Next move, I think I will try again piCore 11.0 and the hplip .run installer, trying to find support from HP: I will let you know if the .run installer may be compatible with TinyCore Linux.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: aus9 on September 08, 2020, 05:39:29 AM
there is another way you could try if above fails for you.

http://foo2xqx.rkkda.com/
that link claims "foo2xqx is an open source printer driver for printers that use the HP/Software Imaging "XQX" stream wire protocol for their print data, such as the HP LaserJet P1005"

a bit of reading suggests it will use cups, ghostscript and foomatic but foomatic is I believe what we call cups-filters
I had a peep at printers supported by gutenprint but its not supported
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 08, 2020, 05:42:14 AM
Sorry, I'd forgotten you were using piCore-9.x because of hplip.

The last time I used piCore-9.x, both hplip and wifi worked OK, but I didn't try to automate wifi logon at boot - maybe you need a sleep command before trying to connect?

I doubt that hplip .run will work due to hplip having so many hard coded paths in its scripts.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 15, 2020, 12:30:35 PM
there is another way you could try if above fails for you.

http://foo2xqx.rkkda.com/
that link claims "foo2xqx is an open source printer driver for printers that use the HP/Software Imaging "XQX" stream wire protocol for their print data, such as the HP LaserJet P1005"

a bit of reading suggests it will use cups, ghostscript and foomatic but foomatic is I believe what we call cups-filters
I had a peep at printers supported by gutenprint but its not supported

Hi aus9,  I gave a try to that driver. I moved to piCore 11.0 anyway. After resolving the missing dependencies, I got the error while launching the make command: "Error: must install GNU dc with -e option!". Does somebody have a clue about it? Could it be related to a dc/gdc package that I could not find?
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: curaga on September 15, 2020, 01:19:15 PM
GNU dc is a part of the bc extension. Not sure if bc.tcz exists for pi.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 15, 2020, 01:23:03 PM
Hi curaga
GNU dc is a part of the bc extension. Not sure if bc.tcz exists for pi.
It does:
http://tinycorelinux.net/11.x/armv6/tcz/bc.tcz.list
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 15, 2020, 01:51:25 PM
Thanks, I compiled on RaspBerry Pi Zero W. But I got some errors:

/bin/sh: groff not found
/usr/local/bin/gs: error while loading shared libraries: libidn.so.11: cannot open shared object file: No such file or directory.

and

Error: ex is not installed! Install vim package(s) for your OS

Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 15, 2020, 02:11:21 PM
I installed the package vim.tcz from the 7.x repository, I went on and obtained:

ex: error while loading shared libraries: libncursesw.so.5

The ncurses.tcz package is already installed...do I need something else
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 15, 2020, 02:15:13 PM
Hi matteo
The ncurses.tcz package in TC11 is version 6, not 5.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 15, 2020, 02:19:55 PM
Hi Rich, do you mean that I am stuck again? Also "gs" gives me some troubles...
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 15, 2020, 02:58:25 PM
I changed ncurses v.5.9 from piCore 9.x into piCore 11.x (I made a backup of the newer file ncurses.tcz, copied the old one in tce/optional and made it executable). Fortunately, the wifi at logon is still ok; however I lost Midnight Commander that wants the newer version.

The only error that I still have, while compiling the printer driver foo2xqx, is related to gs:

/usr/local/bin/gs: error while loading shared libraries: libidn.so.11: cannot open shared object file: No such file or directory.

I installed ghostscript 9.22 via tce-ab; libidn2 v.2.3.0 is already installed from the piCore 11.x repository. Any clue? Many thanks!
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 15, 2020, 03:51:31 PM
Hi matteo
libidn2.tcz contains  libidn2.so.0.  libidn.tcz in TC9  contains  libidn.so.11:
http://tinycorelinux.net/9.x/armv6/tcz/libidn.tcz.list
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 16, 2020, 06:08:38 AM
libidn copied to piCore-11.x repos, ghostscript deps adjusted - thanks for reporting this.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 16, 2020, 07:30:27 AM
Hi Juanito, thanks.
It seems that I compiled the foo2xqx driver without further errors or warnings. If it could help, I also used the groff.tcz and the vim.tcz packages from the 7.x armv6 repo.

The USB printer, obviously, still does not print  ::) I will try also vim.tcz from TC 4.x (probably smaller and without X.org dependecies, just to give it a try) and ghostscript 9.07 from TC 4.x (the gs 9.22 version is reported as broken in the foo2xqx installation file). I will let you know.

Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 16, 2020, 11:36:23 AM
cups, ghostscript and hplip worked for me in piCore-9.x - I will get round to updating hplip for piCore-11.x, but it’s going to be a couple of weeks yet.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 17, 2020, 11:59:46 AM
Ok, in the meanwhile I tried to compile that foo2xqx driver again. This time, I tried:
- the groff and vim tcz files from TC 7.x;
- the ghostscript v.9.16 from TC 9.x (the foo2xqx install file does not report it as broken).

However, I guess the problem is that compiling, after "sudo make install-hotplug", I have:

/etc/hotplug/usb/hpljP1005 install-usermap
/usr/local/bin/ex: line 1: syntax error: unexpected "("

So I have not hotplug available, and thus no firmware loaded to the USB printer.

That is curious. I tried vim.tcz from 7.x/armv6, reboot, and from 4.x/x86. The command ex --version gives both times
/usr/local/bin/ex: line 1: syntax error: unexpected "("
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 18, 2020, 03:28:30 PM
I tried again, but I had not luck.

While compiling the foo2xqx driver, I got:

/etc/hotplug/usb/hpljP1005 install-usermap
/usr/local/bin/ex: line 1: syntax error: unexpected "("

These are the outputs that I get:
ex --version
/usr/local/bin/ex: line 1: syntax error: unexpected "("

vim --version
/usr/local/bin/vim: line 1: syntax error: unexpected "("

gvim --version
/usr/local/bin/gvim: line 1: syntax error: unexpected word (expecting ")")

I used the gvim.tcz from 9.x/x86: probably it does not work on ARM? Still, the errors with ex and vim are not related to tcz files that I installed from other repositories...
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 18, 2020, 05:00:32 PM
Hi matteo
... I used the gvim.tcz from 9.x/x86: probably it does not work on ARM? Still, the errors with ex and vim are not related to tcz files that I installed from other repositories...
Something compiled to run on x86 will not run on ARM.

I ran the  file  command against vim from TC7 and busybox from TC9:
Code: [Select]
tc@E310:~$ file vim/vim/usr/local/bin/vim
vim/vim/usr/local/bin/vim: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, stripped
tc@E310:~$ file PiCore/TC9/mnt2/tmp/bin/busybox
PiCore/TC9/mnt2/tmp/bin/busybox: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, stripped
tc@E310:~$

I think it's a version mismatch issue. From the results of the file commands:
Code: [Select]
vim GNU/Linux 2.6.32
busybox GNU/Linux 3.2.0
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 21, 2020, 05:14:44 AM
Hi Rich,
ok, then the problem also arises using vim from armv6 TC7 in TC11.x because:

file /bin/busybox
/bin/busybox: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, stripped

Probably there is the same version mismatch. Is it possible to have an updated vim.tcz in armv6 TC11.x?
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 21, 2020, 09:03:21 AM
Hi matteo
If you would like to try building it, there is a build script located here:
http://tinycorelinux.net/7.x/armv6/tcz/src/vim/

To fetch the most recent source code here:
Code: [Select]
tce-load -wil compiletc squashfs-tools bash acl-dev ncurses-dev git
git clone https://github.com/vim/vim.git

You will need to make 2 changes to the build script:
Change this
Code: [Select]
WRKDIR=vim-7.4.935To this
Code: [Select]
WRKDIR=vim
And

Change this
Code: [Select]
tar -xf $SRCNAMTo this
Code: [Select]
#tar -xf $SRCNAM
Then run the build script
Code: [Select]
./vim.build
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 21, 2020, 03:31:31 PM
Hi Rich,
thanks for the instructions. I also had to remove the first occurence of the line:
Code: [Select]
rm -r -f $WRKDIR
that became
Code: [Select]
# rm -r -f $WRKDIR
otherwise the script erases everything in the directory /vim and the directory itself  >:( even before the
Code: [Select]
make -j4command. That was fun.

The command ./vim.build gives, after several checkings:
Code: [Select]

checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -ltinfo... no
checking for tgetent in -lncurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.
make[2]: *** [Makefile:2056: config] Error 1
make[2]: Leaving directory '/mnt/mmcblk0p2/tce/vimsrc/vim/src'
make[1]: *** [Makefile:2084: reconfig] Error 2
make[1]: Leaving directory '/mnt/mmcblk0p2/tce/vimsrc/vim/src'
make: *** [Makefile:29: first] Error 2
Starting make in the src directory.
If there are problems, cd to the src directory and run make there
cd src && make install
make[1]: Entering directory '/mnt/mmcblk0p2/tce/vimsrc/vim/src'
Makefile:2714: target '/tmp/vim' given more than once in the same rule
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/mnt/mmcblk0p2/tce/vimsrc/vim/src'
mode of '/tmp/vim/' changed to 0755 (rwxr-xr-x)
Usage: strip <option(s)> in-file(s)
 Removes symbols and sections from files
 The options are:
  -I --input-target=<bfdname>      Assume input file is in format <bfdname>
  -O --output-target=<bfdname>     Create an output file in format <bfdname>
  -F --target=<bfdname>            Set both input and output format to <bfdname>
  -p --preserve-dates              Copy modified/access timestamps to the output
  -D --enable-deterministic-archives
                                   Produce deterministic output when stripping archives
  -U --disable-deterministic-archives
                                   Disable -D behavior (default)
  -R --remove-section=<name>       Also remove section <name> from the output
     --remove-relocations <name>   Remove relocations from section <name>
  -s --strip-all                   Remove all symbol and relocation information
  -g -S -d --strip-debug           Remove all debugging symbols & sections
     --strip-dwo                   Remove all DWO sections
     --strip-unneeded              Remove all symbols not needed by relocations
     --only-keep-debug             Strip everything but the debug information
  -M  --merge-notes                Remove redundant entries in note sections (default)
      --no-merge-notes             Do not attempt to remove redundant notes
  -N --strip-symbol=<name>         Do not copy symbol <name>
  -K --keep-symbol=<name>          Do not strip symbol <name>
     --keep-file-symbols           Do not strip file symbol(s)
  -w --wildcard                    Permit wildcard in symbol comparison
  -x --discard-all                 Remove all non-global symbols
  -X --discard-locals              Remove any compiler-generated symbols
  -v --verbose                     List all object files modified
  -V --version                     Display this program's version number
  -h --help                        Display this output
     --info                        List object formats & architectures supported
  -o <file>                        Place stripped output into <file>
strip: supported targets: elf32-littlearm elf32-littlearm-fdpic elf32-bigarm elf32-bigarm-fdpic elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
mv: can't rename '/tmp/vim/usr/local/share/man': No such file or directory
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on vim.tcz, block size 4096.


Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 4096
        compressed data, compressed metadata, compressed fragments,
        compressed xattrs, compressed ids
        duplicates are removed
Filesystem size 0.16 Kbytes (0.00 Mbytes)
        100.00% of uncompressed filesystem size (0.16 Kbytes)
Inode table size 30 bytes (0.03 Kbytes)
        88.24% of uncompressed inode table size (34 bytes)
Directory table size 0 bytes (0.00 Kbytes)
        nan% of uncompressed directory table size (0 bytes)
Number of duplicate files found 0
Number of inodes 1
Number of files 0
Number of fragments 0
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1
Number of ids (unique uids + gids) 2
Number of uids 1
        tc (1001)
Number of gids 1
        staff (50)
find: 'usr': No such file or directory
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on vim-doc.tcz, block size 4096.


Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 4096
        compressed data, compressed metadata, compressed fragments,
        compressed xattrs, compressed ids
        duplicates are removed
Filesystem size 0.25 Kbytes (0.00 Mbytes)
        70.87% of uncompressed filesystem size (0.35 Kbytes)
Inode table size 61 bytes (0.06 Kbytes)
        46.92% of uncompressed inode table size (130 bytes)
Directory table size 51 bytes (0.05 Kbytes)
        68.00% of uncompressed directory table size (75 bytes)
Number of duplicate files found 0
Number of inodes 4
Number of files 0
Number of fragments 0
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 4
Number of ids (unique uids + gids) 2
Number of uids 1
        tc (1001)
Number of gids 1
        staff (50)

I found a file vim.tcz inside /tmp/vim, its size is 4096 B, and an empty vim.tcz.list file. The script evaluated a md5sum for the vim.tcz package; I tried anyway

$ tce-load -i vim.tcz

that gives vim.tcz:OK

but given it dimensions, I supposed something is not working properly.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 21, 2020, 04:46:59 PM
Hi matteo
Are you sure you installed the  -dev  extension:
Code: [Select]
ncurses-dev.tcz
I wonder if you need any of these:
Code: [Select]
ncurses-terminfo.tcz
ncurses-utils.tcz
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 21, 2020, 05:01:37 PM
Hi matteo
You can also try adding this to the  .configure  command in the build script:
Code: [Select]
--with-tlib=ncursesw
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 22, 2020, 05:53:48 AM
Hi Rich,
yes, the
Code: [Select]
ncurses-dev.tcz

was installed. I tried the
Code: [Select]
--with-tlib=ncursesw

and the process reached a bit further point, 
Code: [Select]
checking --with-tlib argument... ncursesw
checking for linking with ncursesw library... OK
checking for tgetent()... yes
checking whether we talk terminfo... yes
checking what tgetent() returns for an unknown terminal... zero

and then, after several checkings,
Code: [Select]
checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -ltinfo... no
checking for tgetent in -lncurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.
make[1]: *** [Makefile:2056: auto/config.mk] Error 1
make[1]: Leaving directory '/mnt/mmcblk0p2/tce/vimsrc/vim/src'
make: *** [Makefile:29: first] Error 2

It seems that the configure command is called more than once. The first time it goes well (it is called from inside the vim.build script), then the 2nd and 3rd time it gives the errors above. Do I have to add the --with-tlib=ncursesw somewhere else? In the vim directory, probably?

I would try again, but cloning again vim gives me
Code: [Select]
Cloning into 'vim'...
fatal: unable to access 'http://github.com/vim/vim.git/': SSL certificate problem: certificate is not yet valid

Probably it is related to RPI Zero W that has not a realtime clock?
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 22, 2020, 06:01:45 AM
There are many apps that have problems with ncurses(w) - one way to fix things is to search for the appropriate test in the ./configure script and change -lncurses to -lncursesw.

Another possible fix is to use LIBS="-L/usr/local/lib -lncursesw" ./configure --blah-blah
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 22, 2020, 06:04:23 AM
Probably it is related to RPI Zero W that has not a realtime clock?

You could run getTime.sh before the download and check the time is correct with the date command?
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 22, 2020, 06:19:58 AM
Probably it is related to RPI Zero W that has not a realtime clock?

You could run getTime.sh before the download and check the time is correct with the date command?

That is nice. Ok, I added
Code: [Select]
ntp.tcz
via tce-ab, then
Code: [Select]
sudo ntpd
getTime.sh
The time and date are now synced. I also will try without doing sudo ntpd and append the getTime.sh command in bootlocal.sh. Thanks!
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 22, 2020, 07:12:31 AM
There are many apps that have problems with ncurses(w) - one way to fix things is to search for the appropriate test in the ./configure script and change -lncurses to -lncursesw.

Another possible fix is to use LIBS="-L/usr/local/lib -lncursesw" ./configure --blah-blah

So, the first config file is inside the vim directory
Code: [Select]
#! /bin/sh

# This is just a stub for the Unix configure script, to provide support for
# doing "./configure" in the top Vim directory.

cd "${SRCDIR:-src}" && exec ./configure "$@"

and the consequent one is inside the vim/src directory:
Code: [Select]
#! /bin/sh
# run the automatically generated configure script
CONFIG_STATUS=auto/config.status \
        auto/configure "$@" --srcdir="${srcdir:-.}" --cache-file=auto/config.cache
result=$?

# Stupid autoconf 2.5x causes this file to be left behind.
if test -f configure.lineno; then rm -f configure.lineno; fi

exit $result

and then, in the vim/src/auto directory there is a very long configure file plenty of "test" occurences  :D but no "lncurses". There are some "curses" occurences related to a "tlibs" variable (?).
I have no guess where I should use the part
Code: [Select]
LIBS="-L/usr/local/lib -lncursesw"

Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 22, 2020, 07:38:42 AM
This:
Code: [Select]
checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -ltinfo... no
checking for tgetent in -lncurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lcurses... no
no terminal library found
..means that one of the configure scripts is checking for -lncurses, does "grep -lr lncurses ." find it?

Quote
I have no guess where I should use the part

Instead of:
Code: [Select]
$ ./configure --blah-blah
..use:
Code: [Select]
$ LIBS="-L/usr/local/lib -lncursesw" ./configure --blah-blah
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 22, 2020, 08:42:44 AM
Hi Juanito
Found some interesting notes. It seems they don't use a standard ./configure, make, make install.
Quote
# config.mk.in -- autoconf template for Vim on Unix      vim:ts=8:sw=8:
#
# DO NOT EDIT config.mk!!  It will be overwritten by configure.
# Edit Makefile and run "make" or run ./configure with other arguments.
#
# Configure does not edit the makefile directly. This method is not the
# standard use of GNU autoconf, but it has two advantages:
#   a) The user can override every choice made by configure.
#   b) Modifications to the makefile are not lost when configure is run.
#
# I hope this is worth being nonstandard. jw.
Found here:
https://github.com/vim/vim/blob/master/src/config.mk.in

Apparently make can call configure.
Quote
2. Unix
=======

Summary:
1. make         run configure, compile and link
2. make install      installation in /usr/local

This will include the GUI and X11 libraries, if you have them.  If you want a
version of Vim that is small and starts up quickly, see the Makefile for how
to disable the GUI and X11.  If you don't have GUI libraries and/or X11, these
features will be disabled automatically.

See the start of Makefile for more detailed instructions about how to compile
Vim.

If you need extra compiler and/or linker arguments, set $CFLAGS and/or $LIBS
before starting configure.  Example:

   env  CFLAGS=-I/usr/local/include  LIBS=-lm  make

This is only needed for things that configure doesn't offer a specific argument
for or figures out by itself.  First try running configure without extra
arguments.

GNU Autoconf and a few other tools have been used to make Vim work on many
different Unix systems.  The advantage of this is that Vim should compile
on most systems without any adjustments.  The disadvantage is that when
adjustments are required, it takes some time to understand what is happening.

If configure finds all library files and then complains when linking that some
of them can't be found, your linker doesn't return an error code for missing
libraries.  Vim should be linked fine anyway, mostly you can just ignore these
errors.

If you run configure by hand (not using the Makefile), remember that any
changes in the Makefile have no influence on configure.  This may be what you
want, but maybe not!

The advantage of running configure separately, is that you can write a script
to build Vim, without changing the Makefile or feature.h.  Example (using sh):

   CFLAGS=-DCOMPILER_FLAG ./configure --enable-gui=motif

One thing to watch out for: If the configure script itself changes, running
"make" will execute it again, but without your arguments.  Do "make clean" and
run configure again.


----- Snip -----
Found here:
https://github.com/vim/vim/blob/master/src/INSTALL
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 22, 2020, 10:56:16 AM
Ok Juanito,
I changed part of the vim.build script
Code: [Select]
./configure --prefix=/usr/local --without-x --enable-gui=no

to:
Code: [Select]
LIB="-L/usr/local/lib -lncursesw" ./configure --prefix=/usr/local --without-x --enable-gui=no --with-tlib=ncursesw

As you see, I also left the "--with-tlib=ncursesw". It seems that the whole process gave no errors: in /tmp/vim there is a vim.tcz package of 10.7 MB and in /tmp/vim-doc there is a vim-doc.tcz of 208 kB. So far, so good? I think I can move the .tcz files to the persistent directory tce/optional and use them again with "tce-load -i", that is right?

The command:
Code: [Select]
tc@box:/tmp/vim$ vim --version

now gives:
Code: [Select]
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 22 2020 14:37:22)
Included patches: 1-1724
Compiled by tc@box
Huge version without GUI.  Features included (+) or not (-):
+acl               -farsi             +mouse_sgr         +tag_binary
+arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
+autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
+autochdir         +float             +mouse_xterm       -tcl
-autoservername    +folding           +multi_byte        +termguicolors
-balloon_eval      -footer            +multi_lang        +terminal
+balloon_eval_term +fork()            -mzscheme          +terminfo
-browse            -gettext           +netbeans_intg     +termresponse
++builtin_terms    -hangul_input      +num64             +textobjects
+byte_offset       +iconv             +packages          +textprop
+channel           +insert_expand     +path_extra        +timers
+cindent           +ipv6              -perl              +title
-clientserver      +job               +persistent_undo   -toolbar
-clipboard         +jumplist          +popupwin          +user_commands
+cmdline_compl     +keymap            +postscript        +vartabs
+cmdline_hist      +lambda            +printer           +vertsplit
+cmdline_info      +langmap           +profile           +virtualedit
+comments          +libcall           -python            +visual
+conceal           +linebreak         -python3           +visualextra
+cryptv            +lispindent        +quickfix          +viminfo
+cscope            +listcmds          +reltime           +vreplace
+cursorbind        +localmap          +rightleft         +wildignore
+cursorshape       -lua               -ruby              +wildmenu
+dialog_con        +menu              +scrollbind        +windows
+diff              +mksession         +signs             +writebackup
+digraphs          +modify_fname      +smartindent       -X11
-dnd               +mouse             -sound             -xfontset
-ebcdic            -mouseshape        +spell             -xim
+emacs_tags        +mouse_dec         +startuptime       -xpm
+eval              -mouse_gpm         +statusline        -xsmp
+ex_extra          -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+extra_search      +mouse_netterm     +syntax            -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim        -lm -lelf  -lncursesw -lacl -lattr -ldl

Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 22, 2020, 11:06:59 AM
Yes, you can move the *tcz you created to tce/optional and load them with tce-load - note that you'll need to create a *tcz.dep file containing at least ncurses.tcz
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 22, 2020, 11:53:48 AM
Ok, many thanks!

I tried to recompile the foo2xqx driver and, finally, the ex and the vim errors are gone. However, hotplug does not work and the firmware goes not to the printer HP P1005....but I have a vim working ;-)
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 22, 2020, 01:42:22 PM
Probably it is related to RPI Zero W that has not a realtime clock?

You could run getTime.sh before the download and check the time is correct with the date command?

That is nice. Ok, I added
Code: [Select]
ntp.tcz
via tce-ab, then
Code: [Select]
sudo ntpd
getTime.sh
The time and date are now synced. I also will try without doing sudo ntpd and append the getTime.sh command in bootlocal.sh. Thanks!

There is not need to add "sudo ntpd" or "getTime.sh" to /opt/bootlocal.sh. It seems that is enough to append ntp.tcz to onboot.lst.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 22, 2020, 02:27:11 PM
Hi matteo
... note that you'll need to create a *tcz.dep file containing at least ncurses.tcz
The TC7 version also had a dependency on  acl.tcz.  Run this:
Code: [Select]
ldd /usr/local/bin/vimIf  libacl.so  comes up in the list, you need  acl.tcz  in the  .dep  file.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 23, 2020, 04:31:58 AM
Hi Rich,
I saw the acl.tcz dependency in vim.tcz.dep and added to the vim.tcz.dep file. If I give the command ldd, I obtain:
Code: [Select]
tc@box:~$ ldd /usr/local/bin/vim
        libm.so.6 => /lib/libm.so.6 (0xb6e67000)
        libncursesw.so.6 => /usr/local/lib/libncursesw.so.6 (0xb6e0f000)
        libacl.so.1 => /usr/local/lib/libacl.so.1 (0xb6df9000)
        libdl.so.2 => /lib/libdl.so.2 (0xb6de6000)
        libc.so.6 => /lib/libc.so.6 (0xb6ca4000)
        libattr.so.1 => /usr/local/lib/libattr.so.1 (0xb6c91000)
        /lib/ld-linux-armhf.so.3 (0xb6ed4000)

Thanks for the command ldd: it is another useful thing.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 23, 2020, 10:52:31 AM
Hi matteo
If you like, you can submit the extensions you created to the repository.

Created a work directory and copy your extensions to it:
Code: [Select]
mkdir package
cd package
cp /etc/sysconfig/tcedir/optional/vim*.tcz .
cp /etc/sysconfig/tcedir/optional/vim.tcz.dep .
vim-doc.tcz does not get a  .dep  file.

Fetch the current  .info  files:
Code: [Select]
wget http://tinycorelinux.net/7.x/armv6/tcz/vim.tcz.info
wget http://tinycorelinux.net/7.x/armv6/tcz/vim-doc.tcz.info

In both files, update this field with the new version number:
Code: [Select]
Version:        7.4.935
In both files, update the change log to this:
Code: [Select]
Change-log:     2015/11/22 First version, 7.4.935
Current:        2020/09/23 update 7.4.935 -> VERSION (matteo)
Replace VERSION with the new version number.

Copy your updated  vim.build  script to this directory too. Add something like this in the section titled  # Build script  :
Code: [Select]
# Updated 2020/09/23 matteo
# Fetch source code before running this script:
# git clone https://github.com/vim/vim.git
This may help someone in the future trying to build vim.

Install the script used to check extensions for errors and run it:
Code: [Select]
tce-load submitqc
submitqc --libs 2>&1 > submitqc.txt
This updated the size field in the  .info  files, and created  .list, .md5.txt, and .zsync  files.
Check the  submitqc.txt  file for any reported errors.

Now place all of the files into a  .tar  file:
Code: [Select]
tar -czf vimPiCore9.tar.gz *.tcz* vim.build
Encrypt it:
Code: [Select]
bcrypt vimPiCore9.tar.gzWhen it asks for a key, enter  tinycore

Write a brief email stating the extension name, architecture, and which version of Tinycore this is for. Attach the
vimPiCore9.tar.gz.bfe  file and go here for the address to send it to:
[Link deleted, Wiki is fixed.  Rich]
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 23, 2020, 01:03:01 PM
In fact nobody has the password for the piCore submit email, so you’ll need to send it to the main one.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 23, 2020, 02:15:36 PM
Hi Rich,
first, I fetched submitqc.tcz with wget from the TC repository 11.x/x86; I tried to run it several times; it asked several dependencies. Done.

Then, inside the submitqc.txt file, I found
Code: [Select]
submitqc: Unrecognized architecture 'armv6l'. See --help
 :(
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 23, 2020, 03:55:53 PM
Hi matteo
Quote
... 2016/03/17 bugfix (andyj), begin ARM support, self-pkg; dentonlt ...
I guess that was never fully implemented:
http://tinycorelinux.net/11.x/x86/tcz/submitqc.tcz.info

OK, ignore the submitqc step.
Get the size of the extensions like this:
Code: [Select]
du -h vim.tcz
du -h vim-doc.tcz
and fill in the  Size:  fields of the  .info  files manually.

Make sure you have  squashfs-tools.tcz  loaded, then create the  .list  files:
Code: [Select]
unsquashfs -f -d vim vim.tcz
unsquashfs -f -d vim-doc vim-doc.tcz
cd vim
find . -not -type d | cut -c 2- | sort > ../vim.tcz.list
cd ../vim-doc
find . -not -type d | cut -c 2- | sort > ../vim-doc.tcz.list
rm -rf vim
rm -rf vim-doc

The server will handle generating the .md5.txt and .zsync files when it updates the repo.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 24, 2020, 02:56:44 PM
Done!
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 24, 2020, 04:23:26 PM
Hi matteo
You saw what Juanito said:
In fact nobody has the password for the piCore submit email, so you’ll need to send it to the main one.
Don't send it to the  picore  address listed here:
http://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions#submitting
Send it to the first address shown there.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 25, 2020, 05:32:48 AM
hplip posted to piCore repos - note that more recent versions require a pre-built libImageProcessor.so, but hplip does not supply one for RPi.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 25, 2020, 07:01:57 AM
Hi matteo
You saw what Juanito said:
In fact nobody has the password for the piCore submit email, so you’ll need to send it to the main one.
Don't send it to the  picore  address listed here:
http://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions#submitting
Send it to the first address shown there.

Hi Rich, I misunderstood Juanito's sentence. I sent the e-mail to the main address. Thanks!
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 25, 2020, 07:13:19 AM
hplip posted to piCore repos - note that more recent versions require a pre-built libImageProcessor.so, but hplip does not supply one for RPi.

Thanks Juanito. I do not understand the consequences of that, but the problem seems to be there since half 2018. Any of these links could help? On Red Hat they suggest to use a --nodeps install option, probably there is a way to configure that after ./configure ....

https://unix.stackexchange.com/questions/603644/hplip-hpcups-libimageprocessor-so-cannot-open-shared-object-file-no-such-file

https://bugs.launchpad.net/hplip/+bug/1785230

https://answers.launchpad.net/hplip/+question/674828
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 25, 2020, 07:32:30 AM
And probably the issue arises after the 3.18.6 hp version. Could it be worth to remain with the 3.18.6 version that does not need  libImageProcessor.so? Is it worth a try?

https://bugs.launchpad.net/hplip/+bug/1806981
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 25, 2020, 08:41:27 AM
I posted hplip-3.18.6 - it printed a test page using an RPi3 running piCore-11.x and an hp officejet 6700.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 25, 2020, 10:22:44 AM
Hi Rich, I misunderstood Juanito's sentence. I sent the e-mail to the main address. Thanks!

posted - thanks

note that the md5.txt files are needed.

Also if you wish to have a desktop icon, you need to add a line analogous to:

X-FullPathIcon=/usr/local/share/pixmaps/beaver.png

..to the desktop fie
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 25, 2020, 11:10:52 AM
I posted hplip-3.18.6 - it printed a test page using an RPi3 running piCore-11.x and an hp officejet 6700.

Thanks Juanito,
in the .tcz.info file, the row:
Code: [Select]
$ sudo /usr/local/etc/inid.d/dbus start

should be:
Code: [Select]
$ sudo /usr/local/etc/init.d/dbus start

By the way, the installation of the HP plugin fails on RPi Zero W, TC 11.x, with the error:
Code: [Select]
-----------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.18.6 |
-----------------------------------------

  Option      Description
  ----------  --------------------------------------------------
  d           Download plug-in from HP (recommended)
  p           Specify a path to the plug-in (advanced)
  q           Quit hp-plugin (skip installation)

Enter option (d=download*, p=specify path, q=quit) ? d

-------------------
| DOWNLOAD PLUGIN |
-------------------

Checking for network connection...
Downloading plug-in from:
Downloading plug-in: [\                                                                                                                                                 ] 0%     Traceback (most recent call last):
  File "/usr/local/bin/hp-plugin", line 363, in <module>
    status, plugin_path, error_str = pluginObj.download(plugin_path, plugin_download_callback)
  File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/pluginhandler.py", line 254, in download
    core = core_install.CoreInstall()
  File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/core_install.py", line 231, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 112, in __init__
    self.__readAuthType()  # self.__authType
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 134, in __readAuthType
    distro_name = get_distro_name().lower()
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 80, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'
error: Failed to install Plugin.
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins.Visit http://hplipopensource.com for more infomation.

I wonder why HP has to make thing sooo difficult. Is the download failing? Is the firmware a sihpP1005.img file (or similar, it could be downloaded while compiling the foo2xqx driver)?
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 25, 2020, 11:15:52 AM
Hi Juanito
... note that the md5.txt files are needed. ...
Thanks for the heads up. I thought the server scripts would handle that, so I omitted them in my last update. Just went
back and updated them.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 25, 2020, 11:55:30 AM
Can you print a test page without the plugin?
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 25, 2020, 12:22:01 PM
No, I cannot. If I add a printer from IP address:631/admin, I could see:

HP LaserJet P1005 (HP LaserJet P1005)
HP LaserJet P1005 USB BC04P65 HPLIP (HP LaserJet P1005)
Serial Port #1

I chose the second entry, then it asks for driver or a ppd file. The suggested driver is "HP LaserJet p1005, hpcups 3.18.6, requires proprietary plugin (en)". The test page does not print (state: stopped "Filter failed").
If I use instead a HP-LaserJet_P1005.ppd file, it is the same. The test page does not print (state: stopped "Filter failed").

Accordingly to foo2xqx installation pages, the HP P1005 is a XQX wire protocol printer that requires the firmware to be downloaded to the printer at each printer power on (orange led flashes, drum rotates). However, I never saw that on Windows 7 or Windows 10; but I remember that behavior on very old HP LaserJet vertically feeded.

The plugin required by "sudo hpsetup -ia" (or by "hp-plugin") is, again, "hplip-3.18.6-plugin.run" and it is not the firmware "sihpP1005.img".
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 28, 2020, 08:18:50 AM
I tried to save locally "hplip-3.18.6-plugin.run" downloaded from the hp-developers website. If feeded into "hp-setup -ia", I get:

Code: [Select]
---------------
| COPY PLUGIN |
---------------

Downloading plug-in from: file:///mnt/mmcblk0p2/tce/foo2zjs/hplip-3.18.6-plugin.run
Downloading plug-in: [\                                                                                                                                                 ] 0%     Traceback (most recent call last):
  File "/usr/local/bin/hp-plugin", line 363, in <module>
    status, plugin_path, error_str = pluginObj.download(plugin_path, plugin_download_callback)
  File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/pluginhandler.py", line 254, in download
    core = core_install.CoreInstall()
  File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/core_install.py", line 231, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 112, in __init__
    self.__readAuthType()  # self.__authType
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 134, in __readAuthType
    distro_name = get_distro_name().lower()
  File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 80, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'
error: Failed to install Plugin.
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins.Visit http://hplipopensource.com for more infomation.

Python 2.7 and 3.8 are installed.  The following code seems to fail:

Code: [Select]
def get_distro_name():
    os_name = None
    try:
        import platform
        os_name = platform.dist()[0]

and the call platform.dist() should be deprecated since python2.6.

The file "password.py" contains a function that seems to retrieve the su or sudo password (it listed several distro, but not TC. The file "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py" is not writeable (it seems located on a read-only filesystem). How could I try to write something in "password.py"? I would like to modify the script and see what happens next.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 28, 2020, 09:49:12 AM
Code: [Select]
$ sudo cp /tmp/tcloop/hplip/usr/local/share/hplip/base/password.py /usr/local/share/hplip/base
User @andyj solved his plugin problem by downloading the actual firmware blob somehow.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 28, 2020, 09:55:17 AM
Hi matteo
As you've already found out, the  squashfs  used for extensions is read only. First replace the symlink in the main
file system with a copy of the actual file:
Code: [Select]
sudo busybox cp /usr/local/share/hplip/base/password.py /usr/local/share/hplip/base/
Then rerun your command to make sure the error changes to:
Code: [Select]
File "/usr/local/share/hplip/base/password.py", line 80, in get_distro_nameIf the path in that error message no longer contains  /tmp/tcloop/hplip, then add your changes to:
Code: [Select]
/usr/local/share/hplip/base/password.py
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on September 28, 2020, 11:07:53 AM
Hi matteo
I think the binary plugin file you need is  hp_laserjet_p1005.plugin
which is located here:
https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/

I have no idea where it needs to be saved to.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 29, 2020, 08:41:27 AM
Hi Rich,
I do not know about the file "hp_laserjet_p1005.plugin" and how to use it. If sent to the printer, nothing happens; it cannot be given as a valid entry to "hp-plugin":
Code: [Select]
error: Plug-in filename must be 'hplip-3.18.6-plugin.run'

The blob firmware could be a "sihpP1005.dl" file (that is my case, for a HP Laser Jet P1005 printer). Using the command:
Code: [Select]
sudo cat /usr/local/share/firmware/sihpP1005.dl > /dev/usb/lp0
provided that the firmware file is placed in that directory, the firmware goes to the printer that flashes orange, the drum rotates for a few seconds. Ok. But printing still fails with the lp command and with the cups test page. Once the printer clicked but did nothing; otherwise, the printer stays still.

I tried to send a PM to user @andyj, without answer.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 29, 2020, 10:37:37 AM
Code: [Select]
$ sudo cp /tmp/tcloop/hplip/usr/local/share/hplip/base/password.py /usr/local/share/hplip/base
User @andyj solved his plugin problem by downloading the actual firmware blob somehow.

Hi Juanito,
I did not try, yet, to modify the python script password.py. @andyj suggests that there should be an hplip-plugins.tcz extension. Could you post it, keeping the version aligned to the 3.18.6 hplip.tcz? I found the hplip-3.18.6-plugin.run here: https://developers.hp.com/hp-linux-imaging-and-printing/plugins
Thanks.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on September 29, 2020, 11:38:34 AM
There's a script here you could take a look at: http://tinycorelinux.net/11.x/x86_64/tcz/src/hplip/hplip_plugins.sh
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on September 29, 2020, 03:48:13 PM
Hi Juanito,
I modified the suggested script and got some errors: some files, uncompressed from the downloaded HP file are there, but cannot be copied over (?)
I changed the script erasing everything but the only few files that I should need for my laser printer, excluding missing files in the downloaded HP files or "sane" and "fax" related files. I obtained a hplip-plugins extension arm32. Then tce-load it. The problem is that the printer does not print: I do not see how it could print anything, the firmware is not sent to the printer.

Then, I sent manually the "hp_laserjet_p1005.fw" via the cat command, the printer flashes orange and drum rotates few seconds. Still nothing.
I also tried to run "hp-setup -i" again, skipping the part of plugin download. This time, it goes on and ask for a printer name, location etc. It says ok. Still, the printer does not print anything. And the printer as configured (?) by hp-setup is not available on CUPS web interface.

If I add a printer using the cups web interface, using the HP plugin driver, I can send a test page to the printer. The printer clicks once, but does not do anything else.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Juanito on October 01, 2020, 10:06:00 AM
Sorry, but without access to a printer requiring a plugin to test, there's not much I can do to help..
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on October 01, 2020, 11:13:06 AM
Would you like a laser printer HP P1005? ;D Otherwise, it will become an unidentified flying object. From my window >:(
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on October 01, 2020, 11:51:28 AM
Hi matteo
... Then, I sent manually the "hp_laserjet_p1005.fw" via the cat command, the printer flashes orange and drum rotates few seconds. ...
That sounds like it might have accepted the firmware, assuming that's a legitimate way of transferring the firmware.

Quote
... If I add a printer using the cups web interface, using the HP plugin driver, I can send a test page to the printer. The printer clicks once, but does not do anything else.
So it talked to the printer, that's a good sign. I think I read somewhere that your printer can't print without the firmware.
Perform that step again but stop right before printing a test page. Open a terminal and send the firmware to the printer:
Code: [Select]
sudo dd if=/usr/local/share/firmware/sihpP1005.dl of=/dev/usb/lp0Then click the  Send Test Page  button.

I also came across this little tidbit (emphasis mine):
Quote
If your printer is listed as requiring a binary plugin, install the hplip-pluginAUR package from AUR. If the binary plugin hplip-pluginAUR is a requirement you will need to start the org.cups.cupsd.service before the PPD is recognized by hplip.
Found here:
https://wiki.archlinux.org/index.php/CUPS/Printer-specific_problems#HPLIP
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on October 08, 2020, 05:20:42 AM
Hi Rich,
I tried again with various combinations (for example i tried to load hplip-plugin-arm32, then dd the firmware, then restart cups, then install hplip)...the printer still clicks once and does not print anything.
Some troubles: if I dd the firmware and then use the command "hp-setup -i", the cups web interface does not see any printer; and I do not know where to look for org.cups.cupsd.service. I think there is only a cups daemon, am I right?
If I give:
Code: [Select]
$ sudo /usr/local/etc/init.d/cups start
sometimes I got:
Code: [Select]
no /usr/local/bin/dbus-daemon found; none killed
rm: cannot remove '/var/run/dbus/pid': No such file or directory

and sometimes I got not errors.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: Rich on October 08, 2020, 10:37:56 AM
Hi matteo
Take a look at this thread starting here:
http://forum.tinycorelinux.net/index.php/topic,23667.msg149518.html#msg149518
Maybe it contains something useful.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on October 08, 2020, 03:01:32 PM
Hi Rich,
following your advice (and Juanito's), I tried again. I have got some improvements:
Code: [Select]
$ tce-load -i hplip-plugins-arm32
$ sudo dd if=/mnt/mmcblk0p2/tce/hp_laserjet_p1005.fw of=/dev/usb/lp0
$ tce-load -i hplip
$ sudo /usr/local/etc/init.d/dbus start
$ sudo /usr/local/etc/init.d/cups start
$ hp-setup -i

also the command:
Code: [Select]
ldd /usr/local/lib/cups/filter/hpcups
gives no errors and:
Code: [Select]
$ /usr/local/lib/lsusb
Bus 001 Device 003: ID 03f0:3d17 HP, Inc LaserJet P1005
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

There are some minor (?) differences as: cups is a now a dependence (?) of hplip 3.18.6; hp-setup does not require the sudo password.
This time, "hp-setup -i" goes on! And it says "Firmware download successful", wow, then it proposes to print a HP test page. And the printer only clicks. Again. But it does not print. Again.

Now:
Code: [Select]
$ lpstat -t
scheduler is running
no system default destination
device for HP_LaserJet_P1005: hp:/usb/HP_LaserJet_P1005?serial=BC04P65
HP_LaserJet_P1005 accepting requests since Thu Oct  8 18:47:29 2020
printer HP_LaserJet_P1005 is idle.  enabled since Thu Oct  8 18:47:29 2020
        ready to print
HP_LaserJet_P1005-1     unknown         422912   Thu Oct  8 18:47:01 2020

and, finally, hp-info gives:
Code: [Select]
  cups-printers                 ['HP_LaserJet_P1005']
  cups-uri                      hp:/usb/HP_LaserJet_P1005?serial=BC04P65
  dev-file
  device-state                  1
  device-uri                    hp:/usb/HP_LaserJet_P1005?serial=BC04P65
  deviceid                      MFG:Hewlett-Packard;MDL:HP LaserJet
                                P1005;CMD:HBS,PJL,ACL;CLS:PRINTER;DES:HP LaserJet
                                P1005;FWVER:20080415;

with the FWVER meaning that the firmware is loaded to the printer. Now, the situation is the same I got while trying the foo2xqx driver: the printer is configured but it does not print...I got some fun, anyway.
Title: Re: piCore 9.0.1 and RPI Zero W
Post by: matteo on October 08, 2020, 04:10:06 PM
Even more fun. I compiled again that foo2xqx driver after hplip installation. But foo2xqx removes hplip. However, creating the printer from commandline:
Code: [Select]
sudo lpadmin -p "HPfoo2xqx" -v "hp:/usb/HP_LaserJet_P1005?serial=BC04P65" -E -P /mnt/mmcblk0p2/tce/HP-LaserJet_P1005.ppd
$ sudo lpadmin -d "HPfoo2xqx"

and sending a test page from CUPS administration webpage, the green light of the printer blinks (!) as if receiving data (!!). The printer job keeps staying in the state "Processing since...". But the printer does not print. After a while, the printer clicks. Nothing else. And the mistery goes on. Next, try again avoiding ghostscript 9.22 (as foo2xqx suggests?!?), using the version in the TC 9.x repository.