Tiny Core Linux

Tiny Core Base => Raspberry Pi => piCore Test Releases => Topic started by: Juanito on August 12, 2020, 01:36:20 AM

Title: piCore-12.0alpha1
Post by: Juanito on August 12, 2020, 01:36:20 AM
Team Tiny Core is proud to announce the first alpha release of piCore-12.0

For RPi0 and RPi1:
http://tinycorelinux.net/12.x/armv6/test_releases/RPi/piCore-12.0alpha1.zip

For RPi2, RPi3 and RPi4:
http://tinycorelinux.net/12.x/armv7/test_releases/RPi/piCore-12.0alpha1.zip

..and for the first time a 64-bit release for RPi3 and RPi4:
http://tinycorelinux.net/12.x/aarch64/test_releases/RPi/piCore64-12.0-alpha1.zip

Note that the 64-bit extension support is limited as everything has to be built from scratch.

Core components

- kernel 5.4.51
- glibc-2.31
- busybox-1.31.1
- gcc-10.1.0
- util-linux-2.35.2
- e2fsprogs-1.45.6

Please try it out and share your experience, bugs found, etc.
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 17, 2020, 10:40:35 PM
Hi
Thanks to Bela, you and contributors for RPi TC development. README is on first partition.
Snippets from bmarkus' README....First partition..... is unmounted during operation.

Please consider putting a copy of README under tce dir to minimise dummies like me, from not seeing it, not researching it etc etc

In final release post  either say please read the README under tce dir and/or publish the user password

thanks for reading
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 18, 2020, 03:50:41 AM
Just a suggestion even tho its only minor. In 6 series if I restart the openssh daemon I get messages that:
file /var/empty already exists
addgroup group sshd in use
adduser user sshd in use.

I did a small mod to change the contents of /usr/local/etc/init.d/openssh so that line reads
[ -d /var/empty ] || mkdir /var/empty  in lieu of -f and that seems to remove that issue.

Yes I do know that every dir is also a file in Linux but forgive my weirdness.
Title: Re: piCore-12.0alpha1
Post by: Juanito on August 18, 2020, 04:23:19 AM
Maybe at the same time the init.d can be converted to use group staff like x86/x86_64?
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 18, 2020, 04:25:15 AM
I am not sure. Forgot to add did the same thing to convert -f to -d for same file above
/usr/local/etc/ssh
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 18, 2020, 04:31:39 AM
also, there seems to be differences between at least one dep file TC64 versus Arm 6
eg
http://tinycorelinux.net/11.x/armv6/tcz/fltk-1.3.tcz.dep
libjpeg-turbo.tcz
libpng.tcz
libXinerama.tcz
libXft.tcz
libXcursor.tcz


http://tinycorelinux.net/11.x/x86_64/tcz/fltk-1.3.tcz.dep
libXext.tcz
libjpeg-turbo.tcz
libpng.tcz

I have no clue why that is.
Title: Re: piCore-12.0alpha1
Post by: Juanito on August 18, 2020, 04:47:30 AM
I think that is because originally fltk had been compiled against libXinerama, libXft and libXcursor, unlike x86/x86_64, but then the deps belong with ftlk-1.3.
Title: Re: piCore-12.0alpha1
Post by: mbivol10 on August 18, 2020, 08:04:19 AM
Can't wait to install this (64 bit) on the pi 4B  xD Where can I find the nodejs source to compile? Do I just clone it from nodejs github?
Title: Re: piCore-12.0alpha1
Post by: Juanito on August 18, 2020, 08:21:25 AM
It's better to use releases: https://github.com/nodejs/node/releases
Title: Re: piCore-12.0alpha1
Post by: mbivol10 on August 18, 2020, 01:21:15 PM
That's where I was going to get it from ... what package contains gcc/g++ ? I need those to do compilation

Btw, it works great on the 4b :)
Title: Re: piCore-12.0alpha1
Post by: Juanito on August 18, 2020, 01:26:58 PM
Load the compiletc extension.
Title: Re: piCore-12.0alpha1
Post by: mbivol10 on August 18, 2020, 02:50:08 PM
 I did ... still nothing (https://i.imgur.com/reJmqaw.png)
Title: Re: piCore-12.0alpha1
Post by: Rich on August 18, 2020, 04:48:46 PM
Hi mbivol10
Try this:
Code: [Select]
sudo rm -rf /usr/local/tce.installed/compiletc
sudo rm -rf /etc/sysconfig/tcedir/optional/compiletc*
tce-load -liw compiletc
Title: Re: piCore-12.0alpha1
Post by: Paul_123 on August 18, 2020, 08:00:54 PM
I would guess he did not expand the 2nd partition, and ran out of space downloading.
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 22, 2020, 08:04:46 AM
aarch64....I have a working image of it with flwm success desktop with ethernet. Yet to test anything wl or bt etc

One thing I noticed, the key generation is so much  faster than for my arm 6 11x.
I noticed you and Paul have been busy beavers populating the Apps list.

thanks heaps

cheers
Title: Re: piCore-12.0alpha1
Post by: Paul_123 on August 22, 2020, 09:42:26 AM
Bluetooth is next on my list......
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 22, 2020, 09:46:45 PM
Any chance either of you Gentlemen could show your build flags here please?
I could ask for assistance by pm, but that might not help other submitters?

for example for 32 bit Arm I plan to use
export CFLAGS="-Os -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp"
export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp"
export LDFLAGS="-Wl,-O1"
Title: Re: piCore-12.0alpha1
Post by: Juanito on August 23, 2020, 01:17:19 AM
piCore:
Code: [Select]
CC="gcc -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe" CXX="g++ -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -fno-exceptions -fno-rtti"
piCore64:
Code: [Select]
CC="gcc -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe" CXX="g++ -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti"
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 23, 2020, 01:40:34 AM
thanks heaps for that.....sorry for being anal but what happened to the wiki entry suggesting we might need
LDFLAGS="-Wl,-O1"
http://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions

Do we need it please?
Title: Re: piCore-12.0alpha1
Post by: Juanito on August 23, 2020, 02:16:42 AM
I don't usually use it - maybe @curaga could comment?
Title: Re: piCore-12.0alpha1
Post by: curaga on August 23, 2020, 03:09:47 AM
See man ld, it works for every arch.
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 23, 2020, 04:14:00 AM
curaga thanks for the heads up.

According to https://linux.die.net/man/1/ld
Quote
-O level
    If level is a numeric values greater than zero ld optimizes the output. This might take significantly longer and therefore probably should only be enabled for the final binary. At the moment this option only affects ELF shared library generation
This seems to be discussing the generation of shared objects (so) files

According to my eyesight the -W option is not even mentioned in my link. YMMV

 found a web page saying "SNIP your build system is passing LDFLAGS directly to the linker, and not by way of GCC"

So as I am writing this both for my benefit and any other submitter, based on Juanito's reply
I am going to drop those linker flags.

Thankyou all for helping me
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 23, 2020, 05:01:49 AM
I know we are at alpha and you guys are busy beavers.
Would you like me to have a go at building full wget, zsync.

Is it ok to make other such requests for 12x here?
I can't see a web browser yet, yes I am impatient swine, netsurf is small enough for my needs but need a just a few more deps

cheers
Title: Re: piCore-12.0alpha1
Post by: Juanito on August 23, 2020, 07:17:05 AM
Since we're still in alpha testing, it might be better to wait a while with extensions (firefox is in progress).
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 26, 2020, 03:39:22 AM
thanks for firefox.
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 28, 2020, 08:50:48 AM
WOOHOO thankyou very much for wget and zsync.
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 28, 2020, 09:44:13 AM
piCore64:
Code: [Select]
CC="gcc -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe" CXX="g++ -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti"

I made mistake again....but this might help me. I set the flags with
Code: [Select]
export CFLAGS="gcc -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe"
export CXXFLAGS="g++ -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti"
SNIP
./configure --prefix=/usr/local --with-doc=no
checking for gcc... gcc
checking whether the C compiler works... no

I closed the terminal to do something and when I returned, I forgot to set the flags and got past that error, but not prepared to proceed any further until hopefully I get some advice.
In repeating above configure line I got
Code: [Select]
Prefix  : /usr/local
Compiler   : gcc -g -O2

and that looks like it might succeed. Any chance you could supply the next best flag set to try if .....as yes I do not know if this is right....if the issue was purely flag related.

thanks for reading in any case ....packages gr* and na* relate
Title: Re: piCore-12.0alpha1
Post by: Juanito on August 28, 2020, 10:07:08 AM
Quite a few source packages were created with autotools before aarch64 was common - if you overwrite config.guess and config.sub in the source with those from the libtool extension, it will usually fix things.
Title: Re: piCore-12.0alpha1
Post by: Paul_123 on August 28, 2020, 12:39:25 PM
Here is the official way to get the latest and greatest config.guess and config.sub

https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html


Also, from your above example.  this is not correct.
Code: [Select]
export CFLAGS="gcc -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe"
export CXXFLAGS="g++ -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti"

CFLAGS should not include the compiler reference
Code: [Select]
export CFLAGS="-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe"
export CXXFLAGS="-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti"

There are of course a million ways to do things, it all depends on how the makefile was built.


Title: Re: piCore-12.0alpha1
Post by: aus9 on August 28, 2020, 10:22:41 PM
thats great. I have a few things to try now.
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 31, 2020, 08:04:46 PM
some minor feedback for arm7l not aarch64.

1) I use a distro to flash the image using dd and that distro automounts freshly created or installed media.
It detects 2 partitions but thinks it should be called piCore11. As sdcards do look the same and I now have a few, I inserted aarch64 which says piCore64_12 and my original 11x says its piCore11.

2) Key generation is really fast, relative to 11x arm7
but I have to press the enter key to get a prompt, do we need an exit command?
I am still so new to this key gen stuff.....I am never too sure how long to wait but
Code: [Select]
filetool.sh -b
cat /opt/.filetool.lst
# shows 8 keys in backup which I think is right
trivia.....hold shift page up works. keg gen seems to use this order, not sure if the string change
rsa.......dsa......ecdsa......ed<string>

3) using ssh commands
Code: [Select]
tce-load -w  -i Xorg Xlibs flwm aterm wbar nano
cat /mnt/mmcblk0p2/tce/onboot.lst
openssh.tcz
Xorg.tcz
flwm.tcz
aterm.tcz
wbar.tcz
nano.tcz

on RPi
Code: [Select]
startx  -> gives me a desktop
WOOHOO

oops forgot to expand p2
Title: Re: piCore-12.0alpha1
Post by: aus9 on August 31, 2020, 09:02:56 PM
expanded parttiton2 complete, firefox working as I am typing on it ATM

If I open aterm, file:///home/tc/.Xdefaults looks correct. white foreground on black bg
If I run a download thru Apps, aterm opens but shows black foreground on black bg
any clues where to change?

2) I have only one RPi (a 4) first sound check is good
Code: [Select]
speaker-test -D default:Headphones
Title: Re: piCore-12.0alpha1
Post by: aus9 on September 01, 2020, 11:24:55 PM
I am normally on ethernet but just tested wifi on arm7l, it works as I type with eth cable pulled.
I have wifi, so this is a casual remark in case the kernel can be tweaked?
Code: [Select]
dmesg | grep 509
[    0.000000] Memory: 3848180K/4050944K available (10240K kernel code, 725K rwdata, 2736K rodata, 2048K init, 851K bss, 137228K reserved, 65536K cma-reserved, 3264512K highmem)
[    1.194504] Asymmetric key parser 'x509' registered
[    1.487415] Loading compiled-in X.509 certificates
[   57.397279] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   57.442509] WARNING: CPU: 2 PID: 2179 at crypto/rsa-pkcs1pad.c:539 pkcs1pad_verify+0x158/0x174
[   57.442630] [<c064306c>] (public_key_verify_signature) from [<c06448cc>] (x509_check_for_self_signed+0xcc/0x128)
[   57.442641] [<c0644800>] (x509_check_for_self_signed) from [<c0643cc0>] (x509_cert_parse+0x178/0x1c8)
[   57.442651] [<c0643b48>] (x509_cert_parse) from [<c064454c>] (x509_key_preparse+0x20/0x1a4)
[   57.442662] [<c064452c>] (x509_key_preparse) from [<c0641fac>] (asymmetric_key_preparse+0x60/0x90)
[   57.443101] cfg80211: Problem loading in-kernel X.509 certificate (-22)

A search of "problem loading etc" which may be completely irrelevant as its a diff distro suggests that a kernel had to change.
bug as reported = EFI: Problem loading in-kernel X.509 certificate
https://bugzilla.redhat.com/show_bug.cgi?id=1075966
That reporter ....reported as they wanted
Quote
Flawless/Clean boot with no warnings/errors
I don't see EFI but I do see Problem loading in-kernel X.509 certificate
so suggest it in case it helps a future kernel re-compile?

As I have a desktop, ca-certificates is loaded by recursive dep of  xorg-server
Title: Re: piCore-12.0alpha1
Post by: Rich on September 02, 2020, 10:53:36 AM
Hi Paul_123
Emphasis mine:
... Also, from your above example.  this is not correct.
Code: [Select]
export CFLAGS="gcc -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe"
export CXXFLAGS="g++ -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti"

CFLAGS should not include the compiler reference
Code: [Select]
export CFLAGS="-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe"
export CXXFLAGS="-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti"
...

I can attest to the fact that including a compiler reference in the flags can cause problems. I recently ran into this problem (again)
while trying to run  configure  for a package from a build script. Running it from the command line it ran fine. That made it easy to
pinpoint the culprit in the build script.

I did notice this in the configure help:
Code: [Select]
tc@E310:~/BuildTCZs/Setxkbmap/setxkbmap$ ./configure --help
`configure' configures setxkbmap 1.3.2 to adapt to many kinds of systems.

 ----- Snip -----

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor

They list  CPPFLAGS  but not  CXXFLAGS , so I added this to my build script:
Code: [Select]
CPPFLAGS=$CXXFLAGS
Title: Re: piCore-12.0alpha1
Post by: mortegai on September 03, 2020, 05:40:43 AM
Missing bc for aarch64.
To recompile the kernel for aarch64 bc is needed, and the extension bc.tcz does not exist for that arch.
Please, could you create it?
Title: Re: piCore-12.0alpha1
Post by: Paul_123 on September 03, 2020, 07:45:20 PM
bc posted,   I hope you know that changing a kernel in piCore is far from a trivial task.
Title: Re: piCore-12.0alpha1
Post by: mortegai on September 05, 2020, 09:15:57 AM
bc posted,   I hope you know that changing a kernel in piCore is far from a trivial task.

Thank you. 
I know that the kernel modules are distributed among the various tcz extensions, but I only use the base and wireless modules.
Title: Re: piCore-12.0alpha1
Post by: aus9 on September 05, 2020, 10:29:14 PM
Hi

I am aware that this thread is mainly for TCB feedback. I just attempted to get into dropbox on firefox (Repo build) and it reports "there was a problem completing this request". I suspect after a search online it relates to our version of firefox.  Anyone able to login on 12x?

Its easy to evade. I just put the files onto a usb stick and transfer them on TC64 (or whatever you have)

thanks for reading
Title: Re: piCore-12.0alpha1
Post by: aus9 on September 08, 2020, 12:10:45 AM
@Juanito

You can safely ignore my 2 private messages. First one is still kind of correct that gtk2 is missing one cups backend file. But I am now on 32 bit and reading cups error log after rebuild of gtk2 on 12x and gutenprint
the error to print from leafpad a gtk2 app is filter failed.

error log shows
Quote
D [08/Sep/2020:03:49:52 +0000] [Job 3] /usr/local/bin/gs: error while loading shared libraries: libidn.so.11: cannot open shared object file: No such file or directory

so
Code: [Select]
strings /usr/local/bin/gs | grep libidn
libidn.so.11

trouble is with have libidn2 with /usr/local/lib/libidn2.so.0.3.7

I tried and failed to do a dirty sym link to see if I could print but can not. Its above my pay scale to recommend you or anyone else update these packages. So I will plod along and see if I can do a private build to resolve missing file.

thanks for reading and that may still not resolve all my issues.
Title: Re: piCore-12.0alpha1
Post by: Juanito on September 08, 2020, 03:14:36 AM
You could try the libidn extension from piCore-9.x?
Title: Re: piCore-12.0alpha1
Post by: aus9 on September 08, 2020, 03:43:32 AM
did not see your reply to just now. I can report I am now printing on usb canon. Ink for Epson dried up but reported job complete. As I am pensioner, I am binning the Epson as it was a basic printer to begin with and its actually cheaper to buy a new printer than buy refills.

ON 32 bit Not sure if I needed to but re-compiled gtk2 and gutenprint and then re-compiled ghostscript without recompiling anything else, altho I can see cups-filters might get my attention.
Code: [Select]
strings /usr/local/bin/gs | grep libidn
tc@box:~/Downloads$

If you would like to re-compile ghostscript, I used

SRC=ghostscript-9.52
compiletc wget squashfs-tools zsync xz cups-dev cairo-dev libjpeg-turbo-dev lcms2-dev libXt-dev
# libXt-dev not detected until make
cd $SRC
rm -rf expat freetype lcms2mt jpeg libpng
./configure --prefix=/usr/local --with-system-libtiff --localstatedir=/var --enable-dynamic --disable-compile-inits
make -j5 takes 3.5 minutes

dep list modest change to remove libtiff as we are using GS
libcups.tcz
lcms2.tcz
fontconfig.tcz
libpng.tcz

If you do not have time, depending on your priorities, would you like me to submit a TCE
I promise I will re-check my crap. But I can see this pdf test is a pass

Code: [Select]
gs -v
GPL Ghostscript 9.52 (2020-03-19)
Copyright (C) 2020 Artifex Software, Inc.  All rights reserved
gs -dSAFER -dBATCH sample.pdf
GPL Ghostscript 9.52 (2020-03-19)
Copyright (C) 2020 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Processing pages 1 through 2.
Page 1
Loading NimbusSans-Regular font from /usr/local/share/ghostscript/9.52/Resource/Font/NimbusSans-Regular... 4009096 2525100 4357136 3025076 4 done.
>>showpage, press <return> to continue<<

exit the GUI causes a trivial error IMHO


Title: Re: piCore-12.0alpha1
Post by: aus9 on September 08, 2020, 03:50:12 AM
offtopic but does affect my testing of wireless printing with my canon.
I think I used a different router to sync with my wl canon. So far, I have failed to get cups to see a wl canon that claims it has a "direct" wireless setting....with or without avahi running.

My router is not seeing any wl device. So I have to delay any gutenprint submission until I have exhausted my last 6 brain cells  ;D
Title: Re: piCore-12.0alpha1
Post by: aus9 on September 17, 2020, 01:07:11 AM
aarch64 avahi issues and modest success
####################
Build script has --localstatedir=/var, attempts to use --runstatedir=/var fails as configure output shows
Quote
avahi socket:/run/avahi-daemon/socket

Attempt to fix Makefile....looks good but still fails....still "makes"  to /run
Code: [Select]
sed 's|avahi_runtime_dir = /run|avahi_runtime_dir = /var/run|' -i Makefile
sed 's|avahi_socket = /run/avahi-daemon/socket|avahi_socket = /var/run/avahi-daemon/socket|' -i Makefile

after load and start daemon....I wonder does it really matter as avahi first tests without cups built appear ok

Code: [Select]
ls /run/avahi-daemon/
pid     socket
tc@box:~$ sudo /usr/local/etc/init.d/avahi stop
tc@box:~$ ls /run/avahi-daemon/ 
tc@box:~$ SNIP.....avahi is not running
###########################
# when it was running
avahi-browse -art
SNIP
eth0 IPv4 box                                           _ssh._tcp            local
SNIP
=   eth0 IPv4 Entertainment Room                            _mediaremotetv._tcp  local
   hostname = [Entertainment-Room.local]
   address = [fe80::107f:e600:247c:3a34]
   port = [49152]
   txt = ["LocalAirPlayReceiverPairingIdentity=4FC9C511-EA41-41C2-950A-B6FB01E11623" "SystemBuildVersion=17M61"
"UniqueIdentifier=4FC9C511-EA41-41C2-950A-B6FB01E11623" "Name=Entertainment Room" "macAddress=50:32:37:a8:2c:0e"
 "BluetoothAddress=P27�,\013" "AllowPairing=YES" "ModelName=Apple TV"]

Question Can I continue or does it matter that run for this daemon needs to be /var/run and not /run

If it does matter I will probably look to an older version that does not know about systemd

thanks for reading

Title: Re: piCore-12.0alpha1
Post by: Juanito on September 17, 2020, 02:39:36 AM
I believe that will be OK.