WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Update: PicorePlayerV10 = Squeezelite on piCore with SSH, WiFi and set-up script  (Read 97739 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Use modules built with your new kernel. Kernel modules must match the kernel.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline courtjester

  • Newbie
  • *
  • Posts: 6
Hi Steen,

The next step is to update the modules in the alsa-modules extension (and the wireless modules extension). tinycore extensions are stored in squashfs format. To find which files are in an extension you will have to unsquash the extension as follows:

1. copy the extension to a working folder.
2. from the working folder use the unsquashfs command to unsquash the extension. For example

unsquashfs -d alsa-modules-3.6.11-piCore alsa-modules-3.6.11-piCore.tcz

will unsquash the alsa modules for the 3.6.11 kernel into a folder called alsa-modules-3.6.11-piCore.

Now that you have the alsa modules unsquashed, you can see what files need to be included in the alsa modules file for your kernel.

Now you need to create an alsa modules extension for your kernel 3.8.12+. I would create a folder called alsa-modules-3.8.12+-piCore in your working directory with the same folder structure as alsa-modules-3.6.11-piCore. Note that anywhere you see 3.6.11, you will need to use 3.8.12+. Copy the modules from your compiled kernel to the appropriate places in the new extension folder. There is one more file that you will need from the alsa-modules-3.6.11-piCore folder:

usr/local/tce.installed/alsa-modules-3.6.11-piCore

Copy this file to your new extension folder and rename it to

usr/local/tce.installed/alsa-modules-3.8.12+-piCore

Now from your working folder run the following commands:

mksquashfs alsa-modules-3.8.12+-piCore alsa-modules-3.8.12+-piCore.tcz
md5sum alsa-modules-3.8.12+-piCore.tcz > alsa-modules-3.8.12+-piCore.tcz.md5.txt

This will create two files alsa-modules-3.8.12+-piCore.tcz and alsa-modules-3.8.12+-piCore.tcz.md5.txt. Copy these two files to the tce/optional folder on the sdcard, insert the sdcard into the rpi and reboot. This should get alsa working. You can use the same procedure for the wireless modules.

Hope this helps.
Doug.

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Doug,
Thank you very much for your detailed explanations - with this help I managed to update the kernel, the modules and the ALSA and WiFi packages in microcore.
I used the 3.8.12+ kernel which gsh from the raspberry foundation is working on. This branch is specifically made in order to improve or hopefully fix the USB issues.


For me the USB handling is now much better, I now can play music via a USB-DAC with a raspberry connected via a WiFi-dongle at full speed (150 Mbit/s) and using WPA2 protection. So it is much better now.

I think you should try it and see if it has improved the situation for you as well.
You can get it from here:https://sites.google.com/site/picoreplayer/home/download

-------
BUT I still have a few issues that you might know the answer for:
After having build the kernel and the modules, I could see that I have many modules that I will not need. Can I just delete these modules (the *.ko files) and then do the: sudo find | sudo cpio -o -H newc | gzip -2 > ../piCore3611m.gz thing again?

Or will I have to start all over again and compile a new kernel with the correct options chosen (it is difficult because there are so many options that I don't know the exact meaning of).

Steen
 

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Looking at following script may give you an idea, though it may not apply to your case ad verbatim.

http://forum.tinycorelinux.net/index.php/topic,9028.0.html
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum

I used the 3.8.12+ kernel which gsh from the raspberry foundation is working on. This branch is specifically made in order to improve or hopefully fix the USB issues.


Is it the kernel at http://elinux.org/RPi_Kernel_Compilation or from different location?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Hi bmarkus.

It is from here: https://github.com/raspberrypi/linux/tree/fiq_split  This is a special experimental branch made by gsh who is hired in order to improve or fix the USB problem on the raspberry pi.

See the discussion here: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=39175

Steen

Offline courtjester

  • Newbie
  • *
  • Posts: 6
Hi Steen,

I have been kind of off the grid for the last few days.

Glad you got PicorePlayer working with the experimental USB code.

You can just delete any of the kernel modules you do not need and then regenerate the piCore file. No need to recompile the kernel. Just make sure you do not really need the modules you delete. I don't know if you know this, but you can tell which modules actually get loaded at run time by running lsmod from the PicorePlayer terminal.

If I were you, I would rename the piCore file to be consistent with the kernel you are using. piCore3611m.gz implies you are using the 3.6.11 kernel. You would be better off calling it piCore3812exp.gz or something similar. Since you are already changing the "a" to an "m" you may as well go the rest of the way.

Doug.

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
new version available:

piCorePlayer version 1.0.
It is now possible to stream high resolution audio (up to 192 kHz) through the HDMI connection (previously it would downsample to 48 kHz) - thanks to giantpopples for the suggestion.

The Kernel is updated to version 3.8.13+ the special fiq_split version which hopefully one day will solve the USB problems found in the raspberry.

It is trimmed in size (28 MB again)
There are several tweaks in the cmdline.txt and config.txt

Look here: https://sites.google.com/site/picoreplayer/home/news

Please report back

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Hi

It seems like the learning curve continue.
Now I can build a update the kernel and make the modules, but as more and more people use the piCorePlayer the demand for support of new WiF cards increase.

It seems like especially those who have a Radlink card have problems.
Ralink RT5370 is reported not working
An adaptor using the Ralink RTL8188S driver is reported not working
but also an adaptor using Realtek RTL8191SU is reported not working

So I'm willing to learn how to support these adaptors, but where do I start?

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Steen

as a starting point check wether these cards are supported or not by Raspbian at

http://elinux.org/RPi_VerifiedPeripherals#USB_Wi-Fi_Adapters

Keep in mind that info ther may be obsolate, related to different kernel, etc. But you may find useful info e.g. required firmware, driver, etc.

Next check support status in other distros, not only Raspberry Pi but x86.

Than you may look into kernel source and as usual Google.

Also check the fullo piCore kernel modul pack for drivers, firmware including staging where you find not yet stable experimental modules.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Hi all,

This post is partially off-topic, since I use my own install of TinyCore/Squeezelite, but I see the PicoPlayer has the same problem.

I've ordered and received this WiPi dongle from farnell: Link to WiPi dongle, it's got the RT5370 chipset.
It's working on Raspbian, but not on Tinycore, probably because of this:

Just for your information...I played with picoreplayer today. I upgraded the kernel to 3.8.11 and added support for my wireless USB dongle, an RT5370 based adapter. The RT5370 needed a  module (crc-ccitt.ko) not included in the standard picoreplayer image and the firmware file (rt2870.bin).

But I don't know how to install/make/build the modules. Can you point me in the right direction?
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Hi Gerrelt

I also plan on trying to get that wifi card working but I haven't found the time.

Basicly you have to build the modules - I followed the advice from here: http://elinux.org/RPi_Kernel_Compilation
And if you use the .config file that follows bmarcus builds you will need to change the path to the cross-compiler in this .config file. Then: make ARCH=arm modules

This will build the modules, then you will need to make a new wifi-"kernel".tcz This is described by courtjester a few post above. He describes the Alsa-modules but you will need to change the wifi module.

Furthermore you should make a lib directory here and add the crc-ccitt.ko module which you will need to locate in all your newly build modules (I can't remember where I found it) next you should make a firmware directory and in that add the rt2870.bin.

Then pack it up as described by courtjester below.

Please report back if you succeed.
Do you have the wifi-card?

Steen

Quote
The next step is to update the modules in the alsa-modules extension (and the wireless modules extension). tinycore extensions are stored in squashfs format. To find which files are in an extension you will have to unsquash the extension as follows:

1. copy the extension to a working folder.
2. from the working folder use the unsquashfs command to unsquash the extension. For example

unsquashfs -d alsa-modules-3.6.11-piCore alsa-modules-3.6.11-piCore.tcz

will unsquash the alsa modules for the 3.6.11 kernel into a folder called alsa-modules-3.6.11-piCore.

Now that you have the alsa modules unsquashed, you can see what files need to be included in the alsa modules file for your kernel.

Now you need to create an alsa modules extension for your kernel 3.8.12+. I would create a folder called alsa-modules-3.8.12+-piCore in your working directory with the same folder structure as alsa-modules-3.6.11-piCore. Note that anywhere you see 3.6.11, you will need to use 3.8.12+. Copy the modules from your compiled kernel to the appropriate places in the new extension folder. There is one more file that you will need from the alsa-modules-3.6.11-piCore folder:

usr/local/tce.installed/alsa-modules-3.6.11-piCore

Copy this file to your new extension folder and rename it to

usr/local/tce.installed/alsa-modules-3.8.12+-piCore

Now from your working folder run the following commands:

mksquashfs alsa-modules-3.8.12+-piCore alsa-modules-3.8.12+-piCore.tcz
md5sum alsa-modules-3.8.12+-piCore.tcz > alsa-modules-3.8.12+-piCore.tcz.md5.txt

This will create two files alsa-modules-3.8.12+-piCore.tcz and alsa-modules-3.8.12+-piCore.tcz.md5.txt. Copy these two files to the tce/optional folder on the sdcard, insert the sdcard into the rpi and reboot. This should get alsa working. You can use the same procedure for the wireless modules.

Hope this helps.
Doug.

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Please report back if you succeed.
Do you have the wifi-card?

Thanks, Steen!

I will do some studying, it's more complex then I thought.
Yes, I allready have this wifi card, and I've used it in combination with Raspbian wheezy without problems.

Greetings,
    Gerrelt.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Status update:

I've been on a rollercoaster ride with this..
At first I was focused at getting the crc-ccitt.ko module to work, but at the end I discovered that it's allready present in TinyCore:

Code: [Select]
tc@cherry:~$ sudo find / -name crc-ccitt.ko
/lib/modules/3.8.13-002.piCore/kernel/lib/crc-ccitt.ko

I also discovered that the WiPi dongle is recognized by the Raspberry (see the arrows):
Code: [Select]
tc@cherry:~$ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
----> Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter  <----
Bus 001 Device 005: ID 2101:8500 ActionStar
Bus 001 Device 006: ID 2101:8501 ActionStar
Bus 001 Device 007: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

At first I used it with an USB extension cable, and then it wasn't recognised. When plugged directly into the raspberry, it was recognised. As shown in the above lsusb output.

But it doesn't work, I cannot get the wlan0 up:
Code: [Select]
tc@cherry:/opt$ ifconfig wlan0 up
ifconfig: SIOCSIFFLAGS: Operation not permitted

I found this in the dmesg:
Code: [Select]
tc@cherry:~$ dmesg | grep rt2
[   32.618387] usbcore: registered new interface driver rt2800usb
[   36.361078] phy0 -> rt2x00lib_request_firmware: Error - Failed to request Firmware.
[   37.845923] phy0 -> rt2x00lib_request_firmware: Error - Failed to request Firmware.
[   37.914414] phy0 -> rt2x00lib_request_firmware: Error - Failed to request Firmware.

When googling these errors, people seem to suggest to compile the Ralink drivers.
I started doing that, but then I discovered I had to compile the kernel for this too (maybe not correct?..).
Now, the problem is that compiling the kernel is quite complex, and the only Linux machines I got are Raspberry Pi's.. So cross compiling is out of the question. Compiling for 12 hours and then discovering it doesn't work does not sound like fun.  :)

What still puzzles me is that the WiPi dongle has chipset RT5370, and the error messages are about the rt2800usb driver..
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Hi Gerrelt

I really also would like this wifi stick to be available in microcore.

1. Good that you have the crc-ccitt.ko module in kernel -one problem solved.
2. I think now that the problem is that you are lacking the firmware.
Look here: http://mitchtech.net/realtek-wireless-dongle-rt3070-on-the-raspberry-pi/  so according to his blog I think that you should be able to make a RT5370.tcz which include the directory /lib/firmware/rt2870.bin

I think that I can cross-compile a module for you if you need it - but then we need to be clear about which kernel you are using and which module you need.

Steen