Trying to build tlv430

76 views
Skip to first unread message

paulandre...@gmail.com

unread,
Nov 3, 2016, 2:23:47 PM11/3/16
to BeagleBoard
Hi,
    I have been lurking about these boards asking a few questions about beaglebone. Off and on when I have time I am evaluating the beaglebone for a low latency audio application.


I am using the 4.4.20-ti-r44 build at the moment, in a previous post I have swapped using RPMsg for the older uio_pruss library which was more flexible for my needs. Thanks to a lot of help on the board I managed to get the PRUs loaded and running.


The next thing I want to try is to get the TLV320AIC3204 codec working with the beaglebone black. Looking at the forums there is a lot to do.


1) Build a kernel module driver, install on target machine under /lib/modules/(kernel name)/kernel/sound.soc.codecs

2) Look at the dts and disable hdmi support

3) Then start adding alsa support into the dts for pins, i2c config, links to alsa , etc.


Unfortunately I am stuck at 1 8-(. Being a newbie I am not quie sure what to do.


It looks like there is a driver for it:

KERNEL/sound/soc/codecs/tlv320aic32x4.c


The current kernel has support for snd-soc-tlv320aic31xx.ko, and snd-soc-tlv320aic32032x4.ko.  I want to add snd-soc-tlv320aic32x4.ko,


So I cloned the bb kernel.   git clone https://github.com/RobertCNelson/bb-kernel , and tried to build ./build_kernel   I  hoped I could run make menuconfig and enable it but it is not an option.


So some question if anyone can help.


1) There is no branch for 4.4.20-ti-r44 so I am a bit confused. It might be obvious to guys with experience why but I don;t understand, am I looking at the wrong repository. It looks like this repository is the main one for beaglebone.


2) So I went for the current release branch at 4.4 just to get started. Started the build and when the menu config came up there was no option to select tlv320aic32032x4. So I looked at the Kconfig , and makefile in the /sound.soc/codecs directory and the file exists, there is an option in the makefile to build if the config is selected. The KConfig looks like it is not selected. I tried to add an option in Kconfig and rebuild using ./build_kernel but it looks like it overwrites my Kconfig when it patches the bbb patch onto 4.4.


3) Can anyone help, Is there a way just to build the code without calling the patch update ? Also can I add the configuration option into the menu,


I know this is probably basic.

Thanks for any replies,

Paul

Robert Nelson

unread,
Nov 3, 2016, 2:58:24 PM11/3/16
to Beagle Board, paulandre...@gmail.com
4.4.20-ti-r44 was generated from:

https://github.com/RobertCNelson/ti-linux-kernel-dev/tree/ti-linux-4.4.y

but don't use it, as "old tags" can't be used in that repo, instead
grab yakbuild and follow the readme/recipe example

https://github.com/RobertCNelson/yakbuild

>
>
> 2) So I went for the current release branch at 4.4 just to get started.
> Started the build and when the menu config came up there was no option to
> select tlv320aic32032x4. So I looked at the Kconfig , and makefile in the
> /sound.soc/codecs directory and the file exists, there is an option in the
> makefile to build if the config is selected. The KConfig looks like it is
> not selected. I tried to add an option in Kconfig and rebuild using
> ./build_kernel but it looks like it overwrites my Kconfig when it patches
> the bbb patch onto 4.4.

if you make changes under ./KERNEL/

run:

./tools/rebuild.sh

>
>
> 3) Can anyone help, Is there a way just to build the code without calling
> the patch update ? Also can I add the configuration option into the menu,

Regards,


--
Robert Nelson
https://rcn-ee.com/

paulandre...@gmail.com

unread,
Nov 4, 2016, 12:44:04 PM11/4/16
to BeagleBoard, paulandre...@gmail.com

Thanks for the reply Robert. I can build the kernel fine. The trouble is when I try to run the rebuild script under tools I get:

/bin/sh: 0: Can't open /home/proserv/ti-processor-sdk-linux-am335x-evm-03.00.00.04/linux-devkit/yakbuild/tools/tools/host_det.sh

I checked the ownership of the scripts and files and it is proserv (my user)
drwxrwxrwx 2 proserv proserv  4096 Nov  4 13:17 deploy
-rwxrwxrwx 1 proserv proserv 13600 Nov  4 10:53 host_det.sh
-rwxrwxrwx 1 proserv proserv  9593 Nov  4 10:53 install_kernel.sh
-rwxrwxrwx 1 proserv proserv  4994 Nov  4 10:53 local_install.sh
-rwxrwxrwx 1 proserv proserv  4624 Nov  4 10:53 rebuild_deb.sh
-rwxrwxrwx 1 proserv proserv  7038 Nov  4 14:23 rebuild.sh

probably I am being stupid. Can't see what else is wrong. Would you have any ideas ?

paulandre...@gmail.com

unread,
Nov 4, 2016, 12:46:19 PM11/4/16
to BeagleBoard, paulandre...@gmail.com
PS also tried bash and dash as well as sh, same problem.

Robert Nelson

unread,
Nov 4, 2016, 1:57:14 PM11/4/16
to Beagle Board, paulandre...@gmail.com
On Fri, Nov 4, 2016 at 11:44 AM, <paulandre...@gmail.com> wrote:
>
> Thanks for the reply Robert. I can build the kernel fine. The trouble is
> when I try to run the rebuild script under tools I get:
>
> /bin/sh: 0: Can't open
> /home/proserv/ti-processor-sdk-linux-am335x-evm-03.00.00.04/linux-devkit/yakbuild/tools/tools/host_det.sh
>
> I checked the ownership of the scripts and files and it is proserv (my user)
> drwxrwxrwx 2 proserv proserv 4096 Nov 4 13:17 deploy
> -rwxrwxrwx 1 proserv proserv 13600 Nov 4 10:53 host_det.sh
> -rwxrwxrwx 1 proserv proserv 9593 Nov 4 10:53 install_kernel.sh
> -rwxrwxrwx 1 proserv proserv 4994 Nov 4 10:53 local_install.sh
> -rwxrwxrwx 1 proserv proserv 4624 Nov 4 10:53 rebuild_deb.sh
> -rwxrwxrwx 1 proserv proserv 7038 Nov 4 14:23 rebuild.sh
>
> probably I am being stupid. Can't see what else is wrong. Would you have any
> ideas ?
>

Not a clue..

So let's go over what the readme says:


git clone https://github.com/RobertCNelson/yakbuild
cd ./yakbuild/

cp recipe.sh.sample recipe.sh

change kernel_tag in the "recipe.sh" to "4.4.20-ti-r44"...

run:

./build_kernel.sh

....

paulandre...@gmail.com

unread,
Nov 4, 2016, 2:11:37 PM11/4/16
to BeagleBoard, paulandre...@gmail.com
Hi,
  The kernel build works fine, no problem there, I have the correct images build, rebuild_kernel.sh is ok.

 Then I have changed the Kconfig in /KERNEL/soc/codecs/ to add below to give an option to enable the tlv320aic32x4 driver through menu config.

'config SND_SOC_TLV320AIC32X4
    tristate "Texas Instruments TLV320AIC3x4 CODECs"
    depends on I2C
    select SND_SOC_TLV320AIC32x4'

I want to just rebuild the kernel now without calling git checkout to avoid overwriting my change. Sorry if this basic but it is not clear to me how I can rebuild the kernel without going through the git clone, and checkouts again.

So as suggested I try running /rebuild.sh in the tools directory and it says it can't open any of the other sh files in the directory. I tried dash and bash, I've checked the files are executable and all appears ok.

Cheers,
Paul

paulandre...@gmail.com

unread,
Nov 4, 2016, 2:12:59 PM11/4/16
to BeagleBoard, paulandre...@gmail.com
Oops sorry I mean build_kernel.sh worked fine.

Robert Nelson

unread,
Nov 4, 2016, 2:14:19 PM11/4/16
to Beagle Board, paulandre...@gmail.com
On Fri, Nov 4, 2016 at 1:11 PM, <paulandre...@gmail.com> wrote:
> Hi,
> The kernel build works fine, no problem there, I have the correct images
> build, rebuild_kernel.sh is ok.
>
> Then I have changed the Kconfig in /KERNEL/soc/codecs/ to add below to give
> an option to enable the tlv320aic32x4 driver through menu config.
>
> 'config SND_SOC_TLV320AIC32X4
> tristate "Texas Instruments TLV320AIC3x4 CODECs"
> depends on I2C
> select SND_SOC_TLV320AIC32x4'
>
> I want to just rebuild the kernel now without calling git checkout to avoid
> overwriting my change. Sorry if this basic but it is not clear to me how I
> can rebuild the kernel without going through the git clone, and checkouts
> again.
>
> So as suggested I try running /rebuild.sh in the tools directory and it says
> it can't open any of the other sh files in the directory. I tried dash and
> bash, I've checked the files are executable and all appears ok.

run as:
yakbuild$ ./tools/rebuild.sh

paulandre...@gmail.com

unread,
Nov 4, 2016, 2:14:53 PM11/4/16
to BeagleBoard
Helps also if I get the right sh in the tools directory... I meant rebuild.sh. It's been a long day....

William Hermans

unread,
Nov 4, 2016, 2:19:38 PM11/4/16
to beagl...@googlegroups.com, paulandre...@gmail.com
Paul,

Have you copied the exact error message you're getting on the cmd line and pasted it to us yet ? If so, I'm not seeing it . . .

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/318d46a4-ca05-47a5-9642-151b2d2d80b3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Paul McManus

unread,
Nov 4, 2016, 2:20:34 PM11/4/16
to beagl...@googlegroups.com
Thanks again, got it, understand now , it should be called from the top level directory. A bit slow .... 8-).

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/crS5n532gic/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages