piCorePlayer = piCore Linux + Raspberry Pi + Squeezelite

I have tried to obtain the extension again and the following messages are displayed :

Downloading: raid-dm-4.1.13-piCore+.tcz
Error on raid-dm-4.1.13-piCore+.tcz

ntfs-3g.tcz.info not found!

ntfs-3g.tcz.dep not found!

ntfs-3g.tcz.tree not found!

filesystems-4.1.13-piCore+.tcz 3321856, 3.17 MB
ntfs-3g.tcz 520192, 0.50 MB
raid-dm-4.1.13-piCore+.tcz 503808, 0.48 MB

Total size (bytes) 4345856, 4.14 MB
+ Indicates need to download 0, 0.00 MB

ntfs-3g.tcz.list not found!


I am not sure where I could have gone wrong.
 
Last edited:
Hi there.

First of, thx for your great package. Having a lot of fun with it.


I'm in the process of building a new/updated kernel for it.
I'm quite familiar with kernel building on other systems.
I also made myself familiar as much as possible of how to build a kernel for PCP/TinyCore on RPI based on the TC sources and TC .config.

I already managed to boot my PCP with the new kernel. :D

However. There's one missing link. :confused:

No modules get loaded !?!??

From what read you're separating the modules into loadable chunks and package them up somewhere.

I stripped my kernel config that much down that "all" my modules on the initrd image
fit on the boot partition. Still it's more than twice as large as yours.

For sure that's not quite right. I guess the old modules are still hanging out somewhere
and need to updated as well..

I'd really appreciate if u could show me (quick) directions what to look for.

Thx a lot.
 
Member
Joined 2002
Paid Member
hi soundcheck,

I am not 100% sure of your question as the piCore Team (bmarkus) and Steen do all the kernel stuff. :)

If you mean "extensions" when you say "modules do not load", then the extensions are loaded into /mnt/mmcblk0p2/tce/optional directory and are told to load on boot in the file /mnt/mmcblk0p2/tce/onboot.lst. This is standard tinycore/piCore practice. :confused:

If you are talking about modules in the kernel, then posting in the piCore forum is your best bet. :D

regards
 
Hi Greg.

Thx for coming back on that one. I wasn't aware of the responsibilities in your team..

I figured out most of what you say by now.

It seems that you guys select newly compiled modules and distribute these into different places.

Some of them end up in optional packages, which would have to be rebuild after a kernel update. (I'd have to figure out how that's done.)

Basic modules end up in the "Xcore.gz". I might have an idea how to cope with that task.

Many of the modules you just won't make use of at all, even though you use a basic .config.

Then I need to check how you handle the device tree (.dtb) and the firmware.


What you guys do - as it seems - you're swapping your (updated) modules and kernel into a given TinyCore kernel structure. That makes live a bit easier I guess.

Another key to success for me would probably be to not mess with kernel naming and kernel revisions.

I'm still on a steep learning curve.

Steen doesn't hang out over here, right ?? I might give it a try over a PiCore.

Unfortunately the TinyCore/PiCore kernel Wiki doesn't really help that much. Sorry for bothering.

Cheers
 
Member
Joined 2006
Paid Member
I made some progress.



I managed now by myself to get the initrd build/updated and the new core kernel modules to load at boot. :D

I crosscompile the stuff on Ubuntu btw.



The final step is now to get the Alsa modules package redone. I guess I need makesquashfs for that.



I'm getting closer. ;)



I'll contact Steen on the last one. That'll go over my head.





Cheers



I am very interested in your progress as well. I butchered a piCore player (stopped all services and added RAAT service) myself.
Let me know if I can help testing - I am a software developer with some knowledge in Linux, but definitely not on your level from what I can see.
I have DAM 1021 and 2 XMOS (JLSounds and DIYINHK) interfaces.
 
Last edited:
Member
Joined 2002
Paid Member
I am very interested in your progress as well. I butchered a piCore player (stopped all services and added RAAT service) myself.
Let me know if I can help testing - I am a software developer with some knowledge in Linux, but definitely not on your level from what I can see.
I have DAM 1021 and 2 XMOS (JLSounds and DIYINHK) interfaces.

hi luchoh,

By chance, did you post your script somewhere?

I recall testing someone's script a year or so ago, but can't find a copy of the script or find the original post. :confused:

regards
 
Member
Joined 2006
Paid Member
hi luchoh,



By chance, did you post your script somewhere?



I recall testing someone's script a year or so ago, but can't find a copy of the script or find the original post. :confused:



regards



Greg,
No, I haven't posted anything.
Essentially I added the needed kernel modules with direct modprobe in the main script of the piCore distro (can't remember the name off the top of my head), removed/commented out the http service and added a section to start the RAAT service.
I really butchered it... the way you do it when the servers are down and the management is hysterical: you make it work and then promptly forget exactly what you did.
If you're interested, I can send you a copy of the SD card image and you can diff the two. I won't have time before the weekend to really take a closer look.

Lucho
 
Member
Joined 2006
Paid Member
Greg,
No, I haven't posted anything.
Essentially I added the needed kernel modules with direct modprobe in the main script of the piCore distro (can't remember the name off the top of my head), removed/commented out the http service and added a section to start the RAAT service.
I really butchered it... the way you do it when the servers are down and the management is hysterical: you make it work and then promptly forget exactly what you did.
If you're interested, I can send you a copy of the SD card image and you can diff the two. I won't have time before the weekend to really take a closer look.

Lucho



Oh, and one more thing: RAAT needs glibc 2.14. I had no idea where to look for it so I installed the compile-essentials.tcz before even testing if the RAAT would start. It was all good and I removed the compile-essentials package. RAAT wouldn't start again, so I added it back.
I'm sure there's more elegant way to do it.
 
Last night I found -- hopefully -- the last piece of the puzzle over at TinyCore to get the Alsa modules done. I hope I'll manage today.

The info I stepped over is a couple of years (2013/2014) old. Those times when Steen started
his PCP kernel journey. ;) Unfortunately nothing of these discussions ever went into the TinyCore/PiCore kernel Wiki.

Some things I still don't fully understand. Things like e.g. Why there is no longer the initrd hex address range in cmdline.txt. It works without it now - Why bother!?!?
Or - is there a TinyCore specfic difference in the kernel .config. Are there any TinyCore specific patches. Or can I just use the base kernel stuff from RPI?

My intention is to write up some lines as soon as I have PCP under control. My PCP kernel "subproject" is the last challenge I have in front of me as part of my overall PCP project.

I'd also love to get the 4.4.y kernel in. Most people work on the 4.4.y kernel for PI nowadays. That makes live easier on e.g. applying audio related and other patches. And not to forget
Arm support is getting better with every release.

I'll keep you posted.

Cheers
 
Last edited:
Hi.

I finally managed to compile my own modified 4.1 kernels. Steen gave me some valuable hints.
Though, since I intended to crosscomplile my stuff on an Ubuntu machine instead of building kernels on TinyCore to save serious time and effort - I had to walk the extra mile myself to get going.

Thx again to the PCP team for the great work and support.

PS:
I hope that we'll see soon the more advanced and dead stable 4.4 kernel on TinyCore/PCP. ;)
 
Hi.

I finally managed to compile my own modified 4.1 kernels. Steen gave me some valuable hints.
Though, since I intended to crosscomplile my stuff on an Ubuntu machine instead of building kernels on TinyCore to save serious time and effort - I had to walk the extra mile myself to get going.

Thx again to the PCP team for the great work and support.

PS:
I hope that we'll see soon the more advanced and dead stable 4.4 kernel on TinyCore/PCP. ;)

Hi Klaus

Good to know it worked for you.

Yes we absolutely will use a 4.4 version kernel in pCP. However, it seems like they (at raspberry git) have recently removed a lot of the interesting audio improvements from the modules. So for the time being I'm not sure there is a huge benefit over 4.1.
But we keep an eye on the development and for sure we will be using 4.4.y shortly.

PS: I also build the kernels and modules through cross-compiling on a Debian computer

Steen
 
Hi folks.

Could somebody please tell me how to install vcgencmd? Is there a .tcf ? Somehow that link to the tcf database in your web mask doesn't work.

I'm just in the process to get the PI3 going on 2.05.

What struck me first is your default clocking scheme for the PI3 !?!?
You basically use the default scheme from years back - good old PI1 ?? days.


I'd suggest to introduce either an empty config.txt (regarding clock settings) or at least

DEFAULT settings per PI generation - selectable from the overclocking menu.

PI3 default:

Code:
arm_freq=1200
core_freq=400
gpu_freq=300
sdram_freq=450
over_voltage=0
force_turbo=0

You run that animal at 700MHz by default!

More suggestions:

You IMO should add vcgencmd and tvservice to the image. Both are very basic PI tools.

And please add:

dtoverlays=i2s-mmap

to config.txt Only this way squeezelite can run in mmap mode towards HAT/I2S DACs.



Cheers
 
Just wrote a little script to fetch some IMO important actual system data:


Code:
root@pico3:/mnt/mmcblk0p2/tce# ./stat.sh 
##################################################
#
#  CPU Frequency act:   1200 MHz
#  CPU Frequency max:   1200 MHz
#  CPU Frequency min:   600 MHz
#  CPU Governor:        performance
#  VideoCore:           400 MHz
#  3D-CORE:             300 MHz
#  SDRAM:               450 MHz
#  Overvoltage:         0
#  Force Turbo:         0
#  CPU Temperature:     48 C° 
#  HDMI                 off
#
##################################################


Code:
#!/bin/sh
#
# This script fetches some system data on PIx on 
# PicorePlayer
# rpi-vc.tcz package needs to be installed!
#
########################################################################

which tvservice >/dev/null || { echo "rpi-vc.tcz not installed, please install first!" ; exit 1 ; } ;


CPUMAXFREQ="$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq)"
CPUMINFREQ="$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq)"
CPUACTFREQ="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)"
CPUGOVERNOR="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)"
VIDEOCORE="$(vcgencmd get_config core_freq | cut -f 2 -d "=")"
DCORE="$(vcgencmd get_config gpu_freq | cut -f 2 -d "=")"
SDRAM="$(vcgencmd get_config sdram_freq | cut -f 2 -d "=")"
OVERVOLTAGE="$(vcgencmd get_config over_voltage | cut -f 2 -d "=")"
FORCETURBO="$(vcgencmd get_config force_turbo | cut -f 2 -d "=")"
TEMPERATURE=$(cat /sys/class/thermal/thermal_zone0/temp)
tvservice -s | grep "off" >/dev/null && HDMI=off || HDMI=on  

echo "##################################################"
echo "#"
echo "#  CPU Frequency act:   $(( CPUACTFREQ / 1000 )) MHz"
echo "#  CPU Frequency max:   $(( CPUMAXFREQ / 1000 )) MHz"
echo "#  CPU Frequency min:   $(( CPUMINFREQ / 1000 )) MHz"
echo "#  CPU Governor:        $CPUGOVERNOR"
echo "#  VideoCore:           $VIDEOCORE MHz"
echo "#  3D-CORE:             $DCORE MHz"
echo "#  SDRAM:               $SDRAM MHz"
echo "#  Overvoltage:         $OVERVOLTAGE"
echo "#  Force Turbo:         $FORCETURBO"
echo "#  CPU Temperature:     $(( TEMPERATURE / 1000 )) C° " 
echo "#  HDMI                 $HDMI"
echo "#"
echo "##################################################"

exit 0

Would be nice to have such a or similar "short" summary somewhere on the PCP web interface.
I think especially people who want to play around with the clocking will highly appreciate it.

You might consider it.

Just a little contribution from my side.
 
Last edited:
Activating mmap for I2S DACs

It's me again.

As mentioned before I recommend to activate mmap for I2S DACs.

For those who want to try it:

Below you'll find a little how-to.
You need to be able to ssh into PiCorePlayer as basic requirement.

The below commands toggle (activate or deactivate) i2s-mmap support.

First time they turn support on. Next time they turn it off.

Before you run the exercise make a BACKUP first!

After ssh login copy/paste below all in once:

Code:
sudo su
mount /dev/mmcblk0p1 /mnt/mmcblk0p1
FILE=/mnt/mmcblk0p1/config.txt
grep -q '^dtoverlay=i2s-mmap' $FILE && sed -i '/^dtoverlay=i2s-mmap/d' $FILE  || echo 'dtoverlay=i2s-mmap' >> $FILE
cat $FILE
sync
reboot


As a final step you need to tell squeezelite to use mmap.

Under "Squeezelite Settings" "Alsa Setting"

you enter

Code:
80:::1

instead of

Code:
80:::


Don't forget to push the "Save" button.


Enjoy.


PS:
A correction:
In earlier post today I said "dtoverlays=i2s-mmap"- It's gotta be "dtoverlay=i2s-mmap"
 
One more.

While you are at it, you could also turn the RPI internal sounddevice on/off by copy/pasting below into your ssh shell:

Code:
sudo su
mount /dev/mmcblk0p1 /mnt/mmcblk0p1
FILE=/mnt/mmcblk0p1/config.txt
grep -q '^dtparam=audio=on' $FILE && sed -i '/^dtparam=audio=on/d' $FILE  || echo 'dtparam=audio=on' >> $FILE
cat $FILE
sync
reboot



Note: I think these and similar functions could be easily implemented into the PCP Web interface.

Enjoy.
 
Hi soundcheck,

Enabled mmap. What does that do in this context? I understand memory mapped files etc...
 

Attachments

  • Screen Shot 2016-05-13 at 5.52.57 PM.png
    Screen Shot 2016-05-13 at 5.52.57 PM.png
    53 KB · Views: 251