The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,733 other followers

Archive for April 5th, 2017

OpenSuSE Tumbleweed on Raspberry Pi: getting `vcgencmd version` to work to see which GPU firmware you have

Posted by jpluimers on 2017/04/05

When you search for raspberry pi firmware version check

Installing and running rpi-update will – besides updating the GPU firmware – also install vcgencmd, I got this result:

statler:~ # LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vc/lib/
statler:~ # export LD_LIBRARY_PATH
statler:~ # /opt/vc/bin/vcgencmd version
Jul 15 2016 17:50:10 
Copyright (c) 2012 Broadcom
version efa728fef77ea14ceb1500caf0146395fa282a0f (clean) (release)

But I wanted to be able to run vcgencmd before installing updates.

openmamba indicates it’s part of their raspberrypi-utils package with sources in the raspberrypi-userland package tracing back to git://github.com/raspberrypi/userland.git which is at https://github.com/raspberrypi/userland.

So I had two choices: compile https://github.com/raspberrypi/userland or find the binaries that rpi-update installs and are already runnable. I went for the second first by digging in https://github.com/Hexxeh/rpi-update/blob/master/rpi-update which on one of the first lines points to https://github.com/Hexxeh/rpi-firmware where the binaries are stored under https://github.com/Hexxeh/rpi-firmware/tree/master/vc/softfp/opt/vc.

The logic for copying the files is in the update_vc_libs function. The calling do_update function updates a lot more, including the firmware. So I wrote a quick pull request to just download the userland binaries:

Feature SKIP_FIRMWARE for #220: forces SKIP_KERNEL=1 and also skip the kernel.img files and the kernel modules: This effectively only installs the userland and SDK.

Source: #220 feature `SKIP_FIRMWARE` by jpluimers · Pull Request #221 · Hexxeh/rpi-update

Hopefully it gets merged in. When not, then you can always take a look at the commit: #220 feature SKIP_FIRMWARE · jpluimers/rpi-update@5a2ec0b

Run these commands to get going:

cd /root/bin
wget https://raw.githubusercontent.com/jpluimers/rpi-update/5a2ec0bc552436d58127cc20e3791cb5b90fd5ba/rpi-update
chmod +x rpi-update
SKIP_FIRMWARE=1 UPDATE_SELF=0 ./rpi-update

You should see this when updating:

 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** We're running for the first time
 *** Backing up files (this will take a few minutes)
 *** Remove old firmware backup
 *** As requested, not updating firmware and kernel modules
This update bumps to rpi-4.4.y linux tree
Be aware there could be compatibility issues with some drivers
Discussion here:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=144087
##############################################################
 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168    0   168    0     0    361      0 --:--:-- --:--:-- --:--:--   362
100 51.2M  100 51.2M    0     0  1246k      0  0:00:42  0:00:42 --:--:-- 1446k
 *** As requested, not updating firmware and kernel
 *** As requested, not updating firmware and kernel modules
 *** Updating VideoCore libraries
 *** Using HardFP libraries
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to 818a860cf690d64c62d3227ad9c36d5867a671c2
 *** A reboot is needed to activate the new firmware

And the final goal of checking the firmware version now works:

# LD_LIBRARY_PATH=/opt/vc/lib /opt/vc/bin/vcgencmd version
Jul 15 2016 17:50:10 
Copyright (c) 2012 Broadcom
version efa728fef77ea14ceb1500caf0146395fa282a0f (clean) (release)

–jeroen

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

Recursively convert WMA files to MP3 using ffmeg on a Mac OS X bash shell

Posted by jpluimers on 2017/04/05

A friend of mine made the mistake to capture some CDs using WMA files and throwing away the CDs. His old Nokia could play them, but not his new iOS and Android devices.

ffmeg and bash to the rescue:

find . -iname "*.wma" -execdir bash -c 'NAME="{}" && ffmpeg -y -i "$NAME" -ab 192k "${NAME/.wma/.mp3}" -map_metadata 0:s:0 && rm "$NAME"' \;

Tricks used:

–jeroen

Source:

via: command line – How to use Ffmpeg to convert wma to mp3 recursively, importing from txt file? – Ask Ubuntu

Posted in *nix, *nix-tools, Audio, bash, bash, Development, Power User, Scripting, Software Development | Leave a Comment »

 
%d bloggers like this: