How to build a kernel on a Parallela board

Forum about Parallella boot process, linux kernel, distros, SD-cards, etc.

Re: How to build a kernel on a Parallela board

Postby nickoppen » Tue May 27, 2014 2:00 am

Well, I don't know what happened last time. I suspect I skipped a step or two.

I took the whole process from the top and now it's good. Actually the sound is better than on my Windows box.

Thanks,

nick
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Re: How to build a kernel on a Parallela board

Postby shodruk » Tue May 27, 2014 4:40 am

Congratz!

nickoppen wrote:Actually the sound is better than on my Windows box.


Great! :D
Shodruky
shodruk
 
Posts: 464
Joined: Mon Apr 08, 2013 7:03 pm

Re: How to build a kernel on a Parallela board

Postby shodruk » Thu Jun 19, 2014 12:12 pm

I managed to use Sound Blaster X-Fi HD with my Parallella board.

http://us.creative.com/p/sound-blaster/ ... premium-hd

It supports 96kHz 24bit Hi-Fi audio on Linux!! :D

First I rebuild the Linux kernel with this configuration.

https://www.dropbox.com/s/ocwajrk6dyvhq ... g.14.06.09

How to build a kernel on a Parallela board
viewtopic.php?f=48&t=1230

---------Changes---------
Code: Select all
make mrproper

cp DOWNLOAD_DIRECTORY/dot.config.14.06.09 .config

(omit "make parallella_defconfig", "make menuconfig")

nano Makefile

---------Snip---------

ALSA configuration

nano ~/.asoundrc

(Note: If you get a permission error, try "sudo chown linaro:linaro ~/.asoundrc")

Code: Select all
defaults.ctl.card 1
defaults.pcm.card 1
defaults.timer.card 1

pcm.!default {
 type rate
 slave {
  pcm "hw:1"
  rate 96000
 }
 converter "samplerate"
}


To get the maximum audio quality, you should use (or create) native 96kHz WAV files.
(Samplerate converter degrades audio quality.)
Also, you (audiophiles) should use "aplay" instead of smplayer. software-volume also degrades audio quality.)
usage:

aplay audiofile.wav
Last edited by shodruk on Fri Jun 20, 2014 5:16 pm, edited 4 times in total.
Shodruky
shodruk
 
Posts: 464
Joined: Mon Apr 08, 2013 7:03 pm

Re: How to build a kernel on a Parallela board

Postby Transcendental » Thu Jun 19, 2014 2:55 pm

Here's the best and most carefully analytical article examining "Hi-Fi audio" that I've seen:
http://people.xiph.org/~xiphmont/demo/neil-young.html

shodruk wrote:I managed to use Sound Blaster X-Fi HD with my Parallella board.

http://us.creative.com/p/sound-blaster/ ... premium-hd

It supports 96kHz Hi-Fi audio on Linux!! :D
...
To get the maximum audio quality, you should use (or create) native 96kHz WAV files.
(Samplerate converter degrades audio quality.)
User avatar
Transcendental
 
Posts: 49
Joined: Mon Dec 17, 2012 1:41 am

Re: How to build a kernel on a Parallela board

Postby over9000 » Thu Jun 19, 2014 3:09 pm

If you've got more than one Parallella, you can also try using distcc to distribute the compilation.


To start with you need to set up distcc, ssh and passwordless-login to the remote machines. Log on as a regular user on all machines that will be in the cluster and run:

Code: Select all
$ sudo apt-get install distcc
# when prompted, tell it not to start up a distcc server at startup (it's a possible security risk and we'll use ssh anyway)
$ sudo apt-get install ssh-server     # virtual package; use openssh-server if that doesn't work
$ ssh-keygen -t dsa
# (just hit enter to acccept all defaults)
$ touch ~/.ssh/authorized_keys


Next, copy the public key from the master machine to all the worker machines (replace $USER with the remote username and $HOST1 ...with actual hostnames):

Code: Select all
# log into master host (where the kernel sources are) first
$ for worker in $HOST1 ... ; do cat ~/.ssh/id_dsa.pub | ssh "$USER@$worker" 'tee --append .ssh/authorized_keys'  ; done
# (answer 'yes' to any questions about unknown hosts, and enter password when prompted)


Then change the 'make -j 2...' line from shodruk's instructions in the first post to tell it to use distcc:

Code: Select all
# replace ellipsis (...) below with any more worker hosts, following same format as the first user@host pattern:
$ export DISTCC_HOSTS="--randomize localhost/2 $USER@$HOST1/2,lzo ..."
# count up all the numbers after / in the previous line. This is the number of threads to run.
# Above example with localhost and 1 other host has /2 + /2 == 4 threads, so we use -j 4:
$ make -j 4 CC=distcc LOADADDR=0x8000 uImage


And that should be it. The power of all your parallella boards contributing to making the kernel!

If you have other ARM machines that have a similar architecture (armv7) and the versions of gcc matches up to what's on your master node, you can even use those to help with the compile, too. Likewise, if you have a cross-compiler set up on a PC or other machine, it should be possible to follow these steps and use PC + Parallella (or whatever combination you have) together to speed up the build.
over9000
 
Posts: 98
Joined: Tue Aug 06, 2013 1:49 am

Re: How to build a kernel on a Parallela board

Postby shodruk » Thu Jun 19, 2014 5:47 pm

Transcendental,

Thanks! I've read that. But audiophiles don't think so. (e.g. HD audio reduces jitter) It's like a ... review of art. :lol:

over9000,

Great! That's easy and useful.
Shodruky
shodruk
 
Posts: 464
Joined: Mon Apr 08, 2013 7:03 pm

Re: How to build a kernel on a Parallela board

Postby frank_buss » Fri Jun 20, 2014 1:18 am

shodruk, thanks for this manual, worked for me. But you should add "make modules" and "make modules_install" at the end, because there are some modules enabled in the default Parallella kernel configuration, and the "make modules_install" target creates the file "/lib/modules/3.12.0-parallella/build", which makes it easy to write your own loadable kernel modules, for example as explained here: http://www.thegeekstuff.com/2013/07/wri ... el-module/
frank_buss
 
Posts: 18
Joined: Wed Jun 11, 2014 1:50 pm

Re: How to build a kernel on a Parallela board

Postby shodruk » Fri Jun 20, 2014 3:28 pm

frank_buss wrote:shodruk, thanks for this manual, worked for me. But you should add "make modules" and "make modules_install" at the end, because there are some modules enabled in the default Parallella kernel configuration, and the "make modules_install" target creates the file "/lib/modules/3.12.0-parallella/build", which makes it easy to write your own loadable kernel modules, for example as explained here: http://www.thegeekstuff.com/2013/07/wri ... el-module/


Thanks frank, I'll try that.
Shodruky
shodruk
 
Posts: 464
Joined: Mon Apr 08, 2013 7:03 pm

Re: How to build a kernel on a Parallela board

Postby theover » Fri Jun 20, 2014 11:07 pm

I'm grateful for the easy to follow kernel recompile description, I just played my first audio from the Parallella over my self-made USB AD/DA convertor, from the network, and with a sample conversion. Now I'll look into Jack.

T.
theover
 
Posts: 181
Joined: Mon Dec 17, 2012 4:50 pm

Re: How to build a kernel on a Parallela board

Postby shodruk » Sat Jun 21, 2014 2:31 pm

theover wrote:I'm grateful for the easy to follow kernel recompile description, I just played my first audio from the Parallella over my self-made USB AD/DA convertor, from the network, and with a sample conversion. Now I'll look into Jack.

T.


Great! I'm interested in the USB AD/DA convertor.
Shodruky
shodruk
 
Posts: 464
Joined: Mon Apr 08, 2013 7:03 pm

PreviousNext

Return to Linux/U-Boot

Who is online

Users browsing this forum: No registered users and 4 guests

cron