Sunday 29 April 2018

Playing a sound alert

I found an interesting way to generate sound alerts after a task gets finished. You can install sox with which you can generate sounds. A simple command such as play -n synth 0.2 sin 440 can help generate a audio beep which can indicate a build done or some other alert.

In the above command -n specifies a null file i.e. do not generate a file, synth 0.2 tells how many seconds and sin 400 tells a sine way of 440 Hz.

 

AM33xx sysboot settings

AM33xx document is not very clear on the sysboot settings. Recently when working on it I had some trouble finding out where in the document the SYSBOOT[15:0] pins correspond to the LCD_DATA[51:0] inputs. It is in page 5033 of spruh73p documentation in chapter 26.1.6 Booting, 26.1.6.2 Device list and sub chapter 26.1.6.2.1 SYSBOOT CONFIGURATION.

To quote:

"SYSBOOT[15:0] terminals are respectively LCD_DATA[15:0] inputs, latched on the rising edge of PWRONRSTn."

Saturday 14 April 2018

Hitting partition limit in Beaglebone black Linux kernel

At work I was recently hit with the partition limit of 8 partitions. It was quite strange and debugging for hours with the kernel dmesg showing only 8 partitions being detected but lsblk and fdisk showing all the remaining partitions I was puzzled. Due the kernel not detecting more than 8 partitions udev would not create the device nodes for the undetected partitions. Narrowing down the problem to the kernel and wondering if it is a bug I did a google search for partition limit in beaglebone. It finally revealed the kernel config to be CONFIG_MMC_BLOCK_MINORS=8 which was limiting the partitions.

Reference to the original thread: https://groups.google.com/d/msg/beagleboard/IJpym7xOFBA/Cb7JQNS_6KcJ

Thanks to Robert C Nelson for helping with the problem and Ankur Tank for posting the problem in Google groups and Superuser.