<?sphp $this->text('pagetitle') ?>
 
Home of the Squeezebox™ & Transporter® network music players.

Custom.baby.version

From SqueezeboxWiki

Revision as of 06:44, 26 October 2010 by Bklaas (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

It is possible to force Squeezebox Server (SBS) to push a specific build of Squeezebox Radio firmware out to radios that connect to it by using specially named 'custom.baby.*' files.

WARNING: load custom radio firmware at your own risk. While an unlikely scenario, it is possible to "brick" your radio by loading a corrupted or buggy-because-not-formally-qualified firmware. If you get in a situation where the custom firmware you've attempted to install won't load, you may be able to recover it by booting to the previous firmware. This is done by continually holding down the rew key during boot.

Loading Custom Radio Firmware

  • Begin by obtaining a firmware for the radio that you want to load. These are typically named in the form baby_X.Y.Z_rXXXX.bin, where X.Y.Z is the software branch, and rXXXX is the subversion revision. For example, baby_7.6.0_r9155.bin.
  • Rename this file custom.baby.bin
  • This bin file is actually a zip file in disguise. Inside the zip are a few files
   -rw-r--r--  1 bklaas bklaas 2.8M 2010-10-07 01:48 zImage
   -rw-r--r--  1 bklaas bklaas  13M 2010-10-07 01:48 root.cramfs
   -rw-r--r--  1 bklaas bklaas   62 2010-10-07 01:48 jive.version
   -rw-r--r--  1 bklaas bklaas   72 2010-10-07 01:48 board.version
   -rw-r--r--  1 bklaas bklaas   87 2010-10-07 01:48 upgrade.md5
  • The important file for this exercise is jive.version. This file needs to be extracted from the archive and renamed custom.baby.version (please note: while the file in the archive is called jive.version, it is important to name the extracted file custom.baby.version.
    • Depending on OS, there are a variety of ways to extract this file from the zip archive.
      • In windows, a utility like WinZip can be used. Modern versions of Windows can do Zip archive inspection natively, though you will have to convince windows explorer that your .bin file is actually a .zip file.
      • Mac and Linux are very simple from the command line (see also scripting instructions below). This command extracts the file jive.version from the archive custom.baby.bin and prints it to STDOUT. This output is redirected to the file custom.baby.version
   zip -p custom.baby.bin jive.version > custom.baby.version
  • The two files custom.baby.bin and custom.baby.version need to be placed in the Cache/Updates folder of the SBS installation. The default location of this folder differs by OS.
The cache folder can be in a variety of locations depending on your OS. Typically at \\...\SqueezeCenter\Cache folder
Linux = /var/cache/slimserver/
Ubuntu = /var/lib/squeezecenter/cache
OSX 10.x.x = /Library/Caches/SqueezeCenter
Windows 7 (7.5/7.6) = C:\ProgramData\Squeezebox\Cache\updates
Windows XP (7.4/7.5)= C:\Documents and Settings\All Users\Application Data\Squeezebox\Cache
Windows Vista = ..\ProgramData\SqueezeCenter\Cache\
Windows Server 2000 = ..\Documents and Settings\All Users\Application Data\SqueezeCenter\Cache
  • Restart SBS to push this custom firmware update notification to any Radios connected to this server.
  • Note: When using this method, no version data will be displayed on the Radio, as there is no version info to parse from the filename custom.baby.bin.
  • When done using the custom firmware, remove the custom.baby.* files from the Cache/Updates folder. SBS will NOT offer new firmware updates to the Radio until these are removed.

Scripting the process (Linux and Mac only)

If you have the good fortune to not be saddled with Windows as your OS, this process can be easily automated with a shell script. These are two scripts I frequently use to speed up the repetitive process of pushing a particular radio firmware to radios in my network for testing.

These scripts will need to be modified to suit your environment's requirements. Use at your own risk, but I would go nuts not having these :)

  • Local script, used when the downloaded firmware is resident on the machine where the SBS resides.
   #!/bin/bash
   
   CACHE='Cache/updates' # rename to the resolved path of where your Cache/updates/ folder is
   SBSPATH='/home/bklaas/squeezecenter/7.6/trunk/server' # change to correct path for your installed SBS
   
   if  [ -e $1 ]; then
       echo "Copying baby bin file to cache"
       cp $1 $CACHE/custom.baby.bin
       echo "Unzipping version file and killing server"
       unzip -p $CACHE/custom.baby.bin jive.version > $CACHE/custom.baby.version && pkill slimserver.pl
       echo "Sleeping 8 seconds for graceful shutdown..."
       sleep 8 # this is really only necessary for MySQL-based installs that need to shutdown gracefully, as SQLite-based SBS (default in 7.6) die immediately
       echo 'Restarting SBS'
       cd $SBSPATH && ./slimserver.pl --daemon &
   else
       echo "error: $1 not found"
   fi
  • SSH/SCP-driven script, used when the downloaded firmware is not resident on the machine where the SBS resides (note: assumes that passwordless authentication with ssh keys has been setup).
   #!/bin/bash
   
   USER='someUser' # rename to the correct username
   SERVER='192.168.1.2' # rename to the location of your SBS
   CACHE='Cache/updates' # rename to the resolved path of where your Cache/updates/ folder is
   SBSPATH='/home/bklaas/squeezecenter/7.6/trunk/server' # change to correct path for your installed SBS
   
   if  [ -e $1 ]; then
       echo "Copying baby bin file to server"
       scp $1 $USER@$SERVER:$CACHE/custom.baby.bin
       echo "Unzipping version file remotely and killing server"
       ssh $USER@$SERVER "unzip -p $CACHE/custom.baby.bin jive.version > $CACHE/custom.baby.version && pkill slimserver.pl"
       echo "Sleeping 8 seconds for graceful shutdown..."
       sleep 8 # this is really only necessary for MySQL-based installs that need to shutdown gracefully, as SQLite-based SBS (default in 7.6) die immediately
       echo 'Restarting SBS'
       ssh $USER@$SERVER "cd $SBSPATH && ./slimserver.pl --daemon &"
   else
       echo "error: $1 not found"
   fi