WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore-13.0.3 released (32-bit)  (Read 30643 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11695
Re: piCore-13.0.3 released (32-bit)
« Reply #15 on: May 17, 2021, 09:09:37 PM »
Hi MrPorcine
... Did I do something wrong?
I don't know. What does this return:
Code: [Select]
cat /opt/.filetool.lst

Offline MrPorcine

  • Newbie
  • *
  • Posts: 37
Re: piCore-13.0.3 released (32-bit)
« Reply #16 on: May 18, 2021, 02:33:50 PM »
Sorry, the forum refuses to accept the contents of .filetool.lst. It first trips up on etc dot group. But I have not modified the file - it is the default from the piCore13 image.

More strangeness since the last post. After backing out the two font folders from .filetool.lst, I added the same two font folders to Xorg-fonts.tcz. This tcz is added as a dependency of Xorg.tcz. After reboot, the system exhibited the same behavior as described in my previous post. Xorg hung because it couldn't find the turbo driver. I then restored the original Xorg-fonts.tcz and now Xorg would start OK once again.

I modified the Xorg-fonts.tcz file on a RPi4 running Rasbian as the on piCore the squashfs utility is missing some of its dependencies. Squashfs-tools is in the repository. I found and added lzo and liblz4, also in the repository and needed but not brought in automatically. There is at least one more library needed (libzstd) that is not in the repository.

Next I copied the two font folders to /opt, modified bootsync.sh to create simlinks from the Xorg fonts folder to the two folders now in opt and once again did a filetool.sh -b. Now on reboot Xorg starts and finds the fonts that I added. So I have a work-around to the two standard methods that did not work.

Offline MrPorcine

  • Newbie
  • *
  • Posts: 37
Re: piCore-13.0.3 released (32-bit)
« Reply #17 on: May 18, 2021, 03:44:45 PM »
I wanted to rule out hardware issues, so I ran f3write and f3read on on the SD card that has piCore on it - no problems found. I also slipped in a Rasbian SD card on the RPi3b and ran memtester overnight. Also no problems found.

Offline MrPorcine

  • Newbie
  • *
  • Posts: 37
Re: piCore-13.0.3 released (32-bit)
« Reply #18 on: May 19, 2021, 01:08:34 AM »
At this point the whole system is working OK, except that the touchscreen is inop. A USB mouse works fine. We are using a RPi 3B+. Actually I find piCore pretty amazing. The SDcard image is only about 500MB. It uses about 100MB of the 1GB RAM. It boots to our splash screen in about 9 seconds and the final app appears in about 18 seconds. You can turn off the system any time without worrying about file system corruption.

We do need the touchscreen to work. If we can help with the touchscreen interface in 13.0.3 let us know. If someone could post the .config used to compile the RPi 3B+ kernel we could just compile it with the modules that we need. If I remember correctly, there is a script that separates the modules that are include in the kernel image from the ones that are in the module image. Or maybe it's more complicated than that. Anyway, any help is welcome.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11695
Re: piCore-13.0.3 released (32-bit)
« Reply #19 on: May 19, 2021, 09:50:03 AM »
Hi MrPorcine
The kernel in the 13.0.3 release is 5.10.16. In the source folder http://tinycorelinux.net/www/13.x/armv6/releases/RPi/src/kernel/, the kernel is indeed 5.10.16. However, the .config and the module files are all 5.10.13. ...
I just checked, bmarkus fixed that. Everything is now  5.10.16.

... We do need the touchscreen to work. If we can help with the touchscreen interface in 13.0.3 let us know. ...

Fetch the kernel modules package:
http://tinycorelinux.net/13.x/ARM/releases/RPi/src/kernel/
Replace the word  ARM  with the results of the  getBuild  command.

Unpack it using the  tar xf FileName.tar.xz  command.

Then see if  edt-ft5x06.ko  works for you:
Code: [Select]
tc@E310:~/Downloads$ ls -l modules/lib/modules/KERNEL/kernel/drivers/input/touchscreen/
total 176
-rw-r--r-- 1 tc staff 25104 Feb 17 05:46 ads7846.ko
-rw-r--r-- 1 tc staff 26988 Feb 17 05:46 edt-ft5x06.ko
-rw-r--r-- 1 tc staff  8992 Feb 17 05:46 egalax_ts.ko
-rw-r--r-- 1 tc staff 12532 Feb 17 05:46 exc3000.ko
-rw-r--r-- 1 tc staff 22960 Feb 17 05:46 goodix.ko
-rw-r--r-- 1 tc staff 14824 Feb 17 05:46 ili210x.ko
-rw-r--r-- 1 tc staff  9712 Feb 17 05:46 raspberrypi-ts.ko
-rw-r--r-- 1 tc staff 10828 Feb 17 05:46 stmpe-ts.ko
-rw-r--r-- 1 tc staff 27300 Feb 17 05:46 usbtouchscreen.ko
tc@E310:~/Downloads$

Offline MrPorcine

  • Newbie
  • *
  • Posts: 37
Re: piCore-13.0.3 released (32-bit)
« Reply #20 on: May 19, 2021, 06:11:40 PM »
Wonderful! Touchscreen now works. New module for the official 7" Raspberry Pi touchscreen is called raspberrypi_ts.ko, found in the kernel/drivers/input/touchscreen folder. The URL to the v7 files is slightly different than the one Rich posted: http://tinycorelinux.net/www/13.x/armv7/releases/RPi/src/kernel/


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11695
Re: piCore-13.0.3 released (32-bit)
« Reply #21 on: May 19, 2021, 09:15:36 PM »
Hi MrPorcine
... The URL to the v7 files is slightly different than the one Rich posted: ...
Since I don't know what  ARM  version the end user is running, it is up to them to complete the URL.

As stated:
 ... Replace the word  ARM  with the results of the  getBuild  command. ... [/quote]
Run the command:
Code: [Select]
getBuildReplace the word  ARM  in the URL with the value returned by the command.

Offline MrPorcine

  • Newbie
  • *
  • Posts: 37
Re: piCore-13.0.3 released (32-bit)
« Reply #22 on: May 20, 2021, 05:25:44 PM »
It appears that while booting maybe 1/2 the time piCore doesn't assemble the overlay file system correctly. The symptom is that some important file is missing. Sometimes it is a driver, sometimes it is a library or something else. When I examine the system, the tcz files are mounted on /tmp/tcloop, but the simlink from the ultimate location if at least one of the files contained in a tcz is missing. Looking back at some of the previous problems I had, this could explain all. Recall that I needed to add two font directories to /usr/local/lib/X11/fonts. Adding them with the filetool mechanism did not work. Adding them to Xorg-fonts.tcz did not work. What finally did work was to copy the directories to /opt, and then create the simlinks in bootsync.sh. I now suspect that this worked as all the init scripts have finished by the time bootsync.sh runs.

Here is the contents of my /tmp/tcloop:
Code: [Select]
/tmp/tcloop$ ls
Xorg/                libXdamage/          libxcb/
Xorg-fonts/          libXdmcp/            libxkbfile/
busybox-httpd/       libXext/             libxshmfence/
bzip2-lib/           libXfixes/           mesa/
ca-certificates/     libXfont2/           mtdev/
expat2/              libXxf86vm/          ncurses/
freetype/            libdrm/              openssh/
gamin/               libelf/              openssl/
gcc_libs/            libepoxy/            pcre/
glib2/               libevdev/            pixman/
graphite2/           libfontenc/          xf86-input-libinput/
harfbuzz/            libinput/            xf86-video-fbturbo/
inetutils-servers/   libpciaccess/        xkbcomp/
libX11/              libpng/              xkeyboard-config/
libXau/              libudev/             xorg-server/
And the contents of my /mnt/mmcblk0p2/tce/onboot.lst:
Code: [Select]
cat /mnt/mmcblk0p2/tce/onboot.lst
openssh.tcz
Xorg.tcz
busybox-httpd.tcz
inetutils-servers.tcz
I removed Xprogs.tcz from the list of dependencies in Xorg.tcz.dep. This made the above list somewhat shorter than by default.

The contents of .filetool.lst is the default.

This behavior is intermittent. Sometime piCore completes correctly, sometime it will miss some file. As far as I know, there are no external asynchronous processes that could affect the init scripts. Any hints as to what might be going on are welcome.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11695
Re: piCore-13.0.3 released (32-bit)
« Reply #23 on: May 20, 2021, 11:20:10 PM »
Hi MrPorcine
Maybe try a different memory card ?  I think there have been 2 or 3 instances of strange intermittent behavior caused
by marginal memory cards.

Offline MrPorcine

  • Newbie
  • *
  • Posts: 37
Re: piCore-13.0.3 released (32-bit)
« Reply #24 on: May 21, 2021, 12:24:15 AM »
Hi MrPorcine
Maybe try a different memory card ? 
I've tried two memory cards and two RPi3+ cards - no difference. I have previously run memtester on the 3b+ and f3 write/f3read on the SD card. No trouble found.

I did find an undocumented command line argument that puts more output in /tmp/forklog.txt - "debugbootlog". While the additional text in forklog.txt doesn't expose the problem directly, the boot problem goes for maybe 1 in 2 times to maybe 1 in 10. So it looks to me as if there is a race problem in /usr/bin/tce-bootload or something that it calls. From forklog.txt it appears that the process of mounting the tce files is multi-threaded. At this time I believe that I have found a bug in tinyCore. I'm not sure how to proceed. The following is from a successful boot. The unsuccessful ones are not much different.
forklog.txt:
Code: [Select]
cat /tmp/forklog.txt
PID:428 Started for openssh.tcz
PID:429 Started for Xorg.tcz
PID:431 Started for busybox-httpd.tcz
PID:433 Started for inetutils-servers.tcz
PID:429 Finished, exit code: 0
PID:440 Started for openssl.tcz
PID:428 Finished, exit code: 0
PID:443 Started for xorg-server.tcz
PID:431 Finished, exit code: 0
PID:444 Started for xf86-video-fbturbo.tcz
PID:433 Finished, exit code: 0
PID:449 Started for xf86-input-libinput.tcz
PID:440 Finished, exit code: 0
PID:452 Started for xkeyboard-config.tcz
PID:443 Finished, exit code: 0
PID:455 Started for xkbcomp.tcz
OS Error code xkey:65280

PID:444 Finished, exit code: 0
PID:458 Started for Xorg-fonts.tcz
OS Error code xkey:65280

PID:449 Finished, exit code: 0
PID:462 Started for ncurses.tcz
PID:455 Finished, exit code: 0
PID:465 Started for ca-certificates.tcz
PID:458 Finished, exit code: 0
PID:469 Started for mesa.tcz
PID:462 Finished, exit code: 0
PID:474 Started for pixman.tcz
Successful Retry on xkey

PID:452 Finished, exit code: 0
PID:478 Started for libXfont2.tcz
PID:469 Finished, exit code: 0
PID:479 Started for libepoxy.tcz
PID:465 Finished, exit code: 0
PID:484 Started for libinput.tcz
PID:474 Finished, exit code: 0
PID:487 Started for libxkbfile.tcz
PID:478 Finished, exit code: 0
PID:490 Started for libdrm.tcz
PID:479 Finished, exit code: 0
PID:493 Started for libXdamage.tcz
PID:484 Finished, exit code: 0
PID:496 Started for libXxf86vm.tcz
PID:487 Finished, exit code: 0
PID:499 Started for expat2.tcz
PID:490 Finished, exit code: 0
PID:503 Started for libxshmfence.tcz
PID:493 Finished, exit code: 0
PID:505 Started for freetype.tcz
PID:499 Finished, exit code: 0
PID:508 Started for libfontenc.tcz
PID:496 Finished, exit code: 0
PID:512 Started for mtdev.tcz
PID:503 Finished, exit code: 0
PID:515 Started for libevdev.tcz
PID:505 Finished, exit code: 0
PID:518 Started for libudev.tcz
PID:512 Finished, exit code: 0
PID:522 Started for libX11.tcz
PID:508 Finished, exit code: 0
PID:524 Started for libpciaccess.tcz
PID:515 Finished, exit code: 0
PID:527 Started for libXfixes.tcz
PID:518 Finished, exit code: 0
PID:530 Started for libXext.tcz
PID:524 Finished, exit code: 0
PID:533 Started for libpng.tcz
PID:522 Finished, exit code: 0
PID:536 Started for harfbuzz.tcz
PID:527 Finished, exit code: 0
PID:539 Started for bzip2-lib.tcz
PID:530 Finished, exit code: 0
PID:542 Started for glib2.tcz
PID:536 Finished, exit code: 0
PID:545 Started for libxcb.tcz
PID:533 Finished, exit code: 0
PID:548 Started for graphite2.tcz
PID:539 Finished, exit code: 0
PID:551 Started for gamin.tcz
PID:542 Finished, exit code: 0
PID:555 Started for libelf.tcz
PID:545 Finished, exit code: 0
PID:556 Started for pcre.tcz
PID:548 Finished, exit code: 0
PID:561 Started for libXau.tcz
PID:551 Finished, exit code: 0
PID:563 Started for libXdmcp.tcz
PID:555 Finished, exit code: 0
PID:566 Started for gcc_libs.tcz
PID:556 Finished, exit code: 0
PID:561 Finished, exit code: 0
PID:563 Finished, exit code: 0
PID:566 Finished, exit code: 0
PID:571 Started for openssh.tcz
PID:572 Started for Xorg.tcz
PID:574 Started for busybox-httpd.tcz
PID:576 Started for inetutils-servers.tcz
PID:572 Finished, exit code: 0
PID:579 Started for openssl.tcz
PID:574 Finished, exit code: 0
PID:580 Started for xorg-server.tcz
PID:571 Finished, exit code: 0
PID:582 Started for xf86-video-fbturbo.tcz
PID:576 Finished, exit code: 0
PID:585 Started for xf86-input-libinput.tcz
PID:579 Finished, exit code: 0
PID:587 Started for xkeyboard-config.tcz
PID:580 Finished, exit code: 0
PID:588 Started for xkbcomp.tcz
PID:585 Finished, exit code: 0
PID:590 Started for Xorg-fonts.tcz
PID:582 Finished, exit code: 0
PID:592 Started for ncurses.tcz
PID:588 Finished, exit code: 0
PID:595 Started for ca-certificates.tcz
PID:592 Finished, exit code: 0
PID:597 Started for mesa.tcz
PID:590 Finished, exit code: 0
PID:599 Started for pixman.tcz
PID:597 Finished, exit code: 0
PID:601 Started for libXfont2.tcz
PID:599 Finished, exit code: 0
PID:603 Started for libepoxy.tcz
PID:587 Finished, exit code: 0
PID:605 Started for libinput.tcz
PID:601 Finished, exit code: 0
PID:606 Started for libxkbfile.tcz
PID:603 Finished, exit code: 0
PID:609 Started for libdrm.tcz
PID:606 Finished, exit code: 0
PID:611 Started for libXdamage.tcz
PID:605 Finished, exit code: 0
PID:613 Started for libXxf86vm.tcz
PID:609 Finished, exit code: 0
PID:615 Started for expat2.tcz
PID:611 Finished, exit code: 0
PID:617 Started for libxshmfence.tcz
PID:613 Finished, exit code: 0
PID:428 Started for openssh.tcz
PID:429 Started for Xorg.tcz
PID:431 Started for busybox-httpd.tcz
PID:433 Started for inetutils-servers.tcz
PID:429 Finished, exit code: 0
PID:440 Started for openssl.tcz
PID:428 Finished, exit code: 0
PID:443 Started for xorg-server.tcz
PID:431 Finished, exit code: 0
PID:444 Started for xf86-video-fbturbo.tcz
PID:433 Finished, exit code: 0
PID:449 Started for xf86-input-libinput.tcz
PID:440 Finished, exit code: 0
PID:452 Started for xkeyboard-config.tcz
PID:443 Finished, exit code: 0
PID:455 Started for xkbcomp.tcz
OS Error code xkey:65280

PID:444 Finished, exit code: 0
PID:458 Started for Xorg-fonts.tcz
OS Error code xkey:65280

PID:449 Finished, exit code: 0
PID:462 Started for ncurses.tcz
PID:455 Finished, exit code: 0
PID:465 Started for ca-certificates.tcz
PID:458 Finished, exit code: 0
PID:469 Started for mesa.tcz
PID:462 Finished, exit code: 0
PID:474 Started for pixman.tcz
Successful Retry on xkey

PID:452 Finished, exit code: 0
PID:478 Started for libXfont2.tcz
PID:469 Finished, exit code: 0
PID:479 Started for libepoxy.tcz
PID:465 Finished, exit code: 0
PID:484 Started for libinput.tcz
PID:474 Finished, exit code: 0
PID:487 Started for libxkbfile.tcz
PID:478 Finished, exit code: 0
PID:490 Started for libdrm.tcz
PID:479 Finished, exit code: 0
PID:493 Started for libXdamage.tcz
PID:484 Finished, exit code: 0
PID:496 Started for libXxf86vm.tcz
PID:487 Finished, exit code: 0
PID:499 Started for expat2.tcz
PID:490 Finished, exit code: 0
PID:503 Started for libxshmfence.tcz
PID:493 Finished, exit code: 0
PID:505 Started for freetype.tcz
PID:499 Finished, exit code: 0
PID:508 Started for libfontenc.tcz
PID:496 Finished, exit code: 0
PID:512 Started for mtdev.tcz
PID:503 Finished, exit code: 0
PID:515 Started for libevdev.tcz
PID:505 Finished, exit code: 0

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1267
Re: piCore-13.0.3 released (32-bit)
« Reply #25 on: May 21, 2021, 08:15:42 AM »
Its not a race condition, but for some reason the kernel is not creating loop devices fast enough to satisfy mount.   This error also is seen with tce-load, but mainly on the slower single core pies.   This was fixed in git, The pull request is still sitting open, So it appears to not be in 13.x.   The 64 bit version does have this fixed in 13.....which reminds me, I need to move this from Beta.

As a work around, add to your command line "max_loop=64"   (Or a little bigger than the number of extensions you are loading.  The kernel will create the loop devices during boot.

Offline MrPorcine

  • Newbie
  • *
  • Posts: 37
Re: piCore-13.0.3 released (32-bit)
« Reply #26 on: May 21, 2021, 05:01:10 PM »
As a work around, add to your command line "max_loop=64"
This works to get rid of the errors that forklog.txt reports. Also the undocumented command line argument is debugbootload, not debugbootlog.

I still see problem of missing files. Not very often now, but maybe 1 in 20 boots. It just happened again, the file is present in /etc/tcloop file tree but the simlink is missing in the file system. It's not always the same file. I suspect that the behavior is present more often than I know as not all missing files will prevent X or my app from starting.

Offline MrPorcine

  • Newbie
  • *
  • Posts: 37
Re: piCore-13.0.3 released (32-bit)
« Reply #27 on: May 21, 2021, 08:17:45 PM »
I decided to try to reproduce this behavior with the stock image. I was successful. Here is what I did:
1)Flashed the piCore13 image to an 8G SD card. Expanded partition 2 to max with gparted.
2)booted a RPi 3B+ with the new card. Added "syslog max_loop=50" to the end of cmdline.txt. Made the following changes to config.txt:
Code: [Select]
disable_overscan=1
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on
[PI3]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
#dtoverlay=vc4-kms-v3d
dtoverlay=disable-bt
dtoverlay=sdio,poll_once
3)Used tce to install Xorg and busybox-httpd.
4)Commented out the last few lines of dot profile so Xorg will not start.
5)wrote a script "findMissingFile" to check for missing simlinks and put it in /home/tc. Did a filetool.sh -b, then a sudo reboot.  I've attached the script (the forum won't let me put it in-line).
6)After the boot the script found several missing simlinks:
Code: [Select]
/usr/local/lib/xorg/modules/drivers/fbturbo_drv.so  does not exist!
....................................................................................
/usr/local/share/pixmaps/screenshot.png  does not exist!

/usr/local/share/pixmaps/services.png  does not exist!

/usr/local/share/pixmaps/settime.png  does not exist!
...............................................................

Offline MrPorcine

  • Newbie
  • *
  • Posts: 37
Re: piCore-13.0.3 released (32-bit)
« Reply #28 on: May 21, 2021, 08:37:46 PM »
OK, never mind. You should just remove that last post. It turn out the max_loop=50 is too small. On my custom image I removed the Xprogs extension which eliminates a few dependencies, so 50 is big enough. Also ash seems to treat -e as something other that "exists". The png files are present, but fail the -e test.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1267
Re: piCore-13.0.3 released (32-bit)
« Reply #29 on: May 21, 2021, 10:19:04 PM »
Yes, busybox apps have some odd behavior when compared to full versions.

I've done a lot of testing trying to speed up the boot process.   In general 1 thread per CPU has worked really well.  The mount errors happen if you run multi threaded or not.

I experimented with checking for a free loop device and creating it before mount, but that slowed things way down, since during boot it always needed to created a new loop device.  In the end, I opted to just retry the mount if it fails....With a max number of retries, in case of a real error.   That seems to be the best of both worlds, speed vs reliability.