The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

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

    Join 1,862 other subscribers

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, Linux, openSuSE, Raspberry Pi, SuSE Linux, Tumbleweed | 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:

Read the rest of this entry »

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

OpenSuSE Tumbleweed on Raspberry Pi: using Hexxeh/rpi-update to update the firmware

Posted by jpluimers on 2017/04/04

https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update

The above is suggested by Hexxeh/rpi-update: An easier way to update the firmware of your Raspberry Pi

This is what I did  on my OpenSuSE Tumbleweed powered Raspberry Pi devices:

statler:~ # cd bin
statler:~/bin # wget https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update 
--2016-08-30 13:04:38--  https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.36.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.36.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12022 (12K) [text/plain]
Saving to: ‘rpi-update’

rpi-update          100%[===================>]  11.74K  --.-KB/s    in 0.002s  

2016-08-30 13:04:39 (6.36 MB/s) - ‘rpi-update’ saved [12022/12022]

statler:~/bin # ls -al
total 20
drwxr-xr-x 2 root root  4096 Aug 30 13:04 .
drwx------ 4 root root  4096 Aug 30 13:04 ..
-rw-r--r-- 1 root root 12022 Aug 30 13:04 rpi-update
statler:~/bin # chmod 755 rpi-update 
statler:~/bin # ./rpi-update 
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
 *** Relaunching after update
 *** 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)
 *** Backing up firmware
 *** Backing up modules 4.1.19-1-rpi2
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    382      0 --:--:-- --:--:-- --:--:--   382
100 51.2M  100 51.2M    0     0  1511k      0  0:00:34  0:00:34 --:--:-- 1298k
 *** Updating firmware
 *** Updating kernel modules
 *** depmod 4.4.19+
 *** depmod 4.4.19-v7+
 *** 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
statler:~/bin # reboot

Then on the console:

U-Boot 2016.07 (Aug 12 2016 - 14:07:49 +0000)

DRAM:  880 MiB
RPI 2 Model B (0xa21041)
MMC:   bcm2835_sdhci: 0
reading uboot.env

** Unable to read "uboot.env" from mmc0:1 **
Using default environment

In:    serial
Out:   lcd
Err:   lcd
Net:   Net Initialization Skipped
No ethernet found.
starting USB...
USB0:   Core Release: 2.80a
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 1 Ethernet Device(s) found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Scanning mmc 0:2...
Found U-Boot script /boot.scr
2781 bytes read in 50 ms (53.7 KiB/s)
## Executing script at 02000000
switch to partitions #0, OK
mmc0 is current device
5352616 bytes read in 1003 ms (5.1 MiB/s)
6088968 bytes read in 1010 ms (5.7 MiB/s)
14226 bytes read in 138 ms (100.6 KiB/s)
Kernel image @ 0x1000000 [ 0x000000 - 0x51aca8 ]
## Flattened Device Tree blob at 00000100
   Booting using the fdt blob at 0x000100
   Using Device Tree in place at 00000100, end 00006891

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Welcome to openSUSE Tumbleweed 20160828 - Kernel 4.1.19-1-rpi2 (ttyAMA0).


statler login: 
...
statler:~ # /opt/vc/bin/vcgencmd version
/opt/vc/bin/vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory

statler:~ # locate libvchiq_arm.so
-bash: locate: command not found

statler:~ # zypper install findutils-locate
....

statler:~ # locate libvchiq_arm.so
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

statler:~ # /usr/bin/updatedb
statler:~ #  locate libvchiq_arm.so
/opt/vc/lib/libvchiq_arm.so

–jeroen

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

7zip: compress from the command-line; a few notes and a small batch file

Posted by jpluimers on 2017/04/04

I wanted to compress a few files from the current directory in a zip file using the 7z.exe command-line version of 7zip.

The trick is about finding where 7z.exe is as the directory containing 7z.exe is not in the Windows PATH.

Notes:

setlocal
call SortDateTime.bat
echo %SortDateTime% %SortDate%-%SortTime%

for /f "usebackq tokens=2* delims= " %%c in (`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip" /v Path`) do (
  set sevenzExe="%%d7z.exe"
)
endlocal & if exist %sevenzExe% %sevenzExe% a -tzip _my-build.%SortDate%-%SortTime%.zip MyServer.exe MyServer.map MyClient.exe MyClient.map

pause

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development | Leave a Comment »

James Lewis – comprehensive AA battery tests sheet…  Some surprises in there…

Posted by jpluimers on 2017/04/03

A while ago, I bumped into

Almost completed updating my AA battery tests sheet…  Some surprises in there if you’re still buying Alkaline AA’s…I’ve included some that I have a… – James Lewis – Google+

The list is at https://docs.google.com/spreadsheets/d/1HOV0JyhF5J6Cd3PmRCDg5eY8ytabSIEidQaJ_ryusXI/edit and has since then be updated.

One of my surprises is that most of the NiMh batteries have larger capacities can virtually all of the Alkaline ones.

–jeroen

 

Posted in LifeHacker, Power User | Leave a Comment »

OS X – the versions and their names – as I always forget them

Posted by jpluimers on 2017/04/03

I always forget which OS X versions there are and which names they use.

So via: OS X – Wikipedia, the free encyclopedia, I made this list where the first item points to the table in the above article and each subsequent item to the individual article on the version. I tried to find EOL dates, but that’s hard despite the overview at Apple security updates – Apple Support:

None of this would be noteworthy if Apple, like Microsoft and a host of other major software vendors, clearly spelled out its support policies. But Apple doesn’t, leaving users to guess about when their operating systems will fall off support. | Computerworld

–jeroen

PS: EOL dates are as of 20160403.

Posted in Apple, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, OS X 10.10 Yosemite, OS X 10.11 El Capitan, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | 1 Comment »

Please Help Us Track Down Apple II Collections « ASCII by Jason Scott

Posted by jpluimers on 2017/04/03

Conditions are very, very good right now for easy, top-quality, final ingestion of original commercial Apple II Software and if you know people sitting on a pile of it or even if you have a small handful of boxes, please get in touch with me to arrange the disks to be imaged. apple@textfiles.com.

For example, piles and piles of educational software has returned from potential oblivion, because it’s about the preservation, not the title. Wonderfully done works are being brought back to life and are playable on the Internet Archive.

In other words: if you have or know someone who has disks with original, uncracked software that cannot be copied easily, let the team at the WayBack machine know as they have the resources that can help preserve that software.

–jeroen

Source: [WayBackPlease Help Us Track Down Apple II Collections « ASCII by Jason Scott

Posted in //e, 6502, Apple, Apple ][, History, Power User | Leave a Comment »

Go home GitHub, you’re drunk.

Posted by jpluimers on 2017/04/01

Go home GitHub, you’re drunk. – Jeroen Wiert Pluimers – Google+

Source: Go home GitHub, you’re drunk. – CodeProject – Google+

–jeroen

 

Posted in Development, DVCS - Distributed Version Control, git, GitHub, Software Development, Source Code Management | Leave a Comment »

O Rly Software Books – Album on Imgur

Posted by jpluimers on 2017/04/01

Still sooo funny many O Rly fake book covers. Here’s just one of them:

http://imgur.com/gallery/jXAza

–jeroen

Posted in Fun | Leave a Comment »

Offline – YouTube

Posted by jpluimers on 2017/04/01

Posted in Fun | Leave a Comment »