WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore-8.0beta1  (Read 4463 times)

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 176
Re: piCore-8.0beta1
« Reply #15 on: June 05, 2016, 12:32:16 PM »
OK, I've been messing about with it now, and I made some progress.

Instead of installing "alsa-config.tcz", I've installed "alsa-utils.tcz".
Now I can use the "sudo alsactl store" command, but it throws this error:

tc@box:~$ sudo alsactl store
alsactl: save_state:1626: Cannot open /var/lib/alsa/asound.state for writing: No such file or directory

After checking this, it appears the Alsa directory is not present at default (it's normally created by alsa-config.tcz, maybe?) .
So, I've create the directory, and then the store command works, and it creates a asound.state:

tc@box:~$ sudo mkdir -p /var/lib/alsa
tc@box:~$ sudo echo "var/lib/alsa" >> /opt/.filetool.lst
tc@box:~$ sudo alsactl store
tc@box:~$

Now the alsamixer settings are stored, but they are not restored on boot. I've added this command to the end of /opt/bootlocal.sh, but it didn't work:

Code: [Select]
alsactl restore
Starting this command manually after boot, does work, but not on boot.
So, I've redirectred the error output to a logfile, and this is the error that's produced during startup.

alsactl: load_state:1735: No soundcards found...

It seems like the soundcard is not present yet when the restore command is executed during boot.
Did something change in the boot-order? This used to work fine on 7.1 .
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6912
    • My Community Forum
Re: piCore-8.0beta1
« Reply #16 on: June 05, 2016, 01:40:05 PM »
It seems like the soundcard is not present yet when the restore command is executed during boot.
Did something change in the boot-order? This used to work fine on 7.1 .

No, 7.1 and 8.0 is using the same scripts.
Béla
Ham Radio callsign: HA5DI

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

Offline Paul_123

  • Sr. Member
  • ****
  • Posts: 397
Re: piCore-8.0beta1
« Reply #17 on: June 05, 2016, 06:41:18 PM »
are you sure that you have

dtparam=audio=on

in your boot config.
« Last Edit: June 05, 2016, 06:57:24 PM by Paul_123 »

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 176
Re: piCore-8.0beta1
« Reply #18 on: June 06, 2016, 03:07:53 AM »
No, I am using a USB souncard.

I've discovered that if I add a "sleep 1" before the restore command in the bootlocal.sh script, it works OK.

So I think the USB soundcard is not ready yet when the restore command is executed during boot.
I will have to think of way to check and wait until the USB soundcard is available.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline Paul_123

  • Sr. Member
  • ****
  • Posts: 397
Re: piCore-8.0beta1
« Reply #19 on: June 06, 2016, 05:39:15 AM »
No, I am using a USB souncard.

I've discovered that if I add a "sleep 1" before the restore command in the bootlocal.sh script, it works OK.

So I think the USB soundcard is not ready yet when the restore command is executed during boot.
I will have to think of way to check and wait until the USB soundcard is available.

Yes, USB gets detected rather late in the boot process.   It's really been evident on rpi2 and rpi3 and the later piCore releases, they boot very fast.  Should be able to process aplay -l through grep to see when a sound card is present.



Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6912
    • My Community Forum
Re: piCore-8.0beta1
« Reply #20 on: June 06, 2016, 06:27:45 AM »
Yes, USB gets detected rather late in the boot process.   It's really been evident on rpi2 and rpi3 and the later piCore releases, they boot very fast.  Should be able to process aplay -l through grep to see when a sound card is present.

You can read /proc/asound/cards file also to see available cards.
Béla
Ham Radio callsign: HA5DI

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

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 176
Re: piCore-8.0beta1
« Reply #21 on: June 06, 2016, 12:14:51 PM »
Thanks for the tips guys!

I've tried to use /proc/asound/cards, but it allready contained the soundcard during boot allthough it wasn't available.
The aplay-l trick worked! I've made statement that checked if the command was successfull.

But then I realized that I could do the same trick with "alsactl restore".  :)
So I ended up with this command, which seems to work pretty good:

Code: [Select]
for i in $(seq 1 15); do alsactl restore && break || sleep 0.1; done
It tries to execute the command for 15 times, and sleeps 0.1 second in between tries.
Normally it succeeds after 2 or 3 tries.

I've also got a version that adds some logging to a logfile:
Code: [Select]
for i in $(seq 1 15); do alsactl restore && break || sleep 0.1; echo "alsactl restore, #tries: $i" >> /tmp/log.txt; done
I think I've rebooted my raspberry pi for about a trillion times this evening while creating this...  ;) ;D

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

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 281
Re: piCore-8.0beta1
« Reply #22 on: June 06, 2016, 05:25:58 PM »
USB sound card?
add waitusb=5 to cmdline.txt

I need to wait for usb drives to get ready, maybe it's the same with usb sound cards?

I usually have to stick sleep times loops in bootsync.sh for the network to find ip address, date etc

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 5471
Re: piCore-8.0beta1
« Reply #23 on: June 06, 2016, 06:23:44 PM »
Hi gavinmc42
Quote
I usually have to stick sleep times loops in bootsync.sh for the network to find ip address, date etc
A loop like this will wait until the network is up:
Code: [Select]
SEC=60
while [ $SEC -gt 0 ] ; do
   ifconfig | grep -q "Bcast" && break || sleep 1
   echo -ne "Waiting for IP $((SEC--))  \r"     
done                                       
echo

Offline akram

  • WikiUser
  • *
  • Posts: 3
Re: piCore-8.0beta1
« Reply #24 on: June 06, 2016, 08:32:38 PM »
Hi Béla,

I have managed to boot, is there any way to get to GUI? I tried to download TC but server does not respond, getting an error.

I have pi3 model B, does any other version of picore with GUI support this model?

Kind regards

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6912
    • My Community Forum
Re: piCore-8.0beta1
« Reply #25 on: June 06, 2016, 09:25:04 PM »
Hi Béla,

I have managed to boot, is there any way to get to GUI? I tried to download TC but server does not respond, getting an error.

I have pi3 model B, does any other version of picore with GUI support this model?

Kind regards

Hi

piCore-7 supports pi3.

In piCore-8 you can try packages from 7.x most likely they work.
Béla
Ham Radio callsign: HA5DI

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

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 176
Re: piCore-8.0beta1
« Reply #26 on: June 08, 2016, 09:53:41 AM »
Hi Béla,


I've installed squeezelite using my tutorial, and I got it working now. I only had to change the Alsa installation, as mentioned above.
However, I did get these error messages whil installing bash:

tc@box:~$ tce-load -wi bash.tcz
bash.tcz.dep OK
Downloading: bash.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
bash.tcz             100% |*******************************************************************************************|   412k  0:00:00 ETA
bash.tcz: OK
cp: can't stat '/usr/local/share/bash/.bashrc': No such file or directory
cp: can't stat '/usr/local/share/bash/.bashrc': No such file or directory
cp: can't stat '/usr/local/share/bash/bashrc': No such file or directory
cp: can't stat '/usr/local/share/bash/.bashrc': No such file or directory
chown: /home/tc/.bashrc: No such file or directory
tc@box:~$


But bash seems to work fine, my squeezelite (bash sing) script works without problems.

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

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 6912
    • My Community Forum
Re: piCore-8.0beta1
« Reply #27 on: June 08, 2016, 10:13:18 PM »
Thanks will check
Béla
Ham Radio callsign: HA5DI

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

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 176
Re: piCore-8.0beta1
« Reply #28 on: June 10, 2016, 12:30:37 PM »
So I ended up with this command, which seems to work pretty good:

Code: [Select]
for i in $(seq 1 15); do alsactl restore && break || sleep 0.1; done
It tries to execute the command for 15 times, and sleeps 0.1 second in between tries.
Normally it succeeds after 2 or 3 tries.

I've tested a different Pi with a different USB soundcard. This soundcard took longer to become available, so I had to chang the 15 to 30, like this:

Code: [Select]
for i in $(seq 1 30); do alsactl restore && break || sleep 0.1; done
This means it tries for a maximum of 3 seconds before giving up. This soundcard took araound 20 tries, so 2 seconds.

my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline mbivol10

  • WikiUser
  • *
  • Posts: 14
Re: piCore-8.0beta1
« Reply #29 on: June 14, 2016, 12:08:59 PM »
Still no support for the 64 bit version? I get no video out with this os on the 3b. Can I help anyhow to make the 64 bit available too ? I really want it on my pi!