WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore 9.0.1 and RPI Zero W  (Read 18022 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: piCore 9.0.1 and RPI Zero W
« Reply #15 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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: piCore 9.0.1 and RPI Zero W
« Reply #16 on: September 16, 2020, 06:08:38 AM »
libidn copied to piCore-11.x repos, ghostscript deps adjusted - thanks for reporting this.
« Last Edit: September 16, 2020, 06:39:07 AM by Juanito »

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #17 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.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: piCore 9.0.1 and RPI Zero W
« Reply #18 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.

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #19 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 "("
« Last Edit: September 17, 2020, 12:14:11 PM by matteo »

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #20 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...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: piCore 9.0.1 and RPI Zero W
« Reply #21 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
« Last Edit: September 18, 2020, 05:02:22 PM by Rich »

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #22 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?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: piCore 9.0.1 and RPI Zero W
« Reply #23 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

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #24 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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: piCore 9.0.1 and RPI Zero W
« Reply #25 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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: piCore 9.0.1 and RPI Zero W
« Reply #26 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

Offline matteo

  • Newbie
  • *
  • Posts: 42
Re: piCore 9.0.1 and RPI Zero W
« Reply #27 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?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: piCore 9.0.1 and RPI Zero W
« Reply #28 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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: piCore 9.0.1 and RPI Zero W
« Reply #29 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?